-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5.4
-
MOODLE_405_STABLE
When creating an assignment with "Group submission settings -> Require all group members submit" set to no, the overdue notification is sent to the members of the group that did not submit.
The process at the moment for notifications is as follows:
1. Scheduled task "queue_all_assignment_overdue_notification_tasks" runs and creates an adhoc task "queue_assignment_overdue_notification_tasks_for_users" for each assignment that is now overdue ( https://github.com/moodle/moodle/blob/MOODLE_ ... due_notification_tasks.php#L46 )
2. Each adhoc task then loads a list of each user for the assignment that should have a notification sent to ( https://github.com/moodle/moodle/blob/MOODLE_ ... cation_tasks_for_users.php#L37 )
3. The function that checks to see if the user has submitted only checks against the user, not the group ( https://github.com/moodle/moodle/blob/MOODLE_ ... s/notification_helper.php#L234 calls https://github.com/moodle/moodle/blob/MOODLE_ ... /mod/assign/locallib.php#L3797 )
From my tests locally I create an assignment and enrolled 5 users as part of the same group to the course.
When submitting the assignment as 1 member of the group the database was updated to show that the groupid had submitted, and 1 of the users, but the remaining 4 were left in draft status resulting in them being picked up by the notification due to point 3 above:
| id | assignment | userid | timecreated | timemodified | timestarted | status | groupid | attemptnumber | latest |
|
+--------+------------+--------+-------------+--------------+-------------+-----------+---------+---------------+--------+
|
| 155139 | 5476 | 0 | 1747224770 | 1747224805 | NULL | submitted | 20633 | 0 | 1 | |
| 155140 | 5476 | 14273 | 1747224789 | 1747224805 | NULL | submitted | 0 | 0 | 1 | |
| 155143 | 5476 | 14274 | 1747224790 | 1747224790 | NULL | draft | 0 | 0 | 1 | |
| 155144 | 5476 | 14285 | 1747224790 | 1747224790 | NULL | draft | 0 | 0 | 1 | |
| 155141 | 5476 | 14297 | 1747224790 | 1747224790 | NULL | draft | 0 | 0 | 1 | |
| 155142 | 5476 | 14307 | 1747224790 | 1747224790 | NULL | draft | 0 | 0 | 1 | |
Additionally, on the UI the 4 users shown above in the "draft" status visually show as "Submitted for grading" on the grading report, however due to this being a display function of the report the status filter does not work as intended.
Initially I had thought that the solution would be to update the notification system so that it checks for group submissions, however after seeing the status differences in the database and the issue with the report, I think that the solution might be to trigger the other group members status to be "submitted" as well, but there may be issues with doing this, plus we'd need to make sure all other status updates are shared such as reverting to draft.