? 19-session-regen.patch ? MDL-17931-v2.patch ? MDL-17931.patch ? MDL-18720-1.9.patch.txt ? db ? mdl-17629-1.9.patch ? mnet-host-portno-column-size-increase-1.9.patch ? silent.patch ? unmergedfiles.txt ? question/type/flashdd Index: course/lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/course/lib.php,v retrieving revision 1.538.2.79 diff -u -r1.538.2.79 lib.php --- course/lib.php 9 Sep 2009 12:45:14 -0000 1.538.2.79 +++ course/lib.php 18 Feb 2010 01:37:57 -0000 @@ -97,7 +97,17 @@ } -function build_mnet_logs_array($hostid, $course, $user=0, $date=0, $order="l.time ASC", $limitfrom='', $limitnum='', +/** + * builds up the array of information to draw logs with + * + * @param int $hostid the id of the remote host + * @param int $courseid + * + * @return array + * + * @todo document this function - in particular whether the parameters relate to local or remote objects + */ +function build_mnet_logs_array($hostid, $courseid, $user=0, $date=0, $order="l.time ASC", $limitfrom='', $limitnum='', $modname="", $modid=0, $modaction="", $groupid=0) { global $CFG; @@ -139,11 +149,11 @@ WHERE "; - $where .= "l.hostid = '$hostid'"; + $where = "l.hostid = '$hostid'"; // TODO: Is 1 really a magic number referring to the sitename? - if ($course != 1 || $modid != 0) { - $where .= " AND\n l.course='$course'"; + if ($courseid != 1 || $modid != 0) { + $where .= " AND\n l.course='$courseid'"; } if ($modname) { @@ -380,12 +390,20 @@ } +/** + * prints the logs shipped over mnet + * + * @param int $hostid the id of the remote host + * @param stdclass $course + * + * @todo document this function - in particular whether the parameters relate to local or remote objects + */ function print_mnet_log($hostid, $course, $user=0, $date=0, $order="l.time ASC", $page=0, $perpage=100, $url="", $modname="", $modid=0, $modaction="", $groupid=0) { global $CFG; - if (!$logs = build_mnet_logs_array($hostid, $course, $user, $date, $order, $page*$perpage, $perpage, + if (!$logs = build_mnet_logs_array($hostid, $course->id, $user, $date, $order, $page*$perpage, $perpage, $modname, $modid, $modaction, $groupid)) { notify("No logs found!"); print_footer($course); Index: course/report/log/index.php =================================================================== RCS file: /cvsroot/moodle/moodle/course/report/log/index.php,v retrieving revision 1.19.2.3 diff -u -r1.19.2.3 index.php --- course/report/log/index.php 29 Nov 2008 16:16:21 -0000 1.19.2.3 +++ course/report/log/index.php 18 Feb 2010 01:37:57 -0000 @@ -95,7 +95,7 @@ "index.php?id=$course->id&chooselog=1&user=$user&date=$date&modid=$modid&modaction=$modaction&group=$group", $modname, $modid, $modaction, $group); } else { - print_mnet_log($hostid, $id, $user, $date, 'l.time DESC', $page, $perpage, "", $modname, $modid, $modaction, $group); + print_mnet_log($hostid, $course, $user, $date, 'l.time DESC', $page, $perpage, "", $modname, $modid, $modaction, $group); } break; case 'downloadascsv':