aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/evaluation.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/evaluation.php')
-rw-r--r--app/controllers/evaluation.php61
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();
- }
-
-}