From: donal72 Date: Thu, 11 Jan 2007 05:59:57 +0000 (+0000) Subject: Mnet: Bugfix: Revised query to find hosts we SSO with: MDL-8082 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2c1833bdb4606629eaac2c5b01d9921ef0b506f6;p=moodle.git Mnet: Bugfix: Revised query to find hosts we SSO with: MDL-8082 --- diff --git a/course/report/log/lib.php b/course/report/log/lib.php index 0a1cd3f25f..4bbebde8f5 100644 --- a/course/report/log/lib.php +++ b/course/report/log/lib.php @@ -73,22 +73,17 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select } } - // Get all the hosts that we SSO with - $sql = "SELECT DISTINCT - h.id, - h.name, - s.name as servicename - FROM - {$CFG->prefix}mnet_host h - LEFT OUTER JOIN - {$CFG->prefix}mnet_host2service hs ON - (h.id=hs.hostid AND hs.subscribe!=0) - LEFT OUTER JOIN - {$CFG->prefix}mnet_service2rpc sr ON - sr.serviceid=hs.serviceid - LEFT OUTER JOIN - {$CFG->prefix}mnet_service s ON - (sr.serviceid=s.id AND s.name='sso')"; + // Get all the hosts that have log records + $sql = "select distinct + h.id, + h.name + from + {$CFG->prefix}mnet_host h, + {$CFG->prefix}mnet_log l + where + h.id = l.hostid + order by + h.name"; $hosts = get_records_sql($sql); foreach($hosts as $host) {