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

Inconsistent Resource Hide/Show Behavior When Hiding/Showing Topic

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.7
    • Fix Version/s: None
    • Component/s: Resource
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      Note: I know that resources can be made available even inside hidden topics, and that that is intended behavior. This bug is not that, but is related to that functionality.

      Credit to Jason Simms for discovering this bug.

      When a resource is individually hidden, it will remain hidden regardless of the state of the topic it is in.

      This is inconsistent with the behavior when a resource is individually shown, in which case the resource continues to match the state of the topic when that topic is hidden/shown.

      To reproduce:

      • Have the following in a course:
        • Topic A (shown)
          • Resource A1 (shown)
          • Resource A2 (shown)
        • Topic B (shown)
          • Resource B1 (shown)
          • Resource B2 (shown)
      • Optional: hide and then show either topic, observing that the resources mirror the state of the topic.

        

      1. Behavior 1: resources mirror the state of the topic when the topic is shown/hidden, even if the resource has been individually shown ("made available").
        1. Hide Topic A (A1 and A2 are both hidden). 
        2. Show ("make available") A1. 
        3. Show Topic A. Note that the states of A1/A2 match the state of A. 
        4. Hide Topic A. Note that the states of A1/A2 still match the state of A. 
      2. Behavior 2: resources are locked to a hidden state if they have been individually hidden, regardless of the state of the topic they are in.
        1. Hide Resource B1.  
        2. Hide Topic B. Note that as in step 1-3, the states of the resources (B1/B2) match the state of the topic they are in (B). 
        3. Show Topic B. Note how unlike in step 1-4, the states of the resources (B1/B2) do not both match the state of the topic (B). Instead, the resource that was manually/individually hidden has remained hidden. 

      As far as I can tell, it doesn't matter what exact combination of hiding/showing steps you take – if a resource has been at any point individually hidden, it will remain hidden, while if a resource has been individually shown, it will still mirror the state of the topic on subsequent topic state changes.

      I hope my reproduction instructions and screenshots have made it clear that this behavior is inconsistent. When Jason Simms originally reported this to me, he called out Behavior 1 as the unexpected behavior; I believe that this is correct given the current state of things.

      I can see how Behavior 1 could be useful to "lock" the state of a single resource against subsequent topic state changes. However, I feel that this "locking" behavior would need to be extended to both hiding and showing individual resources, and would also need a visual indicator to prevent user confusion, before I would consider it not-a-bug.

        Attachments

        1. init.png
          init.png
          36 kB
        2. step1-1.png
          step1-1.png
          38 kB
        3. step1-2.png
          step1-2.png
          41 kB
        4. step1-3.png
          step1-3.png
          36 kB
        5. step1-4.png
          step1-4.png
          38 kB
        6. step2-1.png
          step2-1.png
          40 kB
        7. step2-2.png
          step2-2.png
          40 kB
        8. step2-3.png
          step2-3.png
          40 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            azito Andrew Zito
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: