3 $hasheading = ($PAGE->heading
);
4 $hasnavbar = (empty($PAGE->layout_options
['nonavbar']) && $PAGE->has_navbar());
5 $hasfooter = (empty($PAGE->layout_options
['nofooter']));
6 $hassidepre = $PAGE->blocks
->region_has_content('side-pre', $OUTPUT);
7 $hassidepost = $PAGE->blocks
->region_has_content('side-post', $OUTPUT);
9 $custommenu = $OUTPUT->custom_menu();
10 $hascustommenu = (empty($PAGE->layout_options
['nocustommenu']) && !empty($custommenu));
12 $courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
13 if (empty($PAGE->layout_options
['nocourseheaderfooter'])) {
14 $courseheader = $OUTPUT->course_header();
15 $coursecontentheader = $OUTPUT->course_content_header();
16 if (empty($PAGE->layout_options
['nocoursefooter'])) {
17 $coursecontentfooter = $OUTPUT->course_content_footer();
18 $coursefooter = $OUTPUT->course_footer();
22 $bodyclasses = array();
23 if ($hassidepre && !$hassidepost) {
24 $bodyclasses[] = 'side-pre-only';
25 } else if ($hassidepost && !$hassidepre) {
26 $bodyclasses[] = 'side-post-only';
27 } else if (!$hassidepost && !$hassidepre) {
28 $bodyclasses[] = 'content-only';
31 echo $OUTPUT->doctype() ?
>
32 <html
<?php
echo $OUTPUT->htmlattributes() ?
>>
34 <title
><?php
echo $PAGE->title ?
></title
>
35 <link rel
="shortcut icon" href
="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
36 <?php
echo $OUTPUT->standard_head_html() ?
>
38 <body id
="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
39 <?php
echo $OUTPUT->standard_top_of_body_html() ?
>
43 <?php
if ($hasheading ||
$hasnavbar) { ?
>
45 <div id
="page-header" class="clearfix">
46 <div id
="page-header-wrapper">
48 <?php
if ($hasheading) { ?
>
49 <h1
class="headermain"><?php
echo $PAGE->heading ?
></h1
>
50 <div
class="headermenu">
52 echo $OUTPUT->login_info();
53 if (!empty($PAGE->layout_options
['langmenu'])) {
54 echo $OUTPUT->lang_menu();
56 echo $PAGE->headingmenu
64 <?php
if ($hasheading) { ?
>
65 <?php
if ($hascustommenu) { ?
>
66 <div id
="custommenu"><?php
echo $custommenu; ?
></div
>
68 <ul id
="page-navigation" class="clearfix">
74 <?php
if (!empty($courseheader)) { ?
>
75 <div id
="course-header"><?php
echo $courseheader; ?
></div
>
78 <?php
if ($hasnavbar) { ?
>
79 <div
class="navbar clearfix">
80 <div
class="breadcrumb"><?php
echo $OUTPUT->navbar(); ?
></div
>
81 <div
class="navbutton"> <?php
echo $PAGE->button
; ?
></div
>
86 <!-- END OF HEADER
-->
88 <div id
="page-content-wrapper">
89 <div id
="page-content">
90 <div id
="region-main-box">
91 <div id
="region-post-box">
93 <div id
="region-main-wrap">
94 <div id
="region-main">
95 <div
class="region-content">
96 <?php
echo $coursecontentheader; ?
>
97 <?php
echo $OUTPUT->main_content() ?
>
98 <?php
echo $coursecontentfooter; ?
>
103 <?php
if ($hassidepre) { ?
>
104 <div id
="region-pre">
105 <div
class="region-content">
106 <?php
echo $OUTPUT->blocks_for_region('side-pre') ?
>
111 <?php
if ($hassidepost) { ?
>
112 <div id
="region-post">
113 <div
class="region-content">
114 <?php
echo $OUTPUT->blocks_for_region('side-post') ?
>
124 <?php
if (!empty($coursefooter)) { ?
>
125 <div id
="course-footer"><?php
echo $coursefooter; ?
></div
>
128 <!-- START OF FOOTER
-->
129 <?php
if ($hasfooter) { ?
>
130 <div id
="page-footer" class="clearfix">
131 <p
class="helplink"><?php
echo page_doc_link(get_string('moodledocslink')) ?
></p
>
133 echo $OUTPUT->login_info();
134 echo $OUTPUT->home_link();
135 echo $OUTPUT->standard_footer_html();
140 <?php
echo $OUTPUT->standard_end_of_body_html() ?
>