ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
5require_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 {
52 parent::__construct($answertext, $points, $order, $id);
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}
Class for true/false or yes/no answers.
setUnchecked()
Sets the answer as a unchecked answer.
setState($state=0)
Sets the state.
__construct( $answertext="", $points=0.0, $order=0, $state=0, $id=-1)
ASS_AnswerBinaryState constructor.
setUnset()
Sets the answer as a unset answer.
setSet()
Sets the answer as a set answer.
setChecked()
Sets the answer as a checked answer.
Class for simple answers.