Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.3, 2.4
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_23_STABLE
-
wip-mdl-36707
-
Description
This is a JavaScript only error, discovered while following MDLQA-4944.
- Enable the conditional access (enableavailability)
- Have a section with:
- A visible resource
- A hidden resource
- A resource hidden (but visible, only dimmed) by conditional access
- Hide the section
- Reload the page (this is important!)
- Unhide the section
Expected
- The previously hidden resources are still dimmed
Actual
- The visible resource is dimmed
I think this is regression caused by MDL-36131 (57bda785403e32864ad90aa63df8a272bfd188ad). The problem appears to be that the 'conditionalhidden' class is always set regardless of whether the resource has a conditional access which hides it. Then the JS will not toggle the status because of that reason. Also, as minor note, I think we should not make use of 'accesshide' for elements which should not be displayed but use 'hide' instead. What would happen there is that the screenreaders would read the information, but that information is unavailable to non-impaired users.
The exact same result occurs on resources hide/show themselves, try to hide a resource, refresh the page and unhide it to reproduce.
Attachments
Issue Links
- blocks
-
MDLQA-4939 CLONE - In Google Chrome the show/hide activity/resource icon functions correctly.
- Passed
-
MDLQA-4942 CLONE - In Internet Explorer 8 the show/hide section icon functions correctly.
- Passed
-
MDLQA-4944 CLONE - In Firefox the show/hide section icon functions correctly.
- Passed
- is duplicated by
-
MDL-36692 Toggling activity/resource visibility does not change link visibility until after reload
-
- Closed
-