mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
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.
This commit is contained in:
parent
240db6d8f7
commit
0f525225a1
@ -127,15 +127,15 @@ class mod_quiz_overdue_attempt_updater {
|
||||
|
||||
WHERE (
|
||||
state = 'inprogress' AND (
|
||||
:timenow1 > usertimeclose OR
|
||||
:timenow2 > quiza.timestart + usertimelimit
|
||||
(usertimeclose > 0 AND :timenow1 > usertimeclose) OR
|
||||
(usertimelimit > 0 AND :timenow2 > quiza.timestart + usertimelimit)
|
||||
)
|
||||
)
|
||||
OR
|
||||
(
|
||||
state = 'overdue' AND (
|
||||
:timenow3 > graceperiod + usertimeclose OR
|
||||
:timenow4 > graceperiod + quiza.timestart + usertimelimit
|
||||
(usertimeclose > 0 AND :timenow3 > graceperiod + usertimeclose) OR
|
||||
(usertimelimit > 0 AND :timenow4 > graceperiod + quiza.timestart + usertimelimit)
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user