diff --git a/mod/quiz/classes/output/renderer.php b/mod/quiz/classes/output/renderer.php index f1e0d9e1133..da16f4b278d 100644 --- a/mod/quiz/classes/output/renderer.php +++ b/mod/quiz/classes/output/renderer.php @@ -534,6 +534,10 @@ class renderer extends plugin_renderer_base { */ public function during_attempt_tertiary_nav($quizviewurl): string { $output = ''; + if ($this->page->pagelayout === 'secure') { + // Do not show the back button in the secure layout on quiz pages. + return $output; + } $output .= html_writer::start_div('tertiary-navigation'); $output .= html_writer::start_div('row'); $output .= html_writer::start_div('navitem'); diff --git a/mod/quiz/tests/behat/attempt_secure_layout.feature b/mod/quiz/tests/behat/attempt_secure_layout.feature index 066ff5098e4..7630d21e6cb 100644 --- a/mod/quiz/tests/behat/attempt_secure_layout.feature +++ b/mod/quiz/tests/behat/attempt_secure_layout.feature @@ -79,3 +79,4 @@ Feature: Attempt a quiz in secure layout But I should not see "Quiz 1 description" And I should not see "Opened:" And I should not see "Closes:" + And I should not see "Back"