Course restore from Moodle v3.4.6 to v3.6.3 error/unknown_context_mapping
Submitted by chuckyang on Tue, 04/16/2019 - 19:11
H5P version 1.17.2 with all library updated.
attempting to restore a Moodle v3.4.6+ course with H5P activity(Interactive video) to a Moodle v3.6.3 would result "error/unknown_context_mapping"
Steps to reproduce the error:
- Add an h5p activity to a moodle 3.4 course.
- Backup the moodle 3.4 course.
- Restore into a moodle 3.6 course.
- The backup will fail with an error/unknown_context_mapping error.
On screen debug output on screen from Moodle v3.6 is attached in the post.
Wed, 07/24/2019 - 14:19
I am experiancing the same
I am experiancing the same issue
(And it was also reported here:
Wed, 08/21/2019 - 11:35
Same here, here's a little work around
This happens when for some reason, in mdl_context the first line id is not 1. (The context line of the site itself)
We were able to get around this currently by editing: mod/hvp/backup/moodle2/restore_hvp_stepslib.php
in function after_execute() line 291
$this->add_related_files('mod_hvp', 'libraries', null, $context->id);with:$this->add_related_files('mod_hvp', 'libraries', null, 1);
This will only work when the origin site had his id set to one (mdl_context.id)we need to really pass the old context id, I currently don't know how to do this Thanks