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

Add Category information to the $navlinks array for the navigation breadcrumbs.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • 2.0
    • 1.9.9
    • Navigation
    • None

      When courses are organised in to categories, one the user selects the course the category is no longer present in the breadcrumb links. This makes returning to the category level to select another course less intuitive.

      To counter this issue, I have inserted the following code in the lib/weblib.php file in the function build_navigation section between the site info and course name:

      // Categrory Name, if appropriate.
      if (isset($COURSE->category) && $COURSE->id != SITEID) {
      $categoryid = trim(get_string($COURSE->category),"[]");
      $sql = "SELECT `name` FROM `mdl_course_categories` WHERE `id` = $categoryid";
      $categoryname = get_record_sql($sql);
      $navlinks[] = array(
      'name' => format_string($categoryname->name),
      'link' => "$CFG->wwwroot/course/category.php?id=$COURSE->category",
      'type' => 'category');
      }

            samhemelryk Sam Hemelryk
            fwdixon Frank Dixon (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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