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
|
<?php
/**
* @var Course_EvaluationController $controller
*/
?>
<!-- TODO min responses -->
<?php foreach ($controller->evaluations as $key => $evaluation) : ?>
<article class="studip toggle <?= $key == 0 ? 'open' : '' ?>">
<header>
<h1>
<a href="#">
<?= htmlReady((Semester::find($evaluation->eval_assignment->semester_id))->name . ' - ' . $evaluation->title) ?>
</a>
</h1>
</header>
<?php if (EvaluationHelper::isPermittedEvaluationAccess()) : ?>
<?= $this->render_partial('questionnaire/evaluate.php', ['questionnaire' => $evaluation, 'range_type' => 'course', 'range_id' => Context::getId()]) ?>
<?php elseif (User::findCurrent()->hasPermissionLevel('tutor', Context::get())) : ?>
<!-- TODO other views -->
<table class="row-headers">
<tbody>
<tr>
<th scope="row"><?= _('Evaluationsbeginn') ?></th>
<td><?= date('d.m.Y H:i', $evaluation->eval_assignment->startdate) ?></td>
</tr>
<tr>
<th scope="row"><?= _('Evaluationsende') ?></th>
<td><?= date('d.m.Y H:i', $evaluation->eval_assignment->stopdate) ?></td>
</tr>
<tr>
<th scope="row"><?= _('Anonyme Teilnahme') ?></th>
<td><?= $evaluation->anonymous ? _('Ja') : _('Nein') ?></td>
</tr>
<tr>
<th scope="row"><?= _('Antworten revidierbar') ?></th>
<td><?= $evaluation->editanswers ? _('Ja') : _('Nein') ?></td>
</tr>
<tr>
<th scope="row"><?= _('Zeitpunkt Einsicht') ?></th>
<td>
<?= _(QuestionnaireEvalCentralProfile::RESULT_VISIBILITY_OPTIONS[$evaluation->resultvisibility]) ?>
</td>
</tr>
<tr>
<th scope="row"><?= _('Einsicht für') ?></th>
<td>
<?= $evaluation->result_visible_for ?
_(QuestionnaireEvalCentralProfile::RESULT_VISIBLE_FOR_OPTIONS[$evaluation->result_visible_for])
: _('Evaluations-Admins') ?>
</td>
</tr>
<tr>
<th scope="row"><?= _('Mindestrücklauf') ?></th>
<td><?= htmlReady($evaluation->minimum_responses) ?></td>
</tr>
</tbody>
</table>
<?php else : ?>
<?php if ($evaluation->isStopped()) : ?>
<?= $this->render_partial('questionnaire/evaluate.php', ['questionnaire' => $evaluation, 'range_type' => 'course', 'range_id' => Context::getId()]) ?>
<?php elseif ($evaluation->isAnswerable()) : ?>
<?= $this->render_partial('questionnaire/answer.php', ['questionnaire' => $evaluation, 'range_type' => 'course', 'range_id' => Context::getId()]) ?>
<?php else : ?>
<p><?= _('Die Evaluation ist noch nicht abgeschlossen.') ?></p>
<?php endif ?>
<?php endif ?>
</article>
<?php endforeach ?>
<?php
if (User::findCurrent()->hasPermissionLevel('tutor', Context::get())) {
$actions = new ActionsWidget();
$actions->addLink(
_("QR-Code für Studierende anzeigen"),
URLHelper::getURL('dispatch.php/course/evaluation'),
Icon::create("code-qr", "clickable"),
['data-qr-code' => sprintf(_( 'Evaluation zur Veranstaltung %s'), Context::get()->getFullname('number-name'))]
);
Sidebar::Get()->addWidget($actions);
}
|