-
Bug
-
Resolution: Fixed
-
Critical
-
2.1.4, 2.2.1
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
Moodle 1.9 did not write grade_categories.depth and grade_categories.path to the backup file because both of these can be re-constructed from grade_categories.parent.
This is not totally a problem, because 2.x restore code computes grade_categories.path from parent on lines 375 - 400 of backup/moodle2/restore_stepslib.php
However, it does not re-compute depth at the same time. It relies on the correct value being in the backup file which was not the case for a custom "Convert courses from 1.9 -> 2.x" system we developed at the OU>
As a results, you get grade_categories in the DB with depth = 0.
Surprisingly, this does not break very much. We only noticed it at the OU because the move icon is only shown on categories where depth > 0, and someone noticed that they could not move any categories in their course that came from 1.9.
- Discovered while testing
-
MDL-31333 MDL-30610 changes breaks restore of 1.9 backups (and II)
-
- Closed
-