Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.4
-
MOODLE_34_STABLE
-
MOODLE_34_STABLE
-
MDL-60012_form_neq_regression -
Description
Noticed in the attendance plugin when running behat on master - not an issue on stable versions - seems to be a regression caused by MDL-53848
the condition "neq" on radio button selector doesn't seem to work anymore.
$mform->disabledIf('groups', 'sessiontype', 'neq', mod_attendance_structure::SESSION_GROUP);
|
The "groups" selector is always disabled no matter what the radio button "sessiontype" is set to.
replacing it with an "eq" instead of a "neq" seems to work better:
$mform->disabledIf('groups', 'sessiontype', 'eq', mod_attendance_structure::SESSION_GROUP);
|
here's the example in the Attendance code (on a form when adding a new session and the course/module are set to allow groups.)
https://github.com/danmarsden/moodle-mod_attendance/blob/6d812f5ea9b8f2fbc0aef679d1a613b205e0ec1b/add_form.php#L96
Attachments
Issue Links
- blocks
-
MDL-60205 Regression in formslib: hideIf on an element inside a group hides the whole group (Clean only)
-
- Closed
-
-
MDL-60108 Simplify moodle.net registration form, add new mailing list, show during installation
-
- Closed
-
- is a regression caused by
-
MDL-53848 Formslib - add function to $mform that makes it possible to hide form elements dependent on selected values
-
- Closed
-