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');
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 '';