adaptlearning / adapt-contrib-spoor

A basic scorm tracking plugin for Adapt
GNU General Public License v3.0
14 stars 42 forks source link

Is an empty string the desired cmi.core.exit value if default of auto used? #297

Open paulstevendev opened 11 months ago

paulstevendev commented 11 months ago

Just wanted to check this is the desired functionality. If you leave the "Exit state if incomplete" and "Exit state if complete" set to "auto" the exit state ends up being an empty string ""

https://github.com/adaptlearning/adapt-contrib-spoor/blob/f07a6032a687b6653c4dbcd903797663fa3ec665/js/scorm/wrapper.js#L934C1-L941C4

Doesn't seem very auto to me. Surely if it is auto it should have a stab at setting it to the most appropriate value kind of like how the pipwerks code does it

https://github.com/adaptlearning/adapt-contrib-spoor/blob/f07a6032a687b6653c4dbcd903797663fa3ec665/libraries/SCORM_API_wrapper.js#L398C1-L423C1

danielghost commented 11 months ago

SCORM 1.2 will use an empty string. SCORM 2004 will use "suspend" until "completed", then switch to "normal".

When using SCORM 1.2, it seems like the default for most LMSs is to restore the previous state regardless when using an empty string for cmi.core.exit. This isn't the case when using SCORM 2004, which requires the addition of "_exitStateIfComplete": "suspend" in config.json to prevent the runtime data from being reset once completed.

An LMS may have configuration to ignore the cmi.core.exit/cmi.exit values determined by the SCO, but I would suggest that as default we use "suspend" at all times so the runtime data is restored consistently regardless of which SCORM version is used.