| Línea 70... |
Línea 70... |
| 70 |
if ($showcoursesnode) {
|
70 |
if ($showcoursesnode) {
|
| 71 |
$this->add(get_string('mycourses'), new \moodle_url('/my/courses.php'), self::TYPE_ROOTNODE, null, 'mycourses');
|
71 |
$this->add(get_string('mycourses'), new \moodle_url('/my/courses.php'), self::TYPE_ROOTNODE, null, 'mycourses');
|
| 72 |
}
|
72 |
}
|
| 73 |
}
|
73 |
}
|
| Línea -... |
Línea 74... |
| - |
|
74 |
|
| - |
|
75 |
// Add the calendar link only for guest users.
|
| - |
|
76 |
if (isguestuser()) {
|
| - |
|
77 |
$this->add(get_string('calendar', 'calendar'), new \moodle_url('/calendar/view.php?view=month'), self::TYPE_ROOTNODE,
|
| - |
|
78 |
null, 'calendar');
|
| - |
|
79 |
}
|
| 74 |
|
80 |
|
| 75 |
$showsiteadminnode = empty($this->page->theme->removedprimarynavitems) ||
|
81 |
$showsiteadminnode = empty($this->page->theme->removedprimarynavitems) ||
|
| Línea 76... |
Línea 82... |
| 76 |
!in_array('siteadminnode', $this->page->theme->removedprimarynavitems);
|
82 |
!in_array('siteadminnode', $this->page->theme->removedprimarynavitems);
|
| 77 |
|
83 |
|
| Línea 131... |
Línea 137... |
| 131 |
}
|
137 |
}
|
| 132 |
} else if (in_array('siteadminnode', $children) && $node = $this->get_site_admin_node()) {
|
138 |
} else if (in_array('siteadminnode', $children) && $node = $this->get_site_admin_node()) {
|
| 133 |
if ($this->context->contextlevel == CONTEXT_COURSECAT || $node->search_for_active_node(URL_MATCH_EXACT)) {
|
139 |
if ($this->context->contextlevel == CONTEXT_COURSECAT || $node->search_for_active_node(URL_MATCH_EXACT)) {
|
| 134 |
$activekey = 'siteadminnode';
|
140 |
$activekey = 'siteadminnode';
|
| 135 |
}
|
141 |
}
|
| - |
|
142 |
} else if (in_array('calendar', $children) && $node = $this->find('calendar', self::TYPE_ROOTNODE)) {
|
| - |
|
143 |
if ($node->search_for_active_node(URL_MATCH_BASE)) {
|
| - |
|
144 |
$activekey = 'calendar';
|
| - |
|
145 |
}
|
| 136 |
}
|
146 |
}
|
| Línea 137... |
Línea 147... |
| 137 |
|
147 |
|
| 138 |
if ($activekey && $activenode = $this->find($activekey, null)) {
|
148 |
if ($activekey && $activenode = $this->find($activekey, null)) {
|
| 139 |
$activenode->make_active();
|
149 |
$activenode->make_active();
|