-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to getInteractionCount on LMS that doesn't support this SCORM 1.2 feature #294
Comments
The quoted lines, call adapt-contrib-spoor/js/adapt-stateful-session.js Lines 205 to 220 in f07a603
Which is calling adapt-contrib-spoor/js/adapt-offlineStorage-scorm.js Lines 111 to 133 in f07a603
Which is calling adapt-contrib-spoor/js/scorm/wrapper.js Lines 366 to 392 in f07a603
adapt-contrib-spoor/js/scorm/wrapper.js Lines 475 to 490 in f07a603
adapt-contrib-spoor/libraries/SCORM_API_wrapper.js Lines 483 to 505 in f07a603
Your error is triggering here: adapt-contrib-spoor/js/scorm/wrapper.js Lines 396 to 421 in f07a603
This is your error: adapt-contrib-spoor/js/scorm/error.js Line 29 in f07a603
So it is checking, but the check pushes an error to the dialogue. This is where the dialogue is shown: adapt-contrib-spoor/js/scorm/wrapper.js Lines 571 to 573 in f07a603
It can be controlled with: adapt-contrib-spoor/example.json Line 21 in f07a603
However, it does seem a bit odd. @danielghost any thoughts? |
Surely this code is not checking isSupported('cmi.interactions._count')
|
Yup, agreed. Needs an |
That is exactly what I have done and testing as we speak |
@oliverfoster happy to create a PR for this. Not done this before so just checking the procedure Do I create a local branch issue/294 and then push this up (I don't appear to have permission to do so) Then create a PR |
You can fork the repo, create your issue/294 and then pr from there. |
Done |
Co-authored-by: Paul Steven <[email protected]>
🎉 This issue has been resolved in version 5.9.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [2.2.0](v2.1.3...v2.2.0) (2024-03-19) ### Bug * score logic (adaptlearning#267) ([898fa80](898fa80)), closes [adaptlearning#267](https://github.com/nagyist/adapt-contrib-spoor/issues/267) ### chore * added package.json (adaptlearning#214) ([c940daf](c940daf)), closes [adaptlearning#214](https://github.com/nagyist/adapt-contrib-spoor/issues/214) [#3072](https://github.com/nagyist/adapt-contrib-spoor/issues/3072) ### Chore * Readme updates for broken links, clarity, and linting errors (fixes adaptlearning#312) (adaptlearning#313) ([df90b8d](df90b8d)), closes [adaptlearning#312](https://github.com/nagyist/adapt-contrib-spoor/issues/312) [adaptlearning#313](https://github.com/nagyist/adapt-contrib-spoor/issues/313) ### fix * Adding a pagehide listener to cover bases when unload becomes deprecated (adaptlearning#298) ([177de84](177de84)), closes [adaptlearning#298](https://github.com/nagyist/adapt-contrib-spoor/issues/298) ### Fix * Add SCORM version selector to config JSON schema (fixes adaptlearning#249) ([a824a72](a824a72)), closes [adaptlearning#249](https://github.com/nagyist/adapt-contrib-spoor/issues/249) * Added gitignore for release automation (adaptlearning#244) ([27decdb](27decdb)), closes [adaptlearning#244](https://github.com/nagyist/adapt-contrib-spoor/issues/244) * Added release automation (adaptlearning#240) ([d2b21a4](d2b21a4)), closes [adaptlearning#240](https://github.com/nagyist/adapt-contrib-spoor/issues/240) * Amend to default schema value for `_setCompletedWhenFailed` (fixes adaptlearning#256) (adaptlearning#258) ([cf29cb1](cf29cb1)), closes [adaptlearning#256](https://github.com/nagyist/adapt-contrib-spoor/issues/256) [adaptlearning#258](https://github.com/nagyist/adapt-contrib-spoor/issues/258) * Amended logic to check for supported `_children` elements before attempting to set values (adaptlearning#306) ([4dddbee](4dddbee)), closes [adaptlearning#306](https://github.com/nagyist/adapt-contrib-spoor/issues/306) * Bump http-cache-semantics from 4.1.0 to 4.1.1 (adaptlearning#263) ([aa3e7f4](aa3e7f4)), closes [adaptlearning#263](https://github.com/nagyist/adapt-contrib-spoor/issues/263) * Changed logic for 401 error handling (adaptlearning#303) ([a71d7a0](a71d7a0)), closes [adaptlearning#303](https://github.com/nagyist/adapt-contrib-spoor/issues/303) * Check LMS supports cmi.interactions._count (fixes adaptlearning#294) (adaptlearning#295) ([d73c7e4](d73c7e4)), closes [adaptlearning#294](https://github.com/nagyist/adapt-contrib-spoor/issues/294) [adaptlearning#295](https://github.com/nagyist/adapt-contrib-spoor/issues/295) * Close loading screen via router.hideLoading() (fixes adaptlearning#291) (adaptlearning#292) ([0fe5539](0fe5539)), closes [adaptlearning#291](https://github.com/nagyist/adapt-contrib-spoor/issues/291) [adaptlearning#292](https://github.com/nagyist/adapt-contrib-spoor/issues/292) * Correct printCompletionInformation string creation ([9e07fbf](9e07fbf)) * delay error messaging until all course data is ready (adaptlearning#301) ([62a2f30](62a2f30)), closes [adaptlearning#301](https://github.com/nagyist/adapt-contrib-spoor/issues/301) * Dynamic course folders (fixes adaptlearning#264) (adaptlearning#265) ([a0b8813](a0b8813)), closes [adaptlearning#264](https://github.com/nagyist/adapt-contrib-spoor/issues/264) [adaptlearning#265](https://github.com/nagyist/adapt-contrib-spoor/issues/265) * Ensure cmi.interactions.n.id is unique (fixes adaptlearning#234) (adaptlearning#246) ([ad5380a](ad5380a)), closes [adaptlearning#234](https://github.com/nagyist/adapt-contrib-spoor/issues/234) [adaptlearning#246](https://github.com/nagyist/adapt-contrib-spoor/issues/246) [adaptlearning#234](https://github.com/nagyist/adapt-contrib-spoor/issues/234) [adaptlearning#246](https://github.com/nagyist/adapt-contrib-spoor/issues/246) * error logging order to match call execution (fixes adaptlearning#307). (adaptlearning#308) ([ea190bf](ea190bf)), closes [adaptlearning#307](https://github.com/nagyist/adapt-contrib-spoor/issues/307) [adaptlearning#308](https://github.com/nagyist/adapt-contrib-spoor/issues/308) * escaped double quotes in _setCompletedWhenFailed help msg (fixes adaptlearning#254) ([333b58c](333b58c)), closes [adaptlearning#254](https://github.com/nagyist/adapt-contrib-spoor/issues/254) * LZMAFactory error when Web Workers are not implemented - fixes adaptlearning#253. (adaptlearning#255) ([b790967](b790967)), closes [adaptlearning#253](https://github.com/nagyist/adapt-contrib-spoor/issues/253) [adaptlearning#255](https://github.com/nagyist/adapt-contrib-spoor/issues/255) * Release job now uses v3 for checkout and setup-node actions ([0e3743d](0e3743d)) * Reworked and removed offline_API_wrapper.js (fixes adaptlearning#260) (adaptlearning#261) ([75f15a6](75f15a6)), closes [adaptlearning#260](https://github.com/nagyist/adapt-contrib-spoor/issues/260) [adaptlearning#261](https://github.com/nagyist/adapt-contrib-spoor/issues/261) * Score logic ([c0d5a62](c0d5a62)) * set html lang and dir attributes from config.json (fixes #499) (adaptlearning#310) ([2642a5a](2642a5a)), closes [#499](https://github.com/nagyist/adapt-contrib-spoor/issues/499) [adaptlearning#310](https://github.com/nagyist/adapt-contrib-spoor/issues/310) * Undefined settings error (adaptlearning#275) ([791c436](791c436)), closes [adaptlearning#275](https://github.com/nagyist/adapt-contrib-spoor/issues/275) * version bump for pull 125 ([608e79f](608e79f)) * Version numbers removed from Readme files ([9f43ba6](9f43ba6)) * Version patch bump (adaptlearning#290) ([f801969](f801969)), closes [adaptlearning#290](https://github.com/nagyist/adapt-contrib-spoor/issues/290) * wrapper.js & adapt-contrib-spoor updated to work with Jest testing. (fixes adaptlearning#284) (adaptlearning#285) ([cb3d93f](cb3d93f)), closes [adaptlearning#284](https://github.com/nagyist/adapt-contrib-spoor/issues/284) [adaptlearning#285](https://github.com/nagyist/adapt-contrib-spoor/issues/285) ### New * Added _uniqueInteractionIds, testing support for cmi.interactions (adaptlearning#278) ([f88877c](f88877c)), closes [adaptlearning#278](https://github.com/nagyist/adapt-contrib-spoor/issues/278) * Added `cmi.objectives` support (fixes adaptlearning#279). (adaptlearning#280) ([cf911c5](cf911c5)), closes [adaptlearning#279](https://github.com/nagyist/adapt-contrib-spoor/issues/279) [adaptlearning#280](https://github.com/nagyist/adapt-contrib-spoor/issues/280) * Added ability to compile as SCORM 1.2 or SCORM 2004 (fixes adaptlearning#249) ([497637a](497637a)), closes [adaptlearning#249](https://github.com/nagyist/adapt-contrib-spoor/issues/249) * Added ability to configure `_setCompletedWhenFailed` - fixes adaptlearning#242. (adaptlearning#251) ([f3a7b7a](f3a7b7a)), closes [adaptlearning#242](https://github.com/nagyist/adapt-contrib-spoor/issues/242) [adaptlearning#251](https://github.com/nagyist/adapt-contrib-spoor/issues/251) * Improve use of scorm_test_harness.html (fixes adaptlearning#247) (adaptlearning#248) ([479c2d1](479c2d1)), closes [adaptlearning#247](https://github.com/nagyist/adapt-contrib-spoor/issues/247) [adaptlearning#248](https://github.com/nagyist/adapt-contrib-spoor/issues/248) * Issue and pr project addition automation (refs adaptlearning/adapt_framework#3315) (adaptlearning#239) ([578f9b0](578f9b0)), closes [adaptlearning#239](https://github.com/nagyist/adapt-contrib-spoor/issues/239) * network connection test (adaptlearning#270) ([ec5ef8a](ec5ef8a)), closes [adaptlearning#270](https://github.com/nagyist/adapt-contrib-spoor/issues/270) ### Update * Added a new maxCharLimitOverride property to allow override o… (adaptlearning#287) ([68e7064](68e7064)), closes [adaptlearning#287](https://github.com/nagyist/adapt-contrib-spoor/issues/287) ### Upgrade * Bump ip from 1.1.8 to 1.1.9 (adaptlearning#311) ([1728659](1728659)), closes [adaptlearning#311](https://github.com/nagyist/adapt-contrib-spoor/issues/311) * Bump yaml and semantic-release (adaptlearning#276) ([9a46faa](9a46faa)), closes [adaptlearning#276](https://github.com/nagyist/adapt-contrib-spoor/issues/276)
I am seeing an issue on an LMS where an error dialogue is displaying after sumitting a question.
Looking at the code I can see it is calling this.scorm.getInteractionCount() inside the onQuestionRecordInteraction function within adapt-stateful-session.js
So it would appear this code does not have any check to see if the LMS supports cmi.interaction._count
I am getting the error every time I answer a question. It is possibly an issue with this particular LMS but it is the only LMS we use that does not have this optional SCORM 1.2 element. So it would be good to hear if anyone else has tested this on an LMS that does not support cmi.interactions._count
https://github.com/adaptlearning/adapt-contrib-spoor/blob/f07a6032a687b6653c4dbcd903797663fa3ec665/js/adapt-stateful-session.js#L205C2-L220C4
The text was updated successfully, but these errors were encountered: