summaryrefslogtreecommitdiffstats
path: root/modules-available/exams/baseconfig/getconfig.inc.php
blob: e5dd01c968397c5b2059af5285b65f48051894a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?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);
}