blob: 572067aceb887d6390d9fe46c9efc7911e13f317 (
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
79
80
|
<?php
/**
* @var Course_Gradebook_StudentsController $controller
* @var float $total
* @var string[] $categories
* @var float[] $subtotals
* @var array<string, Grading\Definition> $groupedDefinitions
*/
?>
<article class="gradebook-student">
<header>
<h1><?= _("Gesamt") ?></h1>
<? if ($total > 0) : ?>
<?= $this->render_partial("course/gradebook/_progress", ['value' => $controller->formatAsPercent($total)])?>
<? endif ?>
<? if ($passed) : ?>
<div><?= _('bestanden')?></div>
<? endif ?>
</header>
<? foreach ($categories as $category) { ?>
<section class="gradebook-student-category">
<header>
<h2><?= $controller->formatCategory($category) ?></h2>
</header>
<? if ($subtotals[$category] > 0) : ?>
<?= $this->render_partial("course/gradebook/_progress", ['value' => $controller->formatAsPercent($subtotals[$category])])?>
<? endif ?>
<? if ($subpassed[$category]) : ?>
<div><?= _('bestanden')?></div>
<? endif ?>
<table class="default">
<colgroup>
<col width="200px" />
<col width="150px" />
<col width="100px" />
<col />
</colgroup>
<thead>
<tr>
<th> </th>
<th><?= _("Tool") ?></th>
<th><?= _("Gewichtung") ?></th>
<th><?= _("Feedback") ?></th>
</tr>
</thead>
<tbody>
<?
foreach ($groupedDefinitions[$category] as $definition) {
$instance = $groupedInstances[$definition->id] ?? null;
$grade = $controller->formatAsPercent($instance ? $instance->rawgrade : 0);
$feedback = $instance ? $instance->feedback : '';
$passed = $instance ? $instance->passed : 0;
?>
<tr>
<td>
<span class="gradebook-definition-name"><?= htmlReady($definition->name) ?></span>
<? if ($grade > 0) : ?>
<?= $this->render_partial("course/gradebook/_progress", ['value' => (int) $grade])?>
<? endif ?>
<div><?= $passed ? _('bestanden') : '' ?></div>
</td>
<td>
<?= htmlReady($definition->tool) ?>
</td>
<td>
<?= $controller->formatAsPercent($controller->getNormalizedWeight($definition)) ?>%
</td>
<td>
<?= htmlReady($feedback) ?>
</td>
</tr>
<? } ?>
</tbody>
</table>
</section>
<? } ?>
</article>
|