Skip to content

Commit

Permalink
Merge branch 'MDL-43412_25' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_25_STABLE
  • Loading branch information
danpoltawski committed Jan 14, 2014
2 parents 5af2e8c + 4d74202 commit 6462a63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions mod/quiz/startattempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@
$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.
if ($lastattempt->state == quiz_attempt::OVERDUE) {
redirect($quizobj->summary_url($lastattempt->id));
} else if ($lastattempt->state != quiz_attempt::IN_PROGRESS) {
if ($lastattempt->state == quiz_attempt::ABANDONED || $lastattempt->state == quiz_attempt::FINISHED) {
redirect($quizobj->review_url($lastattempt->id));
}

Expand Down Expand Up @@ -158,7 +156,11 @@
$accessmanager->notify_preflight_check_passed($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.
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
$output->access_messages($messages));
}
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);
Expand Down

0 comments on commit 6462a63

Please sign in to comment.