summaryrefslogtreecommitdiffstats
path: root/modules-available/runmode
diff options
context:
space:
mode:
authorSimon Rettberg2018-04-20 15:10:27 +0200
committerSimon Rettberg2018-04-20 15:10:27 +0200
commitf2cf42e8ec36ee74bfd7abae0e554c458a03973a (patch)
treeaa4c1eeb737c206b88dca71fe6c1fef07005d37d /modules-available/runmode
parent[systemstatus] atftpd -> tftpd-hpa (diff)
downloadslx-admin-f2cf42e8ec36ee74bfd7abae0e554c458a03973a.tar.gz
slx-admin-f2cf42e8ec36ee74bfd7abae0e554c458a03973a.tar.xz
slx-admin-f2cf42e8ec36ee74bfd7abae0e554c458a03973a.zip
[exams/runmode] Properly disable exam mode for runmodes
Diffstat (limited to 'modules-available/runmode')
-rw-r--r--modules-available/runmode/baseconfig/getconfig.inc.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules-available/runmode/baseconfig/getconfig.inc.php b/modules-available/runmode/baseconfig/getconfig.inc.php
index 2d622fc7..214a974c 100644
--- a/modules-available/runmode/baseconfig/getconfig.inc.php
+++ b/modules-available/runmode/baseconfig/getconfig.inc.php
@@ -6,21 +6,16 @@ $foofoo = function($machineUuid) {
if ($res === false)
return;
$config = RunMode::getModuleConfig($res['module']);
- if ($config === false || $config->configHook === false)
+ if ($config === false)
return;
if (!Module::isAvailable($res['module']))
return; // Not really possible because getModuleConfig would have failed but we should make sure
- call_user_func($config->configHook, $machineUuid, $res['modeid'], $res['modedata']);
+ if ($config->configHook !== false) {
+ call_user_func($config->configHook, $machineUuid, $res['modeid'], $res['modedata']);
+ }
if ($config->systemdDefaultTarget !== false) {
ConfigHolder::add('SLX_SYSTEMD_TARGET', $config->systemdDefaultTarget, 10000);
}
- // Disable exam mode - not sure if this is generally a good idea; for now, all modes we can think of would
- // not make sense that way so do this for now
- if (ConfigHolder::get('SLX_EXAM') !== false) {
- ConfigHolder::add('SLX_EXAM', '', 100001);
- ConfigHolder::add('SLX_EXAM_START', '', 100001);
- ConfigHolder::add('SLX_AUTOLOGIN', '', 100001);
- }
};
$foofoo($uuid); \ No newline at end of file