diff --git a/CHANGES.md b/CHANGES.md index f55fe06a5943d14874c1e9d3dd5a8fa699ddbcb0..3343652254897230255f678e613c672f9b2e0e24 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 800c4e329d36455a0d4e36a1c306dc95994d5076..9a7c93a00415cc43c998cd982915e23b54740f1e 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.