From: moodler Date: Thu, 21 Nov 2002 16:19:19 +0000 (+0000) Subject: For long courses reduce the text printed on x axis X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c351cf27995ba6221e318d8ed977f428dfb3091a;p=moodle.git For long courses reduce the text printed on x axis --- diff --git a/course/loggraph.php b/course/loggraph.php index e3bff02302..58f77cad2b 100644 --- a/course/loggraph.php +++ b/course/loggraph.php @@ -40,10 +40,24 @@ } $timestart = $coursestart = usergetmidnight($course->startdate); + if ((($timenow - $timestart)/86400.0) > 40) { + $reducedays = 7; + } else { + $reducedays = 0; + } + $i = 0; while ($timestart < $timenow) { $timefinish = $timestart + 86400; - $days[$i] = userdate($timestart, "%a %d %b"); + if ($reducedays) { + if ($i % $reducedays) { + $days[$i] = ""; + } else { + $days[$i] = userdate($timestart, "%a %d %b"); + } + } else { + $days[$i] = userdate($timestart, "%a %d %b"); + } $logs[$i] = 0; $i++; $timestart = $timefinish;