Skip to content

3.3.6

Choose a tag to compare

@jcputney jcputney released this 16 Sep 15:19
· 132 commits to master since this release
0428dc8

Fixes

SCORM 2004 sequencing state: automatic saves now carry the real learner id (#1693)

Scorm2004API captured cmi.learner_id into the persistence context when the API was constructed, before the host had loaded the learner. Every automatic sequencing-state save (autoSaveOn, rollup, or saveSequencingState() without metadata) therefore reported learnerId: "unknown" to the host's saveState and loadState callbacks, and hosts that validate the learner on their state endpoint rejected every save.

The context is now built once through createPersistenceContext, whose learnerId reads cmi.learner_id at call time, so it follows loadFromJSON, reset() and resume.

Host-visible change: metadata.learnerId in saveState and loadState now holds the loaded learner id instead of "unknown" when the host passes no metadata of its own. Hosts that pass explicit metadata are unaffected. A host that indexed persisted state under the literal "unknown" should reconcile those rows when upgrading.