{$herinfo['period_deadline']} JOIN $kldv.grp2subj ON grp2subj.grp_id = ppl2grp.grp_id JOIN $kldv.year2grp2subj ON year2grp2subj.grp2subj_id = grp2subj.grp2subj_id AND year2grp2subj.year_id = {$herinfo['year_id']} AND grp2subj_enter <= {$herinfo['period_deadline']} AND grp2subj_exit > {$herinfo['period_deadline']} JOIN rex ON rex.ppl_id = ppl2grp.ppl_id AND period_id = {$herinfo['period_id']} AND rex.subj_id = grp2subj.subj_id GROUP BY grp_id, pta_id ) AS bla USING (grp_id, pta_id) WHERE rooster_id = $rooster_id AND survinfos.surv != '' ORDER BY surv, date, tijd, activiteit EOQ ); $layout = array(); $columns = 0; foreach ($rooster2 as $line) { if (count($line) > $columns) $columns = count($line); $row = array(); foreach ($line as $cell) { $row[] = 1; } $layout[] = $row; } //$last_same = array_fill(0, $columns, 0); $last_same = array(); foreach ($rooster2 as $row_idx => $row) { $faal = 0; if ($row_idx == 0) { foreach ($row as $cell_idx => $hdr) { if ($cell_idx >= 4) continue; $last_same[$cell_idx] = 0; } } else foreach ($row as $cell_idx => $cell) { if ($cell_idx < 4 && $cell === $rooster2[$row_idx-1][$cell_idx] && $faal == 0) { $layout[$row_idx][$cell_idx] = 0; $layout[$last_same[$cell_idx]][$cell_idx]++; } else { $last_same[$cell_idx] = $row_idx; $faal = 1; } } } foreach ($layout as $row_idx => $row_layout) { for ($i = 1; $i < $row_layout[3]; $i++) { $rooster2[$row_idx][4] += $rooster2[$row_idx + $i][4]; } $layout[$row_idx][4] = $layout[$row_idx][3]; } $last = 0; foreach ($layout as $row_idx => $row_layout) { if ($row_layout[4] > 0) { //echo("update last $row_idx\n"); $last = $row_idx; $state = $row_layout[4]; } else if (--$state > 0) { //echo("checking $row_idx against $last\n"); if ($rooster2[$row_idx][5] == $rooster2[$last][5]) { $layout[$last][5]++; $layout[$row_idx][5] = 0; } else { $last = $row_idx; } } } html_start(); ?>

Rooster per surveillant versie ()

$row_layout) { ?> $cell_layout) { if ($cell_layout == 1) { ?> 1) { ?>
survdatumtijdlok/surv(s)llnactiviteitlesgroep
¹ Het begintijdstip van jouw surveillance is niet de begintijd van het surveillancemoment, dat betekent dat je iemand moet aflossen.
² Het eindtijdstip van jouw surveillance is niet de eintdtijd van het surveillancemoment, dat betekent dat iemand jou moet aflossen.