MDL-29896 Navigation: Make links, files clickable in nav block
authorsam marshall <s.marshall@open.ac.uk>
Mon, 24 Oct 2011 11:46:07 +0000 (12:46 +0100)
committersam marshall <s.marshall@open.ac.uk>
Fri, 20 Jan 2012 10:36:53 +0000 (10:36 +0000)
lib/navigationlib.php

index 4f30b84..51e6f08 100644 (file)
@@ -4047,6 +4047,8 @@ class navigation_json {
             $attributes['link'] = $child->action;
         } else if ($child->action instanceof moodle_url) {
             $attributes['link'] = $child->action->out();
+        } else if ($child->action instanceof action_link) {
+            $attributes['link'] = $child->action->url->out();
         }
         $attributes['hidden'] = ($child->hidden);
         $attributes['haschildren'] = ($child->children->count()>0 || $child->type == navigation_node::TYPE_CATEGORY);