mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-32318 question preview: fix php stric syntax error
Also, cheating, and committing a whitespace fix in the same commit. Conflicts: question/engine/questionusage.php
This commit is contained in:
parent
9ad535c550
commit
b9832f2b87
@ -81,7 +81,7 @@ class quizaccess_delaybetweenattempts extends quiz_access_rule_base {
|
||||
$lastattemptfinish = $lastattempt->timefinish;
|
||||
if ($this->quiz->timelimit > 0) {
|
||||
$lastattemptfinish = min($lastattemptfinish,
|
||||
$lastattempt->timestart + $this->quiz->timelimit);
|
||||
$lastattempt->timestart + $this->quiz->timelimit);
|
||||
}
|
||||
|
||||
if ($numprevattempts == 1 && $this->quiz->delay1) {
|
||||
|
@ -171,8 +171,8 @@ class question_usage_by_activity {
|
||||
} else {
|
||||
$this->questionattempts[] = $qa;
|
||||
}
|
||||
$ids = array_keys($this->questionattempts);
|
||||
$qa->set_slot(end($ids));
|
||||
end($this->questionattempts); // Ready to get the last key on the next line.
|
||||
$qa->set_slot(key($this->questionattempts));
|
||||
$this->observer->notify_attempt_added($qa);
|
||||
return $qa->get_slot();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user