ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.assAnswerBinaryState.php
Go to the documentation of this file.
1<?php
2
39{
40 private bool $checked;
41
51 public function __construct(string $answertext = "", float $points = 0.0, int $order = 0, bool $checked = false, int $id = -1)
52 {
54 $this->checked = $checked;
55 }
56
65 public function getState(): bool
66 {
67 return $this->checked;
68 }
69
78 public function isStateChecked(): bool
79 {
80 return $this->checked;
81 }
82
91 public function isStateSet(): bool
92 {
93 return $this->checked;
94 }
95
104 public function isStateUnset(): bool
105 {
106 return !$this->checked;
107 }
108
117 public function isStateUnchecked(): bool
118 {
119 return !$this->checked;
120 }
121
131 public function setState(bool $state = false): void
132 {
133 $this->checked = $state;
134 }
135
143 public function setChecked(): void
144 {
145 $this->checked = true;
146 }
147
155 public function setSet(): void
156 {
157 $this->checked = true;
158 }
159
167 public function setUnset(): void
168 {
169 $this->checked = false;
170 }
171
179 public function setUnchecked(): void
180 {
181 $this->checked = false;
182 }
183}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setUnchecked()
Sets the answer as a unchecked answer.
setState(bool $state=false)
Sets the state.
__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...
setUnset()
Sets the answer as a unset answer.
setSet()
Sets the answer as a set 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...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc