diff options
author | Simon Rettberg | 2017-07-11 12:08:53 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-07-11 12:08:53 +0200 |
commit | 1cfb2dc5e668bd82f62a5606e80ad61b56b8596c (patch) | |
tree | 8d6dbe1756ae043a45b65539a316ef55ae7dae0b /modules-available/exams | |
parent | [baseconfig] Make ConfigHolder static, change default prio, add getter (diff) | |
download | slx-admin-1cfb2dc5e668bd82f62a5606e80ad61b56b8596c.tar.gz slx-admin-1cfb2dc5e668bd82f62a5606e80ad61b56b8596c.tar.xz slx-admin-1cfb2dc5e668bd82f62a5606e80ad61b56b8596c.zip |
[*] Adapt to new baseconfig API
Diffstat (limited to 'modules-available/exams')
-rw-r--r-- | modules-available/exams/baseconfig/getconfig.inc.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules-available/exams/baseconfig/getconfig.inc.php b/modules-available/exams/baseconfig/getconfig.inc.php index 5e506755..325badb0 100644 --- a/modules-available/exams/baseconfig/getconfig.inc.php +++ b/modules-available/exams/baseconfig/getconfig.inc.php @@ -1,16 +1,17 @@ <?php -if (isset($configVars["SLX_LOCATIONS"])) { - $locationIds = explode(' ', $configVars["SLX_LOCATIONS"]); +$locations = ConfigHolder::get('SLX_LOCATIONS'); +if ($locations === false) { + $locationIds = []; } else { - $locationIds = array(); + $locationIds = explode(' ', $locations); } if (Exams::isInExamMode($locationIds, $lectureId, $autoLogin)) { - $configVars['SLX_EXAM'] = 'yes'; + ConfigHolder::add('SLX_EXAM', 'yes', 100000); if (strlen($lectureId) > 0) { - $configVars['SLX_EXAM_START'] = $lectureId; + ConfigHolder::add('SLX_EXAM_START', $lectureId, 100000); } if (strlen($autoLogin) > 0) { - $configVars['SLX_AUTOLOGIN'] = $autoLogin; + ConfigHolder::add('SLX_AUTOLOGIN', $autoLogin, 100000); } } |