From: martinlanghoff Date: Fri, 19 Jan 2007 08:14:18 +0000 (+0000) Subject: mnet: this stuff is only for logged in users! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f3203630ca2dd00a71e43efc92c28ad0255e4d04;p=moodle.git mnet: this stuff is only for logged in users! --- diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 87608ab3b7..4e802e0deb 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -104,6 +104,12 @@ class block_course_list extends block_list { function get_remote_courses() { global $THEME, $CFG, $USER, $SESSION; $icon = ''.get_string('course').''; + + // only for logged in users! + if (!isloggedin() || isguest()) { + return false; + } + if ($USER->mnethostid != $CFG->mnet_localhost_id) { if (!empty($SESSION->mnet_foreign_host_array) && is_array($SESSION->mnet_foreign_host_array)) { $this->content->items[] = get_string('remotemoodles','mnet'); diff --git a/blocks/mnet_hosts/block_mnet_hosts.php b/blocks/mnet_hosts/block_mnet_hosts.php index 1f535c5069..1e976a1de6 100644 --- a/blocks/mnet_hosts/block_mnet_hosts.php +++ b/blocks/mnet_hosts/block_mnet_hosts.php @@ -13,6 +13,11 @@ class block_mnet_hosts extends block_list { function get_content() { global $THEME, $CFG, $USER; + // only for logged in users! + if (!isloggedin() || isguest()) { + return false; + } + // check for outgoing roaming permission first if (!has_capability('moodle/site:mnetlogintoremote', get_context_instance(CONTEXT_SYSTEM, SITEID))) { return '';