diff --git a/CHANGES.md b/CHANGES.md index 9aec3ffc9344b2be91ab75b2056293e5653cb97d..70eba8d5f50c5536255e47b053856ff0a36ac42b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2019-06-03 - Further formal changes to the renderers to be constistent with Moodle core. * 2019-05-31 - Adjusted function render_help_icon() in core_renderer.php due to upstream changes in theme Boost. * 2019-05-31 - Adjusted function render_login() in core_renderer.php due to upstream changes in theme Boost. * 2019-05-31 - Adjusted function context_header_settings_menu() in core_renderer.php due to upstream changes in theme Boost. diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php index 3e1e716f75b665253cb96ce891f1a25ab5f089bd..6132a54f9e5dabec3df55559b8fef3cd954cb05f 100644 --- a/classes/output/core_renderer.php +++ b/classes/output/core_renderer.php @@ -294,6 +294,7 @@ class core_renderer extends \core_renderer { $showfrontpagemenu = false; $showusermenu = false; + // We are on the course home page. // MODIFICATION START. // REASON: With the original code, the course settings icon will only appear on the course main page. // Therefore the access to the course settings and related functions is not possible on other @@ -316,7 +317,7 @@ class core_renderer extends \core_renderer { $courseformat = course_get_format($this->page->course); // This is a single activity course format, always show the course menu on the activity main page. if ($context->contextlevel == CONTEXT_MODULE && - !$courseformat->has_view_page()) { + !$courseformat->has_view_page()) { $this->page->navigation->initialise(); $activenode = $this->page->navigation->find_active_node(); @@ -324,7 +325,7 @@ class core_renderer extends \core_renderer { if ($this->page->is_settings_menu_forced()) { $showcoursemenu = true; } else if (!empty($activenode) && ($activenode->type == navigation_node::TYPE_ACTIVITY || - $activenode->type == navigation_node::TYPE_RESOURCE)) { + $activenode->type == navigation_node::TYPE_RESOURCE)) { // We only want to show the menu on the first page of the activity. This means // the breadcrumb has no additional nodes. @@ -336,15 +337,15 @@ class core_renderer extends \core_renderer { // This is the site front page. if ($context->contextlevel == CONTEXT_COURSE && - !empty($currentnode) && - $currentnode->key === 'home') { + !empty($currentnode) && + $currentnode->key === 'home') { $showfrontpagemenu = true; } // This is the user profile page. if ($context->contextlevel == CONTEXT_USER && - !empty($currentnode) && - ($currentnode->key === 'myprofile')) { + !empty($currentnode) && + ($currentnode->key === 'myprofile')) { $showusermenu = true; } @@ -450,5 +451,9 @@ class core_renderer extends \core_renderer { return $this->render_from_template('core/help_icon', $context); } // MODIFICATION END. + /* ORIGINAL START. + $context = $helpicon->export_for_template($this); + return $this->render_from_template('core/help_icon', $context); + ORIGINAL END. */ } }