Forum Discussion
Getting student name from the LMS and using it in Articulate
Any chance I can call on anyone to help me identify how I get similar functionality in Litmos LMS publishing as SCORM 1.2 - beyond the learner name, I'd like to collect another profile attribute as well... I'm using:
var player = GetPlayer();
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var LMSName = array[1] + ' ' + array[0];
player.SetVar("name", LMSName);
This successfully writes the learner's first and last name to the eLearning displayed from Litmos.
What I'd like to get now is a custom field from the learner's profile in Litmos. According to our admin, this particular field is called "CustomField2".