ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
18{
27
39 public function __construct(
40 $answertext = "",
41 $points_checked = 0.0,
42 $order = 0,
44 $id = -1
45 ) {
46 parent::__construct($answertext, $points_checked, $order, $id);
48 }
49
50
60 public function getPointsUnchecked()
61 {
63 }
64
75 {
76 $new_points = str_replace(",", ".", $points_unchecked);
77
78 if ($this->checkPoints($new_points)) {
79 $this->points_unchecked = $new_points;
80 } else {
81 $this->points_unchecked = 0.0;
82 }
83 }
84
85 public function setPointsChecked($points_checked)
86 {
87 $this->setPoints($points_checked);
88 }
89
90 public function getPointsChecked()
91 {
92 return $this->getPoints();
93 }
94}
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.
An exception for terminatinating execution or to throw for unit testing.