mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +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
|
@ -61,7 +61,8 @@ $accessmanager->setup_attempt_page($PAGE);
|
|||
|
||||
$options = $attemptobj->get_display_options(true);
|
||||
|
||||
// Check permissions.
|
||||
// Check permissions - warning there is similar code in reviewquestion.php and
|
||||
// quiz_attempt::check_file_access. If you change on, change them all.
|
||||
if ($attemptobj->is_own_attempt()) {
|
||||
if (!$attemptobj->is_finished()) {
|
||||
redirect($attemptobj->attempt_url(null, $page));
|
||||
|
@ -91,7 +92,7 @@ if ($options->flags == question_display_options::EDITABLE && optional_param('sav
|
|||
}
|
||||
|
||||
// Work out appropriate title and whether blocks should be shown.
|
||||
if ($attemptobj->is_preview_user() && $attemptobj->is_own_attempt()) {
|
||||
if ($attemptobj->is_own_preview()) {
|
||||
$strreviewtitle = get_string('reviewofpreview', 'quiz');
|
||||
navigation_node::override_active_url($attemptobj->start_attempt_url());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue