19 declare(strict_types=1);
30 protected bool $anonymous_test =
false 43 array $environment = null
45 $inputs[
'question_set_type'] = $f->radio(
46 $lng->
txt(
'test_question_set_type')
49 $lng->
txt(
'test_question_set_type_fixed'),
50 $lng->
txt(
'test_question_set_type_fixed_info')
53 $lng->
txt(
'test_question_set_type_random'),
54 $lng->
txt(
'test_question_set_type_random_info')
57 $trafo = $refinery->custom()->transformation(
58 static function (
string $v):
bool {
67 $inputs[
'anonymity'] = $f->radio(
68 $lng->
txt(
'tst_anonymity')
71 $lng->
txt(
'tst_anonymity_no_anonymization')
74 $lng->
txt(
'tst_anonymity_anonymous_test')
78 if ($environment[
'participant_data_exists']) {
79 $inputs[
'question_set_type'] =
$inputs[
'question_set_type']->withDisabled(
true);
96 return $this->question_set_type;
101 $clone = clone $this;
102 $clone->question_set_type = $question_set_type;
108 return $this->anonymous_test;
113 $clone = clone $this;
114 $clone->anonymous_test = $anonymous_test;
toForm(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
withAnonymity(bool $anonymous_test)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const QUESTION_SET_TYPE_RANDOM
withQuestionSetType(string $question_set_type)
__construct(int $test_id, protected string $question_set_type=ilObjTest::QUESTION_SET_TYPE_FIXED, protected bool $anonymous_test=false)
const QUESTION_SET_TYPE_FIXED
Refinery Factory $refinery