Permalink
Browse files

MDL-40344 navigation: expandable branch id is now properly unique

  • Loading branch information...
1 parent c982630 commit 7bcdac4882404e4ad64713a0a7493818c17c64b6 Sam Hemelryk committed Jun 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/navigationlib.php
View
@@ -589,7 +589,7 @@ public function get_css_type() {
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);
}

0 comments on commit 7bcdac4

Please sign in to comment.