Does anyone have a fix to the problem of editing a question with files links that have a directory path and then the image link breaking (where the questions come from a moodle 1.9 backup)?
We are running Moodle 2.5, importing a 1.9 course backup with quiz/questions with links to images/files.
We've spent about 25 hours investigating this problem. It affects quiz questions imported from moodle 1.9 that have file references that might have a directory folder path. All is fine until an edit/save is done on the question with the file link.
We are importing courses from 1.9 into Moodle 2.5. These courses have quiz and questions. The questions and all the links to the images come in fine, and images render properly.
BUT, Once a question is edited and saved in Moodle 2.5, (in the case of the file being an image (<img src=...> ) The image no longer appears.
After many hours of doing over 20 restores with different test cases, I was able to isolate the problem to this.
In Moodle 1.9, many instructors created quiz questions that had an image link that looked like
<img src="https://gauchospace.ucsb.edu/courses/file.php/4644/Quizzes/Wk1.png" alt="" />
Note - 4644 is the courseid, Quizzes is a folder in the course files, Wk1.png is the file.
When Moodle 2.5 imports the backup, and converts things, it adds a record in to the files table with something like -
... question , questiontext, 5, /Quizzes/, Wk1.png ...
When you edit this question in moodle 2.5, it creates a bunch of
user draft entries in the files table.
BUT, HERE IS THE BIG PROBLEM, once you save, if the filearea is more than '/' the records in the files table are deleted.
The scope of this problem is limited to 1.9 course backups where the files are in a subfolder. Unfortunately, for us,
we have 3700 questions that have this situation. In Moodle 2.5, I don't believe there would ever be a subfolder concept, that it only exists as a legacy problem from moodle 1.9.
Has anyone seen tthis? Any Jira issues you are aware of? Suggestions?