Skip to content

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.min 0, cmi.core.score.max 100, cmi.core.score.raw 80, then cmi.core.lesson_status “passed” or “failed”. Code.
  • SCORM 2004: cmi.score.scaled 0.8 (and cmi.score.raw 80), cmi.success_status passed or failed, and cmi.completion_status completed. 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:

quiz.js
// 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.

quiz.js
// 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('');
}
Where a quiz score goesA learner scores 80% on the quiz. In SCORM 1.2 the course sends cmi.core.score.raw = 80, out of a score.min of 0 and a score.max of 100. In SCORM 2004 it sends cmi.score.scaled = 0.8, the percentage from 0 to 1, which the LMS judges pass or fail by, and cmi.score.raw = 80, the points, which some LMSs show instead.THE QUIZThe learner scores 80%SCORM 1.2 SENDScmi.core.score.raw80Out of score.min 0 and score.max 100Compared with the mastery score, 0 to 100orSCORM 2004 SENDScmi.score.scaled0.8The percentage, 0 to 1: pass or failcmi.score.raw80The points: some LMSs show this one
Where a score of 80% goes in each SCORM version.

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:

imsmanifest.xml
<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 LMSFinish or Terminate is ignored. Report first, finish last.

Check the score before you upload (free)

  1. Drop the zip into Alder and launch it

    Open Alder, drop the zip, and click “Launch the course”. Nothing is uploaded.

  2. 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.

    Alder's call log: LMSSetValue cmi.core.lesson_status passed returns true ('The course told the LMS the learner passed'), then LMSCommit ('asked the LMS to save its data now'), then LMSFinish ('ended its session').
    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.
  3. 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:

    Worth checking: The LMS may ignore the score, or record the course as not attempted. The course sent a score but never said passed, failed or completed. How to fix it: have the course set the status when the quiz is submitted.
    The probe sending a score of 90 and no status.

Still not working?