1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html<?php echo $direction ?>>
5 <meta name=
"keywords" content=
"moodle, <?php echo $title ?> " />
6 <title
><?php
echo $title ?></title>
7 <link rel=
"shortcut icon" href=
"<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
9 <?php
//include('ui/chameleon.php'); ?>
10 <?php
include("$CFG->javascript"); ?>
11 <?php include('js/jquery.php'); ?>
13 <?php require_once($CFG->dirroot
.'/lib/custom_corners_lib.php'); ?>
19 // handle pages which get displayed wrong
20 // either no custom corners or too much
22 // all admin pages are build with the layout-table: sideblocks and content
23 if (!empty($PAGE) && ($PAGE->type
== 'admin') && (strstr($bodytags, ' nocoursepage'))) {
24 $bodytags = str_replace(' nocoursepage', '', $bodytags);
27 // list of pages using the layout-table to be able to view sideblocks
28 $excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
31 if (!empty($PAGE) && (in_array($PAGE->type
, $excludelist)) &&
32 (strstr($bodytags, ' nocoursepage'))) {
33 $bodytags = str_replace(' nocoursepage', '', $bodytags);
36 // add 'nocoursepage' to the list of CLASSes on the admin-roles pages
37 preg_match('/id="([^"]*)"/i', $bodytags, $ids);
38 if (($ids[1] == 'admin-roles-assign') ||
($ids[1] == 'admin-roles-override')) {
39 // exclude roles called from the admin area (courseid 1)
40 // include user roles for the Moodle user settings called
41 // from the start page
42 if (($COURSE->id
> 1) ||
($_GET['contextid'] == 30)) {
43 preg_match('/class="([^"]*)"/i', $bodytags, $classes);
44 $classlist = explode (' ', $classes[1]);
45 if (!in_array('nocoursepage', $classlist)) {
46 array_push($classlist, 'nocoursepage');
47 $bodytags = str_replace($classes[0],
48 'class="'.implode(' ', $classlist).'"', $bodytags);
58 echo " onload=\"setfocus()\"";
62 <?php if(!empty($infooutput)) { ?>
63 <div id=
"infowrapper"><div id=
"infooverlay"><?php echo $infooutput; ?></div></div>
67 <?php if ($home) { // This is what gets printed on the home page only
69 <div id=
"header-home" class=
"clearfix">
70 <?php print_custom_corners_start(TRUE); ?>
71 <h1 class=
"headermain"><?php echo $heading ?></h1>
72 <div class=
"headermenu"><?php echo $menu ?></div>
73 <?php print_custom_corners_end(); ?>
75 <?php } else { // This is what gets printed on any other page with a heading
77 <div id=
"header" class=
"clearfix">
78 <?php print_custom_corners_start(); ?>
79 <h1 class=
"headermain"><?php echo $heading ?></h1>
80 <div class=
"headermenu"><?php echo $menu ?></div>
81 <div class=
"navbar clearfix">
82 <?php if ($navigation) { // This is the navigation table with breadcrumbs
84 <div class=
"breadcrumb"><?php print_navigation($navigation); ?></div>
85 <div class=
"navbutton"><?php echo $button; ?></div>
88 <?php print_custom_corners_end(); ?>
91 <!-- END OF HEADER -->
93 <?php print_custom_corners_start(TRUE); ?>