From e21922f00cd7eaaca1090fc5292d864f428f6262 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 12 Aug 2004 09:55:12 +0000 Subject: [PATCH] Fixed modid selection bug 1735 --- course/lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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()); -- 2.39.5