MDL-30543 navigation: Added missing course variable for user context
authorSam Hemelryk <sam@moodle.com>
Thu, 1 Dec 2011 23:31:12 +0000 (12:31 +1300)
committerSam Hemelryk <sam@moodle.com>
Thu, 1 Dec 2011 23:31:12 +0000 (12:31 +1300)
lib/navigationlib.php

index 845cfe6..6d67cce 100644 (file)
@@ -1216,6 +1216,7 @@ class global_navigation extends navigation_node {
                     }
                     break;
                 case CONTEXT_USER :
+                    $course = $this->page->course;
                     if ($showcategories && !$ismycourse) {
                         $this->load_all_categories($course->category, $showcategories);
                     }