Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.4.7, 2.5.2, 2.6
-
MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
Description
On going to the "Grade essays" tab on the lesson, it is possible to get a coding error under certain circumstances. The error is accompanied by the following notice:
Notice: Undefined offset: 73371 in /moodle/web/mod/lesson/essay.php on line 330 Call Stack: 0.0026 968608 1. {main}() /moodle/web/mod/lesson/essay.php:0 Notice: Undefined offset: 73371 in /moodle/web/mod/lesson/essay.php on line 375 Call Stack: 0.0026 968608 1. {main}() /moodle/web/mod/lesson/essay.php:0
|
The circumstances seem to be
- the lesson is limited to group members only
- there is an essay submission from someone who is not a group member in the target grouping
To reproduce:
- Create a lesson with "Available for group members only" unset
- Add 2 users, "User 1" and "User 2" to the course. Login as both users and submit an assignment.
- Log back in as admin. Create a group with only User 1 in it, and add to a grouping. Change the lesson settings to "Available for group members only" and use this grouping.
- Go to the "Grade essays" tab. You should see the error.
(NB: This error does not appear unless there is at least one submission by someone who is in a group in the chosen grouping)
Even though the steps above describe a not particularly sensible scenario, where someone changes the target grouping after submission has started, I think (although I haven't tested this) that the same should happen if someone submits an essay assignment and then is removed from a group, which is a more reasonable scenario.