Send a quiz score and pass or fail to the LMS from JavaScript (SCORM 1.2 and 2004)
Updated 26 October 2026
Quick answer
Send the score as a percentage number, then say passed or failed, then save. Finish the session last.
- SCORM 1.2:
cmi.core.score.min0,cmi.core.score.max100,cmi.core.score.raw80, thencmi.core.lesson_status“passed” or “failed”. Code. - SCORM 2004:
cmi.score.scaled0.8 (andcmi.score.raw80),cmi.success_statuspassed or failed, andcmi.completion_statuscompleted. Code. - If the manifest has a mastery score, make it the same as the quiz's pass mark. Why.
Alder's free test player shows each call as the course makes it, and what an LMS would record from them: drop the zip in and take the quiz.
This page is for a quiz you or an AI tool built in code: a course from Claude, ChatGPT or a coding agent, or a custom quiz in a web object. If the course comes from Storyline, Rise or Captivate, their own quiz reporting sends the score; see SCORM score not recording instead.
SCORM 1.2
SCORM 1.2 takes a score from 0 to 100. Send a percentage, not points: 8 of 10 right is 80, not 8. Then set the status from your pass mark, and save:
// SCORM 1.2, with scorm.js from the packaging guide.
function reportQuiz(correct, total, passMark) {
var percent = Math.round((correct / total) * 100);
scorm.set('cmi.core.score.min', 0);
scorm.set('cmi.core.score.max', 100);
scorm.set('cmi.core.score.raw', percent);
scorm.set('cmi.core.lesson_status', percent >= passMark ? 'passed' : 'failed');
scorm.save();
}
// 8 of 10 right, pass mark 80%:
reportQuiz(8, 10, 80);scorm.set and scorm.save come from scorm.js, which also finishes the session when the learner leaves. Using your own code instead? Call LMSSetValue with the same names and values, then LMSCommit("").
SCORM 2004
SCORM 2004 keeps the result in two places: whether the learner finished (completion_status) and whether they passed (success_status). Its main score is cmi.score.scaled, from 0 to 1, so 80% is 0.8. Send the raw score as well; some LMSs show that one.
// SCORM 2004: api is the API_1484_11 object the course found.
function reportQuiz2004(api, correct, total, passMark) {
var percent = Math.round((correct / total) * 100);
api.SetValue('cmi.score.min', '0');
api.SetValue('cmi.score.max', '100');
api.SetValue('cmi.score.raw', String(percent));
api.SetValue('cmi.score.scaled', String(percent / 100));
api.SetValue('cmi.success_status', percent >= passMark ? 'passed' : 'failed');
api.SetValue('cmi.completion_status', 'completed');
api.Commit('');
}If the manifest has a mastery score
A mastery score is a pass mark written in imsmanifest.xml. Some LMSs ignore the course's passed or failed and judge the score against it, so a learner the course passed at 80 can show as failed against a mastery score of 90. Either leave it out, or make it the same as the quiz's pass mark. In SCORM 1.2 it sits in the course's item:
<item identifier="item1" identifierref="res1">
<title>My course</title>
<adlcp:masteryscore>80</adlcp:masteryscore>
</item>More on this: mastery score vs passing score and LMS shows failed when the learner passed.
Mistakes AI-written quiz code makes
- “80%” or “8/10” as the score. The LMS refuses anything but a number. In SCORM 1.2, 150 is refused too.
- A SCORM 2004 scaled score of 80. Scaled is 0 to 1; 80 is refused.
- A score with no passed or failed. Then each LMS decides on its own: some leave the course incomplete, and SCORM Cloud records completed, with passed or failed only when the manifest has a mastery score.
- The score sent after the session ended. A results screen that reports after
LMSFinishorTerminateis ignored. Report first, finish last.
Check the score before you upload (free)
Drop the zip into Alder and launch it
Open Alder, drop the zip, and click “Launch the course”. Nothing is uploaded.
Take the quiz and read the log
Open the technical log. You should see the score rows, then “The course told the LMS the learner passed”, a save, and the end of the session, in that order. A refused value shows as a failed call with its error code.

The end of the log for a pass reported the right way: Alder's SCORM 1.2 probe, after min 0, max 100 and a raw score of 80. Press “I’m done”
Alder shows what an LMS would record. If the course sent a score but no passed or failed, it says so:

The probe sending a score of 90 and no status.
Still not working?
- Nothing at all reaches the LMS: see AI-built course plays but records nothing.
- The LMS shows a different score from the course: see SCORM score not recording, or 0%.
- You want a test that checks the score every time the code changes: see test a SCORM package automatically.