3 $hasheading = ($PAGE->heading
);
4 $hasnavbar = (empty($PAGE->layout_options
['nonavbar']) && $PAGE->has_navbar());
5 $hasfooter = (empty($PAGE->layout_options
['nofooter']));
6 $hassidepre = (empty($PAGE->layout_options
['noblocks']) && $PAGE->blocks
->region_has_content('side-pre', $OUTPUT));
7 $hassidepost = (empty($PAGE->layout_options
['noblocks']) && $PAGE->blocks
->region_has_content('side-post', $OUTPUT));
8 $haslogininfo = (empty($PAGE->layout_options
['nologininfo']));
10 $showsidepre = ($hassidepre && !$PAGE->blocks
->region_completely_docked('side-pre', $OUTPUT));
11 $showsidepost = ($hassidepost && !$PAGE->blocks
->region_completely_docked('side-post', $OUTPUT));
13 $custommenu = $OUTPUT->custom_menu();
14 $hascustommenu = (empty($PAGE->layout_options
['nocustommenu']) && !empty($custommenu));
16 $bodyclasses = array();
17 if ($showsidepre && !$showsidepost) {
18 $bodyclasses[] = 'side-pre-only';
19 } else if ($showsidepost && !$showsidepre) {
20 $bodyclasses[] = 'side-post-only';
21 } else if (!$showsidepost && !$showsidepre) {
22 $bodyclasses[] = 'content-only';
25 $bodyclasses[] = 'has_custom_menu';
28 $courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
29 if (empty($PAGE->layout_options
['nocourseheaderfooter'])) {
30 $courseheader = $OUTPUT->course_header();
31 $coursecontentheader = $OUTPUT->course_content_header();
32 if (empty($PAGE->layout_options
['nocoursefooter'])) {
33 $coursecontentfooter = $OUTPUT->course_content_footer();
34 $coursefooter = $OUTPUT->course_footer();
38 echo $OUTPUT->doctype() ?
>
39 <html
<?php
echo $OUTPUT->htmlattributes() ?
>>
41 <title
><?php
echo $PAGE->title ?
></title
>
42 <link rel
="shortcut icon" href
="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
43 <?php
echo $OUTPUT->standard_head_html() ?
>
45 <body id
="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
46 <?php
echo $OUTPUT->standard_top_of_body_html() ?
>
50 <!-- START OF HEADER
-->
52 <?php
if ($hasheading ||
$hasnavbar ||
!empty($courseheader) ||
!empty($coursefooter)) { ?
>
53 <div id
="wrapper" class="clearfix">
56 <?php
if ($hasheading) { ?
>
57 <div id
="page-header">
58 <div id
="page-header-wrapper" class="clearfix">
59 <h1
class="headermain"><?php
echo $PAGE->heading ?
></h1
>
60 <div
class="headermenu">
62 echo $OUTPUT->login_info();
63 if (!empty($PAGE->layout_options
['langmenu'])) {
64 echo $OUTPUT->lang_menu();
66 echo $PAGE->headingmenu
;
73 <?php
if ($hascustommenu) { ?
>
74 <div id
="custommenu"><?php
echo $custommenu; ?
></div
>
77 <?php
if (!empty($courseheader)) { ?
>
78 <div id
="course-header"><?php
echo $courseheader; ?
></div
>
81 <?php
if ($hasnavbar) { ?
>
82 <div
class="navbar clearfix">
83 <div
class="breadcrumb"><?php
echo $OUTPUT->navbar(); ?
></div
>
84 <div
class="navbutton"> <?php
echo $PAGE->button
; ?
></div
>
88 <!-- END OF HEADER
-->
90 <!-- START OF CONTENT
-->
92 <div id
="page-content-wrapper" class="clearfix">
93 <div id
="page-content">
94 <div id
="region-main-box">
95 <div id
="region-post-box">
97 <div id
="region-main-wrap">
98 <div id
="region-main">
99 <div
class="region-content">
100 <?php
echo $coursecontentheader; ?
>
101 <?php
echo $OUTPUT->main_content() ?
>
102 <?php
echo $coursecontentfooter; ?
>
107 <?php
if ($hassidepre) { ?
>
108 <div id
="region-pre" class="block-region">
109 <div
class="region-content">
110 <?php
echo $OUTPUT->blocks_for_region('side-pre') ?
>
115 <?php
if ($hassidepost) { ?
>
116 <div id
="region-post" class="block-region">
117 <div
class="region-content">
118 <?php
echo $OUTPUT->blocks_for_region('side-post') ?
>
128 <!-- END OF CONTENT
-->
130 <!-- START OF FOOTER
-->
132 <?php
if (!empty($coursefooter)) { ?
>
133 <div id
="course-footer"><?php
echo $coursefooter; ?
></div
>
135 <?php
if ($hasfooter) { ?
>
136 <div id
="page-footer" class="clearfix">
137 <p
class="helplink"><?php
echo page_doc_link(get_string('moodledocslink')) ?
></p
>
139 echo $OUTPUT->login_info();
140 echo $OUTPUT->home_link();
141 echo $OUTPUT->standard_footer_html();
146 <?php
if ($hasheading ||
$hasnavbar ||
!empty($courseheader) ||
!empty($coursefooter)) { ?
>
147 </div
> <!-- END
#wrapper -->
150 </div
> <!-- END
#page -->
152 <?php
echo $OUTPUT->standard_end_of_body_html() ?
>