From: moodler Date: Sat, 14 Feb 2004 02:44:35 +0000 (+0000) Subject: Use $modname if it's defined X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c469a7efb63a17b7ea7d2c6511781126c47901c2;p=moodle.git Use $modname if it's defined --- diff --git a/course/lib.php b/course/lib.php index e000bc668d..b9848b335c 100644 --- a/course/lib.php +++ b/course/lib.php @@ -141,7 +141,7 @@ function print_recent_selector_form($course, $selecteduser=0, $selecteddate="tod } function print_log_selector_form($course, $selecteduser=0, $selecteddate="today", - $mod="", $modid=0, $modaction="") { + $modname="", $modid=0, $modaction="") { global $USER, $CFG; @@ -278,7 +278,7 @@ function make_log_url($module, $url) { 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. @@ -297,8 +297,8 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per } } - if ($mod) { - $selector .= " AND l.module = '$mod'"; + if ($modname) { + $selector .= " AND l.module = '$modname'"; } if ($modid) { diff --git a/course/log.php b/course/log.php index 3fc45b3e9a..6a3ade324b 100644 --- a/course/log.php +++ b/course/log.php @@ -7,6 +7,7 @@ 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 @@ -58,11 +59,11 @@ 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) {