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

Allow multiple H5P content displayed properly when accessing the first time (backport of MDL-67095 )

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • Hide

      Setup

      1. Upload the test-h5p.html file to the $CFG->wwwroot.
      2. Access to the private files block.
      3. Upload the files course-presentation.h5p, interactive-video.h5p and chart-7143.h5p  to the root folder.
      4. In case your instance is not a clean instance you should empty most H5P tables using this queries:

      DELETE FROM mdl_h5p_contents_libraries;
      DELETE FROM mdl_h5p_libraries_cachedassets;
      DELETE FROM mdl_h5p_library_dependencies;
      DELETE FROM mdl_h5p_libraries;
      DELETE FROM mdl_h5p;
      DELETE FROM mdl_files where component = 'core_h5p';

      Testing scenario 1: Don't allow to deploy the same H5P file synchronously.

      1. Login as admin in your Moodle in the two different browsers.
      2. In the Private files block, copy the URL for the file course-presentation.h5p.
      3. Open $CFG->wwwroot/test-h5p.html in the two different browsers.
      4. Paste the URL copy in step 2 into the input box named H5P Url in the two different browsers.
      5. Go to one browser and click on the  Display button.
      6. Go to the second browser and wait 3 seconds before to click on the Display button.
      7. Now you have to wait.
      8. Expected result: You should see in the second browser the next message "This H5P content cannot be accessed because it is being deployed. Please try again later.";
      9. Wait to H5P file is deployed in the first browser. Once, you could see the H5P content go to the second browser and reload the tab.
      10. Expected result: You should see the beautiful H5P content without errors.

      Testing scenario 2: Allow to deploy the differents H5P file synchronously.

      1. Login as admin in your Moodle in the two different browsers.
      2. In the Private files block, copy the URL for the file interactive-video.h5p.
      3. Open $CFG->wwwroot/test-h5p.html in the two different browsers.
      4. Paste the URL copy in step 2 into the input box named H5P Url in one browser.
      5. Go to the second browser and copy the URL for the file chart-7143.h5p in the Private files.
      6. Go to one browser and click on Display.
      7. Go to the second browser and wait 3 seconds before to click on the  Display button.
      8. Expected result: You should see in the second browser the H5P content from chart-7143.h5p without errors.
      9. Wait to H5P file is deployed in the first browser. 
      10. Expected result: You should see another beautiful H5P content without errors.

      Testing scenario 3: Allow to deploy the differents H5P file synchronously in the same page.

      1. Login as admin in your Moodle
      2. Create a course
      3. Create a Page
      4. Add the attached H5P files, using the H5P button, in the following order:
        1. arithmetic-quiz.h5p
        2. course-presentation.h5p
        3. guess-the-answer.h5p
      5. Save changes and display
      6. Expected results: The 3 H5P contents are displayed, one below the other.
      Show
      Setup Upload the test-h5p.html file to the $CFG->wwwroot. Access to the private files block. Upload the files course-presentation.h5p, interactive-video.h5p and chart-7143.h5p  to the root folder. In case your instance is not a clean instance you should empty most H5P tables using this queries: DELETE FROM mdl_h5p_contents_libraries; DELETE FROM mdl_h5p_libraries_cachedassets; DELETE FROM mdl_h5p_library_dependencies; DELETE FROM mdl_h5p_libraries; DELETE FROM mdl_h5p; DELETE FROM mdl_files where component = 'core_h5p'; Testing scenario 1: Don't allow to deploy the same H5P file synchronously. Login as admin in your Moodle in the two different browsers. In the Private files block, copy the URL for the file  course-presentation.h5p . Open $CFG->wwwroot/test-h5p.html in the two different browsers. Paste the URL copy in step 2 into the input box named H5P Url in the two different browsers. Go to one browser and click on the  Display button. Go to the second browser and wait 3 seconds before to click on the Display button. Now you have to wait. Expected result:  You should see in the second browser the next message "This H5P content cannot be accessed because it is being deployed. Please try again later." ; Wait to H5P file is deployed in the first browser. Once, you could see the H5P content go to the second browser and reload the tab. Expected result: You should see the beautiful H5P content without errors. Testing scenario 2: Allow to deploy the differents H5P file synchronously. Login as admin in your Moodle in the two different browsers. In the Private files block, copy the URL for the file interactive-video.h5p. Open $CFG->wwwroot/test-h5p.html in the two different browsers. Paste the URL copy in step 2 into the input box named H5P Url in one browser. Go to the second browser and copy the URL for the file chart-7143.h5p in the Private files. Go to one browser and click on Display. Go to the second browser and wait 3 seconds before to click on the  Display button. Expected result:  You should see in the second browser the H5P content from chart-7143.h5p without errors. Wait to H5P file is deployed in the first browser.  Expected result: You should see another beautiful H5P content without errors. Testing scenario 3: Allow to deploy the differents H5P file synchronously in the same page. Login as admin in your Moodle Create a course Create a Page Add the attached H5P files, using the H5P button, in the following order: arithmetic-quiz.h5p course-presentation.h5p guess-the-answer.h5p Save changes and display Expected results: The 3 H5P contents are displayed, one below the other.

      There is a request to backport MDL-67095 to apply in 3.8.

      Steps to reproduce (in a clean installation without H5P libraries installed):

      1. Login as admin
      2. Create a course
      3. Create a Page
      4. Add the attached H5P files, using the H5P button, in the following order:
        • arithmetic-quiz.h5p
        • course-presentation.h5p
        • guess-the-answer.h5p
      5. Save changes

      Expected results

      • The 3 H5P contents are displayed, one below the other.

      Current results

      • The first time, the page doesn't display all the H5P contents (only the first and the last are displayed)
      • Some JS errors appear in the console
      • When reloading the page, the 3 H5P contents are displayed as expected

        1. arithmetic-quiz.h5p
          731 kB
        2. chart-7143.h5p
          107 kB
        3. course-presentation.h5p
          4.14 MB
        4. error.png
          error.png
          312 kB
        5. guess-the-answer.h5p
          861 kB
        6. interactive-video.h5p
          2.84 MB
        7. MDL-67172.jpg
          MDL-67172.jpg
          49 kB
        8. MDL-67172 (2).jpg
          MDL-67172 (2).jpg
          86 kB
        9. MDL-67172 (3).jpg
          MDL-67172 (3).jpg
          60 kB
        10. test-h5p.html
          0.5 kB

            cescobedo Carlos Escobedo
            sarjona Sara Arjona (@sarjona)
            Ferran Recio Ferran Recio
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 31 minutes
                3h 31m

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