Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error/unknown_context_mapping when restoring a course with H5P activity #369

Open
TheRamSan opened this issue Sep 30, 2020 · 4 comments
Open

Comments

@TheRamSan
Copy link

Hi,
When attempting to restore a Moodle 3.9 course with H5P activity to a Moodle 3.8.3 I get "error/unknown_context_mapping"

Steps to reproduce the error:

Add an h5p activity to a moodle 3.9 course.
Backup the moodle 3.9 course.
Restore into a moodle 3.8.3 course.
The backup will fail with an error/unknown_context_mapping error.

What can be done?
Regards,
Ram

@TheRamSan
Copy link
Author

You can see it here:
https://www.loom.com/share/54839e94206b4df892da8c46a2416287

I can't import it - but I can manually upload it.

@Urpokarhu1
Copy link

Urpokarhu1 commented Feb 10, 2021

Hello,

I would like to see this bug fixed @fnoks

@danowar2k
Copy link

We ran into this error.

This happens (exclusively? I don't know) when the hvp activity backup has the main_library_id set to 0, meaning when an already broken hvp activity is backed up and restored.

Going back to the course on the old system that had the activity, we saw that the old activitiy worked.

We never backup hvp libraries because the backup process is slow as molasses.
What maybe happened back then was we backed up the course from the old Moodle server and then restored the course into the new Moodle server where the library in the requested Major.Minor was not installed yet.

mod_hvp looks for the library but doesn't react well to missing libraries when restoring. Meaning if the library isn't found, the main_library_id is just set to 0 (because that is "false")

Having a course with such a broken hvp activity leads to not being able to backup and restore that course anymore.

@danowar2k
Copy link

#561 Noted this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants