MDL-51913 report_stats: Make first column unique

This commit is contained in:
Barry Oosthuizen 2015-10-26 17:22:31 +00:00
parent 9382ac38d6
commit 3e90d870bc

View File

@ -127,7 +127,7 @@ $params = $param->params;
$param->table = 'user_'.$param->table;
$sql = 'SELECT timeend,'.$param->fields.' FROM {stats_'.$param->table.'} WHERE '
$sql = 'SELECT id, timeend,'.$param->fields.' FROM {stats_'.$param->table.'} WHERE '
.(($course->id == SITEID) ? '' : ' courseid = '.$course->id.' AND ')
.' userid = '.$user->id.' AND timeend >= '.$param->timeafter .$param->extras
.' ORDER BY timeend DESC';