| 
    ILIAS
    release_10 Revision v10.1-43-ga1241a92c2f
    
   | 
  
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
 Inheritance diagram for ASS_AnswerSimple:
 Collaboration diagram for ASS_AnswerSimple:Public Member Functions | |
| __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... | |
Protected Attributes | |
| string | $answertext | 
| $points | |
| $order | |
| $id | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class for simple answers
ASS_AnswerSimple is a class for simple answers used for example in cloze tests with text gap.
\
Definition at line 29 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 70 of file class.assAnswerSimple.php.
References $answertext, $id, $order, $points, and setPoints().
 Here is the call graph for this function:| 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 131 of file class.assAnswerSimple.php.
Referenced by setPoints(), ASS_AnswerMultipleResponse\setPointsUnchecked(), and ASS_AnswerImagemap\setPointsUnchecked().
 Here is the caller graph for this function:| ASS_AnswerSimple::getAnswertext | ( | ) | 
Gets the answer text.
Returns the answer text
Definition at line 101 of file class.assAnswerSimple.php.
References $answertext.
Referenced by ilAssClozeTestFeedback\buildSelectGapOptionFeedbackLabel(), ilAssClozeTestFeedback\buildTextGapGivenAnswerFeedbackLabel(), assTextQuestion\getCorrectSolutionForTextOutput(), assSingleChoice\getCorrectSolutionForTextOutput(), assMultipleChoice\getCorrectSolutionForTextOutput(), assAnswerCloze\getNumericValueFromAnswerText(), assClozeTest\saveClozeNumericGapRecordToDb(), assClozeTest\saveClozeSelectGapRecordToDb(), assClozeTest\saveClozeTextGapRecordToDb(), assAnswerCloze\setLowerBound(), assAnswerCloze\setUpperBound(), assTextSubset\toLog(), and assTextQuestion\toLog().
 Here is the caller graph for this function:| ASS_AnswerSimple::getId | ( | ) | 
Gets the answer id.
Returns the answer id
Definition at line 87 of file class.assAnswerSimple.php.
References $id.
Referenced by assMultipleChoice\solutionValuesToText().
 Here is the caller graph for this function:| ASS_AnswerSimple::getOrder | ( | ) | 
Gets the sort/display order.
Returns a nonnegative order value for display or sorting
Definition at line 145 of file class.assAnswerSimple.php.
References $order.
Referenced by assClozeTest\saveClozeNumericGapRecordToDb(), assClozeTest\saveClozeSelectGapRecordToDb(), and assClozeTest\saveClozeTextGapRecordToDb().
 Here is the caller graph for this function:| ASS_AnswerSimple::getPoints | ( | ) | 
Gets the points.
Returns the points
Definition at line 115 of file class.assAnswerSimple.php.
References $points.
Referenced by assSingleChoice\getCorrectSolutionForTextOutput(), ASS_AnswerMultipleResponse\getPointsChecked(), assClozeTest\saveClozeNumericGapRecordToDb(), assClozeTest\saveClozeSelectGapRecordToDb(), assClozeTest\saveClozeTextGapRecordToDb(), assTextSubset\toLog(), and assTextQuestion\toLog().
 Here is the caller graph for this function:| ASS_AnswerSimple::setAnswertext | ( | $answertext = "" | ) | 
Sets the answer text.
Sets the answer text
| string | $answertext | The answer text | 
Definition at line 189 of file class.assAnswerSimple.php.
References $answertext.
Referenced by assClozeTestGUI\saveNumericGapCorrectionFormProperty().
 Here is the caller graph for this function:| ASS_AnswerSimple::setId | ( | $id = -1 | ) | 
Sets the answer id.
| integer | $id | answer id | 
Definition at line 175 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 161 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 205 of file class.assAnswerSimple.php.
References $points, and checkPoints().
Referenced by __construct(), assClozeTestGUI\saveNumericGapCorrectionFormProperty(), and ASS_AnswerMultipleResponse\setPointsChecked().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  protected | 
Definition at line 31 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerBinaryState\__construct(), ASS_AnswerMultipleResponse\__construct(), ASS_AnswerTrueFalse\__construct(), ASS_AnswerImagemap\__construct(), assAnswerCloze\__construct(), __construct(), getAnswertext(), and setAnswertext().
      
  | 
  protected | 
Definition at line 58 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerBinaryState\__construct(), ASS_AnswerMultipleResponse\__construct(), ASS_AnswerImagemap\__construct(), assAnswerCloze\__construct(), __construct(), getId(), and setId().
      
  | 
  protected | 
Definition at line 49 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerMultipleResponse\__construct(), ASS_AnswerBinaryState\__construct(), ASS_AnswerTrueFalse\__construct(), assAnswerCloze\__construct(), __construct(), getOrder(), and setOrder().
      
  | 
  protected | 
Definition at line 40 of file class.assAnswerSimple.php.
Referenced by ASS_AnswerBinaryStateImage\__construct(), ASS_AnswerMultipleResponseImage\__construct(), ASS_AnswerBinaryState\__construct(), ASS_AnswerMultipleResponse\__construct(), ASS_AnswerTrueFalse\__construct(), ASS_AnswerImagemap\__construct(), assAnswerCloze\__construct(), __construct(), getPoints(), and setPoints().