Skip to content

Commit

Permalink
Merge branch 'MDL-78138-402' of https://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_402_STABLE
  • Loading branch information
HuongNV13 committed Jul 4, 2023
2 parents 9047a30 + d2c8356 commit 442c94a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions theme/boost/classes/boostnavbar.php
Expand Up @@ -73,8 +73,11 @@ protected function prepare_nodes_for_boost(): void {
// Remove 'My courses' and 'Courses' if we are in the course context.
$this->remove('mycourses');
$this->remove('courses');
// Remove the course category breadcrumb node.
$this->remove($this->page->course->category, \breadcrumb_navigation_node::TYPE_CATEGORY);
// Remove the course category breadcrumb nodes.
foreach ($this->items as $key => $item) {
// Remove if it is a course category breadcrumb node.
$this->remove($item->key, \breadcrumb_navigation_node::TYPE_CATEGORY);
}
// Remove the course breadcrumb node.
$this->remove($this->page->course->id, \breadcrumb_navigation_node::TYPE_COURSE);
// Remove the navbar nodes that already exist in the secondary navigation menu.
Expand Down Expand Up @@ -103,8 +106,11 @@ protected function prepare_nodes_for_boost(): void {
if ($this->page->context->contextlevel == CONTEXT_MODULE) {
$this->remove('mycourses');
$this->remove('courses');
// Remove the course category breadcrumb node.
$this->remove($this->page->course->category, \breadcrumb_navigation_node::TYPE_CATEGORY);
// Remove the course category breadcrumb nodes.
foreach ($this->items as $key => $item) {
// Remove if it is a course category breadcrumb node.
$this->remove($item->key, \breadcrumb_navigation_node::TYPE_CATEGORY);
}
$courseformat = course_get_format($this->page->course)->get_course();
// Section items can be only removed if a course layout (coursedisplay) is not explicitly set in the
// given course format or the set course layout is not 'One section per page'.
Expand Down

0 comments on commit 442c94a

Please sign in to comment.