Forum Discussion
SasikumarMuruga
4 months agoCommunity Member
Get the Learner Name from Saba Cloud
Hi, We are using Saba Cloud and I am trying to get the Student Name from SCORM package using SL360 but I am not able to get that information. Here is the code I am using it
var player = GetPlayer(...
SasikumarMuruga
4 months agoCommunity Member
I got the results using the below code
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 name=lmsAPI.SCORM_GetStudentName();
var nameArray=name.split(',');
var firstName=nameArray[1];
var lastName=nameArray[0];
player.SetVar('first_name',firstName);
Thank You So much!