140 $this->correctness =
"1";
150 $this->correctness =
"0";
157 ): array|float|bool|
int|string|null
160 ...$transformations->normalize(parent::toNormalized($transformations, $context)),
171 $clone = parent::fromNormalized($normalized, $transformations);
172 $clone->setCorrectness($transformations->
string($normalized[
'correctness']));
Class for simple answers.
Class for true/false or yes/no answers.
__construct($answertext="", $points=0.0, $order=0, $correctness=false)
ASS_AnswerTrueFalse constructor.
toNormalized(Transformations $transformations, array $context=[])
Convert the internal state of the implementing object into a language-neutral array structure.
isCorrect()
Gets the correctness.
setTrue()
Sets the answer as a correct answer.
fromNormalized(array $normalized, Transformations $transformations)
Restore the object from its normalized representation.
isTrue()
Gets the correctness.
isFalse()
Gets the correctness.
isIncorrect()
Gets the correctness.
setFalse()
Sets the answer as a incorrect answer.
setCorrectness($correctness=false)
Sets the correctness.
getCorrectness()
Gets the correctness.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc