Merge branch 'MDL-36897' of git://github.com/timhunt/moodle

This commit is contained in:
Dan Poltawski
2012-12-13 09:54:17 +08:00
+1 -1
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');
}