-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.0.6, 3.2
-
None
-
MOODLE_30_STABLE, MOODLE_32_STABLE
When creating an assignment with all feedback disabled and grade set to none, viewing grading table results in an error.
Coding error detected, it must be fixed by a programmer: Improper use of the assignment class. Cannot load the grade item.
Stack trace:
line 1481 of /mod/assign/locallib.php: coding_exception thrown
line 1593 of /mod/assign/locallib.php: call to assign->get_grade_item()
line 734 of /mod/assign/gradingtable.php: call to assign->display_grade()
line 961 of /mod/assign/gradingtable.php: call to assign_grading_table->display_grade()
line 810 of /lib/tablelib.php: call to assign_grading_table->col_grade()
line 556 of /mod/assign/gradingtable.php: call to flexible_table->format_row()
line 1493 of /lib/tablelib.php: call to assign_grading_table->format_row()
line 1610 of /lib/tablelib.php: call to table_sql->build_table()
line 1439 of /mod/assign/renderer.php: call to table_sql->out()
line 1235 of /mod/assign/renderer.php: call to mod_assign_renderer->flexible_table()
line 378 of /lib/outputrenderers.php: call to mod_assign_renderer->render_assign_grading_table()
line 4074 of /mod/assign/locallib.php: call to plugin_renderer_base->render()
line 4150 of /mod/assign/locallib.php: call to assign->view_grading_table()
line 575 of /mod/assign/locallib.php: call to assign->view_grading_page()
line 55 of /mod/assign/view.php: call to assign->view()
Steps to create
In a course with enrolments:
- Create new assignment
- Remove all feedback types
- Set grade type to none
- Save
- Click assignment, then view all grades
However, changing the grade to point, setting a value, before returning the grade type to none fixes this.