For my second test, I've added SCORM2004_GetStudentName() along with my previous code assigned them to a variable and checked for null which I I thought should be working (but didn't) since all of the js files are in the LMS.
So far this is my code but it does not work for every SCORM version. I uploaded my course through SCORM Cloud.
var player = GetPlayer();
var tempS2004 ="";
var tempS1 ="";
var suspendData =SCORM2004_GetDataChunk();
tempS1 = SCORM_GetStudentName();
tempS2004 = SCORM2004_GetStudentName();
tempA = AICC_GetStudentName();
alert(tempS1+" "+tempS2004+" "+tempA);
var username= player.GetVar("userName");
Any help would be very much appreciated.