}
function print_log_selector_form($course, $selecteduser=0, $selecteddate="today",
- $mod="", $modid=0, $modaction="") {
+ $modname="", $modid=0, $modaction="") {
global $USER, $CFG;
function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $perpage=100,
- $url="", $mod="", $modid=0, $modaction="") {
+ $url="", $modname="", $modid=0, $modaction="") {
// It is assumed that $date is the GMT time of midnight for that day,
// and so the next 86400 seconds worth of logs are printed.
}
}
- if ($mod) {
- $selector .= " AND l.module = '$mod'";
+ if ($modname) {
+ $selector .= " AND l.module = '$modname'";
}
if ($modid) {
require_variable($id); // Course ID
optional_variable($user, 0); // User to display
optional_variable($date, 0); // Date to display
+ optional_variable($modname, ""); // course_module->id
optional_variable($modid, ""); // course_module->id
optional_variable($modaction, ""); // an action as recorded in the logs
optional_variable($page, "0"); // which page to show
print_heading("$course->fullname: $userinfo, $dateinfo (".usertimezone().")");
- print_log_selector_form($course, $user, $date, "", $modid, $modaction);
+ print_log_selector_form($course, $user, $date, $modname, $modid, $modaction);
print_log($course, $user, $date, "l.time DESC", $page, $perpage,
"log.php?id=$course->id&chooselog=1&user=$user&date=$date&modid=$modid&modaction=$modaction",
- "", $modid, $modaction);
+ $modname, $modid, $modaction);
} else {
if ($course->category) {