mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
Merge branch 'MDL-43412' of git://github.com/timhunt/moodle
This commit is contained in:
commit
4be67945aa
2 changed files with 7 additions and 5 deletions
|
@ -93,9 +93,7 @@ if ($lastattempt && ($lastattempt->state == quiz_attempt::IN_PROGRESS ||
|
||||||
$quizobj->create_attempt_object($lastattempt)->handle_if_time_expired($timenow, true);
|
$quizobj->create_attempt_object($lastattempt)->handle_if_time_expired($timenow, true);
|
||||||
|
|
||||||
// And, if the attempt is now no longer in progress, redirect to the appropriate place.
|
// And, if the attempt is now no longer in progress, redirect to the appropriate place.
|
||||||
if ($lastattempt->state == quiz_attempt::OVERDUE) {
|
if ($lastattempt->state == quiz_attempt::ABANDONED || $lastattempt->state == quiz_attempt::FINISHED) {
|
||||||
redirect($quizobj->summary_url($lastattempt->id));
|
|
||||||
} else if ($lastattempt->state != quiz_attempt::IN_PROGRESS) {
|
|
||||||
redirect($quizobj->review_url($lastattempt->id));
|
redirect($quizobj->review_url($lastattempt->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +157,11 @@ if ($accessmanager->is_preflight_check_required($currentattemptid)) {
|
||||||
$accessmanager->notify_preflight_check_passed($currentattemptid);
|
$accessmanager->notify_preflight_check_passed($currentattemptid);
|
||||||
}
|
}
|
||||||
if ($currentattemptid) {
|
if ($currentattemptid) {
|
||||||
redirect($quizobj->attempt_url($currentattemptid, $page));
|
if ($lastattempt->state == quiz_attempt::OVERDUE) {
|
||||||
|
redirect($quizobj->summary_url($lastattempt->id));
|
||||||
|
} else {
|
||||||
|
redirect($quizobj->attempt_url($currentattemptid, $page));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete any previous preview attempts belonging to this user.
|
// Delete any previous preview attempts belonging to this user.
|
||||||
|
|
|
@ -64,7 +64,7 @@ if (!$attemptobj->is_preview_user() && $messages) {
|
||||||
$output->access_messages($messages));
|
$output->access_messages($messages));
|
||||||
}
|
}
|
||||||
if ($accessmanager->is_preflight_check_required($attemptobj->get_attemptid())) {
|
if ($accessmanager->is_preflight_check_required($attemptobj->get_attemptid())) {
|
||||||
redirect($attemptobj->start_attempt_url(null, $page));
|
redirect($attemptobj->start_attempt_url(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayoptions = $attemptobj->get_display_options(false);
|
$displayoptions = $attemptobj->get_display_options(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue