F:\moodledev\moodle25\moodle\theme\bootstrapbase\layout\general.php F:\moodledev\moodle25\moodle\theme\clean\layout\general.php
<?php <?php
// This file is part of Moodle - http://moodle.org/ // This file is part of Moodle - http://moodle.org/
// //
// Moodle is free software: you can redistribute it and/or modify // Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// Moodle is distributed in the hope that it will be useful, // Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>. // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
   
  /**
  * Moodle's Simple theme, an example of how to make a Bootstrap theme
  *
  * DO NOT MODIFY THIS THEME!
  * COPY IT FIRST, THEN RENAME THE COPY AND MODIFY IT INSTEAD.
  *
  * For full information about creating Moodle themes, see:
  * http://docs.moodle.org/dev/Themes_2.0
  *
  * @package   theme_simple
  * @copyright 2013 Moodle, moodle.org
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */ 
   
$hasheading = ($PAGE->heading); $hasheading = ($PAGE->heading);
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
$hasfooter = (empty($PAGE->layout_options['nofooter'])); $hasfooter = (empty($PAGE->layout_options['nofooter']));
$hasheader = (empty($PAGE->layout_options['noheader'])); $hasheader = (empty($PAGE->layout_options['noheader']));
   
$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT)); $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)); $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
   
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT)); $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT)); $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
   
  $haslogo = (!empty($PAGE->theme->settings->logo));
   
  $hasfootnote = (!empty($PAGE->theme->settings->footnote));
  $navbar_inverse = '';
  if (!empty($PAGE->theme->settings->invert)) {
     $navbar_inverse = 'navbar-inverse';
  }
$custommenu = $OUTPUT->custom_menu(); $custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
   
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = ''; $courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
   
if (empty($PAGE->layout_options['nocourseheaderfooter'])) { if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
   $courseheader = $OUTPUT->course_header();    $courseheader = $OUTPUT->course_header();
   $coursecontentheader = $OUTPUT->course_content_header();    $coursecontentheader = $OUTPUT->course_content_header();
   if (empty($PAGE->layout_options['nocoursefooter'])) {    if (empty($PAGE->layout_options['nocoursefooter'])) {
       $coursecontentfooter = $OUTPUT->course_content_footer();        $coursecontentfooter = $OUTPUT->course_content_footer();
       $coursefooter = $OUTPUT->course_footer();        $coursefooter = $OUTPUT->course_footer();
   }    }
} }
   
$layout = 'pre-and-post'; $layout = 'pre-and-post';
if ($showsidepre && !$showsidepost) { if ($showsidepre && !$showsidepost) {
   if (!right_to_left()) {    if (!right_to_left()) {
       $layout = 'side-pre-only';        $layout = 'side-pre-only';
   } else {    } else {
       $layout = 'side-post-only';        $layout = 'side-post-only';
   }    }
} else if ($showsidepost && !$showsidepre) { } else if ($showsidepost && !$showsidepre) {
   if (!right_to_left()) {    if (!right_to_left()) {
       $layout = 'side-post-only';        $layout = 'side-post-only';
   } else {    } else {
       $layout = 'side-pre-only';        $layout = 'side-pre-only';
   }    }
} else if (!$showsidepost && !$showsidepre) { } else if (!$showsidepost && !$showsidepre) {
   $layout = 'content-only';    $layout = 'content-only';
} }
$bodyclasses[] = $layout; $bodyclasses[] = $layout;
   
echo $OUTPUT->doctype() ?>  echo $OUTPUT->doctype() ?> 
<html <?php echo $OUTPUT->htmlattributes() ?>> <html <?php echo $OUTPUT->htmlattributes() ?>>
<head> <head>
   <title><?php echo $PAGE->title ?></title>    <title><?php echo $PAGE->title ?></title>
   <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
   <?php echo $OUTPUT->standard_head_html() ?>     <?php echo $OUTPUT->standard_head_html() ?> 
   <meta name="viewport" content="width=device-width, initial-scale=1.0">    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> </head>
   
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join($bodyclasses)) ?>"> <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join($bodyclasses)) ?>">
   
<?php echo $OUTPUT->standard_top_of_body_html() ?>  <?php echo $OUTPUT->standard_top_of_body_html() ?> 
   
<header role="banner" class="navbar navbar-fixed-top"> <header role="banner" class="navbar <?php echo $navbar_inverse ?> navbar-fixed-top">
   <nav role="navigation" class="navbar-inner">    <nav role="navigation" class="navbar-inner">
       <div class="container-fluid">        <div class="container-fluid">
           <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>            <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->shortname; ?></a>
           <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">            <a class="btn btn-navbar" data-toggle="workaround-collapse" data-target=".nav-collapse">
               <span class="icon-bar"></span>                <span class="icon-bar"></span>
               <span class="icon-bar"></span>                <span class="icon-bar"></span>
               <span class="icon-bar"></span>                <span class="icon-bar"></span>
           </a>            </a>
           <div class="nav-collapse collapse">            <div class="nav-collapse collapse">
           <?php if ($hascustommenu) {            <?php if ($hascustommenu) {
               echo $custommenu;                echo $custommenu;
           } ?>             } ?> 
           <ul class="nav pull-right">            <ul class="nav pull-right">
           <li><?php echo $PAGE->headingmenu ?></li>            <li><?php echo $PAGE->headingmenu ?></li>
           <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>            <li class="navbar-text"><?php echo $OUTPUT->login_info() ?></li>
           </ul>            </ul>
           </div>            </div>
       </div>        </div>
   </nav>    </nav>
</header> </header>
   
<div id="page" class="container-fluid"> <div id="page" class="container-fluid">
   
