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

Navigation block is only showing one top-level category under the courses node when on front page or on a course category page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.2.1
    • Navigation
    • MOODLE_22_STABLE
    • Hide
      • Have several top-level course categories which have subcategories, some of which have courses.
      • Have a navigation block present on the front page.
      • Set navshowallcourses and navshowcategories to yes.
      • Visit the homepage and expand the Courses node in the navigation block
      • Visit a course category page and look at the Courses node in the navigation block

      Expected behavior:
      See all top level course categories listed.

      Actual behavior:
      Only one top level course category listed (the first one).

      Show
      Have several top-level course categories which have subcategories, some of which have courses. Have a navigation block present on the front page. Set navshowallcourses and navshowcategories to yes. Visit the homepage and expand the Courses node in the navigation block Visit a course category page and look at the Courses node in the navigation block Expected behavior: See all top level course categories listed. Actual behavior: Only one top level course category listed (the first one).

      On a Moodle with version '2.2.1+ (Build: 20120309)', hundreds of nested course categories and thousands of courses, I'm seeing a problem where the navigation block is not showing all the top-level course categories when on the front page (no matter whether logged in or not). It only shows the first course category.

      navshowallcourses and navshowcategories is set to yes in the block navigation settings.

      I'm providing a patch (git diff) which fixes this behaviour. It has the following effects:

      • fix breadcrumbs that were often showing the wrong course category (as per MDL-31665)
      • all categories are always available under the courses node when navshowcategories and navshowallcourses are enabled
      • courses node in navigation block is initially closed if in one of my courses (because the mycourses node is already open to the relevant course). If the courses node is clicked to open, the current course will be highlighted.
      • courses node in navigation block is initially closed if on a course category page (because the main content of the page is probably what the user wants to focus on). If the courses node is clicked to open, the current course category will be highlighted .

            samhemelryk Sam Hemelryk
            brianking Brian King (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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