aboutsummaryrefslogtreecommitdiff
path: root/app/views/questionnaire/assign_step2.php
blob: c57623e2d7bcbd7fdbb3d6f849524eac49b9884e (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
<article class="studip">
    <header><h1><?= _('Ausgewählte Veranstaltungen') ?></h1></header>
    <ul>
        <? if ($selected_courses): ?>
            <? foreach ($selected_courses as $selected_course): ?>
                <li>
                    <? if ($GLOBALS['perm']->have_perm('root')): ?>
                        <a href="<?= URLHelper::getLink(
                                 'dispatch.php/course/details',
                                 [
                                     'cid' => $selected_course->id
                                 ]
                                 ) ?>" data-dialog="1">
                            <?= htmlReady($selected_course->getFullName()) ?>
                        </a>
                    <? else: ?>
                        <?= htmlReady($selected_course->getFullName()) ?>
                    <? endif ?>
                </li>
            <? endforeach ?>
        <? endif ?>
    </ul>
</article>
<article class="studip">
    <header><h1><?= _('Auswählbare Fragebögen') ?></h1></header>
    <section>
        <table class="default sortable-table" data-sortlist="[[2, 1]]">
            <colgroup>
                <col width="30px">
                <col>
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>
                        <input type="checkbox"
                               data-proxyfor="input[name='selected_questionnaire_ids[]']"
                               data-activates="#questionnaire-assign-form .step2-button">
                    </th>
                    <th data-sort="text"><?= _('Titel') ?></th>
                    <th data-sort="htmldata"><?= _('Erstellungsdatum') ?></th>
                </tr>
            </thead>
            <tbody>
                <? foreach ($questionnaires as $questionnaire): ?>
                    <tr>
                        <td>
                            <input type="checkbox" name="selected_questionnaire_ids[]"
                                   value="<?= htmlReady($questionnaire->id) ?>"
                                   <?= in_array($questionnaire->id, $selected_questionnaires)
                                     ? 'checked="checked"'
                                     : '' ?>>
                        </td>
                        <td><?= htmlReady($questionnaire->title) ?></td>
                        <td data-sort-value="<?= htmlReady($questionnaire->mkdate) ?>">
                            <?= date('d.m.Y', $questionnaire->mkdate) ?>
                        </td>
                    </tr>
                <? endforeach ?>
            </tbody>
        </table>
        <label>
            <input type="checkbox" name="delete_dates" value="1"
                   <?= $delete_dates ? 'checked="checked"' : '' ?>>
            <?= _('Kopierte Fragebögen händisch starten und enden lassen') ?>
        </label>
        <?= \Studip\Button::create(
            _('Zuweisen'),
            'assign',
            [
                'class' => 'step2-button',
                'disabled' => 'disabled'
            ]
        ) ?>
        <?= \Studip\Button::create(
            _('In Veranstaltungen kopieren'),
            'copy',
            [
                'class' => 'step2-button',
                'disabled' => 'disabled'
            ]
        ) ?>
    </section>
</article>