aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/lti/grades_user.php
blob: 04ce429fb8ebce54346cd4494aed9a45d57cc74c (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
<? if (empty($lti_data_array)): ?>
    <?= MessageBox::info(_('Es sind keine LTI-Tools konfiguriert.')) ?>
<? else : ?>
    <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->deployment_id, $GLOBALS['user']->id])): ?>
                            <?= sprintf('%.0f%%', $grade->score * 100) ?>
                        <? else: ?>
                            &ndash;
                        <? endif ?>
                    </td>
                </tr>
            <? endforeach ?>
        </tbody>
    </table>
<? endif ?>