Permalink
Browse files

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

  • Loading branch information...
1 parent 32e550a commit 21d9cb723b876bc057fbaa0093dbffa64a44e312 Sam Hemelryk committed Jun 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/navigationlib.php
@@ -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 21d9cb7

Please sign in to comment.