3.9.4, 3.10.1, 3.11, 4.0
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
- Copy the attached mformtest.php file in the root directory of your moodle instance.
- In your browser navigate to 'your-moodle-instance-url/mformtest.php'.
- confirm you can see/use the select element with alternate enabled and disabled items.
- confirm you cannot see any errors
Trying to add a select with few disabled items to a form I went to read moodle documentation.
I arrived in: https://docs.moodle.org/dev/lib/formslib.php_Form_Definition#select
and I found the sentence: "It is also possible to create a select with certain options disabled, using this technique"
Following the link I arrived to:
I did what was suggested and now I have a code starting with:
$quickform = new HTML_QuickForm();
Running it I get in the following error:
(if you want to see my code you can get it in: https://github.com/kordan/moodle-mod_surveypro/blob/master/form/items/itembase_form.php#L239)
I found in: https://stackoverflow.com/questions/61054418/php-7-4-deprecated-get-magic-quotes-gpc-function-alternative
that I should remove every mention of get_magic_quotes_gpc() but I think this is not something I can.
In spite of this, I found that if I change from line 269 in lib/pear/HTML/QuickForm.php
all works fine again.
AFAIK get_magic_quotes_gpc() always return false so (1 == get_magic_quotes_gpc()) is never verified.
Is this a bug?