Forum Discussion
Custom Quiz & Pulling Data
As i am doing exactly the same thing now... creating dynamic quizzes that get questions, options and feedback from Google Sheet data.... i also donot use the default quizzes. It is not perse needed to use a result slide to get your score into the LMS.
The Javascript lines below send your score to the LMS ( in our case that's Instructure Canvas )
First you offcourse need to define your score somehow...//These lines will be used to set score value in SCORM2004var previousScore = player.GetVar("myScore");var finalRawScore = player.GetVar("storylineScore");var passPercent = player.GetVar("zPassingPercentage");var scoreScale = finalRawScore/100;console.log("previousScore: " + previousScore+" |finalRawScore: " + finalRawScore);
And when that is done you can sent the score values to the LMS//Set score value here. These 4 lines are necessary for SCORM2004 SCORM2004_objAPI.SetValue('cmi.score.scaled', scoreScale); SCORM2004_objAPI.SetValue('cmi.score.raw', finalRawScore); SCORM2004_objAPI.SetValue('cmi.score.min', '0'); SCORM2004_objAPI.SetValue('cmi.score.max', '100');
I did test this and in Canvas it nicely sets the grades of the student to the current score.
Thank you! This is helpful to know!
Related Content
- 4 months ago
- 4 months ago
- 10 months ago
- 4 months ago