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

Navigation block: Displays click-to-expand for empty weeks (with Label)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a new course.
      2. Set the titles of the first 3 weeks in the course to 'This little piggy has one activity', 'This little piggy has none', and 'This little piggy only has a label'.
      3. In the first week, add a Forum.
      4. In the third week, add a Label.
      + Under the course node, the Navigation block should show only the first week 'This little piggy has one activity'.
      5. Edit the Label. While editing, check the navigation.
      + The third week 'This little piggy has only a label' should now be visible in the navigation, since the label is the context node. It should be expanded and contain the label.

      (At present in step 4 it also displays the third week, and clicking to expand the week does not reveal any activities.)

      Show
      1. Create a new course. 2. Set the titles of the first 3 weeks in the course to 'This little piggy has one activity', 'This little piggy has none', and 'This little piggy only has a label'. 3. In the first week, add a Forum. 4. In the third week, add a Label. + Under the course node, the Navigation block should show only the first week 'This little piggy has one activity'. 5. Edit the Label. While editing, check the navigation. + The third week 'This little piggy has only a label' should now be visible in the navigation, since the label is the context node. It should be expanded and contain the label. (At present in step 4 it also displays the third week, and clicking to expand the week does not reveal any activities.)
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-31122-master

      Description

      The navigation block has two useful properties:

      • It displays only course weeks that contain one or more modules.
      • Within course weeks, it displays only modules that you can navigate to (e.g. not Label).

      Unfortunately, taken together these two features do not work: it incorrectly displays course weeks when they only contain the Label module (or other modules that don't have links).

        Gliffy Diagrams

          Activity

          Hide
          quen Sam Marshall added a comment -

          This turned out slightly more complicated than I thought as I needed to make it show that section when editing (same as how it also shows the label when you are editing it, even though they normally don't appear in navigation). Updated test case to include that test.

          Show
          quen Sam Marshall added a comment - This turned out slightly more complicated than I thought as I needed to make it show that section when editing (same as how it also shows the label when you are editing it, even though they normally don't appear in navigation). Updated test case to include that test.
          Hide
          salvetore Michael de Raadt added a comment -

          We should be back to regular development soon, so hopefully we can get this peer reviewed and integrated ASAP.

          Show
          salvetore Michael de Raadt added a comment - We should be back to regular development soon, so hopefully we can get this peer reviewed and integrated ASAP.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Looks spot on thanks Sam, rebase and get it up for integration!

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Looks spot on thanks Sam, rebase and get it up for integration! Cheers Sam
          Hide
          quen Sam Marshall added a comment -

          Thanks Sam! I'll rebase and submit after this week's release is done.

          Show
          quen Sam Marshall added a comment - Thanks Sam! I'll rebase and submit after this week's release is done.
          Hide
          quen Sam Marshall added a comment -

          Rebased on current branches, now submitting for integration.

          Show
          quen Sam Marshall added a comment - Rebased on current branches, now submitting for integration.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          rajeshtaneja Rajesh Taneja added a comment -

          Works Great
          Thanks for fixing this, Sam.

          Show
          rajeshtaneja Rajesh Taneja added a comment - Works Great Thanks for fixing this, Sam.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

          Nah, joking, many thanks! Closing this a fixed, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12