ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.assAnswerBinaryState.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 include_once "./Modules/TestQuestionPool/classes/class.assAnswerSimple.php";
25 include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
26 
50  var $state;
51 
64  $answertext = "",
65  $points = 0.0,
66  $order = 0,
67  $state = 0,
68  $id = -1
69  )
70  {
72  $this->state = $state;
73  }
74 
75 
85  function getState() {
86  return $this->state;
87  }
88 
98  function isStateChecked() {
99  return $this->state;
100  }
101 
111  function isStateSet() {
112  return $this->state;
113  }
114 
124  function isStateUnset() {
125  return !$this->state;
126  }
127 
137  function isStateUnchecked() {
138  return !$this->state;
139  }
140 
150  function setState($state = 0)
151  {
152  $this->state = $state;
153  }
154 
163  function setChecked() {
164  $this->state = 1;
165  }
166 
175  function setSet() {
176  $this->state = 1;
177  }
178 
187  function setUnset() {
188  $this->state = 0;
189  }
190 
199  function setUnchecked() {
200  $this->state = 0;
201  }
202 }
203 
204 ?>