]> git.mjollnir.org Git - moodle.git/commitdiff
Added class for courseid
authormoodler <moodler>
Sat, 29 Jan 2005 10:49:48 +0000 (10:49 +0000)
committermoodler <moodler>
Sat, 29 Jan 2005 10:49:48 +0000 (10:49 +0000)
lib/weblib.php

index 25da1763cbe631c53dca72b05c390cfcd5b2e221..b6965314886a0f066df9c0fa16f6ec6bea717868 100644 (file)
@@ -1637,8 +1637,8 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
         $path .= 'index';
     }
     if (empty($path)) {
-        $pageid    = 'course-view';
-        $pageclass = 'index';
+        $pageid    = 'site-index';
+        $pageclass = 'course course-'.SITEID;
     } else {
         $pageid    = str_replace('/', '-', $path);
         $pageclass = explode('-', $pageid);
@@ -1646,6 +1646,10 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
         $pageclass = implode('-', $pageclass);
     }
 
+    if (isset($course->id)) {
+        $pageclass .= ' course-'.$course->id;
+    }
+
     $bodytags .= ' class="'.$pageclass.'" id="'.$pageid.'"';
 
     include ($CFG->dirroot .'/theme/'. $CFG->theme .'/header.html');