MDL-40344 navigation: expandable branch id is now properly unique
This commit is contained in:
@@ -589,7 +589,7 @@ class navigation_node implements renderable {
|
||||
public function find_expandable(array &$expandable) {
|
||||
foreach ($this->children as &$child) {
|
||||
if ($child->display && $child->has_children() && $child->children->count() == 0) {
|
||||
$child->id = 'expandable_branch_'.(count($expandable)+1);
|
||||
$child->id = 'expandable_branch_'.$child->type.'_'.clean_param($child->key, PARAM_ALPHANUMEXT);
|
||||
$this->add_class('canexpand');
|
||||
$expandable[] = array('id' => $child->id, 'key' => $child->key, 'type' => $child->type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user