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. | |
get_answertext () | |
Gets the answer text. | |
get_points () | |
Gets the points. | |
get_order () | |
Gets the sort/display order. | |
set_order ($order=0) | |
Sets the order. | |
setId ($id=-1) | |
Sets the answer id. | |
set_answertext ($answertext="") | |
Sets the answer text. | |
set_points ($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.
class.assAnswerSimple.php Assessment
Definition at line 34 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 82 of file class.assAnswerSimple.php.
References $answertext, $id, $order, and $points.
Referenced by ASS_AnswerBinaryState::ASS_AnswerBinaryState(), ASS_AnswerOrdering::ASS_AnswerOrdering(), and ASS_AnswerTrueFalse::ASS_AnswerTrueFalse().
{ $this->answertext = $answertext; $this->points = $points; $this->order = $order; $this->id = $id; }
ASS_AnswerSimple::get_answertext | ( | ) |
Gets the answer text.
Returns the answer text
Definition at line 118 of file class.assAnswerSimple.php.
{ //$tmpanswertext = "<![CDATA[".$this->answertext."]]>"; $tmpanswertext = $this->answertext; return $tmpanswertext; }
ASS_AnswerSimple::get_order | ( | ) |
Gets the sort/display order.
Returns a nonnegative order value for display or sorting
Definition at line 148 of file class.assAnswerSimple.php.
{
return $this->order;
}
ASS_AnswerSimple::get_points | ( | ) |
Gets the points.
Returns the points
Definition at line 134 of file class.assAnswerSimple.php.
{
return $this->points;
}
ASS_AnswerSimple::getId | ( | ) |
Gets the answer id.
Returns the answer id
Definition at line 104 of file class.assAnswerSimple.php.
{
return $this->id;
}
ASS_AnswerSimple::set_answertext | ( | $ | answertext = "" |
) |
Sets the answer text.
Sets the answer text
string | $answertext The answer text public |
Definition at line 193 of file class.assAnswerSimple.php.
References $answertext.
{ $this->answertext = $answertext; }
ASS_AnswerSimple::set_order | ( | $ | 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 162 of file class.assAnswerSimple.php.
References $order.
ASS_AnswerSimple::set_points | ( | $ | 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 207 of file class.assAnswerSimple.php.
References $points.
{ $this->points = $points; }
ASS_AnswerSimple::setId | ( | $ | id = -1 |
) |
Sets the answer id.
Sets the answer id
integer | $id answer id public |
Definition at line 179 of file class.assAnswerSimple.php.
References $order.
{ $this->order = $order; }
ASS_AnswerSimple::$answertext |
Definition at line 43 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState::ASS_AnswerBinaryState(), ASS_AnswerCloze::ASS_AnswerCloze(), ASS_AnswerImagemap::ASS_AnswerImagemap(), ASS_AnswerOrdering::ASS_AnswerOrdering(), ASS_AnswerSimple(), ASS_AnswerTrueFalse::ASS_AnswerTrueFalse(), and set_answertext().
ASS_AnswerSimple::$id |
Definition at line 70 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState::ASS_AnswerBinaryState(), ASS_AnswerCloze::ASS_AnswerCloze(), and ASS_AnswerSimple().
ASS_AnswerSimple::$order |
Definition at line 61 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState::ASS_AnswerBinaryState(), ASS_AnswerCloze::ASS_AnswerCloze(), ASS_AnswerImagemap::ASS_AnswerImagemap(), ASS_AnswerOrdering::ASS_AnswerOrdering(), ASS_AnswerSimple(), ASS_AnswerTrueFalse::ASS_AnswerTrueFalse(), set_order(), and setId().
ASS_AnswerSimple::$points |
Definition at line 52 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryState::ASS_AnswerBinaryState(), ASS_AnswerCloze::ASS_AnswerCloze(), ASS_AnswerImagemap::ASS_AnswerImagemap(), ASS_AnswerOrdering::ASS_AnswerOrdering(), ASS_AnswerSimple(), ASS_AnswerTrueFalse::ASS_AnswerTrueFalse(), and set_points().