Forum Discussion
LewisEigen
8 years agoCommunity Member
Getting student name from the LMS and using it in Articulate
In the LMS we are about to use, we can get the student name since the SCORM runtime variable for it is "cmi.core.student_name". However, how do I get it as a variable in Articulate at run time?
KevinHayes
7 years agoCommunity Member
I've been trying to use this code on SCORM Cloud but it isn't working for me:
var player = GetPlayer();
function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;
// all done if no parent
else if (win.parent == win) return null;
// climb up to parent window & look there
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
player.SetVar("newName", newName);
Is it because SCORM cloud stores the name under a variable name other than StudentID?
Has anyone managed to get this to retrieve the learner ID from SCORM cloud?