Forum Discussion
Scorm keeps reporting 100% in Canvas LMS
And just to clarify - all of the check boxes, etc are individual Quiz Questions?
Is this a project you can share?
Hi Ron,
Thanks again for your help. The checkboxes are actually not individual quiz questions. They are options of a form, which is the question. The learner would need to click the correct checkboxes and fill in the right text to get their mark out of 100.
After reviewing the triggers and javascript, I managed to get this resolved. I had to manually create the value of the individual scores to get it reported to Canvas.
In case someone reads this post, the javascript that I used was:
// Get variables from Storyline
var player = GetPlayer();
var score = player.GetVar("Score1"); // Your calculated score
var totalPossible = player.GetVar("TotalPossible"); // Total points possible
var passingScore = player.GetVar("PassingScore"); // Passing percentage threshold
// Calculate percentage score
var percentScore = (score / totalPossible) * 100;
// SCORM 1.2 Reporting
if (typeof SCORM_CallLMSSetValue !== 'undefined') {
SCORM_CallLMSSetValue("cmi.core.score.raw", percentScore.toFixed(2));
SCORM_CallLMSSetValue("cmi.core.score.min", 0);
SCORM_CallLMSSetValue("cmi.core.score.max", 100);
// Pass/Fail
if (percentScore >= passingScore) {
SCORM_CallLMSSetValue("cmi.core.lesson_status", "passed");
} else {
SCORM_CallLMSSetValue("cmi.core.lesson_status", "failed");
}
SCORM_CallLMSCommit();
}
// SCORM 2004 Reporting
if (typeof SCORM2004_CallSetValue !== 'undefined') {
SCORM2004_CallSetValue("cmi.score.raw", percentScore.toFixed(2));
SCORM2004_CallSetValue("cmi.score.min", 0);
SCORM2004_CallSetValue("cmi.score.max", 100);
// Pass/Fail
if (percentScore >= passingScore) {
SCORM2004_CallSetValue("cmi.success_status", "passed");
SCORM2004_CallSetValue("cmi.completion_status", "completed");
} else {
SCORM2004_CallSetValue("cmi.success_status", "failed");
SCORM2004_CallSetValue("cmi.completion_status", "incomplete");
}
SCORM2004_CallCommit();
}
Related Content
- 1 year ago
- 1 year ago
- 1 year ago
- 8 months ago