Open drahkrub opened 3 months ago
just discovered #679 - essentially the same
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@drahkrub I believe this should be resolved/no longer an issue in 2.0.0
(but I'm not sure if this is perhaps intentional)
storeData(...)
(https://github.com/jcputney/scorm-again/blob/master/src/Scorm12API.js#L269 and also inScorm2004API.js
) returns an object likereceived as return value from
processHttpRequest(...)
iflmsCommitUrl
is set insettings
.If
lmsCommitUrl
is not set thenglobal_constants.SCORM_TRUE
is returned.The latter leads to problems in
terminate(...)
andcommit(...)
wherestoreData(...)
is called, because in(from https://github.com/jcputney/scorm-again/blob/master/src/BaseAPI.js#L321C1-L322C54)
returnValue
is always evaluated toglobal_constants.SCORM_FALSE
, which means thatterminate(...)
andcommit(...)
returnglobal_constants.SCORM_FALSE
although there is no error.In that case a scorm package can call
LMSGetLastError()
to get the error code and realize that there was no error - but we have scorm packages from one supplier that simply stop working and only display an error window "0: No error".I had to patch
scorm-again.js
to make this scorm packages work.One could say that the scorm packages from this provider do not behave correctly - but I think also
scorm-again.js
can do a better job in the case mentioned.