mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Merge branch 'MDL-25596' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
bf97304ac3
7 changed files with 480 additions and 411 deletions
|
@ -537,10 +537,10 @@ class navigation_node implements renderable {
|
|||
*/
|
||||
public function find_expandable(array &$expandable) {
|
||||
foreach ($this->children as &$child) {
|
||||
if ($child->nodetype == self::NODETYPE_BRANCH && $child->children->count()==0 && $child->display) {
|
||||
if ($child->nodetype == self::NODETYPE_BRANCH && $child->children->count() == 0 && $child->display) {
|
||||
$child->id = 'expandable_branch_'.(count($expandable)+1);
|
||||
$this->add_class('canexpand');
|
||||
$expandable[] = array('id'=>$child->id,'branchid'=>$child->key,'type'=>$child->type);
|
||||
$expandable[] = array('id' => $child->id, 'key' => $child->key, 'type' => $child->type);
|
||||
}
|
||||
$child->find_expandable($expandable);
|
||||
}
|
||||
|
@ -3699,7 +3699,7 @@ class navigation_json {
|
|||
*/
|
||||
public function set_expandable($expandable) {
|
||||
foreach ($expandable as $node) {
|
||||
$this->expandable[$node['branchid'].':'.$node['type']] = $node;
|
||||
$this->expandable[$node['key'].':'.$node['type']] = $node;
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue