-
Bug
-
Resolution: Fixed
-
Critical
-
2.3.1
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
To reproduce:
You need a course with a student.
- Create an assignment, turn at least one of the feedback methods on.
- Go into the gradebook, turn editing on, add a grade for that student in the gradebook, save.
- Become the student.
- Click on the assignment in the course.
- You will get a "Coding error detected, it must be fixed by a programmer: PHP catchable fatal error"
Here is the stack trace in the 20120802 master branch:
Debug info: Argument 1 passed to assign_feedback_comments::is_empty() must be an instance of stdClass, boolean given, called in /usr/local/apache2/htdocs/m_master/mod/assign/renderer.php on line 324 and defined
Error code: codingerror
Stack trace:
line 397 of /lib/setuplib.php: coding_exception thrown
line 316 of /mod/assign/feedback/comments/locallib.php: call to default_error_handler()
line 324 of /mod/assign/renderer.php: call to assign_feedback_comments->is_empty()
line 215 of /lib/outputrenderers.php: call to mod_assign_renderer->render_assign_feedback_status()
line 2116 of /mod/assign/locallib.php: call to plugin_renderer_base->render()
line 2152 of /mod/assign/locallib.php: call to assign->view_student_summary()
line 382 of /mod/assign/locallib.php: call to assign->view_submission_page()
line 53 of /mod/assign/view.php: call to assign->view()
My general findings:
When you add a grade through the gradebook, and grade_grades entry is made, but assign_grades is empty. In mod/assign/locallib.php view_student_summary(), the assign_grade item it fetch and put into $grade and the gradebook grade is fetched and placed into $gradebookgrade. Later on, if $gradebookgrade->grade exists, a assign_feedback_status is made, but with the assign_grade grade ($grade) which is false, because there is no assign_grade entry.
That is then passed to mod/assign/renderer.php render_assign_feedback_status(). In there, the $grade is passed to assign_feedback_XXX::is_empty(), which is expecting a object, not the boolean false.
- has a non-specific relationship to
-
MDL-34801 Logic for hiding activities from My Moodle is not intuitive
-
- Closed
-