]> git.mjollnir.org Git - moodle.git/commitdiff
Get less logs from the database
authormoodler <moodler>
Sat, 26 Apr 2003 14:12:12 +0000 (14:12 +0000)
committermoodler <moodler>
Sat, 26 Apr 2003 14:12:12 +0000 (14:12 +0000)
course/lib.php

index 017aca4e009bd368e22e7edc13995e8b11ad89d6..fc353e703a06f21fc5a77bd35826569a68287bb6 100644 (file)
@@ -320,10 +320,14 @@ function print_recent_activity($course) {
     $timemaxrecent = time() - COURSE_MAX_RECENT_PERIOD;
     if ($timestart < $timemaxrecent) {
         $timestart = $timemaxrecent;
-        echo "<p>Logs start from: ".userdate($timestart)."</p>";
     }
 
-    if (! $logs = get_records_select("log", "time > '$timestart' AND course = '$course->id'", "time ASC")) {
+    if (! $logs = get_records_select("log", "time > '$timestart' AND ".
+                                            "course = '$course->id' AND ".
+                                            "module <> 'course' AND ".
+                                            "module <> 'user' AND ".
+                                            "action <> 'view' AND ".
+                                            "action <> 'view all' ", "time ASC")) {
         return;
     }