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

H5P embeds not rewritten during restore/import

XMLWordPrintable

      1. Create a course with studen s1
      2. Create h5pactivity with Embed on
      3. Add a page activity. Insert embed code from previous activity
      4. Back up and restore course into new course2 (include enrolled users)
      5. Enrol another student s2 into a course2
      6. Access page activity

      Expected: Both students can see h5p in page activity
      Actual: Only student s1 can see h5p in page activity

      The underlying problem is that the embedding code for mod_h5pactivity uses a pluginfile.php url that is urlencoded and hence is not modified by backup/restore process.

      Example: http://localhost/h5p/embed.php?url=http%3A%2F%2Flocalhost%2Fpluginfile.php%2F24%2Fmod_h5pactivity%2Fpackage%2F0%2Finteractive-content-29523.h5p&component=mod_h5pactivity

      will be encoded to 
      $@H5PEMBED@$?url=http%3A%2F%2Flocalhost%2Fpluginfile.php%2F24%2Fmod_h5pactivity%2Fpackage%2F0%2Finteractive-content-29523.h5p&component=mod_h5pactivity

      The patch takes care of that and enhances backup_course_task::encode_links_helper() and restore_decode_rule accordingly for possible later use in other cases as there are other activities that might need similar encoding.

       

        1. (1) Passed -- (Main)MDL-69656.png
          71 kB
          Kim Jared Lucas
        2. Selection_001.png
          13 kB
          Ilya Tregubov

            stefan.hanauska Stefan Hanauska
            emerrill Eric Merrill
            Christopher Reimann Christopher Reimann
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            20 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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