diff options
author | Simon Rettberg | 2016-08-21 17:52:42 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-08-21 17:52:42 +0200 |
commit | 20431c95164cdceda3e0cf5aa22090a8c9c2efe1 (patch) | |
tree | c402aa30e367cfdfdfb00eecb509ffb59f3e05d6 | |
parent | [dozmod] Fix idiotic copy&paste error (diff) | |
download | slx-admin-20431c95164cdceda3e0cf5aa22090a8c9c2efe1.tar.gz slx-admin-20431c95164cdceda3e0cf5aa22090a8c9c2efe1.tar.xz slx-admin-20431c95164cdceda3e0cf5aa22090a8c9c2efe1.zip |
[exams] Fix exam mode detection for global location/clients without location
-rw-r--r-- | modules-available/exams/baseconfig/getconfig.inc.php | 12 | ||||
-rw-r--r-- | modules-available/exams/inc/exams.inc.php | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/modules-available/exams/baseconfig/getconfig.inc.php b/modules-available/exams/baseconfig/getconfig.inc.php index 2776d3a8..6a9bf03a 100644 --- a/modules-available/exams/baseconfig/getconfig.inc.php +++ b/modules-available/exams/baseconfig/getconfig.inc.php @@ -2,10 +2,12 @@ if (isset($configVars["SLX_LOCATIONS"])) { $locationIds = explode(' ', $configVars["SLX_LOCATIONS"]); - if (Exams::isInExamMode($locationIds, $lectureId)) { - $configVars['SLX_EXAM'] = 'yes'; - if (strlen($lectureId) > 0) { - $configVars['SLX_EXAM_START'] = $lectureId; - } +} else { + $locationIds = array(); +} +if (Exams::isInExamMode($locationIds, $lectureId)) { + $configVars['SLX_EXAM'] = 'yes'; + if (strlen($lectureId) > 0) { + $configVars['SLX_EXAM_START'] = $lectureId; } } diff --git a/modules-available/exams/inc/exams.inc.php b/modules-available/exams/inc/exams.inc.php index e95a9392..5fc497c7 100644 --- a/modules-available/exams/inc/exams.inc.php +++ b/modules-available/exams/inc/exams.inc.php @@ -11,8 +11,6 @@ class Exams { if (!is_array($locationIds)) { $locationIds = array($locationIds); - } elseif (empty($locationIds)) { - return false; } $l = str_repeat(',?', count($locationIds)); $res = Database::queryFirst("SELECT lectureid FROM exams" |