Repository navigation
SCORM 2004, a pass mark and completion as 100, as options - #140
Merged
Merged
Conversation
A zip written with none of them is the SCORM 1.2 zip written before: its manifest, launch page and notice are unchanged, and only the bridge is new code, which plays such a page as it did. - SCORM 2004 4th Edition (--scorm-version 2004): its manifest, API_1484_11, completion and success apart, the scaled score, each answer with its words as the description and a urn:uuid id, ISO 8601 times, 64,000 characters of saved state. A 2004 session always ends suspended: ended normal after a finish, Moodle 4.5 handed the next launch an empty data model within the same attempt, and the completion it kept was written over. - A pass mark (--pass-mark): 1.2's mastery score or 2004's objective measure; the bridge holds the score to the LMS's mark, else the zip's, in place of the content's own pass. - Completion as 100 (--completion-score): content that finishes without a score records 100. The page gets an Options step for all three, page-wide. Checked in Moodle 4.5 and SCORM Cloud.
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #138.
Stacked on #139, whose page this adds a step to, so the base is
feat/scorm-page-steps. I'll retarget it tomainonce #139 merges.What changes
Three options, each off unless asked for. A zip written with none is the SCORM 1.2 zip from before. Comparing main's code and this branch's on the quiz and on the formulas export, every entry is byte-identical except
scorm.js: the manifest, the launch page and the notice are unchanged. The bridge plays a page that names no option exactly as before, and the existing LMS tests still hold it to that.--scorm-version 2004,scormVersion: '2004')imscp_v1p1,adlcp_v1p3,imsss,schemaversion2004 4th Edition,adlcp:scormType).API_1484_11and uses one set of calls for both versions.completion_statusandsuccess_statusare written separately, andscore.scaledis written alongsideraw,minandmax.urn:uuid:id and the question's words indescription, decoded to plain text (’becomes ’). The response goes inlearner_response, and a wrong answer isincorrect.--pass-mark <0-100>,passMark)adlcp:masteryscore. In 2004 it is the item's primary objective, withsatisfiedByMeasureandminNormalizedMeasureset to mark/100.cmi.student_data.mastery_scoreorcmi.scaled_passing_score), falling back to the page's. It then holds the score as written to that mark, in place of the content's own pass or fail.--completion-score,completionScore)<meta>tags that are written only for options that are set.%SCORM%slot, the build is refused.scormOptionschecks the options for both writers.scormVersionfield.One change from the issue text: a 2004 session always ends
suspend. The issue saidsuspendornormal; I measured both in Moodle 4.5.normalafter a finish, Moodle handed the next launch an empty data model within the same attempt (entryab-initio, completionunknown, no saved state). Theincompletethe bridge writes at launch then overwrote the storedcompleted, and the content started over.suspend, the relaunch resumed: completed and passed were kept, and the content came back on its result screen.1.2 keeps its old behaviour.
Reused:
scormTitle,readPackageand the plan/write split from #139,addStored, anddependenciesInfrom the player's./plan. No other package changed.Docs:
design/scorm.mdhas a new bullet covering the 2004 data model, why sessions endsuspend, and each LMS check with its numbers. The embed README gets Options of the zip, the flags, and the 2004 column.docs/compatibility.mdand both pages' text are updated too.Testing
pnpm -r typecheckis clean.SCORM_1.3, kept the objective (0.8, satisfied by measure), and kept the 1.2 mastery score of 80.SCORM20044THEDITION, with no parser warnings.Not verified
finishedevent dispatched in the SCO's frame, as the tests do.completedand 100, and in 2004 leaves successunknown, as a test holds it. (Corrected after the merge, in SCORM zip and page: six points from the self-review of #139 and #140 #142: this body first said the no-score finishes passed without naming the mark.)Release
An embed minor release, which can go out as 1.6.0 together with #139. A zip built with these options needs the bridge from this version; zips without options are the same as before.