It is worse with some themes and some browsers.
You can still edit by clicking the question name, but that is not obvious.
I moved the edit icon to the left.
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.
Suppose you have two load-balanced servers with badly-synchronised clocks, and
a student does a really quick quiz attempt.
Then it is possible that quiz_attemtp.timestart is greater than quiz_attemtp.timefinish.
And these columns are unsigned (on MySQL) so timefinish - timestart is compulted as
a number close to 2^64, which is about 42 times the age of the universe.
Do the subtraction in PHP instead. (But we still need to compute a duration columnin PHP
because sometimes we sort on it.)
Actually, reviewing this, I noticed some other security checks were missing, for
example we should ensure the users can only delete attempts belonging to this quiz!
Some help icons dropped without replacement as suggested by Helen, the
Help Writer. Some strings moved to core_question.
AMOS BEGIN
HLP quiz/timelimit.html,[timelimit_help,mod_quiz]
HLP quiz/grademethod.html,[grademethod_help,mod_quiz]
HLP quiz/questionsperpage.html,[newpage_help,mod_quiz]
HLP quiz/shufflewithin.html,[shufflewithin_help,mod_quiz]
HLP quiz/penaltyscheme.html,[penaltyscheme_help,mod_quiz]
HLP quiz/repeatattempts.html,[eachattemptbuildsonthelast_help,mod_quiz]
HLP quiz/reviewoptions.html,[reviewoptionsheading_help,mod_quiz]
HLP quiz/showuserpicture.html,[showuserpicture_help,mod_quiz]
HLP quiz/decimalpoints.html,[decimalplaces_help,mod_quiz]
HLP quiz/decimalplacesquestion.html,[decimalplacesquestion_help,mod_quiz]
HLP quiz/requirepassword.html,[requirepassword_help,mod_quiz]
HLP quiz/requiresubnet.html,[requiresubnet_help,mod_quiz]
HLP quiz/timedelay1.html,[delay1st2nd_help,mod_quiz]
HLP quiz/timedelay2.html,[delaylater_help,mod_quiz]
HLP quiz/overallfeedback.html,[overallfeedback_help,mod_quiz]
HLP quiz_statistics/negcovar.html,[negcovar_help,quiz_statistics]
MOV [penaltyfactor,mod_quiz],[penaltyfactor,core_question]
MOV [penaltyfactor_help,mod_quiz],[penaltyfactor_help,core_question]
HLP quiz/penalty.html,[penaltyfactor_help,core_question]
AMOS END