aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/dates/export.php
blob: 7a8b70d082e8f0b680131f0efaf73e3bfa8d63a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?
# Lifter010: TODO
?>
<html>
<head>
    <title><?= htmlReady(PageLayout::getTitle())?></title>
</head>
<body>

<? if (sizeof($dates)) : ?>
    <table cellspacing="0" cellpadding="0" border="1" width="100%">

        <tr>
            <th colspan="5">
                <h2><?= htmlReady(PageLayout::getTitle())?></h2>
            </th>
        </tr>

        <?
        $all_semester = Semester::findAllVisible(false);

        foreach ($dates as $date) :
            if ( ($grenze == 0) || ($grenze < $date['start']) ) {
                foreach ($all_semester as $zwsem) {
                    if ( ($zwsem['beginn'] < $date['start']) && ($zwsem['ende'] > $date['start']) ) {
                        $grenze = $zwsem['ende'];
                        ?>
                        <tr>
                            <td colspan="5">
                                <h3><?= htmlReady($zwsem['name']) ?></h3>
                            </td>
                        </tr>
                    <?
                    }
                }
            }
            ?>
            <tr>
                <td width="20%">
                    <?= htmlReady($date['date']) ?> (<?= htmlReady($date['type']) ?>)
                </td>
                <td width="20%"><?= htmlReady($date['title']) ?></td>
                <td width="20%">
                    <? if (count($date['related_persons']) != $lecturer_count) : ?>
                        <? foreach ($date['related_persons'] as $key => $user_id) {
                            echo ($key > 0 ? ", " : "").htmlReady(get_fullname($user_id));
                        } ?>
                    <? endif ?>
                </td>
                <td width="20%">
                    <? if (count($date['groups']) && count($date['groups']) < $group_count) : ?>
                        <? foreach ($date['groups'] as $key => $statusgruppe_id) {
                            echo ($key > 0 ? ", " : "").htmlReady(Statusgruppen::find($statusgruppe_id)->name);
                        } ?>
                    <? else : ?>
                        <?= _("alle") ?>
                    <? endif ?>
                </td>
                <td width="20%"><?= htmlReady($date['room']) ?></td>
            </tr>
            <? if ($date['description']) : ?>
            <tr>
                <td>&nbsp;</td>
                <td colspan="3"><?= formatReady($date['description'])?></td>
            </tr>
        <? endif ?>
        <? endforeach ?>

    </table>
<? endif ?>
</body>
</html>