summaryrefslogtreecommitdiffstats
path: root/modules-available/exams/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-04-28 10:05:28 +0200
committerSimon Rettberg2017-04-28 10:05:28 +0200
commit6faec4aee961c35394c0bd57ed2719be67fdd012 (patch)
treee204dd54cc2a43fdcf2649795a44bc9356d940e4 /modules-available/exams/page.inc.php
parent[baseconfig_bwlp] Add setting for default pvs checkbox state in vmChooser (diff)
downloadslx-admin-6faec4aee961c35394c0bd57ed2719be67fdd012.tar.gz
slx-admin-6faec4aee961c35394c0bd57ed2719be67fdd012.tar.xz
slx-admin-6faec4aee961c35394c0bd57ed2719be67fdd012.zip
[exams] Add ORDER BY to queries generating UI content, change wording
This fixes #3123
Diffstat (limited to 'modules-available/exams/page.inc.php')
-rw-r--r--modules-available/exams/page.inc.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules-available/exams/page.inc.php b/modules-available/exams/page.inc.php
index 930ba62c..5b4df01a 100644
--- a/modules-available/exams/page.inc.php
+++ b/modules-available/exams/page.inc.php
@@ -35,7 +35,8 @@ class Page_Exams extends Page
. "NATURAL LEFT JOIN exams_x_location exl "
. "NATURAL LEFT JOIN location loc "
. "LEFT JOIN sat.lecture l USING (lectureid) "
- . "GROUP BY examid ");
+ . "GROUP BY examid "
+ . "ORDER BY examid ASC");
while ($exam = $tmp->fetch(PDO::FETCH_ASSOC)) {
$this->exams[] = $exam;
}
@@ -49,7 +50,8 @@ class Page_Exams extends Page
"INNER JOIN sat.user ON (user.userid = lecture.ownerid) " .
"NATURAL LEFT JOIN sat.lecture_x_location " .
"WHERE isexam <> 0 AND starttime < :rangeMax AND endtime > :rangeMin " .
- "GROUP BY lectureid",
+ "GROUP BY lectureid " .
+ "ORDER BY starttime ASC, displayname ASC",
['rangeMax' => $this->rangeMax, 'rangeMin' => $this->rangeMin]);
while ($lecture = $tmp->fetch(PDO::FETCH_ASSOC)) {
$this->lectures[] = $lecture;