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

Hidden categories are not hidden in the breadcrumbs and cause problems in Navigation block

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3, 2.4.7, 2.5.3
    • Fix Version/s: 2.4.8, 2.5.4
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. Create a category and a sub category
      3. In the sub category create a course and enrol a student.
      4. Log in as a student
      5. Browse the course and ensure the category is shown in the navbar
      6. Log in as an admin
      7. Hide the category
      8. Make the course visible again
      9. Log in as the student
      10. Browse to the course
      11. Ensure the category is not shown in the navbar
      Show
      Log in as an admin Create a category and a sub category In the sub category create a course and enrol a student. Log in as a student Browse the course and ensure the category is shown in the navbar Log in as an admin Hide the category Make the course visible again Log in as the student Browse to the course Ensure the category is not shown in the navbar
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      33536-26
    • Pull Master Diff URL:

      Description

      Admin hides a course category but makes the courses in the category visible. Admin can see the category link dimmed in the navbar, as expected. Other users can see the link in the navbar, not dimmed and accessible. When a user clicks the visible link of the hidden category the user is notified: Sorry, but you do not currently have permissions to do that (See hidden categories).

      Expected behavior: If Admin hides a category then the user should not see a link to it to begin with.

      Possible fix: add to the navbar method of core_renderer (outputrenderers) a condition on the node's display property

      if (!$item->display) {
          continue;
      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

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