aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/lti/grades_user.php
blob: 8be7b0270fa812c23573573eb605cd379e67598c (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
<table class="default">
    <caption>
        <?= _('Ergebnisse') ?>
    </caption>

    <thead>
        <tr>
            <th>
                <?= _('Abschnitt') ?>
            </th>
            <th style="text-align: right;">
                <?= _('Bewertung') ?>
            </th>
        </tr>
    </thead>

    <tbody>
        <? foreach ($lti_data_array as $lti_data): ?>
            <tr>
                <td>
                    <?= htmlReady($lti_data->title) ?>
                </td>
                <td style="text-align: right;">
                    <? if ($grade = LtiGrade::find([$lti_data->id, $GLOBALS['user']->id])): ?>
                        <?= sprintf('%.0f%%', $grade->score * 100) ?>
                    <? else: ?>
                        &ndash;
                    <? endif ?>
                </td>
            </tr>
        <? endforeach ?>
    </tbody>
</table>