Permalink
Browse files

MDL-36339 Modify themes to add course headers and footers provided by…

… course format
  • Loading branch information...
1 parent 4bd6f71 commit c8f9faba0cc89d41cec1b287935bb86915c6d94d @marinaglancy marinaglancy committed Nov 28, 2012
@@ -145,33 +145,33 @@
'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),
),
// No blocks and minimal footer - used for legacy frame layouts only!
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
- 'options' => array('nofooter'=>true),
+ 'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
// Embeded pages, like iframe embeded in moodleform (chat)
'embedded' => array(
'file' => 'embedded.php',
'regions' => array(),
- 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>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
// other places - for example there should not be a home link in the footer...
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
- 'options' => array('nofooter'=>true, 'nonavbar'=>true),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>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',
@@ -15,6 +15,16 @@
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+$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) {
$bodyclasses[] = 'side-pre-only';
@@ -91,6 +101,12 @@
<?php } ?>
<!-- end of page-header -->
+<!-- begin of course header -->
+ <?php if (!empty($courseheader)) { ?>
+ <div id="course-header"><?php echo $courseheader; ?></div>
+ <?php } ?>
+<!-- end of course header -->
+
<!-- begin of custom menu -->
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
@@ -115,7 +131,9 @@
<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>
@@ -146,6 +164,11 @@
</div>
<!-- end of moodle content -->
+<!-- begin of course footer -->
+ <?php if (!empty($coursefooter)) { ?>
+ <div id="course-footer"><?php echo $coursefooter; ?></div>
+ <?php } ?>
+<!-- end of course footer -->
<div class="clearfix"></div>
<?php if ($hasframe) { ?>
@@ -14,6 +14,16 @@
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+$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) {
$bodyclasses[] = 'content-only';
@@ -86,6 +96,12 @@
<?php } ?>
<!-- end of page-header -->
+<!-- begin of course header -->
+ <?php if (!empty($courseheader)) { ?>
+ <div id="course-header"><?php echo $courseheader; ?></div>
+ <?php } ?>
+<!-- end of course header -->
+
<!-- begin of custom menu -->
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
@@ -107,7 +123,9 @@
<!-- main mandatory content of the moodle page -->
<div id="report-main-content">
<div class="region-content">
+ <?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
+ <?php echo $coursecontentfooter; ?>
</div>
</div>
<!-- end of main mandatory content of the moodle page -->
@@ -127,6 +145,12 @@
</div>
<!-- end of moodle content -->
+<!-- begin of course footer -->
+<?php if (!empty($coursefooter)) { ?>
+<div id="course-footer"><?php echo $coursefooter; ?></div>
+<?php } ?>
+<!-- end of course footer -->
+
<div class="clearfix"></div>
<?php if ($hasframe) { ?>
@@ -127,28 +127,28 @@
'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(
'file' => 'embedded.php',
'regions' => array(),
- 'options' => array('nofooter'=>true, 'nonavbar'=>true),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>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),
),
);
@@ -9,6 +9,16 @@
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+$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 ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'side-pre-only';
@@ -61,6 +71,10 @@
<?php } ?>
<?php } ?>
+ <?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>
@@ -79,7 +93,9 @@
<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>
@@ -105,6 +121,10 @@
</div>
</div>
+<?php if (!empty($coursefooter)) { ?>
+<div id="course-footer"><?php echo $coursefooter; ?></div>
+<?php } ?>
+
<!-- START OF FOOTER -->
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
@@ -11,6 +11,7 @@ body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { font-family: "Trebuchet MS",
#page-site-index .headermain { margin:0.85em 0;font-size:2.5em; }
+#course-header { margin:0 50px; }
/* Menu Navigation
--------------------------*/
@@ -54,6 +55,8 @@ body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { font-family: "Trebuchet MS",
#page-footer { margin:25px 0; }
#page-footer .logininfo { margin: 1em 0; }
+#course-footer { margin:0 50px; }
+
/* custum menu */
#custommenu {
margin:0 50px;
View
@@ -143,29 +143,29 @@
'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),
),
// 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' => 'general.php',
@@ -10,6 +10,16 @@
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+$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 ($showsidepost) {
$bodyclasses[] = 'side-post-only';
@@ -77,6 +87,10 @@
<?php } ?>
+ <?php if (!empty($courseheader)) { ?>
+ <div id="course-header"><?php echo $courseheader; ?></div>
+ <?php } ?>
+
<!-- START OF CONTENT -->
@@ -106,7 +120,9 @@
</div>
<?php } ?>
+ <?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
+ <?php echo $coursecontentfooter; ?>
</div>
</div>
</div>
@@ -130,6 +146,10 @@
<!-- END OF CONTENT -->
+ <?php if (!empty($coursefooter)) { ?>
+ <div id="course-footer"><?php echo $coursefooter; ?></div>
+ <?php } ?>
+
<?php if ($hasheading || $hasnavbar) { ?>
</div>
@@ -189,6 +189,10 @@ h6{
padding: 2px 5px 0 0;
}
+#course-header, #course-footer {
+ margin:5px 20px 0 0;
+}
+
/* Navbar
----------------------------*/
@@ -131,29 +131,29 @@
'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),
),
// 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',
Oops, something went wrong.

0 comments on commit c8f9fab

Please sign in to comment.