summaryrefslogtreecommitdiffstats
path: root/modules-available/exams
diff options
context:
space:
mode:
authorSimon Rettberg2017-07-11 12:08:53 +0200
committerSimon Rettberg2017-07-11 12:08:53 +0200
commit1cfb2dc5e668bd82f62a5606e80ad61b56b8596c (patch)
tree8d6dbe1756ae043a45b65539a316ef55ae7dae0b /modules-available/exams
parent[baseconfig] Make ConfigHolder static, change default prio, add getter (diff)
downloadslx-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.php13
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);
}
}