"MDL-16844, making choose very old stats data possible, merged from 1.9"

This commit is contained in:
dongsheng
2008-10-12 05:47:35 +00:00
parent 6f7a578791
commit 17fdbcac4a
+7
View File
@@ -1318,6 +1318,13 @@ function stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$ea
$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;
}