mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
navigation MDL-14632 Fixed a small bug with navigation node prepend
This commit is contained in:
parent
fb0acd8644
commit
b499db578c
@ -2014,7 +2014,8 @@ class settings_navigation extends navigation_node {
|
|||||||
*/
|
*/
|
||||||
public function prepend($text, $url=null, $type=null, $shorttext=null, $key=null, pix_icon $icon=null) {
|
public function prepend($text, $url=null, $type=null, $shorttext=null, $key=null, pix_icon $icon=null) {
|
||||||
$children = $this->children;
|
$children = $this->children;
|
||||||
$this->children = new get_class($children);
|
$childrenclass = get_class($children);
|
||||||
|
$this->children = new $childrenclass;
|
||||||
$node = $this->add($text, $url, $type, $shorttext, $key, $icon);
|
$node = $this->add($text, $url, $type, $shorttext, $key, $icon);
|
||||||
foreach ($children as $child) {
|
foreach ($children as $child) {
|
||||||
$this->children->add($child);
|
$this->children->add($child);
|
||||||
@ -2347,7 +2348,7 @@ class settings_navigation extends navigation_node {
|
|||||||
}
|
}
|
||||||
if ($reportavailable) {
|
if ($reportavailable) {
|
||||||
$url = new moodle_url('/grade/report/index.php', array('id'=>$course->id));
|
$url = new moodle_url('/grade/report/index.php', array('id'=>$course->id));
|
||||||
$coursenode->add(get_string('grades'), $url, self::TYPE_SETTING, null, null, new pix_icon('i/grades', ''));
|
$gradenode = $coursenode->add(get_string('grades'), $url, self::TYPE_SETTING, null, 'grades', new pix_icon('i/grades', ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add outcome if permitted
|
// Add outcome if permitted
|
||||||
|
Loading…
x
Reference in New Issue
Block a user