diff options
| author | Finn Schneider <schneider@data-quest.de> | 2026-03-16 17:49:47 +0100 |
|---|---|---|
| committer | Finn Schneider <schneider@data-quest.de> | 2026-03-16 17:49:47 +0100 |
| commit | c43df6c862aead957a507989eb520fd3a1bc7272 (patch) | |
| tree | 102520df18de432348646f9e616cef3745612394 | |
| parent | e7bff0dc8dc2aea4cc1544a702780888fa19dfd2 (diff) | |
dozent/tutor view course
| -rw-r--r-- | app/views/course/evaluation/index.php | 54 | ||||
| -rw-r--r-- | app/views/evaluation/profiles/index.php | 2 | ||||
| -rw-r--r-- | lib/models/QuestionnaireEvalCentralProfile.php | 2 | ||||
| -rw-r--r-- | resources/assets/stylesheets/scss/tables.scss | 25 |
4 files changed, 77 insertions, 6 deletions
diff --git a/app/views/course/evaluation/index.php b/app/views/course/evaluation/index.php index 193ecf7..19f6bdf 100644 --- a/app/views/course/evaluation/index.php +++ b/app/views/course/evaluation/index.php @@ -4,7 +4,9 @@ */ ?> +<!-- TODO min responses --> <?php foreach ($controller->evaluations as $key => $evaluation) : ?> + <?php $profile = QuestionnaireEvalCentralProfile::find($evaluation->eval_assignment->semester_id) ?> <article class="studip toggle <?= $key == 0 ? 'open' : '' ?>"> <header> <h1> @@ -14,12 +16,56 @@ </h1> </header> - <?php if ($evaluation->isStopped()) : ?> + <?php if (EvaluationHelper::isPermittedEvaluationAccess()) : ?> <?= $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 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> + <?= $profile->result_visible_for ? + _(QuestionnaireEvalCentralProfile::RESULT_VISIBLE_FOR_OPTIONS[$profile->result_visible_for]) + : _('Evaluations-Admins') ?> + </td> + </tr> + <tr> + <th scope="row"><?= _('Mindestrücklauf') ?></th> + <td><?= htmlReady($profile->minimum_responses) ?></td> + </tr> + </tbody> + </table> <?php else : ?> - <p><?= _('Die Evaluation ist noch nicht abgeschlossen.') ?></p> + <?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 ?> diff --git a/app/views/evaluation/profiles/index.php b/app/views/evaluation/profiles/index.php index 8f7ec86..75bafbf 100644 --- a/app/views/evaluation/profiles/index.php +++ b/app/views/evaluation/profiles/index.php @@ -72,7 +72,7 @@ use Studip\Button; <?= $profile->result_visible_for ? _(QuestionnaireEvalCentralProfile::RESULT_VISIBLE_FOR_OPTIONS[$profile->result_visible_for]) : - _('Admins') + _('Evaluations-Admins') ?> </td> <td><?= $profile->minimum_responses ?></td> diff --git a/lib/models/QuestionnaireEvalCentralProfile.php b/lib/models/QuestionnaireEvalCentralProfile.php index f3eef52..6c4a0bb 100644 --- a/lib/models/QuestionnaireEvalCentralProfile.php +++ b/lib/models/QuestionnaireEvalCentralProfile.php @@ -16,7 +16,7 @@ class QuestionnaireEvalCentralProfile extends SimpleORMap { public const RESULT_VISIBILITY_OPTIONS = - ['never' => 'nie', 'afterending' => 'nach Ende', 'afterparticipation' => 'nach Teilnahme']; + ['never' => 'Nie', 'afterending' => 'Nach Ende', 'afterparticipation' => 'Nach Teilnahme']; public const RESULT_VISIBLE_FOR_OPTIONS = ['autor' => 'Alle', 'tutor' => 'Tutor/-innen', 'dozent' => 'Lehrende']; protected static function configure($config = []): void diff --git a/resources/assets/stylesheets/scss/tables.scss b/resources/assets/stylesheets/scss/tables.scss index 251932f..1f59538 100644 --- a/resources/assets/stylesheets/scss/tables.scss +++ b/resources/assets/stylesheets/scss/tables.scss @@ -996,3 +996,28 @@ table.mycourses { height: 25px; width: 25px; } + +.row-headers { + text-align: left; + border-collapse: collapse; + width: stretch; + tr { + border-bottom: 1px solid var(--color--table-border) + } + th { + padding: 10px 5px 10px 10px; + width: 40%; + } + td { + padding: 10px 10px 10px 5px; + width: 60%; + } +} + +article.studip > table.row-headers:last-child { + margin-bottom: 0; + + > tbody:last-child > tr:last-child { + border-bottom: 0; + } +} |
