}
-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, $DB;
}
+/**
+ * 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, $DB, $OUTPUT;
- 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)) {
echo $OUTPUT->notification("No logs found!");
echo $OUTPUT->footer();
$eventdata->smallmessage = '';
message_send($eventdata);
}
-}
\ No newline at end of file
+}
"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':