ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_once "./Modules/TestQuestionPool/classes/class.assAnswerSimple.php";
5include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
6
26
38 function __construct (
39 $answertext = "",
40 $points_checked = 0.0,
41 $order = 0,
43 $id = -1
44 )
45 {
46 parent::__construct($answertext, $points_checked, $order, $id);
47 $this->setPointsUnchecked($points_unchecked);
48 }
49
50
61 {
63 }
64
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
94 {
95 return $this->getPoints();
96 }
97}
98
99?>
Class for true/false or yes/no answers.
setPointsUnchecked($points_unchecked=0.0)
Sets the points for an unchecked answer.
__construct( $answertext="", $points_checked=0.0, $order=0, $points_unchecked=0, $id=-1)
ASS_AnswerMultipleResponse constructor.
getPointsUnchecked()
Returns the points for an unchecked answer.
Class for simple answers.
getPoints()
Gets the points.
checkPoints($a_points)
Checks, if the point value is numeric.
setPoints($points=0.0)
Sets the points.