ILIAS
Release_4_0_x_branch Revision 61816
|
Class for simple answers. More...
Public Member Functions | |
ASS_AnswerSimple ($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. |
Data Fields | |
$answertext | |
$points | |
$order | |
$id |
Class for simple answers.
ASS_AnswerSimple is a class for simple answers used for example in cloze tests with text gap.
Definition at line 35 of file class.assAnswerSimple.php.
ASS_AnswerSimple::ASS_AnswerSimple | ( | $answertext = "" , |
|
$points = 0.0 , |
|||
$order = 0 , |
|||
$id = -1 |
|||
) |
ASS_AnswerSimple constructor.
The constructor takes possible arguments an creates an instance of the ASS_AnswerSimple 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 public |
Definition at line 83 of file class.assAnswerSimple.php.
References $answertext, $id, $order, $points, and setPoints().
Referenced by ASS_AnswerBinaryState\ASS_AnswerBinaryState(), ASS_AnswerMultipleResponse\ASS_AnswerMultipleResponse(), ASS_AnswerOrdering\ASS_AnswerOrdering(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), and assAnswerCloze\assAnswerCloze().
ASS_AnswerSimple::checkPoints | ( | $a_points | ) |
Checks, if the point value is numeric.
Checks, if the point value is numeric
Definition at line 156 of file class.assAnswerSimple.php.
Referenced by setPoints(), and ASS_AnswerMultipleResponse\setPointsUnchecked().
ASS_AnswerSimple::getAnswertext | ( | ) |
Gets the answer text.
Returns the answer text
Definition at line 119 of file class.assAnswerSimple.php.
References $answertext.
Referenced by assAnswerCloze\setLowerBound(), and assAnswerCloze\setUpperBound().
ASS_AnswerSimple::getId | ( | ) |
Gets the answer id.
Returns the answer id
Definition at line 105 of file class.assAnswerSimple.php.
References $id.
ASS_AnswerSimple::getOrder | ( | ) |
Gets the sort/display order.
Returns a nonnegative order value for display or sorting
Definition at line 177 of file class.assAnswerSimple.php.
References $order.
ASS_AnswerSimple::getPoints | ( | ) |
Gets the points.
Returns the points
Definition at line 135 of file class.assAnswerSimple.php.
References $points.
Referenced by ASS_AnswerMultipleResponse\getPointsChecked().
ASS_AnswerSimple::setAnswertext | ( | $answertext = "" | ) |
Sets the answer text.
Sets the answer text
string | $answertext | The answer text public |
Definition at line 222 of file class.assAnswerSimple.php.
References $answertext.
ASS_AnswerSimple::setId | ( | $id = -1 | ) |
Sets the answer id.
Sets the answer id
integer | $id | answer id public |
Definition at line 208 of file class.assAnswerSimple.php.
References $order.
ASS_AnswerSimple::setOrder | ( | $order = 0 | ) |
Sets the order.
Sets the nonnegative order value which can be used for sorting or displaying multiple answers
integer | $order | A nonnegative integer public |
Definition at line 191 of file class.assAnswerSimple.php.
References $order.
ASS_AnswerSimple::setPoints | ( | $points = 0.0 | ) |
Sets the points.
Sets the points given for selecting the answer. You can even use negative values for wrong answers.
double | $points | The points given for the answer public |
Definition at line 236 of file class.assAnswerSimple.php.
References $points, and checkPoints().
Referenced by ASS_AnswerSimple(), and ASS_AnswerMultipleResponse\setPointsChecked().
ASS_AnswerSimple::$answertext |
Definition at line 44 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState\ASS_AnswerBinaryState(), ASS_AnswerBinaryStateImage\ASS_AnswerBinaryStateImage(), ASS_AnswerImagemap\ASS_AnswerImagemap(), ASS_AnswerMultipleResponse\ASS_AnswerMultipleResponse(), ASS_AnswerMultipleResponseImage\ASS_AnswerMultipleResponseImage(), ASS_AnswerOrdering\ASS_AnswerOrdering(), ASS_AnswerSimple(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), assAnswerCloze\assAnswerCloze(), getAnswertext(), and setAnswertext().
ASS_AnswerSimple::$id |
Definition at line 71 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState\ASS_AnswerBinaryState(), ASS_AnswerBinaryStateImage\ASS_AnswerBinaryStateImage(), ASS_AnswerImagemap\ASS_AnswerImagemap(), ASS_AnswerMultipleResponse\ASS_AnswerMultipleResponse(), ASS_AnswerMultipleResponseImage\ASS_AnswerMultipleResponseImage(), ASS_AnswerSimple(), and getId().
ASS_AnswerSimple::$order |
Definition at line 62 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState\ASS_AnswerBinaryState(), ASS_AnswerBinaryStateImage\ASS_AnswerBinaryStateImage(), ASS_AnswerImagemap\ASS_AnswerImagemap(), ASS_AnswerMultipleResponse\ASS_AnswerMultipleResponse(), ASS_AnswerMultipleResponseImage\ASS_AnswerMultipleResponseImage(), ASS_AnswerSimple(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), assAnswerCloze\assAnswerCloze(), getOrder(), setId(), and setOrder().
ASS_AnswerSimple::$points |
Definition at line 53 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState\ASS_AnswerBinaryState(), ASS_AnswerBinaryStateImage\ASS_AnswerBinaryStateImage(), ASS_AnswerImagemap\ASS_AnswerImagemap(), ASS_AnswerSimple(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), assAnswerCloze\assAnswerCloze(), getPoints(), and setPoints().