blob: b279a368477a58590e9408c64873bc2c82ccc772 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
<?php
/**
* @var VipsAssignment $assignment
* @var string $user_id
* @var int $released
* @var Vips_SolutionsController $controller
* @var string $feedback
*/
?>
<h1 class="width-1200">
<?= htmlReady($assignment->test->title) ?>
</h1>
<div class="width-1200" style="margin: 10px 0;">
<?= formatReady($assignment->test->description) ?>
</div>
<table class="default dynamic_list collapsable width-1200">
<caption>
<?= _('Ergebnisse des Aufgabenblatts') ?>
</caption>
<thead>
<tr>
<th style="width: 2em;">
</th>
<th style="width: 60%;">
<?= _('Aufgaben') ?>
</th>
<th style="width: 10%; text-align: center;">
<?= _('Bearbeitet') ?>
</th>
<th style="width: 15%; text-align: center;">
<?= _('Erreichte Punkte') ?>
</th>
<th style="width: 15%; text-align: center;">
<?= _('Max. Punkte') ?>
</th>
</tr>
</thead>
<? foreach ($assignment->getExerciseRefs($user_id) as $exercise_ref) : ?>
<? $solution = $assignment->getSolution($user_id, $exercise_ref->task_id); ?>
<tbody class="collapsed">
<tr class="header-row">
<td class="dynamic_counter" style="text-align: right;">
</td>
<td>
<? if ($released >= VipsAssignment::RELEASE_STATUS_CORRECTIONS): ?>
<a href="<?= $controller->view_solution(['assignment_id' => $assignment->id, 'exercise_id' => $exercise_ref->task_id]) ?>">
<?= htmlReady($exercise_ref->exercise->title) ?>
</a>
<? elseif ($released == VipsAssignment::RELEASE_STATUS_COMMENTS && $solution && $solution->hasFeedback()) : ?>
<a class="toggler" href="#">
<?= htmlReady($exercise_ref->exercise->title) ?>
<a>
<? else: ?>
<?= htmlReady($exercise_ref->exercise->title) ?>
<? endif ?>
</td>
<td style="text-align: center;">
<? if ($solution): ?>
<?= Icon::create('accept', Icon::ROLE_STATUS_GREEN)->asSvg(['title' => _('ja')]) ?>
<? else : ?>
<?= Icon::create('decline', Icon::ROLE_STATUS_RED)->asSvg(['title' => _('nein')]) ?>
<? endif ?>
</td>
<td style="text-align: center;">
<?= sprintf('%g', $solution ? $solution->points : 0) ?>
</td>
<td style="text-align: center;">
<?= sprintf('%g', $exercise_ref->points) ?>
</td>
</tr>
<? if ($released == VipsAssignment::RELEASE_STATUS_COMMENTS && $solution && $solution->hasFeedback()): ?>
<tr>
<td>
</td>
<td colspan="4">
<?= formatReady($solution->feedback) ?>
<?= $this->render_partial('vips/solutions/feedback_files', compact('solution')) ?>
</td>
</tr>
<? endif ?>
</tbody>
<? endforeach ?>
<tfoot>
<tr style="font-weight: bold;">
<td>
</td>
<td colspan="2" style="padding: 5px;">
<?= _('Gesamtpunktzahl') ?>
</td>
<td style="text-align: center;">
<?= sprintf('%g', $assignment->getUserPoints($user_id)) ?>
</td>
<td style="text-align: center;">
<?= sprintf('%g', $assignment->test->getTotalPoints()) ?>
</td>
</tr>
</tfoot>
</table>
<? if ($released >= VipsAssignment::RELEASE_STATUS_COMMENTS && $feedback != ''): ?>
<div class="width-1200">
<h3>
<?= _('Kommentar zur Bewertung') ?>
</h3>
<?= formatReady($feedback) ?>
</div>
<? endif ?>
|