MDL-36048 Modify themes to add course headers and footers provided by course format

This commit is contained in:
Marina Glancy
2012-11-10 15:39:15 +08:00
parent fdd4b9a50a
commit 4dcd99de59
15 changed files with 213 additions and 50 deletions
+5 -5
View File
@@ -91,13 +91,13 @@ $THEME->layouts = array(
'popup' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologininfo'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologininfo'=>true, 'nocourseheaderfooter'=>true),
),
// No blocks and minimal footer - used for legacy frame layouts only!
'frametop' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('nofooter'=>true),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
// Embedded pages, like iframe/object embeded in moodleform - it needs as much space as possible
'embedded' => array(
@@ -110,13 +110,13 @@ $THEME->layouts = array(
'maintenance' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
@@ -134,7 +134,7 @@ $THEME->layouts = array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologinlinks'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologinlinks'=>true, 'nocourseheaderfooter'=>true),
),
);
+23 -6
View File
@@ -15,6 +15,16 @@ $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custom
$hasfootnote = (!empty($PAGE->theme->settings->footnote));
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
if (!right_to_left()) {
@@ -47,9 +57,8 @@ echo $OUTPUT->doctype() ?>
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page-wrapper">
<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<div id="page-header">
<?php if ($hasheading) { ?>
<?php if ($hasheading) { ?>
<div id="page-header">
<a class="logo" href="<?php echo $CFG->wwwroot; ?>" title="<?php print_string('home'); ?>"></a>
<div class="headermenu"><?php
if ($haslogininfo) {
@@ -60,9 +69,8 @@ echo $OUTPUT->doctype() ?>
}
echo $PAGE->headingmenu
?></div>
<?php } ?>
</div>
<?php } ?>
</div>
<?php } ?>
<!-- END OF HEADER -->
<!-- START CUSTOMMENU AND NAVBAR -->
<div id="navcontainer">
@@ -72,6 +80,10 @@ echo $OUTPUT->doctype() ?>
</div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
@@ -85,7 +97,9 @@ echo $OUTPUT->doctype() ?>
<div id="region-pre-box">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
@@ -121,6 +135,9 @@ echo $OUTPUT->doctype() ?>
</div>
<!-- START OF FOOTER -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
+5 -5
View File
@@ -85,19 +85,19 @@ $THEME->layouts = array(
'popup' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true, 'nocourseheaderfooter'=>true),
),
// No blocks and minimal footer - used for legacy frame layouts only!
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter', 'noblocks'=>true),
'options' => array('nofooter', 'noblocks'=>true, 'nocoursefooter'=>true),
),
// Embeded pages, like iframe embeded in moodleform
'embedded' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true, 'nocourseheaderfooter'=>true),
),
// Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
// This must not have any blocks, and it is good idea if it does not have links to
@@ -105,13 +105,13 @@ $THEME->layouts = array(
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true, 'nocourseheaderfooter'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true, 'nocourseheaderfooter'=>true),
),
'report' => array(
'file' => 'report.php',
+20 -2
View File
@@ -25,6 +25,16 @@ if ($hasnavbar) {
$bodyclasses[] = 'hasnavbar';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -36,7 +46,7 @@ echo $OUTPUT->doctype() ?>
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader)) { ?>
<div id="page-header">
<div class="rounded-corner top-left"></div>
<div class="rounded-corner top-right"></div>
@@ -50,8 +60,11 @@ echo $OUTPUT->doctype() ?>
echo $PAGE->headingmenu
?></div><?php } ?>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
@@ -71,7 +84,9 @@ echo $OUTPUT->doctype() ?>
<div id="region-main-wrap">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
@@ -97,6 +112,9 @@ echo $OUTPUT->doctype() ?>
</div>
<!-- START OF FOOTER -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+18
View File
@@ -19,6 +19,16 @@ if ($hasnavbar) {
$bodyclasses[] = 'hasnavbar';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -44,6 +54,9 @@ echo $OUTPUT->doctype() ?>
echo $PAGE->headingmenu
?></div><?php } ?>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
@@ -61,7 +74,9 @@ echo $OUTPUT->doctype() ?>
<div id="page-content" class="clearfix">
<div id="report-main-content">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
<?php if ($hassidepre) { ?>
@@ -76,6 +91,9 @@ echo $OUTPUT->doctype() ?>
</div>
<!-- START OF FOOTER -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+5 -5
View File
@@ -143,29 +143,29 @@ $THEME->layouts = array(
'popup' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'embedded' => array(
'theme' => 'canvas',
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'report' => array(
'file' => 'report.php',
+21 -2
View File
@@ -19,6 +19,16 @@ if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -36,7 +46,7 @@ echo $OUTPUT->doctype() ?>
<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div id="wrapper" class="clearfix">
<!-- START OF HEADER -->
@@ -57,6 +67,9 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
</div>
</div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar">
<div class="wrapper clearfix">
@@ -81,7 +94,9 @@ echo $OUTPUT->doctype() ?>
<div id="region-main-wrap">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
@@ -101,7 +116,11 @@ echo $OUTPUT->doctype() ?>
<!-- END OF CONTENT -->
<?php if ($hasheading || $hasnavbar) { ?>
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
</div>
<?php } ?>
+21 -4
View File
@@ -19,6 +19,16 @@ if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -36,7 +46,7 @@ echo $OUTPUT->doctype() ?>
<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div id="wrapper" class="clearfix">
<!-- START OF HEADER -->
@@ -57,6 +67,9 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
</div>
</div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar">
<div class="wrapper clearfix">
@@ -77,7 +90,9 @@ echo $OUTPUT->doctype() ?>
<div id="page-content" class="clearfix">
<div id="report-main-content">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
<?php if ($hassidepost) { ?>
@@ -92,11 +107,13 @@ echo $OUTPUT->doctype() ?>
</div>
</div>
</div>
<!-- END OF CONTENT -->
<?php if ($hasheading || $hasnavbar) { ?>
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
</div>
<?php } ?>
+5 -5
View File
@@ -142,29 +142,29 @@ $THEME->layouts = array(
'popup' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'embedded' => array(
'theme' => 'canvas',
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'report' => array(
'file' => 'report.php',
+21 -3
View File
@@ -20,6 +20,16 @@ if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -33,7 +43,7 @@ echo $OUTPUT->doctype() ?>
<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div id="wrapper" class="clearfix">
<!-- START OF HEADER -->
@@ -56,7 +66,9 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
</div>
</div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar">
<div class="wrapper clearfix">
@@ -81,7 +93,9 @@ echo $OUTPUT->doctype() ?>
<div id="region-main-wrap">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
@@ -101,7 +115,11 @@ echo $OUTPUT->doctype() ?>
<!-- END OF CONTENT -->
<?php if ($hasheading || $hasnavbar) { ?>
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div class="myclear"></div>
</div>
<?php } ?>
+21 -2
View File
@@ -20,6 +20,16 @@ if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -33,7 +43,7 @@ echo $OUTPUT->doctype() ?>
<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div id="wrapper" class="clearfix">
<!-- START OF HEADER -->
@@ -56,6 +66,9 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
</div>
</div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar">
@@ -77,7 +90,9 @@ echo $OUTPUT->doctype() ?>
<div id="page-content" class="clearfix">
<div id="report-main-content">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
<?php if ($hassidepost) { ?>
@@ -94,7 +109,11 @@ echo $OUTPUT->doctype() ?>
<!-- END OF CONTENT -->
<?php if ($hasheading || $hasnavbar) { ?>
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div class="myclear"></div>
</div>
<?php } ?>
+5 -5
View File
@@ -120,29 +120,29 @@ $THEME->layouts = array(
'popup' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
'options' => array('nofooter'=>true, 'nocourseheaderfooter'=>true),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
'maintenance' => array(
'theme' => 'boxxie',
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
'embedded' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
);
+21 -2
View File
@@ -22,6 +22,16 @@ if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -34,7 +44,7 @@ echo $OUTPUT->doctype() ?>
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<?php if ($hasheading || $hasnavbar) { ?>
<?php if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div id="page-wrapper">
<div id="page" class="clearfix">
@@ -57,6 +67,10 @@ echo $OUTPUT->doctype() ?>
<div class="myclear"></div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
@@ -73,7 +87,9 @@ echo $OUTPUT->doctype() ?>
<div id="region-main-wrap">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
@@ -99,6 +115,9 @@ echo $OUTPUT->doctype() ?>
</div>
<div class="myclear"></div>
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
@@ -108,7 +127,7 @@ echo $OUTPUT->doctype() ?>
<?php }
if ($hasheading || $hasnavbar) { ?>
if ($hasheading || $hasnavbar || !empty($courseheader) || !empty($coursefooter)) { ?>
<div class="myclear"></div>
</div> <!-- END #page -->
+4 -4
View File
@@ -144,23 +144,23 @@ $THEME->layouts = array(
'popup' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true),
),
'embedded' => array(
'theme' => 'canvas',
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true),
),
'report' => array(
'file' => 'general.php',
+18
View File
@@ -18,6 +18,16 @@ if ($showsidepost) {
$bodyclasses[] = 'content-only';
}
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -81,6 +91,9 @@ echo $OUTPUT->doctype() ?>
<div id="page">
<div id="wrapper" class="clearfix">
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<!-- START OF CONTENT -->
<div id="page-content-wrapper" class="wrapper clearfix">
@@ -100,7 +113,9 @@ echo $OUTPUT->doctype() ?>
</div>
<?php } ?>
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
@@ -128,6 +143,9 @@ echo $OUTPUT->doctype() ?>
</div>
<!-- END OF CONTENT -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
</div>