ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilQTIItemfeedback.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 define("VIEW_ALL", "1");
25 define("VIEW_ADMINISTRATOR", "2");
26 define("VIEW_ADMINAUTHORITY", "3");
27 define("VIEW_ASSESSOR", "4");
28 define("VIEW_AUTHOR", "5");
29 define("VIEW_CANDIDATE", "6");
30 define("VIEW_INVIGILATORPROCTOR", "7");
31 define("VIEW_PSYCHOMETRICIAN", "8");
32 define("VIEW_SCORER", "9");
33 define("VIEW_TUTOR", "10");
34 
44 {
45  public $view;
46  public $ident;
47  public $title;
48  public $flow_mat;
49  public $material;
50  public $solution;
51  public $hint;
52 
53  public function __construct()
54  {
55  $this->flow_mat = array();
56  $this->material = array();
57  $this->solution = array();
58  $this->hint = array();
59  }
60 
61  public function setView($a_view)
62  {
63  switch (strtolower($a_view)) {
64  case "1":
65  case "all":
66  $this->view = VIEW_ALL;
67  break;
68  case "2":
69  case "administrator":
70  $this->view = VIEW_ADMINISTRATOR;
71  break;
72  case "3":
73  case "adminauthority":
74  $this->view = VIEW_ADMINAUTHORITY;
75  break;
76  case "4":
77  case "assessor":
78  $this->view = VIEW_ASSESSOR;
79  break;
80  case "5":
81  case "author":
82  $this->view = VIEW_AUTHOR;
83  break;
84  case "6":
85  case "candidate":
86  $this->view = VIEW_CANDIDATE;
87  break;
88  case "7":
89  case "invigilatorproctor":
90  $this->view = VIEW_INVIGILATORPROCTOR;
91  break;
92  case "8":
93  case "psychometrician":
94  $this->view = VIEW_PSYCHOMETRICIAN;
95  break;
96  case "9":
97  case "scorer":
98  $this->view = VIEW_SCORER;
99  break;
100  case "10":
101  case "tutor":
102  $this->view = VIEW_TUTOR;
103  break;
104  }
105  }
106 
107  public function getView()
108  {
109  return $this->view;
110  }
111 
112  public function setIdent($a_ident)
113  {
114  $this->ident = $a_ident;
115  }
116 
117  public function getIdent()
118  {
119  return $this->ident;
120  }
121 
122  public function setTitle($a_title)
123  {
124  $this->title = $a_title;
125  }
126 
127  public function getTitle()
128  {
129  return $this->title;
130  }
131 
132  public function addFlow_mat($a_flow_mat)
133  {
134  array_push($this->flow_mat, $a_flow_mat);
135  }
136 
137  public function addMaterial($a_material)
138  {
139  array_push($this->material, $a_material);
140  }
141 
142  public function addSolution($a_solution)
143  {
144  array_push($this->solution, $a_solution);
145  }
146 
147  public function addHint($a_hint)
148  {
149  array_push($this->hint, $a_hint);
150  }
151 }
const VIEW_ALL
const VIEW_TUTOR
const VIEW_AUTHOR
const VIEW_ADMINISTRATOR
const VIEW_ASSESSOR
const VIEW_ADMINAUTHORITY
const VIEW_PSYCHOMETRICIAN
const VIEW_CANDIDATE
const VIEW_SCORER
const VIEW_INVIGILATORPROCTOR