Forum Discussion
AdamTrosper
8 years agoCommunity Member
lmsAPI Functionality in HTML5 Output
Hey all,
I've been searching through the forums and haven't been able to find anything solid. I'm using Storyline 360, outputting to both HTML5 and Flash to cover my bases, since the audience doe...
ilanaDubovi
8 years agoCommunity Member
Hello all,
Matthew send me a code update for SetScore issue which works perfect for sending score from HTML5 to LMS:
var player = GetPlayer();
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);
lmsAPI.SetScore(player.GetVar( "zScores"), 100, 0);
if (player.GetVar(" 14543GameScore")>= player.GetVar(" 14543PassingPercentage"))
{
SetStatus("passed");
} else {
SetStatus("failed");
}
Thank you Matthew, you are a life saver!
Ilana