Tim Hunt 207d145dda quiz delays MDL-20956 don't let overdue attempts + delays block students.
Suppose a quiz has a 60 min time limit, and an enforced delay of 60 mins between attempts.

Suppose a sudent starts an attempt, and then closes their browser, and then comes back 2 hours later. When they try to restart the quiz, it is submitted immediately by the timer.

Now they are blocked out for the next hour.

After this change, they would no longer be blocked, becuse if their attemtp had been submitted at the end of the first hour, then they would already have waited an hour.

That is, we compare the current time with both $lastattempt->timefinish + $delay and $lastattempt->timestart + $timelimit + $delay.
2010-08-06 11:41:50 +00:00
..