]> git.mjollnir.org Git - moodle.git/commitdiff
mnet: this stuff is only for logged in users!
authormartinlanghoff <martinlanghoff>
Fri, 19 Jan 2007 08:14:18 +0000 (08:14 +0000)
committermartinlanghoff <martinlanghoff>
Fri, 19 Jan 2007 08:14:18 +0000 (08:14 +0000)
blocks/course_list/block_course_list.php
blocks/mnet_hosts/block_mnet_hosts.php

index 87608ab3b7bbc7a5fc1e6ee5a8c98576b54292f4..4e802e0deb55632a04d7dd1acfbaa94920ba94bf 100644 (file)
@@ -104,6 +104,12 @@ class block_course_list extends block_list {
     function get_remote_courses() {
         global $THEME, $CFG, $USER, $SESSION;
         $icon  = '<img src="'.$CFG->pixpath.'/i/mnethost.gif" class="icon" alt="'.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'); 
index 1f535c5069acd53c79b528b9d1b29cff23acaf5e..1e976a1de6ce41ca6a1d4d309d04f82c9f9aa9b3 100644 (file)
@@ -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 '';