Commit Graph

33 Commits

Author SHA1 Message Date
Amaia Anabitarte 313da3ebf3 MDL-78527 pear: Adding attributes parameter to groups 2023-09-12 09:59:36 +02:00
Meirza 928b300bc7 MDL-78145 lib: Added missing class properties in pear
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 11:11:12 +07:00
Marina Glancy fcf887919b MDL-77164 lib/pear: correct phpdocs 2023-04-13 09:43:15 +01:00
Paul Holden 16747048f3 MDL-77081 forms: PHP8.1 compatibility for group/textarea elements.
See related changes in b0a83aa7, we can no longer pass null values
to some string related methods.
2023-01-31 10:51:24 +00:00
Marina Glancy 4b99c6a795 MDL-76102 lib: PEAR - passing null to str functions is deprecated 2022-10-27 07:36:26 +02:00
Huong Nguyen 46aece2b63 MDL-71126 Quiz: Manual grading page size preference can get stuck at 0
Including in this change:
 - New positiveint regex rule to check if the value is a positive integer
2021-05-14 17:01:45 +07:00
Eloy Lafuente (stronk7) 599567977f MDL-70457 forms: php74 fix for the (not used in core) date element
Curly brackets to access by index to strings or arrays is
deprecated since php74.
2021-02-26 11:55:24 +01:00
Shamim Rezaie 706c5b3acd MDL-65506 forms: get the correct value for advcheckbox fields in js 2019-06-26 20:56:42 +10:00
Marina Glancy f82c9d8d06 MDL-65217 form: option to randomise element ids 2019-04-29 14:23:27 +02:00
Jake Dallimore c87010baca MDL-62947 core_form: fix remote code execution exploit in QuickForms
Applies the patch found upstream:
https://github.com/pear/HTML_QuickForm/commit/
d3a6d5c44dedf3c164c6c79198e4ef479bcedcd2 and make util methods static
for php7 compatibility.
2018-09-05 12:12:19 +08:00
Marina Glancy e3e3e0abb7 MDL-60281 forms: PHP7.2 deprecations in PEAR 2017-10-16 09:37:20 +08:00
Rajesh Taneja 1ebda3eb8c MDL-50484 lib_formslib: Persistant input should have different id
Persistant input is appended for frozen elements
and should have different id then the actual element
2016-02-19 14:00:04 +08:00
David Monllao 3e51b0ad7e MDL-52826 forms: Using id attr
Switch from custom id references to the element's id attribute.

Extra fix to get rid of an unnecessary call to getValidationScript().
2016-01-29 10:15:25 +08:00
David Monllao 2edb12ec30 MDL-52826 forms: Move global functions to self-contained 2016-01-22 15:43:08 +08:00
Marina Glancy 32fada5cb2 MDL-52081 forms: indicate usage of grandparent constructor 2015-12-10 13:38:04 +08:00
Marina Glancy 1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Damyon Wiese 60a1ea56d9 MDL-51247 forms: All new aria-pimped autocomplete mform element.
Supports static list of options - or options fetched via ajax.
Has options for single,multi and tags support.
2015-10-14 16:22:44 +01:00
Brian Barnes 8b5f402151 MDL-46467 forms: Labels have "for" attribute even when frozen 2015-01-27 14:30:22 +13:00
Dan Poltawski 528ed758e6 MDL-40267 forms: fix utf8 string length rules 2013-11-05 10:20:22 +08:00
Petr Skoda 66b3302dec MDL-32405 workaround for non-static PEAR::raise_error() and fixed -1 debug support 2012-04-15 17:02:26 +02:00
Petr Skoda 68a7c9a696 MDL-32095 some more E_STRICT fixes 2012-03-26 11:47:15 +02:00
Petr Skoda fabbf4398b MDL-32094 some nasty quickforms hacks that should help with E_STRICT
Note: we have stopped tracking our QuickForms hacks long ago.
2012-03-18 18:39:37 +01:00
Tim Hunt 3bbac90b2a MDL-31469 formslib: fix invalid for="" attributes on optional dates 2012-02-02 18:38:01 +00:00
Tim Hunt 820b41e34f MDL-30168 formslib: untangle automatic id generation.
Previously, we had overridden the _generateId method in almost all
subclasses; and then we mostly, but not always; ignored the value that
was generated there, and instead generated new (nicer) values in
MoodleQuickForm_Renderer::renderElement. Of course, that is not really a
logical place to (re)generate ids.

I have fixed the code so that the _generateId method now uses the 'nice
id' algorithm from renderElement. This should make the whole code flow
more logical.

This make all our overriding of _generateId unnecessary.

We do need a special _generateId for radio buttons, because you often
have different radio buttons with the same name but different values.

This change should only change the ids on radio, checkbox and
advcheckbox elements. Previously, those were essentially random, so I
don't think anyone could have been relying on the particular values.

This commit also has new unit tests, first to test the basic _generateId
algorithm, and then to create and render an example form (including some
tricky things like repeat_elements) and chech the acutal ids in the
generated HTML.
2011-12-23 11:51:45 +00:00
Jonathan Harker fcbf4b6fac lib/pear MDL-20876 fix deprecated split() calls to use explode, str_split or preg_split
Author: Jonathan Harker <jonathan@catalyst.net.nz>
2010-07-20 01:16:55 +00:00
Petr Skoda 6d504dc07f MDL-19698 deprecated assign new by ref in QuickForms 2010-07-19 08:38:28 +00:00
skodak 49ba2b61b9 MDL-19030 even uglier hack - do not try to add id to labels of static element - they do not have it; merged from MOODLE_19_STABLE 2009-04-30 10:09:13 +00:00
skodak 5c89242e50 MDL-19030 very ugly hack - do not try to add id to labels of element group - they do not have it; merged from MOODLE_19_STABLE 2009-04-30 10:06:11 +00:00
skodak 8c453e41f7 MDL-19030 fixed xhtml strictness when label attached to frozen element; merged from MOODLE_19_STABLE 2009-04-30 09:50:02 +00:00
Martin Langhoff 08103c9364 cvsimport fixups 2007-07-07 14:18:30 +12:00
Martin Langhoff f3f7610c90 cvsimport fixups -- cvshead had strayed from upstream 2007-01-04 13:15:04 +13:00
jamiesensei f0e2d0ac80 upgraded tableless pear quickform packages 2006-09-27 16:31:11 +00:00
jamiesensei da6f876395 This is a first cut of a new formslib.php a library of classes for creating and securely processing forms in Moodle, based on PEAR QuickForms. Only uses XHTML and CSS and no table tags.
This is NOT YET PART OF THE MOODLE API it is here for experimental purposes.
2006-09-24 17:04:51 +00:00