ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilQTIResponseLabel.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 ("RSHUFFLE_NO", "1");
25 define ("RSHUFFLE_YES", "2");
26 
27 define ("RAREA_ELLIPSE", "1");
28 define ("RAREA_RECTANGLE", "2");
29 define ("RAREA_BOUNDED", "3");
30 
31 define ("RRANGE_EXACT", "1");
32 define ("RRANGE_RANGE", "2");
33 
43 {
44  var $rshuffle;
45  var $rarea;
46  var $rrange;
48  var $ident;
51  var $material;
52  var $flow_mat;
53  var $content;
54 
55  function ilQTIResponseLabel()
56  {
57  $this->material = array();
58  $this->flow_mat = array();
59  }
60 
61  function setRshuffle($a_rshuffle)
62  {
63  switch (strtolower($a_rshuffle))
64  {
65  case "1":
66  case "no":
67  $this->rshuffle = RSHUFFLE_NO;
68  break;
69  case "2":
70  case "yes":
71  $this->rshuffle = RSHUFFLE_YES;
72  break;
73  }
74  }
75 
76  function getRshuffle()
77  {
78  return $this->rshuffle;
79  }
80 
81  function setRarea($a_rarea)
82  {
83  switch (strtolower($a_rarea))
84  {
85  case "1":
86  case "ellipse":
87  $this->rarea = RAREA_ELLIPSE;
88  break;
89  case "2":
90  case "rectangle":
91  $this->rarea = RAREA_RECTANGLE;
92  break;
93  case "3":
94  case "bounded":
95  $this->rarea = RAREA_BOUNDED;
96  break;
97  }
98  }
99 
100  function getRarea()
101  {
102  return $this->rarea;
103  }
104 
105  function setRrange($a_rrange)
106  {
107  switch (strtolower($a_rrange))
108  {
109  case "1":
110  case "excact":
111  $this->rshuffle = RRANGE_EXACT;
112  break;
113  case "2":
114  case "range":
115  $this->rshuffle = RRANGE_RANGE;
116  break;
117  }
118  }
119 
120  function getRrange()
121  {
122  return $this->rrange;
123  }
124 
125  function setLabelrefid($a_labelrefid)
126  {
127  $this->labelrefid = $a_labelrefid;
128  }
129 
130  function getLabelrefid()
131  {
132  return $this->labelrefid;
133  }
134 
135  function setIdent($a_ident)
136  {
137  $this->ident = $a_ident;
138  }
139 
140  function getIdent()
141  {
142  return $this->ident;
143  }
144 
145  function setMatchGroup($a_match_group)
146  {
147  $this->match_group = $a_match_group;
148  }
149 
150  function getMatchGroup()
151  {
152  return $this->match_group;
153  }
154 
155  function setMatchMax($a_match_max)
156  {
157  $this->match_max = $a_match_max;
158  }
159 
160  function getMatchMax()
161  {
162  return $this->match_max;
163  }
164 
165  function addMaterial($a_material)
166  {
167  array_push($this->material, $a_material);
168  }
169 
170  function addFlow_mat($a_flow_mat)
171  {
172  array_push($this->flow_mat, $a_flow_mat);
173  }
174 
175  function setContent($a_content)
176  {
177  $this->content = $a_content;
178  }
179 
180  function getContent()
181  {
182  return $this->content;
183  }
184 }
185 ?>