Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.4.4, 2.5
-
Component/s: Quiz
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
-
Fixed Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
Reported by Steve Miley (see https://moodle.org/mod/forum/discuss.php?d=231937 )
If you restore a Moodle 1.9 backup with question containing embedded images that were in a sub-folder of the course folder (as https://gauchospace.ucsb.edu/courses/file.php/4644/Quizzes/Wk1.png) on the Moodle 1.9 website were the backup was created, everything is fine until you try to edit the question and save the result (you don't need to make any change just opening the question and saving it is enough to exhibit the problem). Then all images are broken in the question.
The forum thread contains useful details about the problem.
In short this is because of the difference about the value of the subdirs setting in the editing form class and in the save code of the question_type class.
As Tim says:
And, setting subdirs to false/0 now breaks things.
Therefore, we should set it to true/1 everywhere.