<?php if ($hasheader) { ?>  <?php if ($hasheader) { ?> 
<header id="page-header" class="clearfix"> <header id="page-header" class="clearfix">
   <?php if ($hasnavbar) { ?>     <?php if ($hasnavbar) { ?> 
       <nav class="breadcrumb-button"><?php echo $PAGE->button; ?></nav>        <nav class="breadcrumb-button"><?php echo $PAGE->button; ?></nav>
       <?php echo $OUTPUT->navbar(); ?>         <?php echo $OUTPUT->navbar(); ?> 
   <?php } ?>     <?php } ?> 
   
         <?php
     if (!$haslogo) { ?> 
   <h1><?php echo $PAGE->heading ?></h1>        <h1><?php echo $PAGE->heading ?></h1>
         <?php
     } else { ?> 
          <a class="logo" href="<?php echo $CFG->wwwroot; ?>" title="<?php print_string('home'); ?>"></a>
         <?php
     } ?> 
   
   <?php if (!empty($courseheader)) { ?>     <?php if (!empty($courseheader)) { ?> 
       <div id="course-header"><?php echo $courseheader; ?></div>        <div id="course-header"><?php echo $courseheader; ?></div>
   <?php } ?>     <?php } ?> 
</header> </header>
<?php } ?>  <?php } ?> 
   
<div id="page-content" class="row-fluid"> <div id="page-content" class="row-fluid">
   
<?php if ($layout === 'pre-and-post') { ?>  <?php if ($layout === 'pre-and-post') { ?> 
   <div id="region-bs-main-and-pre" class="span9">    <div id="region-bs-main-and-pre" class="span9">
   <div class="row-fluid">    <div class="row-fluid">
   <section id="region-main" class="span8 pull-right">    <section id="region-main" class="span8 pull-right">
<?php } else if ($layout === 'side-post-only') { ?>  <?php } else if ($layout === 'side-post-only') { ?> 
   <section id="region-main" class="span9">    <section id="region-main" class="span9">
<?php } else if ($layout === 'side-pre-only') { ?>  <?php } else if ($layout === 'side-pre-only') { ?> 
   <section id="region-main" class="span9 pull-right">    <section id="region-main" class="span9 pull-right">
<?php } else if ($layout === 'content-only') { ?>  <?php } else if ($layout === 'content-only') { ?> 
   <section id="region-main" class="span12">    <section id="region-main" class="span12">
<?php } ?>  <?php } ?> 
   
   
   <?php echo $coursecontentheader; ?>     <?php echo $coursecontentheader; ?> 
   <?php echo $OUTPUT->main_content() ?>     <?php echo $OUTPUT->main_content() ?> 
   <?php echo $coursecontentfooter; ?>     <?php echo $coursecontentfooter; ?> 
   </section>    </section>
   
   
<?php if ($layout !== 'content-only') { <?php if ($layout !== 'content-only') {
         if ($layout === 'pre-and-post') { ?>           if ($layout === 'pre-and-post') { ?> 
           <aside class="span4 desktop-first-column">            <aside class="span4 desktop-first-column">
   <?php } else if ($layout === 'side-pre-only') { ?>     <?php } else if ($layout === 'side-pre-only') { ?> 
           <aside class="span3 desktop-first-column">            <aside class="span3 desktop-first-column">
   <?php } ?>     <?php } ?> 
         <div id="region-pre" class="block-region">          <div id="region-pre" class="block-region">
         <div class="region-content">          <div class="region-content">
         <?php          <?php
               if (!right_to_left()) {                if (!right_to_left()) {
                   echo $OUTPUT->blocks_for_region('side-pre');                    echo $OUTPUT->blocks_for_region('side-pre');
               } else if ($hassidepost) {                } else if ($hassidepost) {
                   echo $OUTPUT->blocks_for_region('side-post');                    echo $OUTPUT->blocks_for_region('side-post');
               } ?>                 } 
           ?> 
         </div>          </div>
         </div>          </div>
         </aside>          </aside>
   <?php if ($layout === 'pre-and-post') {    <?php if ($layout === 'pre-and-post') {
         ?></div></div><?php // Close row-fluid and span9.          ?></div></div><?php // Close row-fluid and span9.
  }   }
   
   if ($layout === 'side-post-only' OR $layout === 'pre-and-post') { ?>     if ($layout === 'side-post-only' OR $layout === 'pre-and-post') { ?> 
       <aside class="span3">        <aside class="span3">
       <div id="region-post" class="block-region">        <div id="region-post" class="block-region">
       <div class="region-content">        <div class="region-content">
       <?php if (!right_to_left()) {        <?php if (!right_to_left()) {
                 echo $OUTPUT->blocks_for_region('side-post');                  echo $OUTPUT->blocks_for_region('side-post');
             } else {              } else {
                 echo $OUTPUT->blocks_for_region('side-pre');                  echo $OUTPUT->blocks_for_region('side-pre');
             } ?>               } ?> 
       </div>        </div>
       </div>        </div>
       </aside>        </aside>
   <?php } ?>     <?php } ?> 
<?php } ?>  <?php } ?> 
</div> </div>
   
<footer id="page-footer"> <footer id="page-footer">
   <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>    <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
   
     <?php
  if ($hasfootnote) { ?> 
    <div class="footnote text-center">
    <?php echo $PAGE->theme->settings->footnote; ?> 
    </div>
     <?php
  } ?> 
   
   <?php echo $OUTPUT->standard_footer_html(); ?>     <?php echo $OUTPUT->standard_footer_html(); ?> 
</footer> </footer>
   
<?php echo $OUTPUT->standard_end_of_body_html() ?>  <?php echo $OUTPUT->standard_end_of_body_html() ?> 
   
</div> </div>
</body> </body>
</html> </html>