From 337f97ad3628226fcaeff2f260bc288ff7128455 Mon Sep 17 00:00:00 2001
From: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
Date: Thu, 5 Mar 2020 11:04:09 +0100
Subject: [PATCH] Adjusted function full_header() in core_renderer.php due to
 upstream changes in theme Boost.

---
 CHANGES.md                       |  1 +
 classes/output/core_renderer.php | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/CHANGES.md b/CHANGES.md
index f55fe06..3343652 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,7 @@ Changes
 
 ### Unreleased
 
+* 2020-03-05 - Adjusted function full_header() in core_renderer.php due to upstream changes in theme Boost.
 * 2020-03-05 - Removed SCSS rule to wrap words in cards as it has been fixed in theme Boost.
 * 2020-03-05 - Adjusted login.mustache template due to upstream changes in theme Boost.
 * 2020-03-05 - Adjusted columns2.mustache template due to upstream changes in theme Boost.
diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php
index 800c4e3..9a7c93a 100644
--- a/classes/output/core_renderer.php
+++ b/classes/output/core_renderer.php
@@ -152,6 +152,17 @@ class core_renderer extends \core_renderer {
         global $PAGE, $USER, $COURSE, $CFG;
         // MODIFICATION END.
 
+        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',
+                    ['id' => 'region-main-settings-menu']
+            ));
+        }
+
         $header = new stdClass();
         // MODIFICATION START.
         // Show the context header settings menu on all pages except for the profile page as we replace
@@ -194,6 +205,7 @@ class core_renderer extends \core_renderer {
         $header->pageheadingbutton = $this->page_heading_button();
         ORIGINAL END. */
         $header->courseheader = $this->course_header();
+        $header->headeractions = $PAGE->get_header_actions();
         // MODIFICATION START:
         // Change this to add the result in the html variable to be able to add further features below the header.
         // Render from the own header template.
-- 
GitLab