Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1, 2.1.2, 2.3.1, 2.3.6
-
MySQL
-
MOODLE_21_STABLE, MOODLE_23_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-29877_bad_grade_item -
Description
When i click Grades in some courses (3 out of 100) i get these errors and then i get memory exhausted:
Notice: Undefined index: in ../lib/grade/grade_category.php on line 1126 Notice: Trying to get property of non-object in ../lib/grade/grade_category.php on line 1126 Warning: array_key_exists() expects parameter 2 to be array, null given in ../lib/grade/grade_category.php on line 1126 Notice: Undefined property: stdClass::$path in ../lib/grade/grade_category.php on line 1142 Notice: Undefined property: stdClass::$id in /var/www/eclass2/lib/grade/grade_category.php on line 1142 Notice: Undefined property: stdClass::$id in ../lib/grade/grade_category.php on line 1144
Attempt to obtain a grade_category's associated grade_item without the category's ID being set.
line 1253 of /lib/grade/grade_category.php: call to debugging()
line 1241 of /lib/grade/grade_category.php: call to grade_category->get_grade_item()
line 212 of /lib/grade/grade_category.php: call to grade_category->load_grade_item()
line 1146 of /lib/grade/grade_category.php: call to grade_category->update()
line 1019 of /lib/grade/grade_category.php: call to grade_category->get_children()
line 1646 of /grade/lib.php: call to grade_category::fetch_course_tree()
line 130 of /grade/report/grader/lib.php: call to grade_tree->grade_tree()
line 114 of /grade/report/grader/index.php: call to grade_report_grader->__construct()
Can not regrade non existing category
line 393 of /lib/grade/grade_category.php: call to debugging()
line 235 of /lib/grade/grade_category.php: call to grade_category->qualifies_for_regrading()
line 1146 of /lib/grade/grade_category.php: call to grade_category->update()
line 1019 of /lib/grade/grade_category.php: call to grade_category->get_children()
line 1646 of /grade/lib.php: call to grade_category::fetch_course_tree()
line 130 of /grade/report/grader/lib.php: call to grade_tree->grade_tree()
line 114 of /grade/report/grader/index.php: call to grade_report_grader->__construct()
Can not update grade object, no id!
line 214 of /lib/grade/grade_object.php: call to debugging()
line 241 of /lib/grade/grade_category.php: call to grade_object->update()
line 1146 of /lib/grade/grade_category.php: call to grade_category->update()
line 1019 of /lib/grade/grade_category.php: call to grade_category->get_children()
line 1646 of /grade/lib.php: call to grade_category::fetch_course_tree()
line 130 of /grade/report/grader/lib.php: call to grade_tree->grade_tree()
line 114 of /grade/report/grader/index.php: call to grade_report_grader->__construct()
PHP Notice: Undefined property: stdClass::$id in ../lib/grade/grade_category.php
If it helps,we don't use grade categories and all these are set to uncategorised.