HTML5 / Javascript for getting details from the LMS

Hi,

Sorry if this has been answered before, I couldn't find anything on it...

We quite often use the bits of javascript to get info from the LMS and set to variables.  However, we've just noticed that if we publish as HTML5 only, it doesn't work. Only if we use Flash.

Please excuse my lack of technical know-how here, but is this something that doesn't work in HTML 5? 

Or is it the code used? (hopefully)

e.g.

var player = GetPlayer();
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
player.SetVar("name", newName);

or:

var lmsAPI = parent;
var player = GetPlayer();
var userName = lmsAPI.SCORM2004_CallGetValue("cmi.learner_id");
player.SetVar("id", userName);

etc.

Thanks,
Laura

 

 

3 Replies