mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-50996 quiz: fix review error with unusual permissions
This commit is contained in:
parent
6d392b3027
commit
857e2a6f8c
3 changed files with 27 additions and 11 deletions
|
@ -52,7 +52,8 @@ $PAGE->set_pagelayout('popup');
|
|||
$PAGE->set_heading($attemptobj->get_course()->fullname);
|
||||
$output = $PAGE->get_renderer('mod_quiz');
|
||||
|
||||
// Check permissions.
|
||||
// Check permissions - warning there is similar code in review.php and
|
||||
// quiz_attempt::check_file_access. If you change on, change them all.
|
||||
if ($attemptobj->is_own_attempt()) {
|
||||
if (!$attemptobj->is_finished()) {
|
||||
echo $output->review_question_not_allowed(get_string('cannotreviewopen', 'quiz'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue