blob: 7e5523c0daf12df45bdf53b4c5ff6022268bcc3b (
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
|
<table class="default sortable-table gradebook-lecturer-overview" data-sortlist="[[0, 0]]">
<caption><?= _('Erbrachte Leistungen') ?></caption>
<colgroup>
<col class="gradebook-column-name">
<col class="gradebook-column-total">
</colgroup>
<? foreach ($categories as $i => $category) { ?>
<colgroup class="gradebook-column-category" span="<?= count($groupedDefinitions[$category]) ?>"/>
<? } ?>
<thead>
<tr class="tablesorter-ignoreRow">
<th> </th>
<th> </th>
<? foreach ($categories as $category) { ?>
<th colspan="<?= count($groupedDefinitions[$category]) ?>"><?= $controller->formatCategory($category) ?></th>
<? } ?>
</tr>
<tr class="sortable">
<th data-sort="text"><?= _('Name') ?></th>
<th data-sort="text"><?= _('Gesamtsumme') ?></th>
<? foreach ($categories as $category) { ?>
<? foreach ($groupedDefinitions[$category] as $definition) { ?>
<th data-sort="text" class="gradebook-lecturer-overview-definition">
<?= htmlReady($definition->name) ?>
<span class="gradebook-definition-weight">(<?= $controller->formatAsPercent($controller->getNormalizedWeight($definition)) ?> %)</span>
</th>
<? } ?>
<? } ?>
</tr>
</thead>
<tbody>
<? if (count($students)) { ?>
<? foreach ($students as $student) { ?>
<tr>
<td class="gradebook-student-name" data-sort-value="<?= $studentName = htmlReady($student->nachname . ', ' . $student->vorname) ?>">
<a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $student->username]) ?>">
<?= $studentName ?>
</a>
</td>
<? $totalSum = $totalSums[$student->user_id] ?? 0 ?>
<? $totalPassed = $totalPassed[$student->user_id] ?? 0 ?>
<td data-sort-value="<?= $totalSum + $totalPassed?>">
<?= $totalSum > 0 ? $controller->formatAsPercent($totalSum) . ' %' : ''?>
<?= $totalPassed ? _('bestanden') : ''?>
</td>
<? foreach ($categories as $category) { ?>
<? foreach ($groupedDefinitions[$category] as $definition) { ?>
<? $instance = $controller->getInstanceForUser($definition, $student) ?>
<? $rawgrade = $instance ? $instance->rawgrade : 0 ?>
<? $passed = $instance ? $instance->passed : 0 ?>
<td data-sort-value="<?= $rawgrade + $passed ?>">
<?= $rawgrade > 0 ? $controller->formatAsPercent($rawgrade) . ' %' : ''?>
<?= $passed ? _('bestanden') : ''?>
</td>
<? } ?>
<? } ?>
</tr>
<? } ?>
<? } ?>
</tbody>
</table>
<? if (!count($categories)) { ?>
<?= \MessageBox::info(_('Es wurden noch keine Leistungen definiert.')) ?>
<? } ?>
<? if (!count($students)) { ?>
<?= \MessageBox::info(_('Es gibt noch keine Teilnehmer.')) ?>
<? } ?>
|