Moodle
  1. Moodle
  2. MDL-31122

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      37552

      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).

        Activity

        Hide
        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
        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
        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
        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
        Sam Hemelryk added a comment -

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

        Cheers
        Sam

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

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

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

        Rebased on current branches, now submitting for integration.

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

        Integrated, thanks!

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

        Works Great
        Thanks for fixing this, Sam.

        Show
        Rajesh Taneja added a comment - Works Great Thanks for fixing this, Sam.
        Hide
        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
        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: