mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
navigation MDL-21604 Corrected simpletests after recent modifications
This commit is contained in:
parent
507a7a9a2d
commit
a3bbac8b76
2 changed files with 41 additions and 143 deletions
|
@ -427,7 +427,7 @@ class navigation_node {
|
|||
$link->add_class('dimmed');
|
||||
}
|
||||
$content = $OUTPUT->render($link);
|
||||
|
||||
|
||||
} else if ($this->action instanceof moodle_url) {
|
||||
$attributes = array();
|
||||
if ($title !== '') {
|
||||
|
@ -438,7 +438,7 @@ class navigation_node {
|
|||
}
|
||||
$content = html_writer::link($this->action, $content, $attributes);
|
||||
|
||||
} else if (is_string($this->action)) {
|
||||
} else if (is_string($this->action) || empty($this->action)) {
|
||||
$attributes = array();
|
||||
if ($title !== '') {
|
||||
$attributes['title'] = $title;
|
||||
|
@ -2326,6 +2326,12 @@ class navbar extends navigation_node {
|
|||
} else {
|
||||
$output .= $this->parse_branch_to_html($this, true);
|
||||
}
|
||||
|
||||
if (!empty($this->children)) {
|
||||
// Add the custom children
|
||||
$output .= $this->parse_branch_to_html($this->children, false, false);
|
||||
}
|
||||
|
||||
$output .= html_writer::end_tag('ul');
|
||||
$this->content = $output;
|
||||
return $output;
|
||||
|
@ -2392,11 +2398,6 @@ class navbar extends navigation_node {
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($this->children)) {
|
||||
// Add the custom children
|
||||
$output .= $this->parse_branch_to_html($this->children, false, false);
|
||||
}
|
||||
|
||||
// XHTML
|
||||
return $output;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue