From ca787a923f3950d867238ea76c34d87b0bdfe413 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 22 Nov 2010 10:19:39 +0000 Subject: [PATCH] navigation MDL-25364 Fixed up AJAX loading for guest users within a course. --- lib/ajax/getnavbranch.php | 2 +- lib/navigationlib.php | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/ajax/getnavbranch.php b/lib/ajax/getnavbranch.php index 115580e292e..3e4390ca75a 100644 --- a/lib/ajax/getnavbranch.php +++ b/lib/ajax/getnavbranch.php @@ -70,7 +70,7 @@ try { } // Create a navigation object to use, we can't guarantee PAGE will be complete - if (!isloggedin() || isguestuser()) { + if (!isloggedin()) { $navigation->set_expansion_limit(navigation_node::TYPE_COURSE); } else { if (isset($block) && !empty($block->config->expansionlimit)) { diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 033c5fce2c2..e6857e41acb 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -536,14 +536,7 @@ class navigation_node implements renderable { * @param array $expandable An array by reference to populate with expandable nodes. */ public function find_expandable(array &$expandable) { - $isloggedin = (isloggedin() && !isguestuser()); - if (!$isloggedin && $this->type > self::TYPE_CATEGORY) { - return; - } foreach ($this->children as &$child) { - if (!$isloggedin && $child->type > self::TYPE_CATEGORY) { - continue; - } if ($child->nodetype == self::NODETYPE_BRANCH && $child->children->count()==0 && $child->display) { $child->id = 'expandable_branch_'.(count($expandable)+1); $this->add_class('canexpand');