Skip to content
Snippets Groups Projects
Commit 70cefa1a authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Fixed Bug that content bank view page cog icon showed course context menu entries.

parent d802984e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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.
// 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);
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment