mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
207d145dda
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.