diff --git a/course/lib.php b/course/lib.php
index 2a1f01a..b95781b 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -2007,8 +2007,20 @@ function make_categories_list(&$list, &$parents, $requiredcapability = '',
         $categoryname = format_string($category->name, true, array('context' => $context));
 
         // Update $path.
+        $tab = str_repeat('&nbsp;', 3);
+        $tl = textlib_get_instance();
+        $len = $tl->strlen($categoryname);
+        $trimto = 80;
+        if($len > $trimto) {
+            $start = $tl->substr($categoryname, 0, $trimto/2);
+            $end = $tl->substr($categoryname, $len - $trimto/2);
+            $categoryname = $start.' &#x22EF; '.$end;
+        }
+
         if ($path) {
-            $path = $path.' / '.$categoryname;
+            $prefix = str_repeat('&#x2503;'.$tab, mb_substr_count($path, '&#x2523;') +
+                                                  mb_substr_count($path, '&#x2503;'));
+            $path = $prefix.'&#x2523;&#x2501; '.$categoryname;
         } else {
             $path = $categoryname;
         }
