. /** * The default layout for the base theme. * * @package theme_base * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $hasheading = ($PAGE->heading); $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); $hasfooter = (empty($PAGE->layout_options['nofooter'])); $hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)); $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT)); $haslogininfo = (empty($PAGE->layout_options['nologininfo'])); $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT)); $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) { if (!right_to_left()) { $bodyclasses[] = 'side-pre-only'; }else{ $bodyclasses[] = 'side-post-only'; } } else if ($showsidepost && !$showsidepre) { if (!right_to_left()) { $bodyclasses[] = 'side-post-only'; }else{ $bodyclasses[] = 'side-pre-only'; } } else if (!$showsidepost && !$showsidepre) { $bodyclasses[] = 'content-only'; } if ($hascustommenu) { $bodyclasses[] = 'has_custom_menu'; } echo $OUTPUT->doctype() ?> htmlattributes() ?>> <?php echo $PAGE->title ?> standard_head_html() ?> standard_top_of_body_html() ?>
main_content() ?>
blocks_for_region('side-pre'); } elseif ($hassidepost) { echo $OUTPUT->blocks_for_region('side-post'); } ?>
blocks_for_region('side-post'); } elseif ($hassidepre) { echo $OUTPUT->blocks_for_region('side-pre'); } ?>
standard_end_of_body_html() ?>