-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.2.9, 4.3.6, 4.4, 4.5
-
MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
-
If all of the advanced form fields in a fieldset are hidden with a hideIf() condition, then the form will display a "Show more" link which expands to an apparently empty section. This looks broken.
One such example is the quiz settings form (once MDL-68806 lands):
- Go to Site Administration > Plugins > Quiz > General Settings
- Uncheck "Locked" for "Pre-create attempts". Leave "Advanced" checked.
- Set "Pre-create period" to 1 hour.
- Save changes
- Go to a course, turn editing on and add a quiz.
- Expand the "Timing" fieldset.
- Click on "Show more..." below the "When time expires" field
- The link will change to "Show less..." but no fields are revealed.
- Check "Enable" in the "Open the quiz" field.
- The "Pre-create attempts" field is now shown.
Ideally, the "Show more" link would only appear if there is something to show.
This can be resolved with CSS using the :has() selector (See Workaround), but that causes issues on the current CI infrastructure. Modifying the javascript for the hideIf() condition is another route that would allow this to be resolved with greater compatibility.