Merge branch 'MDL-34322-master-1' of git://git.luns.net.uk/moodle

This commit is contained in:
Sam Hemelryk
2012-07-23 09:43:17 +12:00
+5
View File
@@ -77,6 +77,11 @@ class block_navigation_renderer extends plugin_renderer_base {
$isexpandable = (empty($expansionlimit) || ($item->type > navigation_node::TYPE_ACTIVITY || $item->type < $expansionlimit) || ($item->contains_active_node() && $item->children->count() > 0));
$isbranch = $isexpandable && ($item->children->count() > 0 || ($item->has_children() && (isloggedin() || $item->type <= navigation_node::TYPE_CATEGORY)));
// Skip elements which have no content and no action - no point in showing them
if (!$isexpandable && empty($item->action)) {
continue;
}
$hasicon = ((!$isbranch || $item->type == navigation_node::TYPE_ACTIVITY || $item->type == navigation_node::TYPE_RESOURCE) && $item->icon instanceof renderable);
if ($hasicon) {