Explore the community Forums Lectora LMS Integration Manually setting cmi.score.min and cmi.score.max in LMS? Reply To: Manually setting cmi.score.min and cmi.score.max in LMS?

#429502 Score: 0
Profile photo of Indra Van Caesbroeck
Indra Van Caesbroeck
curious george
wise owl
1 pt

Ok never mind, trial and error got me figuring it out.

For those coming across this post:

First of all, this concerns SCORM 2004 packages!! Not 1.2. See more information here: https://support.scorm.com/hc/en-us/articles/206166466-cmi-score-raw-whole-numbers-

Secondly, I use this technique for the following situation: I have a course, with questions that are not part of a test and are not graded as such. All I do is use a button right at the end of the module to 1) set the course to passed, 2) to completion, 3) to tell the LMS “Give users 100(%)” and 4) to exit the course.

Thirdly, because of that I want to modify the code to reflect a minimum score of 0, and a maximum score of 100. You can change this to reflect whatever it is that you need, but be aware that you might need to edit your cmi.raw.score as well (mine is 100). I have not tried this myself, though.

In publishing to Lectora SCORM 2004 (3rd edition) you need to edit the trivantis-cookie.js file in your zipped package (unzip first, edit, and then rezip).

Find the following code in your original file (see image ‘trivantis cookie_original file’):

if (A.aiccgroup){LMSSetValue(A.name,C);if (A.name=='cmi.score.raw'){var D=A.value/100;LMSSetValue('cmi.score.scaled',D);LMSCommit("");}

Now modify it to (see image ‘trivantis cookie_edited file’):

if (A.aiccgroup){LMSSetValue(A.name,C);if (A.name=='cmi.score.raw'){var D=A.value/100;LMSSetValue('cmi.score.scaled',D);LMSSetValue('cmi.score.min',0);LMSSetValue('cmi.score.max',100);LMSCommit("");}

And that’s what worked for me!

See image ‘scorm cloud_registration state’. Here you see cmi.min.score and cmi.max.score filled in just as I wanted them to be.