-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.5
-
MOODLE_403_STABLE
The H5P file_storage class has a function called getUpgradeScript, which fetches the upgrades.js file of a H5P library. The script looks for a file called "upgrade.js", however the file is called "upgrades.js" (see https://h5p.org/documentation/developers/content-upgrade). This results in the upgradeScript property always being null in the ajax.php call (action=libraries).
Reproduction
- go to the content bank
- create a new H5P instance, for example "Fill in the Blanks"
- open network tab in developer tools
- click the second ajax.php call (it looks a little like this: ajax.php?action=libraries&machineName=H5P.Blanks&majorVersion=1&minorVersion=14&language=en)
- inspect the response and the upgradeScript property
What I expected
The response to contain the upgradedScript property with a link the a JS file called upgrades.js.
What actually happened
The upgradedScript property is null