diff --git a/course/category.php b/course/category.php index d0a3664..bdc6b9c 100644 --- a/course/category.php +++ b/course/category.php @@ -91,7 +91,7 @@ while ($cattree->parent) { $cattree = get_record("course_categories", "id", $cattree->parent); $cattype = $cattree->visible ? "category" : "hiddencategory"; - array_unshift($navlinks, array('name' => format_string($cattree->name), 'link' => "category.php?id=$cattree->id", 'type' => $cattype)); + array_unshift($navlinks, array('name' => format_string($cattree->name), 'link' => "$CFG->wwwroot/course/category.php?id=$cattree->id", 'type' => $cattype)); } $navigation = build_navigation($navlinks); diff --git a/lib/weblib.php b/lib/weblib.php index ae69295..3bf3ed2 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3809,11 +3809,11 @@ function build_navigation($extranavlinks, $cm = null) { $catlinks = array(); if ($cattree = get_record("course_categories", "id", $COURSE->category)) { $cattype = $cattree->visible ? "category" : "hiddencategory"; - $catlinks[] = array('name' => $cattree->name, 'link' => "category.php?id=$cattree->id", 'type' => $cattype); + $catlinks[] = array('name' => $cattree->name, 'link' => "$CFG->wwwroot/course/category.php?id=$cattree->id", 'type' => $cattype); while ($cattree->parent) { $cattree = get_record("course_categories", "id", $cattree->parent); $cattype = $cattree->visible ? "category" : "hiddencategory"; - array_unshift($catlinks, array('name' => $cattree->name, 'link' => "category.php?id=$cattree->id", 'type' => $cattype)); + array_unshift($catlinks, array('name' => $cattree->name, 'link' => "$CFG->wwwroot/course/category.php?id=$cattree->id", 'type' => $cattype)); } } $navlinks = array_merge($navlinks, $catlinks);