From f3a4d06b6bdd1a0e0d414cdefafed5c43fc647d6 Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Fri, 24 Jun 2016 13:58:38 +0200 Subject: display locationid=0 as locationid=* --- modules-available/exams/page.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules-available/exams') 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, -- cgit v1.2.3-55-g7522