Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36707

Unhiding a section does not removed the dimmed class to resources

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.3, 2.4
    • Fix Version/s: 2.3.4
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      Run MDLQA-4944 and make sure it pass.

      1. Enable the conditional access (enableavailability)
      2. Have a course section with:
        • A visible resource
        • A hidden resource
        • A resource hidden (but visible, only dimmed) by conditional access
      3. Hide the section
      4. Reload the page (this is important!)
      5. Unhide the section
      6. Make sure previously hidden activity is still dimmed and active activity is active.
      Show
      Run MDLQA-4944 and make sure it pass. Enable the conditional access (enableavailability) Have a course 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 Make sure previously hidden activity is still dimmed and active activity is active.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-mdl-36707

      Description

      This is a JavaScript only error, discovered while following MDLQA-4944.

      1. Enable the conditional access (enableavailability)
      2. Have a section with:
        • A visible resource
        • A hidden resource
        • A resource hidden (but visible, only dimmed) by conditional access
      3. Hide the section
      4. Reload the page (this is important!)
      5. 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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jan/13