From d1c927f596c51cd8eb4d6efa6f7a910306b8f9f0 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Fri, 3 Jan 2025 10:16:33 +0200 Subject: [PATCH] Test: Fix setTextRating Demands Int See: https://mantis.ilias.de/view.php?id=43388 --- .../classes/class.assTextSubset.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/components/ILIAS/TestQuestionPool/classes/class.assTextSubset.php b/components/ILIAS/TestQuestionPool/classes/class.assTextSubset.php index deff622f6187..ca9d3ddf3829 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assTextSubset.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assTextSubset.php @@ -76,17 +76,17 @@ public function loadFromDb(int $question_id): void if ($result->numRows() == 1) { $data = $this->db->fetchAssoc($result); $this->setId($question_id); - $this->setObjId($data["obj_fi"]); + $this->setObjId($data['obj_fi']); $this->setNrOfTries($data['nr_of_tries']); - $this->setTitle((string) $data["title"]); - $this->setComment((string) $data["description"]); - $this->setOriginalId($data["original_id"]); - $this->setAuthor($data["author"]); - $this->setPoints($data["points"]); - $this->setOwner($data["owner"]); - $this->setQuestion(ilRTE::_replaceMediaObjectImageSrc((string) $data["question_text"], 1)); - $this->setCorrectAnswers((int) $data["correctanswers"]); - $this->setTextRating($data["textgap_rating"]); + $this->setTitle((string) $data['title']); + $this->setComment((string) $data['description']); + $this->setOriginalId($data['original_id']); + $this->setAuthor($data['author']); + $this->setPoints($data['points']); + $this->setOwner($data['owner']); + $this->setQuestion(ilRTE::_replaceMediaObjectImageSrc((string) $data['question_text'], 1)); + $this->setCorrectAnswers((int) $data['correctanswers']); + $this->setTextRating($data['textgap_rating'] ?? assClozeGap::TEXTGAP_RATING_CASEINSENSITIVE); try { $this->setLifecycle(ilAssQuestionLifecycle::getInstance($data['lifecycle']));