From d6c66e125d3ebff2964dec289c1f39f9282838b5 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 29 Jan 2005 10:49:48 +0000 Subject: [PATCH] Added class for courseid --- lib/weblib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 25da1763cb..b696531488 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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'); -- 2.39.5