I have a very concrete case. This case is due to the fact that we are still using mod_hvp and not the core h5p. But potentially it can affect other third party plugins.
A group of teacher created a very nice escape room like course whose core is a h5p content type Virtual Tour (360). There are other h5p activities in the course and also some other type of activities. They are all hidden but available. The student reach them as links from within the main Virtual Tour. Unfortunately, the course will be completely broken if it goes through a backup/restore process. The encoding/decoding of internal links does not happen. This is such a pity. Potentially the problem exists for each plugin that might decide to save the content as json.
To reproduce the issue:
- Create a course A
- Add any activity or resource, for example a page.
- Add a h5p activity (with mod_hvp) that might contain a url, for example a course presentation.
- In the course presentation add a text that contains a url to the view.php of the page resource
- Duplicate the course, obtaining course B
- Confirm that the link in the course presentation in course B still points to the page resource of course A.
- Confirm that this happens even with the mod_hvp branch decode-links-in-json_content, which extends the decoding of links to the content of the row json_content of the table mdl_hvp.
The reason is, that the encoding does not happen, since the url contains escaped forward slashes (default for php json_encode).
Changing from mod_hvp to core h5p will not fix this, but there the situation is very different.