aboutsummaryrefslogtreecommitdiff
path: root/app/views/questionnaire/assign.php
blob: 5299a83ca2609de7b4d6d225668a4ecb0e9fd0dc (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
<form class="default"  method="post" id="questionnaire-assign-form"
      action="<?= $controller->link_for('questionnaire/assign') ?>">
    <?= CSRFProtection::tokenTag() ?>
    <? if ($step == 0): ?>
        <article class="studip">
            <header><h1><?= _('Veranstaltungen suchen') ?></h1></header>
            <section>
                <label>
                    <?= _('Semester') ?>
                    <select name="semester_id">
                        <? foreach ($available_semesters as $available_semester): ?>
                            <option value="<?= htmlReady($available_semester->id) ?>"
                                    <?= isset($semester_id) && $available_semester->id == $semester_id
                                      ? 'selected'
                                      : ''
                                    ?>>
                                <?= htmlReady($available_semester->name) ?>
                            </option>
                        <? endforeach ?>
                    </select>
                </label>
                <label>
                    <?= _('Einrichtung') ?>
                    (<?= _('optional') ?>)
                    <select name="institute_id">
                        <option value=""
                                <?= empty($institute_id) ? 'selected' : '' ?>>
                                <?= _('(bitte wählen)') ?>
                        </option>
                        <? foreach ($available_institutes as $available_institute): ?>
                            <option value="<?= htmlReady($available_institute['Institut_id']) ?>"
                                    <?= isset($institute_id) && $available_institute['Institut_id'] == $institute_id
                                      ? 'selected'
                                      : ''
                                    ?>>
                                <?= htmlReady($available_institute['Name']) ?>
                            </option>
                        <? endforeach ?>
                    </select>
                </label>
                <label>
                    <?= _('Veranstaltungstyp') ?>
                    (<?= _('optional') ?>)
                    <select name="course_type_id">
                        <option value=""
                                <?= empty($course_type_id) ? 'selected' : '' ?>>
                            <?= dgettext('AskALotPlugin', '(bitte wählen)') ?>
                        </option>
                        <? foreach ($available_course_types as $available_course_type): ?>
                            <option value="<?= htmlReady($available_course_type['id']) ?>"
                                    <?= isset($course_type_id) && $available_course_type['id'] == $course_type_id
                                      ? 'selected'
                                      : ''
                                    ?>>
                                <?= htmlReady($available_course_type['name']) ?>
                            </option>
                        <? endforeach ?>
                    </select>
                </label>
                <?= \Studip\Button::create(_('Suchen'), 'search_courses') ?>
            </section>
        </article>
    <? elseif ($step == 1): ?>
        <?= $this->render_partial('questionnaire/assign_step1') ?>
    <? elseif ($step == 2): ?>
        <?= $this->render_partial('questionnaire/assign_step2') ?>
    <? elseif ($step == 3): ?>

    <? endif ?>
    <? if ($step >= 1): ?>
        <input type="hidden" name="semester_id" value="<?= htmlReady($semester_id) ?>">
        <input type="hidden" name="institute_id" value="<?= htmlReady($institute_id) ?>">
        <input type="hidden" name="course_type_id" value="<?= htmlReady($course_type_id) ?>">
    <? endif ?>
    <? if ($step >= 2): ?>
        <? if ($selected_courses): ?>
            <? foreach ($selected_courses as $course): ?>
                <input type="hidden" name="course_id_list[]" value="<?= htmlReady($course->id) ?>">
            <? endforeach ?>
        <? endif ?>
    <? endif ?>
</form>