mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-40344 navigation: expandable branch id is now properly unique
This commit is contained in:
parent
f0d37f4ac5
commit
09da042b36
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user