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...
VijayPaturkar-f
6 years agoCommunity Member
Below script works perfectly:
Here, I am translating the points accumulated in the user variable "TotalScore". Below JavaScript is inserted in the "Results" slide in Articulate Storyline. Remove the default Submit results trigger, and then insert below JavaScript.
--------------------------------------------------------------
var myscore = 0;
var player = GetPlayer();
var ptScore = player.GetVar("TotalScore");
var maxPoints = 330;
myscore = 100*ptScore/maxPoints;
SCORM2004_SetScore(myscore, 100, 10);
SCORM2004_CommitData();
--------------------------------------------------------------