ILIAS  release_8 Revision v8.24
class.assAnswerMultipleResponse.php
Go to the documentation of this file.
1<?php
2
19include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
20
32{
37
49 public function __construct(string $answertext = "", float $points = 0.0, int $order = 0, int $id = -1, int $state = 0)
50 {
52 }
53
54
64 public function getPointsUnchecked(): float
65 {
67 }
68
78 public function setPointsUnchecked($points_unchecked = 0.0): void
79 {
80 $new_points = str_replace(",", ".", $points_unchecked);
81
82 if ($this->checkPoints($new_points)) {
83 $this->points_unchecked = $new_points;
84 } else {
85 $this->points_unchecked = 0.0;
86 }
87 }
88
89 public function setPointsChecked($points_checked): void
90 {
91 $this->setPoints($points_checked);
92 }
93
94 public function getPointsChecked(): float
95 {
96 return $this->getPoints();
97 }
98}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$points_unchecked
The points given to the answer when the answer is not checked.
setPointsUnchecked($points_unchecked=0.0)
Sets the points for an unchecked answer.
__construct(string $answertext="", float $points=0.0, int $order=0, int $id=-1, int $state=0)
ASS_AnswerMultipleResponse constructor.
getPointsUnchecked()
Returns the points for an unchecked answer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPoints()
Gets the points.
checkPoints($a_points)
Checks, if the point value is numeric.
setPoints($points=0.0)
Sets the points.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc