ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilQTIDecvar.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("VARTYPE_INTEGER", "1");
25 define("VARTYPE_STRING", "2");
26 define("VARTYPE_DECIMAL", "3");
27 define("VARTYPE_SCIENTIFIC", "4");
28 define("VARTYPE_BOOLEAN", "5");
29 define("VARTYPE_ENUMERATED", "6");
30 define("VARTYPE_SET", "7");
31 
41 {
42  public $varname;
43  public $vartype;
44  public $defaultval;
45  public $minvalue;
46  public $maxvalue;
47  public $members;
48  public $cutvalue;
49  public $content;
50  public $interpretvar;
51 
52  public function __construct()
53  {
54  $this->interpretvar = array();
55  }
56 
57  public function setVarname($a_varname)
58  {
59  $this->varname = $a_varname;
60  }
61 
62  public function getVarname()
63  {
64  return $this->varname;
65  }
66 
67  public function setVartype($a_vartype)
68  {
69  switch (strtolower($a_vartype)) {
70  case "integer":
71  case "1":
72  $this->vartype = VARTYPE_INTEGER;
73  break;
74  case "string":
75  case "2":
76  $this->vartype = VARTYPE_STRING;
77  break;
78  case "decimal":
79  case "3":
80  $this->vartype = VARTYPE_DECIMAL;
81  break;
82  case "scientific":
83  case "4":
84  $this->vartype = VARTYPE_SCIENTIFIC;
85  break;
86  case "boolean":
87  case "5":
88  $this->vartype = VARTYPE_BOOLEAN;
89  break;
90  case "enumerated":
91  case "6":
92  $this->vartype = VARTYPE_ENUMERATED;
93  break;
94  case "set":
95  case "7":
96  $this->vartype = VARTYPE_SET;
97  break;
98  }
99  }
100 
101  public function getVartype()
102  {
103  return $this->vartype;
104  }
105 
106  public function setDefaultval($a_defaultval)
107  {
108  $this->defaultval = $a_defaultval;
109  }
110 
111  public function getDefaultval()
112  {
113  return $this->defaultval;
114  }
115 
116  public function setMinvalue($a_minvalue)
117  {
118  $this->minvalue = $a_minvalue;
119  }
120 
121  public function getMinvalue()
122  {
123  return $this->minvalue;
124  }
125 
126  public function setMaxvalue($a_maxvalue)
127  {
128  $this->maxvalue = $a_maxvalue;
129  }
130 
131  public function getMaxvalue()
132  {
133  return $this->maxvalue;
134  }
135 
136  public function setMembers($a_members)
137  {
138  $this->members = $a_members;
139  }
140 
141  public function getMembers()
142  {
143  return $this->members;
144  }
145 
146  public function setCutvalue($a_cutvalue)
147  {
148  $this->cutvalue = $a_cutvalue;
149  }
150 
151  public function getCutvalue()
152  {
153  return $this->cutvalue;
154  }
155 
156  public function setContent($a_content)
157  {
158  $this->content = $a_content;
159  }
160 
161  public function getContent()
162  {
163  return $this->content;
164  }
165 
166  public function addInterpretvar($a_interpretvar)
167  {
168  array_push($this->interpretvar, $a_interpretvar);
169  }
170 }
setDefaultval($a_defaultval)
const VARTYPE_INTEGER
const VARTYPE_SET
setCutvalue($a_cutvalue)
setContent($a_content)
setMaxvalue($a_maxvalue)
const VARTYPE_DECIMAL
const VARTYPE_BOOLEAN
const VARTYPE_ENUMERATED
addInterpretvar($a_interpretvar)
const VARTYPE_STRING
$a_content
Definition: workflow.php:93
setMinvalue($a_minvalue)
const VARTYPE_SCIENTIFIC
setVartype($a_vartype)
setMembers($a_members)
setVarname($a_varname)