ILIAS
Release_5_0_x_branch Revision 61816
|
Class for simple answers. More...
Public Member Functions | |
__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 | |
$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 18 of file class.assAnswerSimple.php.
ASS_AnswerSimple::__construct | ( | $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 |
integer | $id | The database id of the answer |
Definition at line 68 of file class.assAnswerSimple.php.
References $answertext, $id, $order, $points, and setPoints().
Referenced by ASS_AnswerOrdering\ASS_AnswerOrdering(), and ASS_AnswerTrueFalse\ASS_AnswerTrueFalse().
ASS_AnswerSimple::checkPoints | ( | $a_points | ) |
Checks, if the point value is numeric.
$a_points | double Points which are checked if they're numeric. |
Find usages and see if this method can be set deprecated due to the simpleton-pattern it is on is_numeric.
Definition at line 129 of file class.assAnswerSimple.php.
Referenced by setPoints(), ASS_AnswerMultipleResponse\setPointsUnchecked(), and ASS_AnswerImagemap\setPointsUnchecked().
ASS_AnswerSimple::getAnswertext | ( | ) |
Gets the answer text.
Returns the answer text
Definition at line 99 of file class.assAnswerSimple.php.
References $answertext.
Referenced by assAnswerCloze\getNumericValueFromAnswerText(), assAnswerCloze\setLowerBound(), and assAnswerCloze\setUpperBound().
ASS_AnswerSimple::getId | ( | ) |
Gets the answer id.
Returns the answer id
Definition at line 85 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 143 of file class.assAnswerSimple.php.
References $order.
ASS_AnswerSimple::getPoints | ( | ) |
Gets the points.
Returns the points
Definition at line 113 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 |
Definition at line 188 of file class.assAnswerSimple.php.
References $answertext.
ASS_AnswerSimple::setId | ( | $id = -1 | ) |
Sets the answer id.
integer | $id | answer id |
Definition at line 174 of file class.assAnswerSimple.php.
References $id.
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 |
Find usage and see if we can get rid of "magic ignorance" of the input value.
Definition at line 159 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 |
Find usages and see if we can get rid of "magic nullification" here.
Definition at line 204 of file class.assAnswerSimple.php.
References $points, and checkPoints().
Referenced by __construct(), and ASS_AnswerMultipleResponse\setPointsChecked().
|
protected |
Definition at line 27 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerMultipleResponse\__construct(), ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerBinaryState\__construct(), assAnswerCloze\__construct(), __construct(), ASS_AnswerImagemap\ASS_AnswerImagemap(), ASS_AnswerOrdering\ASS_AnswerOrdering(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), getAnswertext(), and setAnswertext().
|
protected |
Definition at line 54 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerMultipleResponse\__construct(), ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerBinaryState\__construct(), __construct(), ASS_AnswerImagemap\ASS_AnswerImagemap(), getId(), and setId().
|
protected |
Definition at line 45 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerMultipleResponse\__construct(), ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerBinaryState\__construct(), assAnswerCloze\__construct(), __construct(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), getOrder(), and setOrder().
|
protected |
Definition at line 36 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerBinaryState\__construct(), assAnswerCloze\__construct(), __construct(), ASS_AnswerImagemap\ASS_AnswerImagemap(), ASS_AnswerTrueFalse\ASS_AnswerTrueFalse(), getPoints(), and setPoints().