Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-30003 fix earliest stat date fetching

  • Loading branch information...
commit 106357825e7839c9e9ac568660dee04b63498580 1 parent c1dc3a5
@skodak skodak authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 course/user.php
View
6 course/user.php
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.