From 4dcd99de5946d7b23d425e49d4c7ab7f2dd2d6ed Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Thu, 1 Nov 2012 16:13:21 +0800 Subject: [PATCH] MDL-36048 Modify themes to add course headers and footers provided by course format --- theme/afterburner/config.php | 10 +++++----- theme/afterburner/layout/default.php | 29 ++++++++++++++++++++++------ theme/anomaly/config.php | 10 +++++----- theme/anomaly/layout/general.php | 22 +++++++++++++++++++-- theme/anomaly/layout/report.php | 18 +++++++++++++++++ theme/arialist/config.php | 10 +++++----- theme/arialist/layout/general.php | 23 ++++++++++++++++++++-- theme/arialist/layout/report.php | 25 ++++++++++++++++++++---- theme/binarius/config.php | 10 +++++----- theme/binarius/layout/general.php | 24 ++++++++++++++++++++--- theme/binarius/layout/report.php | 23 ++++++++++++++++++++-- theme/boxxie/config.php | 10 +++++----- theme/boxxie/layout/general.php | 23 ++++++++++++++++++++-- theme/brick/config.php | 8 ++++---- theme/brick/layout/general.php | 18 +++++++++++++++++ 15 files changed, 213 insertions(+), 50 deletions(-) diff --git a/theme/afterburner/config.php b/theme/afterburner/config.php index e720e8d578b..473cb4c3000 100644 --- a/theme/afterburner/config.php +++ b/theme/afterburner/config.php @@ -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), ), ); diff --git a/theme/afterburner/layout/default.php b/theme/afterburner/layout/default.php index 0bc2bfa88d3..7d28944517c 100644 --- a/theme/afterburner/layout/default.php +++ b/theme/afterburner/layout/default.php @@ -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() ?> standard_top_of_body_html() ?>
- - + + +
+ +