diff --git a/CHANGES.md b/CHANGES.md index 3906ca9771311de487131b219a6746ab8ab4102d..75da3d7d1b8754ea7136a9a03eb315838c4b6fa2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,8 @@ Changes ### Unreleased +* 2020-09-25 - Fixed Bug that content bank view page cog icon showed course context menu entries. + NOTE: This is just a kind of hacky interim solution until MDL-69793 is done. * 2020-09-23 - Updated referenced Bootstrap version to latest in upstream used version 4.5. * 2020-09-18 - Removed fix that bullet points are cut off because it is fixed in upstream Boost now. NOTE: requires minimum Moodle version Moodle 3.9.2 (2020061502) diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php index 7eb3f69468ec80df60f22c965cdb25f121772ec9..b378ea21840ef8836339ee517b2bd1e8f66541a8 100644 --- a/classes/output/core_renderer.php +++ b/classes/output/core_renderer.php @@ -144,8 +144,9 @@ class core_renderer extends \core_renderer { $header = new stdClass(); // MODIFICATION START. // Show the context header settings menu on all pages except for the profile page as we replace - // it with an edit button there. - if ($this->page->pagelayout != 'mypublic') { + // it with an edit button there and if we are not on the content bank view page (contentbank/view.php) + // as this page only adds header actions. + if ($this->page->pagelayout != 'mypublic' && $this->page->bodyid != 'page-contentbank') { $header->settingsmenu = $this->context_header_settings_menu(); } // MODIFICATION END. @@ -186,8 +187,12 @@ class core_renderer extends \core_renderer { $header->headeractions = $this->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. - $html = $this->render_from_template('theme_boost_campus/full_header', $header); + // Render from the own header template if we are not on the content bank view page (contentbank/view.php). + if ($this->page->bodyid == 'page-contentbank') { + $html = $this->render_from_template('core/full_header', $header); + } else { + $html = $this->render_from_template('theme_boost_campus/full_header', $header); + } // MODIFICATION END. /* ORIGINAL START return $this->render_from_template('core/full_header', $header); diff --git a/layout/columns2.php b/layout/columns2.php index 16aa21c05999da3573771f217a1d93ac9fbd4e9f..bbfa238f3dee68be76a95097e4642c2bdf15d9bf 100644 --- a/layout/columns2.php +++ b/layout/columns2.php @@ -153,8 +153,8 @@ $nav = $PAGE->flatnav; // MODIDFICATION START. // Use the returned value from theme_boost_campus_get_modified_flatnav_defaulthomepageontop as the template context. $templatecontext['flatnavigation'] = theme_boost_campus_process_flatnav($nav); -// If setting showsettingsincourse is enabled. -if (get_config('theme_boost_campus', 'showsettingsincourse') == 'yes') { +// If setting showsettingsincourse is enabled and we are not on the content bank view page (contentbank/view.php). +if (get_config('theme_boost_campus', 'showsettingsincourse') == 'yes' && $PAGE->bodyid != 'page-contentbank') { // Context value for requiring incoursesettings.js. $templatecontext['incoursesettings'] = true; // Add the returned value from theme_boost_campus_get_incourse_settings to the template context.