aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/overview/index.php
blob: fa14efd23f61d876a29b1954b843a4c75a55b847 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<section class="contentbox">
    <header>
        <h1><?= _('Grunddaten') ?></h1>
    </header>
    <section>
        <dl style="margin: 0;">
        <? if (Context::get()->Untertitel != '') : ?>
            <dt><?= _('Untertitel') ?></dt>
            <dd>
                <?= htmlReady(Context::get()->Untertitel) ?>
            </dd>
        <? endif ?>
        <? if (!$course->isStudygroup()) : ?>
            <dt><?= _('Zeit / Veranstaltungsort') ?></dt>
            <dd>
                <?= $times_rooms ?: _('Die Zeiten der Veranstaltung stehen nicht fest.') ?>
            </dd>
            <? if ($next_date) : ?>
                <dt><?= _('Nächster Termin') ?></dt>
                <dd><?= htmlReady($next_date->getFullName('long')) ?></dd>
            <? else : ?>
                <dt><?= _('Erster Termin') ?></dt>
                <dd>
                <? if ($first_date) : ?>
                    <?= htmlReady($first_date->getFullName('long')) ?>
                <? else : ?>
                    <?= _('Die Zeiten der Veranstaltung stehen nicht fest.') ?>
                <? endif ?>
                </dd>
            <? endif ?>
            <dt><?= htmlReady(get_title_for_status('dozent', $num_lecturers)) ?></dt>
            <dd><?= implode(', ', $lecturer_html) ?> </dd>
        <? else : ?>
            <? if ($course->beschreibung) : ?>
                <dt><?= _('Beschreibung') ?></dt>
                <dd><?= formatLinks($course->beschreibung) ?></dd>
            <? endif ?>
            <dt><?= _('Moderiert von') ?></dt>
            <dd>
                <ul class="list-csv">
                <? foreach ($all_mods as $mod) : ?>
                    <li>
                        <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $mod->user->username]) ?>">
                            <?= htmlready($mod->user->getFullName()) ?>
                        </a>
                    </li>
                <? endforeach ?>
                </ul>
            </dd>
        <? endif ?>
        </dl>
    </section>
</section>

<?php

// Anzeige von News
if (!empty($news)) {
    echo $news;
}

// Anzeige von Terminen
if (!empty($dates)) {
    echo $dates;
}

if (!empty($questionnaires)) {
    echo $questionnaires;
}

if (!empty($connectedstudygroups)) {
    echo $connectedstudygroups;
}

// display plugins

if (!empty($plugins)) {
    $layout = $GLOBALS['template_factory']->open('shared/content_box');
    foreach ($plugins as $plugin) {
        $template = $plugin->getInfoTemplate($course_id);

        if ($template) {
            echo $template->render(layout: $layout);
            $layout->clear_attributes();
        }
    }
}
echo Feedback::getHTML($course_id, 'Course');