From 10a95b432caee427f9db2ce391aac2617cb50354 Mon Sep 17 00:00:00 2001
From: moodler <moodler>
Date: Sat, 26 Apr 2003 13:41:31 +0000
Subject: [PATCH] Fix for use of COURSE_MAX_RECENT_PERIOD

---
 course/lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/course/lib.php b/course/lib.php
index 46c2776aa7..6162116e19 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -12,7 +12,7 @@ define('COURSE_MAX_LOGS_PER_PAGE', 1000);    // records
 
 define('COURSE_LIVELOG_REFRESH', 60);        // Seconds
 
-define('COURSE_MAX_RECENT_PERIOD', 60480);   // A week, in seconds
+define('COURSE_MAX_RECENT_PERIOD', 604800);   // A week, in seconds
 
 
 
@@ -321,7 +321,7 @@ function print_recent_activity($course) {
         $timestart = time() - COURSE_MAX_RECENT_PERIOD;
     }
 
-    if (! $logs = get_records_select("log", "time > '$USER->lastlogin' AND course = '$course->id'", "time ASC")) {
+    if (! $logs = get_records_select("log", "time > '$timestart' AND course = '$course->id'", "time ASC")) {
         return;
     }
 
-- 
2.39.5