Pulling cmi.interaction values

Apr 30, 2019



I need to pull this cmi.completion_status from the LMS and display it on storyline. I know  that we need to use JS to do this but can you guide me the right codes? 

Here is my sample codes:

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 player = GetPlayer();
var lmsAPI = findLMSAPI(this);
var myName = lmsAPI.GetStudentName();
var newID = lmsAPI.GetStudentID();
var compSYS = lmsAPI.LMSGetVar("cmi.completion_status");
player.SetVar("newName", myName);
player.SetVar("newID", newID);
player.SetVar("dialog", compSYS );


Please help.

Thank you very much,




1 Reply

This discussion is closed. You can start a new discussion or contact Articulate Support.