refactor(scorm): replace runtime and document clean provenance and licensing - #105
Draft
erseco wants to merge 4 commits into
Draft
refactor(scorm): replace runtime and document clean provenance and licensing#105erseco wants to merge 4 commits into
erseco wants to merge 4 commits into
Conversation
…M 1.2 rewrite Coordinated update with exelearning/exelearning#2209: - assets/scorm/SCORM_API_wrapper.js is now the unmodified upstream pipwerks wrapper (MIT, v1.1.20180906, pipwerks/scorm-api-wrapper@82e455b, SHA-256 f2a558ba284edbc6842edf51678df1f7e3e05cbf09ec00bc6dd5988b6caa2e78). - assets/scorm/SCOFunctions.js is now the eXeLearning-owned SCORM 1.2 runtime (GPL-compatible AGPL-3.0-or-later), assembled from the four layers in the eXeLearning repo (public/app/common/scorm/scorm12/). It keeps the full injected contract (loadPage/unloadPage globals, the scorm facade incl. SetScoreMax/SetScoreMin/GetLearnerName/GetScoreRaw, additive pipwerks.SCORM extensions), so scorm_injector.php needs no change. - thirdpartylibs.xml: bump the wrapper version and drop the SCOFunctions entry (no longer third-party); eslint-ignore the assembled artifact. Runtime contract: doc/development/scorm12-runtime-contract.md and doc/architecture/adr/ADR-0001-scorm12-runtime-rewrite.md in the eXeLearning repository.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
=========================================
Coverage 92.31% 92.31%
Complexity 824 824
=========================================
Files 51 51
Lines 3734 3734
=========================================
Hits 3447 3447
Misses 287 287
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Document the provenance, build process, and AGPL/GPLv3 licensing rationale for the bundled eXeLearning editor and SCORM runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the legacy SCORM 1.2 runtime bundled by the Moodle plugin with the clean-provenance runtime introduced in exelearning/exelearning#2209, and document the origin, build process, and licensing of the bundled third-party and eXeLearning code.
This change also addresses the documentation requested by external validation finding DIR-05.
Runtime changes
assets/scorm/SCORM_API_wrapper.jswith the unmodified upstream pipwerks SCORM API wrapper:v1.1.2018090682e455b4032ee08febf64d2fa2bf1aacaebaa446f2a558ba284edbc6842edf51678df1f7e3e05cbf09ec00bc6dd5988b6caa2e78assets/scorm/SCOFunctions.jswith the eXeLearning-owned SCORM 1.2 runtime assembled from:exe-scorm12-client.jsexe-scorm12-policy.jsexe-scorm12-lifecycle.jsexe-scorm12-adapter.jsthirdpartylibs.xmlas the plugin's only third-party library.assets/scorm/SCOFunctions.jsfile from the repository ESLint scope.The new runtime is implemented from the SCORM 1.2 Run-Time Environment specification and is licensed under AGPL-3.0-or-later. It no longer contains ADL/CTC-derived code or Rustici Creative Commons fragments.
Documentation and licensing
assets/scorm/readme_moodle.txtwith:SCOFunctions.jsis first-party eXeLearning code rather than a third-party library.dist/readme_moodle.txtwith:dist/rather thandist/static/;Third-party codesection toREADME.mdexplaining:Compatibility
No injector change is required.
classes/local/scorm/scorm_injector.phpcontinues to inject:libs/SCORM_API_wrapper.jslibs/SCOFunctions.jsThe replacement keeps the existing public contract, including the global lifecycle functions and the
scormfacade used by exported content.Behavior changes to verify
incompletestatus is no longer reset tonot attemptedwhen a page is reopened.pagehideandvisibilitychangeinstead of relying only onunload.cmi.core.exitis empty after a terminal status andsuspendotherwise.The legacy Moodle-specific window flags, such as
mod_scorm_is_window_closing, were intentionally not copied. Any compatibility issue requiring them should be reported to the main eXeLearning repository and evaluated against ADR-0001.Verification
readme_moodle.txtfiles are included in the generated release ZIP next to the code they document.Follow-up
A versioned artifact, checksum verification step, or synchronization script should eventually replace the current manual copying of SCORM runtime files between the main eXeLearning repository and this plugin.
Moodle Playground Preview
The changes in this pull request can be previewed and tested using a Moodle Playground instance.
ℹ️ The eXeLearning editor is fetched from the shared release and unpacked into the plugin when the playground boots, so the first load may take a few extra seconds. ELPX upload, viewer and preview work normally.