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

Form collapsing JavaScript fails if you have a form where all sections are initially expanded

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-75459-master
    • Hide

      Requirements

      1. A course created in your Moodle instances along with a teacher login

      Testing instructions

      1. Login as a teacher
      2. If there isn’t already a course created, create one
      3. Navigate to the course
      4. Turn on ‘Edit mode’ (top right of window)
      5. Click on ‘Add an activity or resource’
      6. Choose ‘Quiz’
      7. Fill in the quiz details (any will do) and click ‘Save and display’
      8. From the secondary navigation, click on ‘Results’
      9. CONFIRM that the top-right global collapse/expand link has the words ‘Collapse all’ by default.
      10. CONFIRM that by clicking the ‘Collapse all’ link it collapses all the sections
      11. CONFIRM that by clicking the ‘Collapse all’ link that the text changes to ‘Expand all’
      12. CONFIRM that by click the ‘Expand all’ link it expands all sections again.
      Show
      Requirements A course created in your Moodle instances along with a teacher login Testing instructions Login as a teacher If there isn’t already a course created, create one Navigate to the course Turn on ‘Edit mode’ (top right of window) Click on ‘Add an activity or resource’ Choose ‘Quiz’ Fill in the quiz details (any will do) and click ‘Save and display’ From the secondary navigation, click on ‘Results’ CONFIRM that the top-right global collapse/expand link has the words ‘Collapse all’ by default. CONFIRM that by clicking the ‘Collapse all’ link it collapses all the sections CONFIRM that by clicking the ‘Collapse all’ link that the text changes to ‘Expand all’ CONFIRM that by click the ‘Expand all’ link it expands all sections again.

      This bug was actually found by Anupama Sarjoshi.

      Steps to reproduce:

      1. Go to any form where all the secitions are expanded by default. This will be true for any form with two sections, such as https://qa.moodledemo.net/mod/quiz/report.php?id=30&mode=overview.

      Actual result: the link the top right says 'Expand all' and clicking it has no effect.

      Expected result: the link says 'Collapse all' and works.

      Note: As soon as you collapse one section, clicking expand all then works, and the label changes to Collapse all. Similarly, collapsing and expanding one section changes the label to 'Collapse all' which then works.

      This worked fine in Moodle 3.x, so I suspect this is a regression caused by MDL-74459 or MDL-74222.

        1. 1_MDL-75459_master.png
          1_MDL-75459_master.png
          36 kB
        2. 1_MDL-75459_v400.png
          1_MDL-75459_v400.png
          33 kB
        3. 2_MDL-75459_master.png
          2_MDL-75459_master.png
          12 kB
        4. 2_MDL-75459_v400.png
          2_MDL-75459_v400.png
          11 kB

            david.woloszyn@moodle.com David Woloszyn
            timhunt Tim Hunt
            Tim Hunt Tim Hunt
            Andrew Lyons Andrew Lyons
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours, 25 minutes
                7h 25m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.