Permalink
Browse files

Merge branch 'w03_MDL-30003_m21_userstats' of https://github.com/skod…

…ak/moodle into MOODLE_21_STABLE
  • Loading branch information...
nebgor committed Jan 16, 2012
2 parents e333be5 + 1063578 commit 7741d150c9d0e45eaac840fb9035ec5279d00665
Showing with 3 additions and 3 deletions.
  1. +3 −3 course/user.php
View
@@ -200,9 +200,9 @@
echo $OUTPUT->notification($statsstatus);
}
- $earliestday = $DB->get_field_sql('SELECT timeend FROM {stats_user_daily} ORDER BY timeend');
- $earliestweek = $DB->get_field_sql('SELECT timeend FROM {stats_user_weekly} ORDER BY timeend');
- $earliestmonth = $DB->get_field_sql('SELECT timeend FROM {stats_user_monthly} ORDER BY timeend');
+ $earliestday = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_daily}');
+ $earliestweek = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_weekly}');
+ $earliestmonth = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_monthly}');
if (empty($earliestday)) $earliestday = time();
if (empty($earliestweek)) $earliestweek = time();

0 comments on commit 7741d15

Please sign in to comment.