diff options
| -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); +} |
