MDL-15094 fixed stats regression

This commit is contained in:
skodak 2008-06-05 20:30:09 +00:00
parent 2ac897cd40
commit 68d3c35b3b

View File

@ -26,11 +26,9 @@
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
$tableprefix = $CFG->prefix.'stats_';
$earliestday = $DB->get_field_sql('SELECT timeend FROM {daily} ORDER BY timeend');
$earliestweek = $DB->get_field_sql('SELECT timeend FROM {weekly} ORDER BY timeend');
$earliestmonth = $DB->get_field_sql('SELECT timeend FROM {monthly} ORDER BY timeend');
$earliestday = $DB->get_field_sql('SELECT timeend FROM {stats_daily} ORDER BY timeend');
$earliestweek = $DB->get_field_sql('SELECT timeend FROM {stats_weekly} ORDER BY timeend');
$earliestmonth = $DB->get_field_sql('SELECT timeend FROM {stats_monthly} ORDER BY timeend');
if (empty($earliestday)) $earliestday = time();
if (empty($earliestweek)) $earliestweek = time();