Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.3.2, 2.3.8
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-35717-quiz-attempt-checkstate -
-
Description
We see lots of quiz attempts staying in the "In progress" state after quizzes close.
Attempts modified within one hour of the close date are closed (in a way depending on quiz settings), but previous attempts are left open.
There is an SQL WHERE clause in get_list_of_overdue_attempts() (mod/quiz/cronlib.php) that selects only recent quiz attempts:
WHERE iquiza.state IN ('inprogress', 'overdue')
|
AND iquiza.timemodified >= :processfrom
|
AND iquiza.timemodified < :processto
|
I think the middle line is causing this. Removing that line should fix the problem, although it removes the incremental processing aspect to the code. On our new 2.3 site with 20k attempts, the full query with processfrom=0 finishes in milliseconds, so this might not be an issue.
Attachments
Issue Links
- caused a regression
-
MDL-37098 Fatal error when deleting a group in quiz_groups_group_deleted_handler()
-
- Closed
-
-
MDL-37378 Notice Undefined property timecheckstate when restoring old backups
-
- Closed
-
-
MDL-37514 Quiz is not automatically submitted in preview mode when time is up
-
- Closed
-
- has a non-specific relationship to
-
MDL-37577 Deleting users and very slow quiz_get_attempt_usertime_sql
-
- Closed
-
- has been marked as being related by
-
MDL-36842 Back-port the fix for MDL-35717 once we have confidence it works in master.
-
- Closed
-
- is a regression caused by
-
MDL-3030 Late quiz attempts should be closed automatically
-
- Closed
-