diff --git a/components/ILIAS/TestQuestionPool/classes/forms/class.ilAssLongmenuCorrectionsInputGUI.php b/components/ILIAS/TestQuestionPool/classes/forms/class.ilAssLongmenuCorrectionsInputGUI.php index 3b79b4e74671..12d5654e2602 100755 --- a/components/ILIAS/TestQuestionPool/classes/forms/class.ilAssLongmenuCorrectionsInputGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/forms/class.ilAssLongmenuCorrectionsInputGUI.php @@ -16,6 +16,8 @@ * *********************************************************************/ +declare(strict_types=1); + /** * Class ilAssLongmenuCorrectionsInputGUI * @@ -27,6 +29,7 @@ class ilAssLongmenuCorrectionsInputGUI extends ilAnswerWizardInputGUI { private \ILIAS\DI\UIServices $ui; + private \ILIAS\UI\Component\Modal\Modal $modal; public function __construct($a_title = "", $a_postvar = "") { @@ -50,12 +53,11 @@ public function insert(ilTemplate $a_tpl): void $message = $inp->render(); $page = $this->ui->factory()->modal()->lightboxTextPage($message, $this->lng->txt('answer_options')); - $modal = $this->ui->factory()->modal()->lightbox($page); - $button = $this->ui->factory()->button()->standard($this->lng->txt('show'), $modal->getShowSignal()); + $this->modal = $this->ui->factory()->modal()->lightbox($page); + $button = $this->ui->factory()->button()->standard($this->lng->txt('show'), $this->modal->getShowSignal()); $tpl = new ilTemplate('tst.longmenu_corrections_input.html', true, true, 'components/ILIAS/TestQuestionPool'); - $tpl->setVariable('ANSWERS_MODAL', $this->ui->renderer()->render($modal)); $tpl->setVariable('TAG_INPUT', $this->buildTagInput()->render()); $tpl->setVariable('NUM_ANSWERS', $this->values['answers_all_count']); $tpl->setVariable('BTN_SHOW', $this->ui->renderer()->render($button)); @@ -69,6 +71,11 @@ public function insert(ilTemplate $a_tpl): void $a_tpl->parseCurrentBlock(); } + public function getContentOutsideFormTag(): string + { + return $this->ui->renderer()->render($this->modal); + } + protected function buildTagInput(): ilTagInputGUI { $tagInput = new ilTagInputGUI('', $this->getPostVar() . '_tags'); diff --git a/components/ILIAS/TestQuestionPool/templates/default/tst.longmenu_corrections_input.html b/components/ILIAS/TestQuestionPool/templates/default/tst.longmenu_corrections_input.html index fe2de16d48eb..965692d08e25 100755 --- a/components/ILIAS/TestQuestionPool/templates/default/tst.longmenu_corrections_input.html +++ b/components/ILIAS/TestQuestionPool/templates/default/tst.longmenu_corrections_input.html @@ -2,5 +2,4 @@

{TXT_ANSWERS} {NUM_ANSWERS} {BTN_SHOW}

{TXT_CORRECT_ANSWERS}

{TAG_INPUT} - {ANSWERS_MODAL} \ No newline at end of file