-
Bug
-
Resolution: Fixed
-
Critical
-
3.0.7
-
MOODLE_30_STABLE
-
MOODLE_30_STABLE, MOODLE_31_STABLE
-
MDL-56948-master -
When viewing the submissions of any assignment that has the Grade Type of None a coding exception is thrown because /mod/assign/locallib.php attempts to get the decimals of grade when there is no grade. Changing the assignment to Grade Type Point enables you to view the submissions page.
- View an assignment of grade type None that has submissions.
- Click on "View/grade all submissions"
Debug info:
Error code: codingerror
Stack trace:
line 1220 of /mod/assign/locallib.php: coding_exception thrown
line 1332 of /mod/assign/locallib.php: call to assign->get_grade_item()
line 639 of /mod/assign/gradingtable.php: call to assign->display_grade()
line 861 of /mod/assign/gradingtable.php: call to assign_grading_table->display_grade()
line 817 of /lib/tablelib.php: call to assign_grading_table->col_grade()
line 463 of /mod/assign/gradingtable.php: call to flexible_table->format_row()
line 1521 of /lib/tablelib.php: call to assign_grading_table->format_row()
line 1638 of /lib/tablelib.php: call to table_sql->build_table()
line 1233 of /mod/assign/renderer.php: call to table_sql->out()
line 1029 of /mod/assign/renderer.php: call to mod_assign_renderer->flexible_table()
line 319 of /lib/outputrenderers.php: call to mod_assign_renderer->render_assign_grading_table()
line 3412 of /mod/assign/locallib.php: call to plugin_renderer_base->render()
line 3450 of /mod/assign/locallib.php: call to assign->view_grading_table()
line 552 of /mod/assign/locallib.php: call to assign->view_grading_page()
line 52 of /mod/assign/view.php: call to assign->view()
Version 3.0.7 vs 3.0.6 introduced the following code on line 1332 of /mod/assign/locallib.php
$decimals = $this->get_grade_item()->get_decimals();