ILIAS
Release_5_0_x_branch Revision 61816
|
Class for true/false or yes/no answers. More...
Public Member Functions | |
__construct ($answertext="", $points=0.0, $order=0, $state=0, $id=-1) | |
ASS_AnswerBinaryState constructor. | |
getState () | |
Gets the state. | |
isStateChecked () | |
Gets the state. | |
isStateSet () | |
Gets the state. | |
isStateUnset () | |
Gets the state. | |
isStateUnchecked () | |
Gets the state. | |
setState ($state=0) | |
Sets the state. | |
setChecked () | |
Sets the answer as a checked answer. | |
setSet () | |
Sets the answer as a set answer. | |
setUnset () | |
Sets the answer as a unset answer. | |
setUnchecked () | |
Sets the answer as a unchecked answer. | |
Public Member Functions inherited from ASS_AnswerSimple | |
__construct ($answertext="", $points=0.0, $order=0, $id=-1) | |
ASS_AnswerSimple constructor. | |
getId () | |
Gets the answer id. | |
getAnswertext () | |
Gets the answer text. | |
getPoints () | |
Gets the points. | |
checkPoints ($a_points) | |
Checks, if the point value is numeric. | |
getOrder () | |
Gets the sort/display order. | |
setOrder ($order=0) | |
Sets the order. | |
setId ($id=-1) | |
Sets the answer id. | |
setAnswertext ($answertext="") | |
Sets the answer text. | |
setPoints ($points=0.0) | |
Sets the points. |
Protected Attributes | |
$state | |
Protected Attributes inherited from ASS_AnswerSimple | |
$answertext | |
$points | |
$order | |
$id |
Class for true/false or yes/no answers.
ASS_AnswerBinaryState is a class for answers with a binary state indicator (checked/unchecked, set/unset)
Get rid of duplicate methods (hiding behind different names.
Rework class to use a true binary state (boolean) instead of integer
Rename class to something that matches the filename properly.
Definition at line 26 of file class.assAnswerBinaryState.php.
ASS_AnswerBinaryState::__construct | ( | $answertext = "" , |
|
$points = 0.0 , |
|||
$order = 0 , |
|||
$state = 0 , |
|||
$id = -1 |
|||
) |
ASS_AnswerBinaryState constructor.
The constructor takes possible arguments an creates an instance of the ASS_AnswerBinaryState object.
string | $answertext | A string defining the answer text |
double | $points | The number of points given for the selected answer |
integer | $order | A nonnegative value representing a possible display or sort order |
integer | $state | A integer value indicating the state of the answer |
integer | $id | The database id of the answer |
Definition at line 50 of file class.assAnswerBinaryState.php.
References ASS_AnswerSimple\$answertext, ASS_AnswerSimple\$id, ASS_AnswerSimple\$order, ASS_AnswerSimple\$points, and $state.
Referenced by ASS_AnswerImagemap\ASS_AnswerImagemap().
ASS_AnswerBinaryState::getState | ( | ) |
Gets the state.
Returns the state of the answer
Definition at line 64 of file class.assAnswerBinaryState.php.
References $state.
ASS_AnswerBinaryState::isStateChecked | ( | ) |
Gets the state.
Returns the answer state
Definition at line 77 of file class.assAnswerBinaryState.php.
References $state.
ASS_AnswerBinaryState::isStateSet | ( | ) |
Gets the state.
Returns the answer state
Definition at line 90 of file class.assAnswerBinaryState.php.
References $state.
ASS_AnswerBinaryState::isStateUnchecked | ( | ) |
Gets the state.
Returns the answer state
Definition at line 116 of file class.assAnswerBinaryState.php.
References $state.
ASS_AnswerBinaryState::isStateUnset | ( | ) |
Gets the state.
Returns the answer state
Definition at line 103 of file class.assAnswerBinaryState.php.
References $state.
ASS_AnswerBinaryState::setChecked | ( | ) |
Sets the answer as a checked answer.
Sets the state value of the answer to 1
Definition at line 142 of file class.assAnswerBinaryState.php.
ASS_AnswerBinaryState::setSet | ( | ) |
Sets the answer as a set answer.
Sets the state value of the answer to 1
Definition at line 154 of file class.assAnswerBinaryState.php.
ASS_AnswerBinaryState::setState | ( | $state = 0 | ) |
Sets the state.
Sets the state of the answer using 1 or 0 as indicator
bool | int | $state | A integer value indicating the state of the answer |
Definition at line 130 of file class.assAnswerBinaryState.php.
References $state.
ASS_AnswerBinaryState::setUnchecked | ( | ) |
Sets the answer as a unchecked answer.
Sets the state value of the answer to 0
Definition at line 178 of file class.assAnswerBinaryState.php.
ASS_AnswerBinaryState::setUnset | ( | ) |
Sets the answer as a unset answer.
Sets the state value of the answer to 0
Definition at line 166 of file class.assAnswerBinaryState.php.
|
protected |
Definition at line 35 of file class.assAnswerBinaryState.php.
Referenced by __construct(), getState(), isStateChecked(), isStateSet(), isStateUnchecked(), isStateUnset(), and setState().