ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.assAnswerBinaryState.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
5 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
6 
27 {
35  protected $state;
36 
50  public function __construct( $answertext = "", $points = 0.0, $order = 0, $state = 0, $id = -1 )
51  {
53  $this->state = $state;
54  }
55 
64  public function getState()
65  {
66  return $this->state;
67  }
68 
77  public function isStateChecked()
78  {
79  return $this->state;
80  }
81 
90  public function isStateSet()
91  {
92  return $this->state;
93  }
94 
103  public function isStateUnset()
104  {
105  return !$this->state;
106  }
107 
116  public function isStateUnchecked()
117  {
118  return !$this->state;
119  }
120 
130  public function setState($state = 0)
131  {
132  $this->state = $state;
133  }
134 
142  public function setChecked()
143  {
144  $this->state = 1;
145  }
146 
154  public function setSet()
155  {
156  $this->state = 1;
157  }
158 
166  public function setUnset()
167  {
168  $this->state = 0;
169  }
170 
178  public function setUnchecked()
179  {
180  $this->state = 0;
181  }
182 }