2007-05-09 14:26:59 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html<?php echo $direction ?>>
|
|
|
|
<head>
|
|
|
|
<?php echo $meta ?>
|
|
|
|
<meta name="keywords" content="moodle, <?php echo $title ?> " />
|
|
|
|
<title><?php echo $title ?></title>
|
|
|
|
<link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-10-12 09:57:58 +00:00
|
|
|
<?php include('ui/chameleon.php'); ?>
|
2007-05-09 14:26:59 +00:00
|
|
|
<?php include("$CFG->javascript"); ?>
|
|
|
|
<?php include('js/jquery.php'); ?>
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
<?php require_once($CFG->dirroot.'/lib/custom_corners_lib.php'); ?>
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
<?php
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
global $PAGE;
|
2007-11-11 16:04:08 +00:00
|
|
|
|
|
|
|
if (function_exists('get_in_popup')) {
|
|
|
|
$inpopup = get_in_popup();
|
|
|
|
} else {
|
|
|
|
$inpopup = false;
|
|
|
|
}
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
// handle pages which get displayed wrong
|
|
|
|
// either no custom corners or too much
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
// all admin pages are build with the layout-table: sideblocks and content
|
2007-10-16 14:56:19 +00:00
|
|
|
if (!empty($PAGE) && ($PAGE->type == 'admin') && (strpos($bodytags, ' nocoursepage'))) {
|
2007-05-09 14:26:59 +00:00
|
|
|
$bodytags = str_replace(' nocoursepage', '', $bodytags);
|
|
|
|
}
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
// list of pages using the layout-table to be able to view sideblocks
|
2007-05-09 15:33:05 +00:00
|
|
|
$excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
|
|
|
|
'my-index');
|
2007-07-16 20:59:38 +00:00
|
|
|
|
2007-08-24 04:22:30 +00:00
|
|
|
if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) &&
|
2007-10-16 14:56:19 +00:00
|
|
|
(strpos($bodytags, ' nocoursepage'))) {
|
2007-05-09 14:26:59 +00:00
|
|
|
$bodytags = str_replace(' nocoursepage', '', $bodytags);
|
|
|
|
}
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-10-16 14:56:19 +00:00
|
|
|
// add 'nocoursepage' to the list of CLASSes on several pages
|
|
|
|
if (strpos($bodytags, 'nocoursepage') === false) {
|
|
|
|
$includelist = array('admin-roles-assign', 'admin-roles-override',
|
|
|
|
'mod-data-view');
|
|
|
|
preg_match('/id="([^"]*)"/i', $bodytags, $ids);
|
|
|
|
if (in_array($ids[1], $includelist)) {
|
|
|
|
// exclude roles called from the admin area (courseid 1)
|
|
|
|
// include user roles for the Moodle user settings called
|
|
|
|
// from the start page
|
|
|
|
if (($COURSE->id > 1) || ($_GET['contextid'] == 30)) {
|
|
|
|
preg_match('/class="([^"]*)"/i', $bodytags, $classes);
|
|
|
|
$classlist = explode (' ', $classes[1]);
|
|
|
|
if (!in_array('nocoursepage', $classlist)) {
|
|
|
|
array_push($classlist, 'nocoursepage');
|
|
|
|
$bodytags = str_replace($classes[0],
|
|
|
|
'class="'.implode(' ', $classlist).'"', $bodytags);
|
|
|
|
}
|
2007-05-09 14:26:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-11-11 16:04:08 +00:00
|
|
|
|
2007-05-09 14:26:59 +00:00
|
|
|
?>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body<?php
|
|
|
|
echo " $bodytags";
|
|
|
|
if ($focus) {
|
|
|
|
echo " onload=\"setfocus()\"";
|
|
|
|
};
|
|
|
|
?>>
|
2007-07-16 19:46:54 +00:00
|
|
|
|
|
|
|
<?php if(!empty($infooutput)) { ?>
|
2007-05-09 14:26:59 +00:00
|
|
|
<div id="infowrapper"><div id="infooverlay"><?php echo $infooutput; ?></div></div>
|
|
|
|
<?php } ?>
|
2007-11-11 16:04:08 +00:00
|
|
|
<div id="page"<?php echo (' class="'.(($inpopup) ? 'inpopup' : 'notinpopup').'"'); ?>>
|
2007-07-16 19:46:54 +00:00
|
|
|
|
2007-11-11 16:04:08 +00:00
|
|
|
<?php if (!$inpopup) {
|
|
|
|
if ($home) { // This is what gets printed on the home page only
|
2007-05-09 14:26:59 +00:00
|
|
|
?>
|
|
|
|
<div id="header-home" class="clearfix">
|
2007-10-16 09:01:11 +00:00
|
|
|
<?php print_custom_corners_start(); ?>
|
2007-11-11 16:04:08 +00:00
|
|
|
<div class="wraphome clearfix">
|
2007-10-16 09:01:11 +00:00
|
|
|
<h1 class="headermain"><?php echo $heading ?></h1>
|
|
|
|
<div class="headermenu"><?php echo $menu ?></div>
|
|
|
|
</div>
|
2007-05-09 14:26:59 +00:00
|
|
|
<?php print_custom_corners_end(); ?>
|
|
|
|
</div>
|
2007-11-11 16:04:08 +00:00
|
|
|
<?php } else if ($heading) { // This is what gets printed on any other page with a heading
|
2007-05-09 14:26:59 +00:00
|
|
|
?>
|
|
|
|
<div id="header" class="clearfix">
|
2007-10-16 09:01:11 +00:00
|
|
|
<?php print_custom_corners_start(); ?>
|
2007-05-09 14:26:59 +00:00
|
|
|
<h1 class="headermain"><?php echo $heading ?></h1>
|
|
|
|
<div class="headermenu"><?php echo $menu ?></div>
|
2007-10-16 09:01:11 +00:00
|
|
|
<div class="navbar clearfix">
|
2007-05-09 14:26:59 +00:00
|
|
|
<?php if ($navigation) { // This is the navigation table with breadcrumbs
|
|
|
|
?>
|
2007-08-24 12:45:16 +00:00
|
|
|
<div class="breadcrumb"><?php print_navigation($navigation); ?></div>
|
2007-05-09 14:26:59 +00:00
|
|
|
<div class="navbutton"><?php echo $button; ?></div>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
<?php print_custom_corners_end(); ?>
|
|
|
|
</div>
|
2007-11-11 16:04:08 +00:00
|
|
|
<?php }
|
|
|
|
}
|
|
|
|
?>
|
2007-05-09 14:26:59 +00:00
|
|
|
<!-- END OF HEADER -->
|
|
|
|
<div id="content">
|
2007-09-03 19:36:46 +00:00
|
|
|
<?php print_custom_corners_start(true, false, 'content'); ?>
|