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

Add a mechanism to support multi H5P core_api versions

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Login as admin.
      2. Access to "Site administration / H5P / H5P settings", check the selected "H5P framework handler" is "H5P framework v1.24 (h5plib_v124)" and save changes.
      3. Create a course with a forum.
      4. Add a new topic to the forum ("D1"). In the message, use the H5P button in the Atto editor to add the arithmetic-quiz.h5p content. Into the same message, add another H5P content with arithmetic-quiz-highercoreapiversion.h5p (using also the H5P Atto button).
      5. Save.

      Testing scenario 1: Content requiring higher Core API is not displayed.

      1. Login as admin.
      2. Access to the forum discussion "D1".
      3. Check the first H5P content is displayed as expected ("Solve these multiplication quizzes as fast as you can!").
      4. Check the second H5P is not displayed. The following message should appear: "api-version-unsupported : The system was unable to install the Arithmetic Quiz component from the package, as it requires a newer version of the H5P plugin. This site is currently running version 1.24, whereas the required version is 1.30 or higher. Please upgrade and then try again."

      Testing scenario 2: Install new H5P library (v130) without changing the default H5P libraries handler.

      1. Login as admin.
      2. Access to "Site administration / Plugins / Install plugins"
      3. Upload h5plib_v130.zip into the "ZIP package" area. This .zip file is a dummy new H5P library handler with a simulated H5P library having 1.30 as core API.
      4. Click the "Install plugin from the ZIP file" button and follow the instructions to install the plugin. The folder "h5p/h5plib" will require write access permissions.
      5. Access to the forum discussion "D1".
      6. Check the first H5P content is displayed as expected ("Solve these multiplication quizzes as fast as you can!").
      7. Check the second H5P is not displayed. The following message should appear: "api-version-unsupported : The system was unable to install the Arithmetic Quiz component from the package, as it requires a newer version of the H5P plugin. This site is currently running version 1.24, whereas the required version is 1.30 or higher. Please upgrade and then try again."

      Testing scenario 3: Set the default H5P libraries handler to v130.

      1. Login as admin.
      2. Access to "Site administration / H5P / H5P settings"
      3. Set the "H5P framework handler" to "H5P libraries v1.30 (h5plib_v130)" and save changes.
      4. Access to the forum discussion "D1".
      5. Check the first H5P content is displayed as expected ("Solve these multiplication quizzes as fast as you can!").
      6. Check the second H5P content is also displayed as expected ("Solve these multiplication quizzes as fast as you can!").

       
       

      Show
      Setup Login as admin. Access to "Site administration / H5P / H5P settings", check the selected "H5P framework handler" is "H5P framework v1.24 (h5plib_v124)" and save changes. Create a course with a forum. Add a new topic to the forum ("D1"). In the message, use the H5P button in the Atto editor to add the arithmetic-quiz.h5p content. Into the same message, add another H5P content with  arithmetic-quiz-highercoreapiversion.h5p (using also the H5P Atto button). Save. Testing scenario 1: Content requiring higher Core API is not displayed. Login as admin. Access to the forum discussion "D1". Check the first H5P content is displayed as expected ("Solve these multiplication quizzes as fast as you can!"). Check the second H5P is not displayed. The following message should appear: "api-version-unsupported : The system was unable to install the Arithmetic Quiz component from the package, as it requires a newer version of the H5P plugin. This site is currently running version 1.24, whereas the required version is 1.30 or higher. Please upgrade and then try again." Testing scenario 2: Install new H5P library (v130) without changing the default H5P libraries handler. Login as admin. Access to "Site administration / Plugins / Install plugins" Upload h5plib_v130.zip  into the "ZIP package" area. This .zip file is a dummy new H5P library handler with a simulated H5P library having 1.30 as core API. Click the "Install plugin from the ZIP file" button and follow the instructions to install the plugin. The folder "h5p/h5plib" will require write access permissions. Access to the forum discussion "D1". Check the first H5P content is displayed as expected ("Solve these multiplication quizzes as fast as you can!"). Check the second H5P is not displayed. The following message should appear: "api-version-unsupported : The system was unable to install the Arithmetic Quiz component from the package, as it requires a newer version of the H5P plugin. This site is currently running version 1.24, whereas the required version is 1.30 or higher. Please upgrade and then try again." Testing scenario 3: Set the default H5P libraries handler to v130. Login as admin. Access to "Site administration / H5P / H5P settings" Set the "H5P framework handler" to "H5P libraries v1.30 (h5plib_v130)" and save changes. Access to the forum discussion "D1". Check the first H5P content is displayed as expected ("Solve these multiplication quizzes as fast as you can!"). Check the second H5P content is also displayed as expected ("Solve these multiplication quizzes as fast as you can!").    
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-67063-master
    • Sprint:
      H5P Sprint Relase 3.8

      Description

      H5P integration is composed of:

      • A 'core' library: A set of PHP + JS code, currently at version 1.24.
      • The content types. The content types available through their API. The content types make use of features in the core library.
      • User-content: Content using those content-type.

       

      The issue is that H5P frequently updates its core library. When they do so:

      • They reserve the right to make their content types require the latest version of the core library. If that version is not available, they tell you to upgrade the core library.
      • Where the content type is upgraded in tandem with the core library, then we are now saying that you must update your content to require the latest version of that content type... which now requires the latest version.

      Other known issues:

      • The libraries are non-trivial to upgrade because they may introduce breaking API changes which we need to implement something on our side to solve;
      • Some customizations have been done in order to improve the integration with the Moodle API.

       

      We will need to decide which is the best way to proceed for upgrading the library core. Some approaches (there may be more):

      1. Move the current integration to a new plugin in a new plugintype with the option of installing additional plugintypes.
      2. Create a third-party plugin for upgrading it ( such as the app does with the additional features 3rd party plugin).
      3. Update the H5P core library in Moodle with each minor release (treat it as a security issue).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              sarjona Sara Arjona (@sarjona)
              Peer reviewer:
              Víctor Déniz Falcón
              Integrator:
              Andrew Nicols
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 2 days, 1 minute
                  1w 2d 1m