summaryrefslogtreecommitdiffstats
path: root/modules-available/exams
diff options
context:
space:
mode:
authorChristian Klinger2016-06-24 13:58:38 +0200
committerChristian Klinger2016-06-24 13:58:38 +0200
commitf3a4d06b6bdd1a0e0d414cdefafed5c43fc647d6 (patch)
treed55022beaade43be56726c929e551851e121c7c6 /modules-available/exams
parentMerge branch 'modularization' of git.openslx.org:openslx-ng/slx-admin into mo... (diff)
downloadslx-admin-f3a4d06b6bdd1a0e0d414cdefafed5c43fc647d6.tar.gz
slx-admin-f3a4d06b6bdd1a0e0d414cdefafed5c43fc647d6.tar.xz
slx-admin-f3a4d06b6bdd1a0e0d414cdefafed5c43fc647d6.zip
display locationid=0 as locationid=*
Diffstat (limited to 'modules-available/exams')
-rw-r--r--modules-available/exams/page.inc.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules-available/exams/page.inc.php b/modules-available/exams/page.inc.php
index 56ab50f7..1d0b8fc5 100644
--- a/modules-available/exams/page.inc.php
+++ b/modules-available/exams/page.inc.php
@@ -62,7 +62,14 @@ class Page_Exams extends Page
$unique_ids = 1;
/* add the red shadows */
foreach ($this->exams as $e) {
- foreach (explode(',', $e['locationids']) as $locationid) {
+ $locationids = explode(',', $e['locationids']);
+ if ($locationids[0] == 0) {
+ $locationids = [];
+ foreach($this->locations as $l) {
+ $locationids[] = $l['locationid'];
+ }
+ }
+ foreach ($locationids as $locationid) {
$out[] = ['id' => 'shadow_' . $unique_ids++,
'content' => '',
'start' => intval($e['starttime']) * 1000,