ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.assAnswerMultipleResponse.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once "./Modules/TestQuestionPool/classes/class.assAnswerSimple.php";
5 include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
6 
26 
38  function __construct (
39  $answertext = "",
40  $points_checked = 0.0,
41  $order = 0,
42  $points_unchecked = 0,
43  $id = -1
44  )
45  {
46  parent::__construct($answertext, $points_checked, $order, $id);
47  $this->setPointsUnchecked($points_unchecked);
48  }
49 
50 
60  function getPointsUnchecked()
61  {
63  }
64 
74  function setPointsUnchecked($points_unchecked = 0.0)
75  {
76  $new_points = str_replace(",", ".", $points_unchecked);
77 
78  if ($this->checkPoints($new_points))
79  {
80  $this->points_unchecked = $new_points;
81  }
82  else
83  {
84  $this->points_unchecked = 0.0;
85  }
86  }
87 
88  function setPointsChecked($points_checked)
89  {
90  $this->setPoints($points_checked);
91  }
92 
93  function getPointsChecked()
94  {
95  return $this->getPoints();
96  }
97 }
98 
99 ?>
setPoints($points=0.0)
Sets the points.
setPointsUnchecked($points_unchecked=0.0)
Sets the points for an unchecked answer.
getPoints()
Gets the points.
checkPoints($a_points)
Checks, if the point value is numeric.
Class for simple answers.
Class for true/false or yes/no answers.
getPointsUnchecked()
Returns the points for an unchecked answer.
__construct( $answertext="", $points_checked=0.0, $order=0, $points_unchecked=0, $id=-1)
ASS_AnswerMultipleResponse constructor.