ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.assAnswerBinaryState.php
Go to the documentation of this file.
1 <?php
2 
19 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
20 
41 {
42  private bool $checked;
43 
53  public function __construct(string $answertext = "", float $points = 0.0, int $order = 0, bool $checked = false, int $id = -1)
54  {
56  $this->checked = $checked;
57  }
58 
67  public function getState(): bool
68  {
69  return $this->checked;
70  }
71 
80  public function isStateChecked(): bool
81  {
82  return $this->checked;
83  }
84 
93  public function isStateSet(): bool
94  {
95  return $this->checked;
96  }
97 
106  public function isStateUnset(): bool
107  {
108  return !$this->checked;
109  }
110 
119  public function isStateUnchecked(): bool
120  {
121  return !$this->checked;
122  }
123 
133  public function setState(bool $state = false): void
134  {
135  $this->checked = $state;
136  }
137 
145  public function setChecked(): void
146  {
147  $this->checked = true;
148  }
149 
157  public function setSet(): void
158  {
159  $this->checked = true;
160  }
161 
169  public function setUnset(): void
170  {
171  $this->checked = false;
172  }
173 
181  public function setUnchecked(): void
182  {
183  $this->checked = false;
184  }
185 }
setUnchecked()
Sets the answer as a unchecked answer.
setChecked()
Sets the answer as a checked answer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setUnset()
Sets the answer as a unset answer.
setState(bool $state=false)
Sets the state.
setSet()
Sets the answer as a set answer.
__construct(string $answertext="", float $points=0.0, int $order=0, bool $checked=false, int $id=-1)
ASS_AnswerBinaryState constructor The constructor takes possible arguments and creates an instance of...
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...