aboutsummaryrefslogtreecommitdiff
path: root/app/views/vips/sheets/add_exercise_dialog.php
blob: f13a08d580c1018a04bea79d00b85fa00aa16daf (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
<?php
/**
 * @var Vips_SheetsController $controller
 * @var int $assignment_id
 * @var array<class-string<Exercise>, array> $exercise_types
 */
?>
<form class="default" action="<?= $controller->edit_exercise() ?>" method="POST">
    <input type="hidden" name="assignment_id" value="<?= $assignment_id ?>">

    <fieldset>
        <legend>
            <?= _('Aufgabentyp auswählen') ?>
        </legend>

        <div class="exercise_types">
            <? foreach ($exercise_types as $type => $entry): ?>
                <button class="exercise_type" name="exercise_type" value="<?= htmlReady($type) ?>"
                        style="<?= $type::getTypeIcon()->asCSS(40) ?>">
                    <b><?= htmlReady($entry['name']) ?></b><br>
                    <?= htmlReady($type::getTypeDescription()) ?>
                </button>
            <? endforeach ?>
        </div>
    </fieldset>
</form>