Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83441

H5P core doesn't find upgrade script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.3.5
    • H5P
    • 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

      1. go to the content bank
      2. create a new H5P instance, for example "Fill in the Blanks"
      3. open network tab in developer tools
      4. 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)
      5. 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

            Unassigned Unassigned
            juriaan Juriaan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.