Manually setting cmi.score.min and cmi.score.max in LMS?

_
Community Member Posts: 82 ☆ Roadie ☆
Hi Everyone,
Wondering if anyone has any experience in manually setting LMS variables from within Lectora?
I'm deploying an assessment module to Brightspace (Desire2Learn) LMS - the overall learner score (cmi.score.raw) is being successfully communicated to the LMS, however I also need to write back the cmi.score.min and cmi.score.max variables for the score to be correctly stored in the LMS's 'Gradebook'.
Is it possible to manually set these values within Lectora so they're written to the LMS upon completion of the assessment?
I suspect this can be done with a Javascript call or HTML extension but I don't have the faintest idea where to start!
Any clues? Thanks!
Cam
Wondering if anyone has any experience in manually setting LMS variables from within Lectora?
I'm deploying an assessment module to Brightspace (Desire2Learn) LMS - the overall learner score (cmi.score.raw) is being successfully communicated to the LMS, however I also need to write back the cmi.score.min and cmi.score.max variables for the score to be correctly stored in the LMS's 'Gradebook'.
Is it possible to manually set these values within Lectora so they're written to the LMS upon completion of the assessment?
I suspect this can be done with a Javascript call or HTML extension but I don't have the faintest idea where to start!
Any clues? Thanks!
Cam
Comments
-
Figured it out - I hardcoded the values into trivantis-cookies.js in the SCORM package:
if( this.aiccgroup ) { LMSSetValue( this.name, lmsVal ) if( this.name == 'cmi.score.raw' ){ var scaled = this.value / 100 LMSSetValue( 'cmi.score.scaled', scaled ) LMSSetValue( 'cmi.score.min', 0 ) LMSSetValue( 'cmi.score.max', 100 ) LMSCommit( "" ); }
Probably not the most elegant solution but it does work! -
-
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. -
<span class="bbp-user-nicename"><span class="handle-sign">@</span>ivancaesbroeck1298</span> Sorry for the lack of reply - I didn't see the notification until just now!
Glad you figured it out. I can't even remember where I was trying to deploy this course or why I needed to use SCORM 2004.
Categories
- 35.8K All Categories
- 108 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 5 The Training Arcade®
- 5 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products