]> git.mjollnir.org Git - moodle.git/commitdiff
Use $COURSE and not the $course hack
authormoodler <moodler>
Wed, 13 Sep 2006 04:11:36 +0000 (04:11 +0000)
committermoodler <moodler>
Wed, 13 Sep 2006 04:11:36 +0000 (04:11 +0000)
lib/weblib.php

index 27229b2ac7f9e5c0fd96e7ababb713e2ec75568c..77f00ca912a297cfda954f87681edc39b58bc3f8 100644 (file)
@@ -2241,14 +2241,14 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
 function print_header_simple($title='', $heading='', $navigation='', $focus='', $meta='',
                        $cache=true, $button='&nbsp;', $menu='', $usexml=false, $bodytags='', $return=false) {
 
-    global $course,$CFG;                // The same hack is used in print_header
+    global $COURSE, $CFG;   
 
     $shortname ='';
-    if ($course->category) {
-        $shortname = '<a href="'.$CFG->wwwroot.'/course/view.php?id='. $course->id .'">'. $course->shortname .'</a> ->';
+    if ($COURSE->category) {
+        $shortname = '<a href="'.$CFG->wwwroot.'/course/view.php?id='. $COURSE->id .'">'. $COURSE->shortname .'</a> ->';
     }
 
-    $output = print_header($course->shortname .': '. $title, $course->fullname .' '. $heading, $shortname .' '. $navigation, $focus, $meta,
+    $output = print_header($COURSE->shortname .': '. $title, $course->fullname .' '. $heading, $shortname .' '. $navigation, $focus, $meta,
                            $cache, $button, $menu, $usexml, $bodytags, true);
 
     if ($return) {