diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /app/controllers/evaluation.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'app/controllers/evaluation.php')
| -rw-r--r-- | app/controllers/evaluation.php | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/app/controllers/evaluation.php b/app/controllers/evaluation.php deleted file mode 100644 index 4a157a9..0000000 --- a/app/controllers/evaluation.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -# Lifter010: TODO -/** - * vote.php - Votecontroller controller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -class EvaluationController extends AuthenticatedController -{ - public function display_action($range_id) - { - // Bind some params - URLHelper::bindLinkParam('show_expired', $null1); - - // Bind range_id - $this->range_id = $range_id; - - $this->nobody = !$GLOBALS['user']->id || $GLOBALS['user']->id == 'nobody'; - - // Check if we ned administration icons - $this->admin = $range_id == $GLOBALS['user']->id || $GLOBALS['perm']->have_studip_perm('tutor', $range_id); - - // Load evaluations - if (!$this->nobody) { - $eval_db = new EvaluationDB(); - $this->evaluations = StudipEvaluation::findMany($eval_db->getEvaluationIDs($range_id, EVAL_STATE_ACTIVE)); - } else { - $this->evaluations = []; - } - // Check if we got expired - if (Request::get('show_expired')) { - if ($this->admin) { - $this->evaluations = array_merge($this->evaluations, StudipEvaluation::findMany($eval_db->getEvaluationIDs($range_id, EVAL_STATE_STOPPED))); - } - } - if (!empty($this->suppress_empty_output) && count($this->evaluations) === 0) { - $this->render_nothing(); - } else { - $this->visit(); - } - } - - public function visit() - { - if ($GLOBALS['user']->id && $GLOBALS['user']->id != 'nobody' && Request::option('contentbox_open') && in_array(Request::option('contentbox_type'), words('vote eval'))) { - object_set_visit(Request::option('contentbox_open'), Request::option('contentbox_type')); - } - } - - public function visit_action() - { - $this->visit(); - $this->render_nothing(); - } - -} |
