-
Bug
-
Resolution: Fixed
-
Minor
-
3.2
-
None
-
3.2
-
MOODLE_32_STABLE
-
MOODLE_32_STABLE
From github issue #80:
Import/Restore not working for dependencies, if the parent question (RADIO or DROPDOWN) was created after the child question and has been moved before the to-be-child afterwards.
The parent-question is stored AFTER the child question due to its higher ID in the Backup-XML-File inside the mbz-File. While iterating through the file, moodle can't get the new mappingid for the depending record, because it doesn't exist yet.
This leads to the result: dependquestion = 0, dependchoice = old choice ID
Example:
Create a questionnaire with some questions (IDs 1 2 3 4 5). Move the last question (ID 5) somewhere before the second last question (ID 4). Set the new last question to be dependend on the answer in (ID 5).
Now create a backup. The questions in the questionnaire are stored sequentially according to the question-ID.
Now import the mbz-File and restore the questionnaire. The questionnaire gets importet smoothly, but misses the correct dependency between former ID4 to ID5.
Tested with MOODLE_32_STABLE.