I don't know how to get a score when using SCORM. I have the interaction information i guess, but how do I set the max, min, raw? There is 1 multiple choice question worth 100 points(for testing).
submitMCQ(correct, response) {
let nextIndex = SCORM.get("cmi.interactions._count", true);
//record interaction id
SCORM.set("cmi.interactions." + nextIndex + ".id", "round_" + nextIndex);
//record interaction type
SCORM.set("cmi.interactions." + nextIndex + ".type", "choice");
//record interaction of students choice
SCORM.set("cmi.interactions." + nextIndex + ".student_response", response);
//record interaction of correct choice
SCORM.set("cmi.interactions." + nextIndex + ".result", correct);
//HOW TO GET SCORE FROM CORRECT CHOICES?
},
Commonly you could have a objective(s) aligned to the interaction which has a spot for scoring.
https://github.com/cybercussion/SCOBot/blob/master/QUnit-Tests/js/scorm/SCOBot.js#L868
You can roughly see how I dealt with looping thru that to assist at the content API level since SCORM is entirely a single key/value get per request.
I designed SCOBot around 2009 as I witnessed so much code duplication occurring among teams, and at the time utilized more advanced features of SCORM. Most the other options at the time were either too expensive, or did not wrap a lot of this SCORM communication which left developers fending for themselves.
This project was mainly broke up into base SCORM communication, and then the SCOBot add on wraps all the common tasks to aid in making those interactions easier. And there is actually have a Wiki on that project if you have deeper questions. https://github.com/cybercussion/SCOBot/wiki