ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
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
26
class
ASS_AnswerBinaryState
extends
ASS_AnswerSimple
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
}
ASS_AnswerBinaryState\setUnchecked
setUnchecked()
Sets the answer as a unchecked answer.
Definition:
class.assAnswerBinaryState.php:178
ASS_AnswerBinaryState\setChecked
setChecked()
Sets the answer as a checked answer.
Definition:
class.assAnswerBinaryState.php:142
ASS_AnswerBinaryState\__construct
__construct($answertext="", $points=0.0, $order=0, $state=0, $id=-1)
ASS_AnswerBinaryState constructor.
Definition:
class.assAnswerBinaryState.php:50
ASS_AnswerBinaryState\$state
$state
Definition:
class.assAnswerBinaryState.php:35
ASS_AnswerSimple\$answertext
$answertext
Definition:
class.assAnswerSimple.php:27
ASS_AnswerBinaryState\isStateSet
isStateSet()
Gets the state.
Definition:
class.assAnswerBinaryState.php:90
ASS_AnswerBinaryState\setState
setState($state=0)
Sets the state.
Definition:
class.assAnswerBinaryState.php:130
ASS_AnswerSimple
Class for simple answers.
Definition:
class.assAnswerSimple.php:18
ASS_AnswerBinaryState\setUnset
setUnset()
Sets the answer as a unset answer.
Definition:
class.assAnswerBinaryState.php:166
ASS_AnswerBinaryState\isStateUnset
isStateUnset()
Gets the state.
Definition:
class.assAnswerBinaryState.php:103
ASS_AnswerBinaryState\isStateChecked
isStateChecked()
Gets the state.
Definition:
class.assAnswerBinaryState.php:77
ASS_AnswerBinaryState\getState
getState()
Gets the state.
Definition:
class.assAnswerBinaryState.php:64
ASS_AnswerSimple\$points
$points
Definition:
class.assAnswerSimple.php:36
ASS_AnswerSimple\$id
$id
Definition:
class.assAnswerSimple.php:54
ASS_AnswerBinaryState\setSet
setSet()
Sets the answer as a set answer.
Definition:
class.assAnswerBinaryState.php:154
ASS_AnswerBinaryState\isStateUnchecked
isStateUnchecked()
Gets the state.
Definition:
class.assAnswerBinaryState.php:116
ASS_AnswerSimple\$order
$order
Definition:
class.assAnswerSimple.php:45
ASS_AnswerBinaryState
Class for true/false or yes/no answers.
Definition:
class.assAnswerBinaryState.php:26
Modules
TestQuestionPool
classes
class.assAnswerBinaryState.php
Generated on Sat Jan 18 2025 19:01:22 for ILIAS by
1.8.13 (using
Doxyfile
)