Forum Discussion
LuisGomez-bb5a4
4 years agoCommunity Member
Register in an LMS the highest score of 2 possible attempts
Hello, I have a question, i need to register in an LMS the highest score of 2 possible attempts of a quiz, but I have not been able to do it, I only register the last score obtained, can you help me...
ScottWiley1
4 years agoCommunity Member
Sounds like you may need to utilize some custom variables to hold your scores, instead of the built-in quiz functionality.
Then you could apply a JavaScript trigger to check/compare the two and send the results to your LMS.
FYI - there are slightly different JS calls depending on whether you publish to SCORM 1.2 vs SCORM 2004.
Example SCORM 1.2
//get LMS API
var lmsAPI = parent;
//set score; the first number is the score
//lmsApI.SetScore(yourscore, Max score, Min score);
lmsAPI.SetScore(90, 100, 0);
//set status; possible values: "completed", "incomplete", "failed", "passed"
lmsApI.SetStatus("completed");
Example SCORM 2004
// get LMS API
var lmsAPI = parent;
// set score; the first number is the score
// lmsAPI.SetPointBasedScore(intScore, maxScore, intMinScore);
lmsAPI.SetPointBasedScore(100, 100, 0);
// set passed/completed
lmsAPI.SCORM2004_SetPassed();
lmsAPI.SCORM2004_SetCompleted();