diff options
| author | Finn Schneider <schneider@data-quest.de> | 2026-03-04 12:40:21 +0100 |
|---|---|---|
| committer | Finn Schneider <schneider@data-quest.de> | 2026-03-13 17:25:01 +0000 |
| commit | 0b7738a2fa2cf1b55457603ca7a39fa29dfe70d3 (patch) | |
| tree | 8ccb92892d99d3bf43a51d7615614186db18df11 | |
| parent | db31dcfd04a43789cba1728db8e0969182cb7880 (diff) | |
qr init
| -rw-r--r-- | app/controllers/course/evaluation.php | 5 | ||||
| -rw-r--r-- | app/views/course/evaluation/index.php | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/app/controllers/course/evaluation.php b/app/controllers/course/evaluation.php index 48b06f2..dd3043f 100644 --- a/app/controllers/course/evaluation.php +++ b/app/controllers/course/evaluation.php @@ -4,6 +4,11 @@ class Course_EvaluationController extends AuthenticatedController public function index_action() { Navigation::activateItem('course/evaluation'); + $this->evaluations = Questionnaire::findBySQL( + "INNER JOIN `questionnaire_eval_assignments` USING(`questionnaire_id`) + WHERE `course_id` = ? AND `applied` = 1 + ORDER BY `questionnaire_eval_assignments`.`startdate` DESC", + [Context::getId()]); $this->render_template('course/evaluation/index', $this->layout); } } diff --git a/app/views/course/evaluation/index.php b/app/views/course/evaluation/index.php index b3d9bbc..a7268d0 100644 --- a/app/views/course/evaluation/index.php +++ b/app/views/course/evaluation/index.php @@ -1 +1,21 @@ <?php +/** + * @var Course_EvaluationController $controller + */ +?> + +<?php foreach ($controller->evaluations as $evaluation) : ?> + +<?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); +} |
