aboutsummaryrefslogtreecommitdiff
path: root/public/admin_evaluation.php
blob: 144e3f31dc7bc8c6b8dedc25037e57c8b8be629d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
# Lifter001: TEST
# Lifter002: TODO
# Lifter007: TODO
# Lifter003: TODO
# Lifter010: TODO
// +--------------------------------------------------------------------------+
// This file is part of Stud.IP
// admin_evaluation.php
//
// Show the admin pages
//
// +--------------------------------------------------------------------------+
// 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 any later version.
// +--------------------------------------------------------------------------+
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// +--------------------------------------------------------------------------+


/**
 * admin_evaluation.php
 *
 *
 * @author  cb
 * @version 10. Juni 2003
 * @access  public
 * @package evaluation
 */

require '../lib/bootstrap.php';

ob_start(); // start output buffering

page_open ( ["sess" => "Seminar_Session",
                  "auth" => "Seminar_Auth",
                  "perm" => "Seminar_Perm",
                  "user" => "Seminar_User"]);
$perm->check ("autor");

$list = Request::option('list');
$view = Request::option('view');


include_once 'lib/seminar_open.php';

PageLayout::setHelpKeyword("Basis.Evaluationen");
$title = _('Verwaltung von Evaluationen');
if (Context::get()) {
    $title = Context::getHeaderLine() . ' - ' . $title;
}
PageLayout::setTitle($title);

require_once 'lib/evaluation/evaluation.config.php';

if ($view === 'eval_inst') {
    Navigation::activateItem('/admin/institute/evaluation');
    require_once 'lib/admin_search.inc.php';
} else if (Context::getId() && $view == "eval_sem") {
    Navigation::activateItem('/course/admin/evaluation');
} else {
    Navigation::activateItem('/contents/evaluation');
}

if ((Context::getId()) && ($view == "eval_sem") || ($view == "eval_inst")) {
    $the_range = Context::getId();
} else {
    $the_range = Request::option('rangeID');
}

if ($the_range) {
    if (get_Username($the_range)) {
        $the_range = get_Username($the_range);
    }
    if (get_Userid($the_range)) {
        $isUserrange = 1;
    }
} elseif ($view) {
    $the_range = Context::getId();
}

if (empty($the_range)) {
    $the_range = $user->id;
    $isUserrange = 1;
}

if ($the_range != $auth->auth['uname'] && $the_range != 'studip' && !$isUserrange){
    $view_mode = get_object_type($the_range);
    if ($view_mode == "fak"){
        $view_mode = "inst";
    }
}


ob_start();
if (Request::option('page') == "edit"){
    include (EVAL_PATH.EVAL_FILE_EDIT);
}else{
    include (EVAL_PATH.EVAL_FILE_OVERVIEW);
}
$template = $GLOBALS['template_factory']->open('layouts/base.php');
$template->content_for_layout = ob_get_clean();
echo $template->render();
page_close();