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