ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.assAnswerMultipleResponse.php
Go to the documentation of this file.
1 <?php
2 
19 include_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 }
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(string $answertext="", float $points=0.0, int $order=0, int $id=-1, int $state=0)
ASS_AnswerMultipleResponse constructor.
__construct(Container $dic, ilPlugin $plugin)
getPointsUnchecked()
Returns the points for an unchecked answer.
$points_unchecked
The points given to the answer when the answer is not checked.