From 0b7738a2fa2cf1b55457603ca7a39fa29dfe70d3 Mon Sep 17 00:00:00 2001 From: Finn Schneider Date: Wed, 4 Mar 2026 12:40:21 +0100 Subject: qr init --- app/controllers/course/evaluation.php | 5 +++++ app/views/course/evaluation/index.php | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) 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 @@ + +evaluations as $evaluation) : ?> + + + +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); +} -- cgit v1.0