Merge branch 'wip-MDL-40344-m26' of git://github.com/samhemelryk/moodle

This commit is contained in:
Dan Poltawski 2013-07-01 11:21:47 +08:00
commit 536a240891

View File

@ -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);
}