-
Bug
-
Resolution: Fixed
-
Major
-
2.4.5
-
MOODLE_24_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
MDL-41149-master -
1. Create Group: Group 1, containing Student A, Student B, Student C
2. Create Grouping: Grouping 1
3. Add Group 1 to Grouping 1
4. Set up an assignment with 'Students submit in groups' = Yes
5. Set 'Grouping for student groups' = Grouping 1
6. Student A submits a file
7. One random student from the group receives the notification
The reason for this is that the $submission object is altered before the notification is sent:
line 328 of /mod/assign/locallib.php: call to assign->process_save_submission()
line 4039 of /mod/assign/locallib.php: call to assign->update_submission()
line 3233 of /mod/assign/locallib.php: call to assign->gradebook_item_update() - this function loops through team members and assigns a value $submission->userid for each one
line 4059 of /mod/assign/locallib.php: call to assign->notify_student_submission_receipt() - this function uses $submission->userid if it exists
A quick fix would be to use $USER regardless of whether $submission->userid exists:
---if ($submission->userid) {
|
$user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST);
|
---} else {
|
---$user = $USER;
|
---}
|
---$this->send_notification($user, $user, 'submissionreceipt', 'assign_notification', $submission->timemodified);
|
|
+++$this->send_notification($USER, $USER, 'submissionreceipt', 'assign_notification', $submission->timemodified);
|
Our preferred option would be for all members of the group to receive the notification.