-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.1, 4.1.10, 4.2.7, 4.3, 4.4
- Create a course with studen s1
- Create h5pactivity with Embed on
- Add a page activity. Insert embed code from previous activity
- Back up and restore course into new course2 (include enrolled users)
- Enrol another student s2 into a course2
- 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.
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.