ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.assAnswerMultipleResponse.php
Go to the documentation of this file.
1 <?php
2 
19 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
20 
32 {
41 
53  public function __construct(string $answertext = "", float $points = 0.0, int $order = 0, int $id = -1, int $state = 0)
54  {
56  }
57 
58 
68  public function getPointsUnchecked(): float
69  {
71  }
72 
82  public function setPointsUnchecked($points_unchecked = 0.0): void
83  {
84  $new_points = str_replace(",", ".", $points_unchecked);
85 
86  if ($this->checkPoints($new_points)) {
87  $this->points_unchecked = $new_points;
88  } else {
89  $this->points_unchecked = 0.0;
90  }
91  }
92 
93  public function setPointsChecked($points_checked): void
94  {
95  $this->setPoints($points_checked);
96  }
97 
98  public function getPointsChecked(): float
99  {
100  return $this->getPoints();
101  }
102 }
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.
__construct(VocabulariesInterface $vocabularies)
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.
getPointsUnchecked()
Returns the points for an unchecked answer.