Línea 66... |
Línea 66... |
66 |
if ($this->page->pagetype === 'admin-roles-check') {
|
66 |
if ($this->page->pagetype === 'admin-roles-check') {
|
67 |
$this->remove('permissions');
|
67 |
$this->remove('permissions');
|
68 |
}
|
68 |
}
|
69 |
}
|
69 |
}
|
70 |
if ($this->page->context->contextlevel == CONTEXT_COURSE) {
|
70 |
if ($this->page->context->contextlevel == CONTEXT_COURSE) {
|
- |
|
71 |
$removesections = course_get_format($this->page->course)->can_sections_be_removed_from_navigation();
|
71 |
// Remove any duplicate navbar nodes.
|
72 |
// Remove any duplicate navbar nodes.
|
72 |
$this->remove_duplicate_items();
|
73 |
$this->remove_duplicate_items();
|
73 |
// Remove 'My courses' and 'Courses' if we are in the course context.
|
74 |
// Remove 'My courses' and 'Courses' if we are in the course context.
|
74 |
$this->remove('mycourses');
|
75 |
$this->remove('mycourses');
|
75 |
$this->remove('courses');
|
76 |
$this->remove('courses');
|
Línea 110... |
Línea 111... |
110 |
$this->remove('courses');
|
111 |
$this->remove('courses');
|
111 |
// Remove the course category breadcrumb nodes.
|
112 |
// Remove the course category breadcrumb nodes.
|
112 |
foreach ($this->items as $key => $item) {
|
113 |
foreach ($this->items as $key => $item) {
|
113 |
// Remove if it is a course category breadcrumb node.
|
114 |
// Remove if it is a course category breadcrumb node.
|
114 |
$this->remove($item->key, \breadcrumb_navigation_node::TYPE_CATEGORY);
|
115 |
$this->remove($item->key, \breadcrumb_navigation_node::TYPE_CATEGORY);
|
- |
|
116 |
|
- |
|
117 |
// Module types not visible on the course main page cannot have a section breadcrumb.
|
- |
|
118 |
if (!$this->page->cm->is_of_type_that_can_display() && $item->type === navigation_node::TYPE_SECTION) {
|
- |
|
119 |
$this->remove($item->key, \breadcrumb_navigation_node::TYPE_SECTION);
|
- |
|
120 |
}
|
115 |
}
|
121 |
}
|
116 |
$courseformat = course_get_format($this->page->course);
|
122 |
$courseformat = course_get_format($this->page->course);
|
117 |
$removesections = $courseformat->can_sections_be_removed_from_navigation();
|
123 |
$removesections = $courseformat->can_sections_be_removed_from_navigation();
|
118 |
if ($removesections) {
|
124 |
if ($removesections) {
|
119 |
// If the course sections are removed, we need to add the anchor of current section to the Course.
|
125 |
// If the course sections are removed, we need to add the anchor of current section to the Course.
|