Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.10, 2.2.7, 2.3.4, 2.4.1
-
Testing Instructions:
-
Affected Branches:MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
Fixed Branches:MOODLE_23_STABLE, MOODLE_24_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
Refer to MDL-37672. Restoring a course backup made in 1.9 which is missing all grade categories, but still has manual grade items that reference those absent categories, will incorrectly insert the grade items with a null category id.
This will cause a recursion/memory exhaustion error when trying to access the course's Grades interface, as the null category id is unanticipated.
Suggested fix is to not allow an import of a manual grade item with a null category id. If the mapping (backup_ids_temp) fails, use the course's grade category as a default.