From 3e90d870bc1824a86371ce6b336d018742e88595 Mon Sep 17 00:00:00 2001 From: Barry Oosthuizen Date: Mon, 26 Oct 2015 17:22:31 +0000 Subject: [PATCH] MDL-51913 report_stats: Make first column unique --- report/stats/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report/stats/user.php b/report/stats/user.php index 25fbf0a6965..85841ea5357 100644 --- a/report/stats/user.php +++ b/report/stats/user.php @@ -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';