From: moodler Date: Thu, 12 Aug 2004 09:55:12 +0000 (+0000) Subject: Fixed modid selection bug 1735 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e21922f00cd7eaaca1090fc5292d864f428f6262;p=moodle.git Fixed modid selection bug 1735 --- diff --git a/course/lib.php b/course/lib.php index 9d08afd495..3c2c3a8031 100644 --- a/course/lib.php +++ b/course/lib.php @@ -450,10 +450,10 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per $joins[] = "l.module = '$modname'"; } - if ($modid and is_int($modid)) { - $joins[] = "l.cmid = '$modid'"; - } else if ('site_errors' === $modid) { + if ('site_errors' === $modid) { $joins[] = "l.action='error'"; + } else if ($modid) { + $joins[] = "l.cmid = '$modid'"; } if ($modaction) { @@ -494,12 +494,14 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per $totalcount = 0; // Initialise + $db->debug = true; if (!$logs = get_logs($selector, $order, $page*$perpage, $perpage, $totalcount)) { notify("No logs found!"); print_footer($course); exit; } + $db->debug = false; $count=0; $ldcache = array(); $tt = getdate(time());