19 declare(strict_types=1);
31 private readonly
ilCtrl $ctrl
37 return $this->ui_factory->modal()->roundtrip(
41 $this->
ctrl->getFormActionByClass([ilObjTestGUI::class, ilTestCorrectionsGUI::class],
'addAnswer')
47 $to_int_trafo = $this->
refinery->kindlyTo()->int();
48 $fix_points_trafo = $this->
refinery->custom()->transformation(
50 $v = str_replace(
',',
'.', $v);
61 $inputs[
'question_id'] = $this->ui_factory->input()->field()->hidden()
62 ->withAdditionalTransformation($to_int_trafo)
63 ->withValue((
string) ($data[
'question_id'] ??
''));
64 $inputs[
'question_index'] = $this->ui_factory->input()->field()->hidden()
65 ->withAdditionalTransformation($to_int_trafo)
66 ->withValue((
string) ($data[
'question_index'] ??
''));
67 $inputs[
'answer_value'] = $this->ui_factory->input()->field()->hidden($this->
language->txt(
'answer'))
69 $inputs[
'answer'] = $this->ui_factory->input()->field()->text($this->
language->txt(
'answer'))
72 $inputs[
'points'] = $this->ui_factory->input()->field()->text($this->
language->txt(
'points'))
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
language()
description: > Example for rendring a language glyph.