-
Bug
-
Resolution: Fixed
-
Blocker
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE
-
MDL-41726-master-2nd -
-
100
-
BACKEND Sprint 5
Steps to reproduce
- Create a large course, say with 10,000 users, a few dozen groups each with a few thousand members, and several quizzes. (The OU has courses this big.)
- Time doing a course reset to remove all group members. (Also look at the DB query count in the footer.)
Do this for Moodle versions both before and after MDL-39958 was integrated. (Note that MDL-39958 was committed with MDL-39959 is the issue id in the commit comment.)
That is the perofrmance problem. Now the nasty race condition.
- Work out which order $DB->get_recordset('groups', array('courseid' => $courseid)); in groups_delete_group_members, in particular identify which goup will be deleted first, and which last.
- For one quiz, set Time limits as follows:
- Quiz closes: Now + 1 day
- Quiz closes group override for last group to be processed: Now - 1 day
- Quiz closes group override for first group to be processed: Now + 1 day
- Set the quiz to have attempts become overdue when time expires, and to send an email notification to student when this happens.
- Start an attempt as one student that is a member of both those groups. Answer some questions but don't submit.
- Now, try to work out when cron will next run, and just beofre that, do a course reset to remove all the group members, Now also need to be between T + 1 minute and T + 1 day.
Expected result: The student does not get a notification, because initially the close date is Now + 1 day, and when they are removed from both groups it is Now + 1 day.
Possible result:
Cron runs between time the student is removed from the first group, and the time they are removed from the last group. Hence cron sees them as due to submit T - 1 day ago, and so makes their attempt overdue, and sends them an incorrect email.
- Discovered while testing
-
MDL-41962 Event handlers are not removed from the DB after upgrade
-
- Closed
-
- has been marked as being related by
-
MDL-41936 Investigate how to handle events during bulk operations
-
- Closed
-
- is a regression caused by
-
MDL-39958 Replace Legacy events - Groups
-
- Closed
-
- will help resolve
-
MDL-41559 Replace handlers by observers for groups in mod_quiz
-
- Closed
-