Skip to content
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

Fix: SCORM 2004 runtime data reset if disconnected on exit #323

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

danielghost
Copy link
Contributor

Fixes #320.

Fix

  • Set exit state on initialisation to negate SCORM 2004 runtime data being reset on relaunch if disconnected whilst course window is closed.
  • Set session time on each commit to prevent this from potentially being lost if finish is not called during exit. This can occur due to being disconnected, or potentially when used via a mobile app which may not trigger the required window events.

…ta being reset on relaunch if disconnected whilst course widow is closed (fixes #320).
@danielghost danielghost self-assigned this Dec 10, 2024
js/scorm/wrapper.js Outdated Show resolved Hide resolved
js/scorm/wrapper.js Outdated Show resolved Hide resolved
danielghost and others added 2 commits December 10, 2024 17:16
Co-authored-by: Oliver Foster <oliver.foster@kineo.com>
Copy link

@joe-replin joe-replin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I've tested against the original issue and can confirm that it is working as desired. Thank you for looking into this.

Out of curiosity, should cmi.entry state be listed in the console alongside cmi.exit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@oliverfoster
Copy link
Member

Waiting for @danielghost to answer @joe-replin 's question before merging.

@danielghost
Copy link
Contributor Author

Out of curiosity, should cmi.entry state be listed in the console alongside cmi.exit?

It will only log this if isFirstSession is called, which isn't the case as default as currently nothing is handled differently depending on the session type. This can be used by other plugins as required.

@danielghost danielghost merged commit 650d469 into master Jan 6, 2025
@danielghost danielghost deleted the issue/320 branch January 6, 2025 13:16
github-actions bot pushed a commit that referenced this pull request Jan 6, 2025
## [5.9.10](v5.9.9...v5.9.10) (2025-01-06)

### Fix

* SCORM 2004 runtime data reset if disconnected on exit (#323) ([650d469](650d469)), closes [#323](#323)
Copy link

github-actions bot commented Jan 6, 2025

🎉 This PR is included in version 5.9.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Recently Released
Development

Successfully merging this pull request may close these issues.

Course Exit while disconnected from LMS loses progress
5 participants