jcputney / scorm-again

A modern SCORM JavaScript runtime library.
https://jcputney.github.io/scorm-again/
MIT License
218 stars 53 forks source link

Error recording SCORM 2004 objectives #714

Closed mubashshir-cloudmate closed 3 weeks ago

mubashshir-cloudmate commented 3 months ago

I am using Scorm2004API and hosting SCORM Advanced Run-Time Calls. I am getting error

scorm-again:10 
throwSCORMError     : 401: The data model element passed to SetValue (cmi.objectives.undefined.progress_measure) is not a valid SCORM data model element.
scorm-again:10 
throwSCORMError     : 401: The data model element passed to SetValue (cmi.objectives.undefined.completion_status) is not a valid SCORM data model element. 

This should be a valid SCORM data model element. From the data model reference:

cmi.objectives.n.completion_status (“completed”, “incomplete”, “not attempted”, “unknown”, RW) Indicates whether the learner has completed the associated objective

scorm-again then does not populate these values to the underlying window.API_1484_11.cmi object.

Any help would be appreciated

jcputney commented 3 weeks ago

@mubashshir-cloudmate As you can see in the error, you're not properly setting an index. You're using an undefined variable, instead of an integer.