From 09da042b360f7156673a681578483d173b7ccd4e Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 27 Jun 2013 10:05:35 +1200 Subject: [PATCH] MDL-40344 navigation: expandable branch id is now properly unique --- lib/navigationlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 72db6669061..378e9f0fbb4 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -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); }