Moodle
  1. Moodle
  2. MDL-25578

Stupid breadcrumb in /course/category.php

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Navigation
    • Labels:
      None
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Very confusing breadcrumb in /course/category.php for non-global-admin users.
      When editing, for example, category home/level1/level2/level3/level4 it shows Home > Courses > level1 > Course categories > level 4 > Courses
      For admins users it always point Home > Courses > level1 > Courses > Add/edit courses and Level1 always links the same category

        Gliffy Diagrams

          Activity

          Hide
          Sam Hemelryk added a comment -

          Hi guys,

          I've attached a patch that cleans up the navbar for the course/categories page.
          The page was trying to find the active node in the settings block which means that it wasn't ending up taking the relevant path from the navigation (the path to the category itself).
          The fix is to make the category link in the navigation the active node and then append the active settings node if the user has permission.

          This patch also cleans up a PAGE->set_url hack in admin_externalpage_setup by instead explicitly finding the correct node and manually marking it active.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi guys, I've attached a patch that cleans up the navbar for the course/categories page. The page was trying to find the active node in the settings block which means that it wasn't ending up taking the relevant path from the navigation (the path to the category itself). The fix is to make the category link in the navigation the active node and then append the active settings node if the user has permission. This patch also cleans up a PAGE->set_url hack in admin_externalpage_setup by instead explicitly finding the correct node and manually marking it active. Cheers Sam
          Hide
          Petr Skoda added a comment -

          yay! +1

          Show
          Petr Skoda added a comment - yay! +1
          Hide
          Vadim Dvorovenko added a comment -

          Now everything is as I expected. Please mark as solved and commit.

          Show
          Vadim Dvorovenko added a comment - Now everything is as I expected. Please mark as solved and commit.
          Hide
          Sam Hemelryk added a comment -

          Has been commit now

          Show
          Sam Hemelryk added a comment - Has been commit now

            People

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

              Dates

              • Created:
                Updated:
                Resolved: