From 5d9a76102a46247510c45d567e6f467562a84a56 Mon Sep 17 00:00:00 2001 From: ingoj <120396930+ingoj@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:23:40 +0100 Subject: [PATCH] fix CascasdeSelect functionality the current versions of CascadeSelect return an array for the column definitions instead of a string. This causes htmlspechialchars to crash, which is called when constructing html fpr the form output. This fix chacks, if the definition is an array and sets the textinput to the name of the column and the default set in "(...)". If the old version of CascadeSelect is used, the fix stay with the old behaviour. --- src/UDFCheck/UDFCheckFormGUI.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/UDFCheck/UDFCheckFormGUI.php b/src/UDFCheck/UDFCheckFormGUI.php index 63ae070b..b44e0cd4 100644 --- a/src/UDFCheck/UDFCheckFormGUI.php +++ b/src/UDFCheck/UDFCheckFormGUI.php @@ -157,6 +157,9 @@ protected function initForm() { $check_radio->addOption($check_radio_text); foreach ($select_gui->getColumnDefinition() as $key => $name) { + if (is_array($name)) { + $name=$name["name"]." ( ".$name["default"]." ) "; + } $text_gui = new ilTextInputGUI($name, self::F_CHECK_VALUE_MUL . $key); $check_radio_text->addSubItem($text_gui); }