From 643b67b8b8b399618334d41be3aa78475f48d0a3 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Fri, 19 Jan 2007 09:36:40 +0000 Subject: [PATCH] mnet: introducing print_remote_host()... and use it in print_my_courses() --- course/lib.php | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/course/lib.php b/course/lib.php index ea4153a33a..3cbd798bdb 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1840,7 +1840,7 @@ function print_my_moodle() { $rcourses = array(); if ($CFG->mnet_dispatcher_mode === 'strict') { $rcourses = get_my_remotecourses($USER->id); - $rhosts = get_my_remotehosts($USER->id); + $rhosts = get_my_remotehosts(); } if (!empty($courses) || !empty($rcourses) || !empty($rhosts)) { @@ -1863,7 +1863,7 @@ function print_my_moodle() { } elseif (!empty($rhosts)) { // non-IDP, we know of all the remote servers, but not courses foreach ($rhosts as $host) { - // print_remote_host($host, "100%"); + print_remote_host($host, "100%"); } } unset($course); @@ -1929,7 +1929,7 @@ function print_remote_course($course, $width="100%") { $url = "{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&wantsurl=/course/view.php?id={$course->remoteid}"; - echo '
'; + echo '
'; echo '
'; echo '
' @@ -1947,6 +1947,24 @@ function print_remote_course($course, $width="100%") { echo '
'; } +function print_remote_host($host, $width="100%") { + + global $CFG, $USER; + + $linkcss = ''; + + echo '
'; + echo '
'; + echo '
'; + echo ''.get_string('course').''; + echo '' + . s($host['name']).' - '; + echo $host['count'] . get_string('courses'); + echo '
'; + echo '
'; + echo '
'; +} + /// MODULE FUNCTIONS ///////////////////////////////////////////////////////////////// -- 2.39.5