summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-22 15:31:11 +0200
committerSimon Rettberg2020-10-22 15:31:11 +0200
commit068a6102e5d74893d70519d1f3f7a6c6e1b205d4 (patch)
tree79041170aab78c420c220c53ccccdf743b0a7f0b
parent[statistics_reporting] Add exam statistics (diff)
downloadslx-admin-068a6102e5d74893d70519d1f3f7a6c6e1b205d4.tar.gz
slx-admin-068a6102e5d74893d70519d1f3f7a6c6e1b205d4.tar.xz
slx-admin-068a6102e5d74893d70519d1f3f7a6c6e1b205d4.zip
[statistics_reporting] Add missing group statement
-rw-r--r--modules-available/statistics_reporting/inc/queries.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules-available/statistics_reporting/inc/queries.inc.php b/modules-available/statistics_reporting/inc/queries.inc.php
index f389cfb1..47a07375 100644
--- a/modules-available/statistics_reporting/inc/queries.inc.php
+++ b/modules-available/statistics_reporting/inc/queries.inc.php
@@ -373,7 +373,8 @@ class Queries
$return = [];
$eres = Database::simpleQuery("SELECT starttime, endtime, GROUP_CONCAT(exl.locationid) AS `locs` FROM exams
LEFT JOIN exams_x_location exl USING (examid)
- WHERE starttime < $to AND endtime > $from");
+ WHERE starttime < $to AND endtime > $from
+ GROUP BY examid");
while ($row = $eres->fetch(PDO::FETCH_ASSOC)) {
// Get all boot events
$data = ['from' => $row['starttime'], 'to' => $row['endtime']];