From 99674db811899435b293ff6f7f59f15d8999e45e Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 10 Mar 2004 11:29:35 +0000 Subject: [PATCH] If $CFG->loglifetime is active then use it make the log graphing nicer. bug 1120 --- course/loggraph.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/course/loggraph.php b/course/loggraph.php index c7fb6f344c..306028eaf6 100644 --- a/course/loggraph.php +++ b/course/loggraph.php @@ -45,6 +45,14 @@ if ($timenow - $course->startdate > $maxseconds) { $course->startdate = $timenow - $maxseconds; } + + if (!empty($CFG->loglifetime)) { + $maxseconds = $CFG->loglifetime * 3600 * 24; // seconds + if ($timenow - $course->startdate > $maxseconds) { + $course->startdate = $timenow - $maxseconds; + } + } + $timestart = $coursestart = usergetmidnight($course->startdate); if ((($timenow - $timestart)/86400.0) > 40) { -- 2.39.5