Forum Discussion
NandiniNK
13 years agoCommunity Member
Help with javascript - Passing score to LMS
HI
I have developed a course having 2 quiz and a result slide. One of the quiz is not developed with the built in storyline quiz template, so I cannot link it up to the result slide. So I have ad...
RickBlunt
12 years agoCommunity Member
Try this:
/*Get player to reference*/
var player = GetPlayer();
/*get LMS API*/
var lmsAPI = parent;
/*set score; the first number is the score*/
lmsAPI.SetScore(player.GetVar("hazards"), 100, 70);
/*set status; possible values:"completed","incomplete", "failed","passed"*/
if (player.GetVar("hazards")>=70)
SetStatus("passed");
else
SetStatus("failed");