]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for use of COURSE_MAX_RECENT_PERIOD
authormoodler <moodler>
Sat, 26 Apr 2003 13:41:31 +0000 (13:41 +0000)
committermoodler <moodler>
Sat, 26 Apr 2003 13:41:31 +0000 (13:41 +0000)
course/lib.php

index 46c2776aa7d93a9790a5b3699a84f2a4fce7c107..6162116e19dd14205988ca7bb050bd36eafa13dc 100644 (file)
@@ -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;
     }