diff options
author | Simon Rettberg | 2016-07-05 13:32:43 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-07-05 13:32:43 +0200 |
commit | 5e14893d6f40a762de7af02ef69a1016013baf78 (patch) | |
tree | 70b706a81ba1d5e7e985bad05eb6de75cc8cb9ed /modules-available/exams | |
parent | [event.inc] Activate sysconfig module before propagating ip address changed e... (diff) | |
download | slx-admin-5e14893d6f40a762de7af02ef69a1016013baf78.tar.gz slx-admin-5e14893d6f40a762de7af02ef69a1016013baf78.tar.xz slx-admin-5e14893d6f40a762de7af02ef69a1016013baf78.zip |
[exams] Handle global room 0 when checking if exam mode is active
Diffstat (limited to 'modules-available/exams')
-rw-r--r-- | modules-available/exams/inc/exams.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/exams/inc/exams.inc.php b/modules-available/exams/inc/exams.inc.php index c01d4bad..f781fc1e 100644 --- a/modules-available/exams/inc/exams.inc.php +++ b/modules-available/exams/inc/exams.inc.php @@ -14,10 +14,10 @@ class Exams } elseif (empty($locationIds)) { return false; } - $l = str_repeat(',?', count($locationIds) - 1); + $l = str_repeat(',?', count($locationIds)); $res = Database::queryFirst("SELECT examid FROM exams" . " INNER JOIN exams_x_location USING (examid)" - . " WHERE UNIX_TIMESTAMP() BETWEEN starttime AND endtime AND locationid IN (?$l) LIMIT 1", $locationIds); + . " WHERE UNIX_TIMESTAMP() BETWEEN starttime AND endtime AND locationid IN (0$l) LIMIT 1", $locationIds); return $res !== false; } |