diff -uNr moodle.orig/lib/statslib.php moodle/lib/statslib.php
--- moodle.orig/lib/statslib.php	2007-04-12 03:26:26.000000000 +0100
+++ moodle/lib/statslib.php	2008-02-22 14:15:58.000000000 +0000
@@ -42,6 +42,34 @@
     define('STATS_TIME_LAST11MONTHS',31);
     define('STATS_TIME_LASTYEAR',32);
 
+    //paulo.matos: expand visualization time frame
+    define('STATS_TIME_LAST13MONTHS',33);
+    define('STATS_TIME_LAST14MONTHS',34);
+    define('STATS_TIME_LAST15MONTHS',35);
+    define('STATS_TIME_LAST16MONTHS',36);
+    define('STATS_TIME_LAST17MONTHS',37);
+    define('STATS_TIME_LAST18MONTHS',38);
+    define('STATS_TIME_LAST19MONTHS',39);
+    define('STATS_TIME_LAST20MONTHS',40);
+    define('STATS_TIME_LAST21MONTHS',41);
+    define('STATS_TIME_LAST22MONTHS',42);
+    define('STATS_TIME_LAST23MONTHS',43);
+    define('STATS_TIME_LAST2YEARS',44);
+    define('STATS_TIME_LAST25MONTHS',45);
+    define('STATS_TIME_LAST26MONTHS',46);
+    define('STATS_TIME_LAST27MONTHS',47);
+    define('STATS_TIME_LAST28MONTHS',48);
+    define('STATS_TIME_LAST29MONTHS',39);
+    define('STATS_TIME_LAST30MONTHS',50);
+    define('STATS_TIME_LAST31MONTHS',51);
+    define('STATS_TIME_LAST32MONTHS',52);
+    define('STATS_TIME_LAST33MONTHS',53);
+    define('STATS_TIME_LAST34MONTHS',54);
+    define('STATS_TIME_LAST35MONTHS',55);
+    define('STATS_TIME_LAST3YEARS',56);
+    define('STATS_TIME_LAST4YEARS',68);
+    define('STATS_TIME_LAST5YEARS',80);
+
     // different modes for what reports to offer
     define('STATS_MODE_GENERAL',1);
     define('STATS_MODE_DETAILED',2);
@@ -958,6 +986,85 @@
     if (strtotime('-1 year',$lastmonthend) >= $earliestmonth) {
         $timeoptions[STATS_TIME_LASTYEAR] = get_string('lastyear');
     }
+    //paulo.matos: expand visualization time frame
+    if (strtotime('-13 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST13MONTHS] = get_string('nummonths','moodle',13);
+    }
+    if (strtotime('-14 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST14MONTHS] = get_string('nummonths','moodle',14);
+    }
+    if (strtotime('-15 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST15MONTHS] = get_string('nummonths','moodle',15);
+    }
+    if (strtotime('-16 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST16MONTHS] = get_string('nummonths','moodle',16);
+    }
+    if (strtotime('-17 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST17MONTHS] = get_string('nummonths','moodle',17);
+    }
+    if (strtotime('-18 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST18MONTHS] = get_string('nummonths','moodle',18);
+    }
+    if (strtotime('-19 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST19MONTHS] = get_string('nummonths','moodle',19);
+    }
+    if (strtotime('-20 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST20MONTHS] = get_string('nummonths','moodle',20);
+    }
+    if (strtotime('-21 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST21MONTHS] = get_string('nummonths','moodle',21);
+    }
+    if (strtotime('-22 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST22MONTHS] = get_string('nummonths','moodle',22);
+    }
+    if (strtotime('-23 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST23MONTHS] = get_string('nummonths','moodle',23);
+    }
+    if (strtotime('-2 years',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST2YEARS] = get_string('numyears','moodle',2);
+    }
+    if (strtotime('-25 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST25MONTHS] = get_string('nummonths','moodle',25);
+    }
+    if (strtotime('-26 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST26MONTHS] = get_string('nummonths','moodle',26);
+    }
+    if (strtotime('-27 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST27MONTHS] = get_string('nummonths','moodle',27);
+    }
+    if (strtotime('-28 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST28MONTHS] = get_string('nummonths','moodle',28);
+    }
+    if (strtotime('-29 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST29MONTHS] = get_string('nummonths','moodle',29);
+    }
+    if (strtotime('-30 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST30MONTHS] = get_string('nummonths','moodle',30);
+    }
+    if (strtotime('-31 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST31MONTHS] = get_string('nummonths','moodle',31);
+    }
+    if (strtotime('-32 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST32MONTHS] = get_string('nummonths','moodle',32);
+    }
+    if (strtotime('-33 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST33MONTHS] = get_string('nummonths','moodle',33);
+    }
+    if (strtotime('-34 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST34MONTHS] = get_string('nummonths','moodle',34);
+    }
+    if (strtotime('-35 months',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST35MONTHS] = get_string('nummonths','moodle',35);
+    }
+    if (strtotime('-3 years',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST3YEARS] = get_string('numyears','moodle',3);
+    }
+    if (strtotime('-4 years',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST4YEARS] = get_string('numyears','moodle',4);
+    }
+    if (strtotime('-5 years',$lastmonthend) >= $earliestmonth) {
+        $timeoptions[STATS_TIME_LAST5YEARS] = get_string('numyears','moodle',5);
+    }
 
     return $timeoptions;
 }
