Index: temp_moodle_dev/moodle/lib/weblib.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/lib/weblib.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/lib/weblib.php 14 Nov 2008 05:57:17 -0000 1.1 +++ temp_moodle_dev/moodle/lib/weblib.php 14 Nov 2008 06:16:59 -0000 1.2 @@ -2835,32 +2835,38 @@ * @param string $bodytags This text will be included verbatim in the
tag (useful for onload() etc) * @param bool $return If true, return the visible elements of the header instead of echoing them. */ +//we pass a new parameter (is_lams) so it will be useful for lams navigation function print_header_simple($title='', $heading='', $navigation='', $focus='', $meta='', - $cache=true, $button=' ', $menu='', $usexml=false, $bodytags='', $return=false) { + $cache=true, $button=' ', $menu='', $usexml=false, $bodytags='', $return=false,$is_lams=null) { global $COURSE, $CFG; - - // if we have no navigation specified, build it - if( empty($navigation) ){ - $navigation = build_navigation(''); - } - - // If old style nav prepend course short name otherwise leave $navigation object alone - if (!is_newnav($navigation)) { - if ($COURSE->id != SITEID) { - $shortname = ''. $COURSE->shortname .' ->'; - $navigation = $shortname.' '.$navigation; - } - } - - $output = print_header($COURSE->shortname .': '. $title, $COURSE->fullname .' '. $heading, $navigation, $focus, $meta, - $cache, $button, $menu, $usexml, $bodytags, true); - - if ($return) { - return $output; - } else { - echo $output; - } + //If is lams don't print top navigation menu (just let the header be blank) + if($is_lams==1){ + print_header(); + }else{ // print the header normally + // if we have no navigation specified, build it + if( empty($navigation) ){ + $navigation = build_navigation(''); + } + + // If old style nav prepend course short name otherwise leave $navigation object alone + if (!is_newnav($navigation)) { + if ($COURSE->id != SITEID) { + $shortname = ''. $COURSE->shortname .' ->'; + $navigation = $shortname.' '.$navigation; + } + } + + $output = print_header($COURSE->shortname .': '. $title, $COURSE->fullname .' '. $heading, $navigation, $focus, $meta, + $cache, $button, $menu, $usexml, $bodytags, true); + + + if ($return) { + return $output; + } else { + echo $output; + } + } } @@ -2876,110 +2882,113 @@ * @param boolean $return output as string * @return mixed string or void */ -function print_footer($course=NULL, $usercourse=NULL, $return=false) { - global $USER, $CFG, $THEME, $COURSE; - - if (defined('ADMIN_EXT_HEADER_PRINTED') and !defined('ADMIN_EXT_FOOTER_PRINTED')) { - admin_externalpage_print_footer(); - return; - } - -/// Course links or special footer - if ($course) { - if ($course === 'empty') { - // special hack - sometimes we do not want even the docs link in footer - $output = ''; - if (!empty($THEME->open_header_containers)) { - for ($i=0; $i<$THEME->open_header_containers; $i++) { - $output .= print_container_end_all(); // containers opened from header - } - } else { - //1.8 theme compatibility - $output .= "\n"; // content div - } - $output .= "\n\n\n