Javascript stopped working

Apr 15, 2013

Hi all

I have used this javascript in previous courses to get the student name and ID from the LMS. Those courses still work.

Now I am doing a new course and the code doesnt work at all. Did something change in the last update?

I have checked the API and get the correct responses from there LMSGetValue("cmi.core.student_name")

Anybody got any clues?

var player = GetPlayer();
var myName  = lmsAPI.GetStudentName();
var array  = myName.split(',');
var FullName = array[1] + '  ' + array[0];
var FirstName = array[1];
var LastName = array[0];
player.SetVar("FullName", FullName);
player.SetVar("FirstName", FirstName);
player.SetVar("LastName", LastName);
var UserName = lmsAPI.GetStudentID();

Going Nuts

2 Replies

This discussion is closed. You can start a new discussion or contact Articulate Support.