mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-77582 mod_quiz: Fix view_url() on null error
This commit is contained in:
parent
556208417d
commit
6c6adc462c
@ -61,7 +61,7 @@ if ($attemptobj->get_userid() != $USER->id) {
|
||||
if ($attemptobj->has_capability('mod/quiz:viewreports')) {
|
||||
redirect($attemptobj->review_url(null, $page));
|
||||
} else {
|
||||
throw new moodle_exception('notyourattempt', 'quiz', $quizobj->view_url());
|
||||
throw new moodle_exception('notyourattempt', 'quiz', $attemptobj->view_url());
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ $slots = $attemptobj->get_slots($page);
|
||||
|
||||
// Check.
|
||||
if (empty($slots)) {
|
||||
throw new moodle_exception('noquestionsfound', 'quiz', $quizobj->view_url());
|
||||
throw new moodle_exception('noquestionsfound', 'quiz', $attemptobj->view_url());
|
||||
}
|
||||
|
||||
// Update attempt page, redirecting the user if $page is not valid.
|
||||
|
Loading…
x
Reference in New Issue
Block a user