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

Implement backup and restore process for H5P content

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.8
    • 3.8
    • H5P
    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-66593-master
    • Hide

      Setup

      1. Upload the test-h5p.html file to the $CFG->wwwroot.
      2. Access to the private files block.
      3. Upload the file arithmetic-quiz.h5p  to the root folder.
      4. In the Private files block, copy the URL for the file arithmetic-quiz.h5p  in "Folder with spaces".
      5. Open $CFG->wwwroot/test-h5p.html in a new tab.
      6. Paste the previous URL into the "H5P file URL" form field.
      7. Select the embed checkbox.
      8. Click the Display button.
      9. When the H5P content is displayed you could see a grey bar below the H5P content with the Embed button.
      10. Click the "Embed" button.
      11. A popup is displayed with the code for embedding this H5P content.
      12. Copy this code. And Paste anywhere you can go find it later to use in the testing scenarios.
      13. Now, you need two instances of Moodle with different wwwroot.
      14. Example:
        1. (moodlesource) -> http://localhost/moodlesource
        2. (moodletarget) -> http://localhost/moodletarget
      15. Create a new course, named course1.

      Testing scenario 1. Backup and restore in differents Moodles.

      1. Login as admin in moodlesource
      2. Go to course1.
      3. Added a new label and paste the previous embed code in the Setup step 12. into the label text in mode </> in Atto editor.
      4. Now you should see the H5P displayed in the new label in the course.
      5. Added a new page and paste the previous embed code in the Setup step 12.  into the Page content in mode </> in Atto editor.
      6. Now you should see the H5P displayed in the page activity.
      7. Create a new backup for course1. You could use the default settings and go next to have the new backup.
      8. Download the new backup.
      9. Login as admin in moodletarget
      10. Go to Site administration > Courses > Restore course
      11. Upload the new backup created in step 5 in Import a backup file section.
      12. Restore the backup. Use the Miscellaneous category to restore the backup or any other category.
      13. Use the defaults settings to restore the backup.
      14. Go to the new course restored.
      15. Expected result: Check you should see the H5P displayed in the label of the new course.
      16. Go to the page activity.
      17. Expected result: Check you should see the H5P displayed

      Testing scenario 2. Backup and restore in the same Moodle.

      1. Login as admin in moodlesource
      2. Go to Site administration > Courses > Restore course
      3. Upload the new backup created in the previous Testing scenario step 5 in Import a backup file section.
      4. Restore the backup. Use the Miscellaneous category to restore the backup or any other category.
      5. Use the defaults settings to restore the backup.
      6. Go to the new course restored and turn the editing on.
      7. Expected result: Check you should see the H5P displayed in the label of the new course.
      8. Go to the page activity.
      9. Expected result: Check you should see the H5P displayed.
      Show
      Setup Upload the test-h5p.html file to the $CFG->wwwroot. Access to the private files block. Upload the file arithmetic-quiz.h5p  to the root folder. In the Private files block, copy the URL for the file arithmetic-quiz.h5p   in "Folder with spaces". Open $CFG->wwwroot/test-h5p.html in a new tab. Paste the previous URL into the "H5P file URL" form field. Select the embed checkbox. Click the Display button. When the H5P content is displayed you could see a grey bar below the H5P content with the Embed button. Click the "Embed" button. A popup is displayed with the code for embedding this H5P content. Copy this code . And Paste anywhere you can go find it later to use in the testing scenarios. Now, you need two instances of Moodle with different wwwroot. Example : (moodlesource) -> http://localhost/moodlesource (moodletarget) -> http://localhost/moodletarget Create a new course, named course1. Testing scenario 1. Backup and restore in differents Moodles. Login as admin in moodlesource Go to course1. Added a new label and paste the previous embed code in the Setup step 12. into the label text in mode </> in Atto editor. Now you should see the H5P displayed in the new label in the course. Added a new page and paste the previous embed code in the Setup step 12.  into the Page content in mode </> in Atto editor. Now you should see the H5P displayed in the page activity. Create a new backup for course1. You could use the default settings and go next to have the new backup. Download the new backup. Login as admin in moodletarget Go to Site administration > Courses > Restore course Upload the new backup created in step 5 in Import a backup file section. Restore the backup. Use the Miscellaneous category to restore the backup or any other category. Use the defaults settings to restore the backup. Go to the new course restored. Expected result: Check you should see the H5P displayed in the label of the new course. Go to the page activity. Expected result: Check you should see the H5P displayed Testing scenario 2. Backup and restore in the same Moodle. Login as admin in moodlesource Go to Site administration > Courses > Restore course Upload the new backup created in the previous Testing scenario  step 5 in Import a backup file section. Restore the backup. Use the Miscellaneous category to restore the backup or any other category. Use the defaults settings to restore the backup. Go to the new course restored and turn the editing on. Expected result: Check you should see the H5P displayed in the label of the new course. Go to the page activity. Expected result: Check you should see the H5P displayed.
    • H5P Sprint 3, H5P Sprint Relase 3.8

    Description

      Using the new Atto button to upload and insert H5P content, we are creating content in the DB and spreading unzipped files in the file system. We need to check and be sure everything is ok once we backup and restore that content created using Atto editor.

      Once this issue MDL-66399 was ready we have a new scenario when we need to implement the backup and restore regarding the embed.php URLs. 

      We have URLs like localhost/moodle/h5p/embed.php?url=@@PLUGINFILE@@...

      So, we are going to translate these URLs in the Backup/Restore in something like $@H5PEMBED@$?url=@@PLUGINFILE@@

       

      Attachments

        1. arithmetic-quiz.h5p
          731 kB
          Carlos Escobedo
        2. Screenshot_1.png
          120 kB
          Janelle Barcega
        3. Screenshot_2.png
          57 kB
          Janelle Barcega
        4. test-h5p.html
          0.4 kB
          Carlos Escobedo

        Issue Links

          Activity

            People

              cescobedo Carlos Escobedo
              amaia Amaia Anabitarte
              Victor Déniz Falcón Victor Déniz Falcón
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/19

                Time Tracking

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