diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index e457330fd39..e0570e428d2 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -4263,7 +4263,10 @@ EOD; public function full_header() { global $PAGE; - if ($PAGE->include_region_main_settings_in_header_actions()) { + if ($PAGE->include_region_main_settings_in_header_actions() && !$PAGE->blocks->is_block_present('settings')) { + // Only include the region main settings if the page has requested it and it doesn't already have + // the settings block on it. The region main settings are included in the settings block and + // duplicating the content causes behat failures. $PAGE->add_header_action(html_writer::div( $this->region_main_settings_menu(), 'd-print-none',