summaryrefslogtreecommitdiffstats
path: root/modules-available/exams/baseconfig/getconfig.inc.php
blob: 37a2caf4a4600e03ad2879b8da6bb2b822749fd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

$locations = ConfigHolder::get('SLX_LOCATIONS');
if ($locations === false) {
	$locationIds = [];
} else {
	$locationIds = explode(' ', $locations);
}
if (Exams::isInExamMode($locationIds, $lectureId, $autoLogin)) {
	ConfigHolder::add('SLX_EXAM', 'yes', 10000);
	if (strlen($lectureId) > 0) {
		ConfigHolder::add('SLX_EXAM_START', $lectureId, 10000);
	}
	if (strlen($autoLogin) > 0) {
		ConfigHolder::add('SLX_AUTOLOGIN', $autoLogin, 10000);
	}
	ConfigHolder::add('SLX_SYSTEMD_TARGET', 'exam-mode', 10000);
	ConfigHolder::add("SLX_PVS_HYBRID", false, 10000);
}