ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class for true/false or yes/no answers. More...
Public Member Functions | |
__construct ($answertext="", $points=0.0, $order=0, $correctness=false) | |
ASS_AnswerTrueFalse constructor. More... | |
getCorrectness () | |
Gets the correctness. More... | |
isCorrect () | |
Gets the correctness. More... | |
isIncorrect () | |
Gets the correctness. More... | |
isTrue () | |
Gets the correctness. More... | |
isFalse () | |
Gets the correctness. More... | |
setCorrectness ($correctness=false) | |
Sets the correctness. More... | |
setTrue () | |
Sets the answer as a correct answer. More... | |
setFalse () | |
Sets the answer as a incorrect answer. More... | |
Public Member Functions inherited from ASS_AnswerSimple | |
__construct ($answertext="", $points=0.0, $order=0, $id=-1) | |
ASS_AnswerSimple constructor. More... | |
getId () | |
Gets the answer id. More... | |
getAnswertext () | |
Gets the answer text. More... | |
getPoints () | |
Gets the points. More... | |
checkPoints ($a_points) | |
Checks, if the point value is numeric. More... | |
getOrder () | |
Gets the sort/display order. More... | |
setOrder ($order=0) | |
Sets the order. More... | |
setId ($id=-1) | |
Sets the answer id. More... | |
setAnswertext ($answertext="") | |
Sets the answer text. More... | |
setPoints ($points=0.0) | |
Sets the points. More... | |
Data Fields | |
$correctness | |
Additional Inherited Members | |
Protected Attributes inherited from ASS_AnswerSimple | |
$answertext | |
$points | |
$order | |
$id | |
Class for true/false or yes/no answers.
ASS_AnswerTrueFalse is a class for true/false or yes/no answers used for example in multiple choice tests.
: Get rid of integers in favor of booleans here.
Definition at line 21 of file class.assAnswerTrueFalse.php.
ASS_AnswerTrueFalse::__construct | ( | $answertext = "" , |
|
$points = 0.0 , |
|||
$order = 0 , |
|||
$correctness = false |
|||
) |
ASS_AnswerTrueFalse constructor.
The constructor takes possible arguments an creates an instance of the ASS_AnswerTrueFalse object.
string | $answertext | A string defining the answer text |
double | $points | The number of points given for the selected answer |
boolean | $correctness | A boolean value indicating the correctness of the answer |
integer | $order | A nonnegative value representing a possible display or sort order |
Definition at line 42 of file class.assAnswerTrueFalse.php.
References ASS_AnswerSimple\$answertext, $correctness, ASS_AnswerSimple\$order, and ASS_AnswerSimple\$points.
ASS_AnswerTrueFalse::getCorrectness | ( | ) |
Gets the correctness.
Definition at line 57 of file class.assAnswerTrueFalse.php.
References $correctness.
ASS_AnswerTrueFalse::isCorrect | ( | ) |
Gets the correctness.
Definition at line 67 of file class.assAnswerTrueFalse.php.
References $correctness.
ASS_AnswerTrueFalse::isFalse | ( | ) |
Gets the correctness.
Definition at line 101 of file class.assAnswerTrueFalse.php.
References $correctness.
ASS_AnswerTrueFalse::isIncorrect | ( | ) |
Gets the correctness.
Definition at line 77 of file class.assAnswerTrueFalse.php.
References $correctness.
ASS_AnswerTrueFalse::isTrue | ( | ) |
Gets the correctness.
Definition at line 89 of file class.assAnswerTrueFalse.php.
References $correctness.
ASS_AnswerTrueFalse::setCorrectness | ( | $correctness = false | ) |
Sets the correctness.
boolean | $correctness | A boolean value indicating the correctness of the answer |
Definition at line 111 of file class.assAnswerTrueFalse.php.
References $correctness.
ASS_AnswerTrueFalse::setFalse | ( | ) |
Sets the answer as a incorrect answer.
Definition at line 134 of file class.assAnswerTrueFalse.php.
ASS_AnswerTrueFalse::setTrue | ( | ) |
Sets the answer as a correct answer.
Definition at line 124 of file class.assAnswerTrueFalse.php.
ASS_AnswerTrueFalse::$correctness |
Definition at line 30 of file class.assAnswerTrueFalse.php.
Referenced by __construct(), getCorrectness(), isCorrect(), isFalse(), isIncorrect(), isTrue(), and setCorrectness().