Index: lib/statslib.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/statslib.php,v retrieving revision 1.54.6.11 diff -u -r1.54.6.11 statslib.php --- lib/statslib.php 28 Jun 2008 18:31:01 -0000 1.54.6.11 +++ lib/statslib.php 12 Oct 2008 05:41:47 -0000 @@ -1322,6 +1322,13 @@ $timeoptions[STATS_TIME_LASTYEAR] = get_string('lastyear'); } + $years = (int)date('y', $now) - (int)date('y', $earliestmonth); + if ($years > 1) { + for($i = 2; $i <= $years; $i++) { + $timeoptions[$i*12+20] = get_string('numyears', 'moodle', $i); + } + } + return $timeoptions; }