13 Commits

Author SHA1 Message Date
Tim Hunt
4ae4d8d1b6 MDL-76614 quiz: merge mod_quiz_overdue_attempt_updater into task
The only place this code was used was in
mod_quiz\task\update_overdue_attempts so neater to combine them into one
class.
2023-01-06 14:35:48 +00:00
Tim Hunt
6f988b712d MDL-45455 quiz cron must rollback transaction on error. 2014-05-15 15:09:58 +01:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Tim Hunt
805e32f74e MDL-37577 quiz overdue handling: optimise database query
This is the standard trick of adding a redundant WHERE clause to a
subquery to help the database realise that it does not have to inspect
so many rows.
2013-01-21 13:21:38 +00:00
Matt Petro
8e771aed93 MDL-35717 quiz: fix overdue attempt processing 2012-11-16 21:32:09 -05:00
Tim Hunt
efe5a53ede MDL-35698 quiz cron: group overrides not computed correctly
Thanks to Matt Petro for finding the bug in this monster SQL statement.
2012-09-29 09:34:29 +01:00
Tim Hunt
c33d527833 MDL-34351 quiz cron: one broken overdue attempt should not kill cron
It seems that sometimes trying to process an overdue quiz attempt can
throw an exception. In that case, we need to catch it and report it
nicely, and then carry on processing the rest of the attempts, rather
than just killing the whole of cron processing.

Also, there may be garbage quiz attempts where the associated quiz or
course has been deleted. Skip those too.
2012-07-19 15:21:05 +01:00
Tim Hunt
0f525225a1 MDL-34109 quiz cron: timelimit are timeclose of 0 are special.
If the timelimit or timeclose of a quiz are 0, this means 'no
restriction', rather than '1970' or '0 seconds'. We need to handle these
special cases correctly in the code that looks for quiz attempts that
might be in the wrong state.
2012-06-29 11:07:21 +01:00
Tim Hunt
240db6d8f7 MDL-34109 quiz cron: change whitespace before applying the fix.
This commit just changes the white-space, but does not change any of the
actual code. This is so that the commit I am about to make, which will
change the code, will be easier to understand.
2012-06-29 11:02:30 +01:00
Tim Hunt
815fcecc40 MDL-33471 quiz cron: better mtrace output for overdue handling 2012-06-08 16:02:01 +01:00
Tim Hunt
f59f85717e MDL-32738 quiz overdue handling cron: appease MySQL.
Thanks to sam marshall for giving my the idea of using a subquery to
make the SQL work on all DBs.
2012-05-03 18:07:59 +01:00
Tim Hunt
e1bf1619e1 MDL-3030 quiz overdue handling: cron to update overdue attempts. 2012-04-27 15:07:41 +01:00