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

Categories intermittently disappearing from Navigation block's "Courses" list

XMLWordPrintable

    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • Hide

      Set $CFG->navcourselimit to be higher than the number of courses in your Moodle instance.

      Show
      Set $CFG->navcourselimit to be higher than the number of courses in your Moodle instance.

      I've found that after the changes to the navigation block for MDL-27809, the categories listed in the Navigation block's "Courses" list come and go. Before that change, all the top-level categories were listed. Now, if I'm in a course then some categories will be missing. I haven't been able to figure out exactly what configuration options are necessary to make this come and go, but I have been able to create a test setup that causes this problem:

      Create this hierarchy of categories and courses:

      Category 1

      • Category 1.1
        • Course 1.1a
        • Course 1.1b
        • Course 1.1c
      • Category 1.2
        • Course 1.2a
        • Course 1.2b
        • Course 1.2c
      • Course 1a
      • Course 1b

      Category 2

      • Course 2a

      Turn on $CFG->navshowcategories and $CFG->navshowallcourses, and set $CFG->navcourselimit to 5.

      Now, from the /course/index.php page or other site pages, you'll see all the courses and categories listed in the Navigation block. However, if you navigate to course 1.2c, You'll find that Category 2 no longer shows up in the Navigation block.

      The expected behavior is that Category 1 and Category 2, as the top level categories, should show up on every page. Or there should at least be a "Show all courses/categories" link to indicate that some categories are hidden.

      If I revert commit e26507b361969c3e1f1f, then I find that it behaves as expected, and all the categories are shown when I'm in course 1.2c.

        1. navigation-on-course-page.png
          187 kB
          Aaron Wells
        2. navigation-on-site-page.png
          161 kB
          Aaron Wells
        There are no Sub-Tasks for this issue.

            Votes:
            21 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved:

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