From 4571bcc14892ea8051284833ef29db7cb8ea5f18 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Mon, 30 Sep 2024 16:19:01 +0200 Subject: [PATCH] Test: Fix Saving of Author See: https://mantis.ilias.de/view.php?id=42148 --- .../Setup/class.ilTestQuestionPool9DBUpdateSteps.php | 9 +++++++++ .../TestQuestionPool/classes/class.assQuestionGUI.php | 1 + 2 files changed, 10 insertions(+) diff --git a/Modules/TestQuestionPool/classes/Setup/class.ilTestQuestionPool9DBUpdateSteps.php b/Modules/TestQuestionPool/classes/Setup/class.ilTestQuestionPool9DBUpdateSteps.php index 16b6d85686a9..14efe5238c13 100644 --- a/Modules/TestQuestionPool/classes/Setup/class.ilTestQuestionPool9DBUpdateSteps.php +++ b/Modules/TestQuestionPool/classes/Setup/class.ilTestQuestionPool9DBUpdateSteps.php @@ -67,4 +67,13 @@ public function step_4(): void $this->db->dropTableColumn('qpl_questionpool', 'isonline'); } } + + public function step_5(): void + { + $this->db->modifyTableColumn( + 'qpl_questions', + 'author', + ['type' => 'text', 'length' => 512] + ); + } } diff --git a/Modules/TestQuestionPool/classes/class.assQuestionGUI.php b/Modules/TestQuestionPool/classes/class.assQuestionGUI.php index 06e360e351f3..9cc5f72d0ab6 100755 --- a/Modules/TestQuestionPool/classes/class.assQuestionGUI.php +++ b/Modules/TestQuestionPool/classes/class.assQuestionGUI.php @@ -953,6 +953,7 @@ public function addBasicQuestionFormProperties(ilPropertyFormGUI $form): void // author $author = new ilTextInputGUI($this->lng->txt("author"), "author"); $author->setValue($this->object->getAuthor()); + $author->setMaxLength(512); $author->setRequired(true); $form->addItem($author);