MDL-36897 quiz review: fixup previous commit.

This commit is contained in:
Tim Hunt 2012-12-12 08:12:16 +00:00
parent 609a7676e4
commit 0fe1b50c29

View File

@ -39,7 +39,7 @@ require_login($attemptobj->get_course(), false, $attemptobj->get_cm());
// Check that this attempt belongs to this user.
if ($attemptobj->get_userid() != $USER->id) {
if ($attemptobj->has_capability('mod/quiz:viewreports')) {
redirect($attemptobj->review_url(null, $page));
redirect($attemptobj->review_url(null));
} else {
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'notyourattempt');
}