aboutsummaryrefslogtreecommitdiff
path: root/app/views/vips/sheets/add_exercise_dialog.php
blob: fbcd953133dd43ac6e91e9da4e13ec5299369964 (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
<?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) ?>">
                    <?= $type::getTypeIcon()->asImg(40) ?>
                    <div class="exercise_type_description">
                        <span class="exercise_type_name"><?= htmlReady($entry['name']) ?></span>
                        <span><?= htmlReady($type::getTypeDescription()) ?></span>
                    </div>
                </button>
            <? endforeach ?>
        </div>
    </fieldset>
</form>