Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * classic config.
  19   *
  20   * @package   theme_classic
  21   * @copyright 2018 Bas Brands
  22   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  23   */
  24  
  25  // This line protects the file from being accessed by a URL directly.
  26  defined('MOODLE_INTERNAL') || die();
  27  
  28  $THEME->name = 'classic';
  29  
  30  $THEME->sheets = [];
  31  
  32  $THEME->layouts = [
  33      // Most backwards compatible layout without the blocks - this is the layout used by default.
  34      'base' => array(
  35          'file' => 'columns.php',
  36          'regions' => array(),
  37      ),
  38      // Standard layout with blocks, this is recommended for most pages with general information.
  39      'standard' => array(
  40          'file' => 'columns.php',
  41          'regions' => array('side-pre', 'side-post'),
  42          'defaultregion' => 'side-pre',
  43      ),
  44      // Main course page.
  45      'course' => array(
  46          'file' => 'columns.php',
  47          'regions' => array('side-pre', 'side-post'),
  48          'defaultregion' => 'side-pre',
  49          'options' => array('langmenu' => true),
  50      ),
  51      'coursecategory' => array(
  52          'file' => 'columns.php',
  53          'regions' => array('side-pre'),
  54          'defaultregion' => 'side-pre',
  55      ),
  56      // Part of course, typical for modules - default page layout if $cm specified in require_login().
  57      'incourse' => array(
  58          'file' => 'columns.php',
  59          'regions' => array('side-pre'),
  60          'defaultregion' => 'side-pre',
  61      ),
  62      // The site home page.
  63      'frontpage' => array(
  64          'file' => 'columns.php',
  65          'regions' => array('side-pre', 'side-post'),
  66          'defaultregion' => 'side-pre',
  67          'options' => array('nofullheader' => true),
  68      ),
  69      // Server administration scripts.
  70      'admin' => array(
  71          'file' => 'columns.php',
  72          'regions' => array('side-pre'),
  73          'defaultregion' => 'side-pre',
  74      ),
  75      // My dashboard page.
  76      'mydashboard' => array(
  77          'file' => 'columns.php',
  78          'regions' => array('side-pre', 'side-post'),
  79          'defaultregion' => 'side-pre',
  80          'options' => array('nonavbar' => true, 'langmenu' => true, 'nocontextheader' => true),
  81      ),
  82      // My public page.
  83      'mypublic' => array(
  84          'file' => 'columns.php',
  85          'regions' => array('side-pre'),
  86          'defaultregion' => 'side-pre',
  87      ),
  88      'login' => array(
  89          'theme' => 'boost',
  90          'file' => 'login.php',
  91          'regions' => array(),
  92          'options' => array('langmenu' => true),
  93      ),
  94  
  95      // Pages that appear in pop-up windows - no navigation, no blocks, no header.
  96      'popup' => array(
  97          'file' => 'contentonly.php',
  98          'regions' => array(),
  99          'options' => array('nofooter' => true, 'nonavbar' => true),
 100      ),
 101      // No blocks and minimal footer - used for legacy frame layouts only!
 102      'frametop' => array(
 103          'file' => 'contentonly.php',
 104          'regions' => array(),
 105          'options' => array('nofooter' => true, 'nocoursefooter' => true),
 106      ),
 107      // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
 108      'embedded' => array(
 109          'theme' => 'boost',
 110          'file' => 'embedded.php',
 111          'regions' => array()
 112      ),
 113      // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
 114      // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
 115      // Please be extremely careful if you are modifying this layout.
 116      'maintenance' => array(
 117          'theme' => 'boost',
 118          'file' => 'maintenance.php',
 119          'regions' => array(),
 120      ),
 121      // Should display the content and basic headers only.
 122      'print' => array(
 123          'file' => 'contentonly.php',
 124          'regions' => array(),
 125          'options' => array('nofooter' => true, 'nonavbar' => false),
 126      ),
 127      // The pagelayout used when a redirection is occuring.
 128      'redirect' => array(
 129          'theme' => 'boost',
 130          'file' => 'embedded.php',
 131          'regions' => array(),
 132      ),
 133      // The pagelayout used for reports.
 134      'report' => array(
 135          'file' => 'columns.php',
 136          'regions' => array('side-pre'),
 137          'defaultregion' => 'side-pre',
 138      ),
 139      // The pagelayout used for safebrowser and securewindow.
 140      'secure' => array(
 141          'file' => 'secure.php',
 142          'regions' => array('side-pre'),
 143          'defaultregion' => 'side-pre'
 144      )
 145  ];
 146  
 147  $THEME->editor_sheets = [];
 148  $THEME->parents = ['boost'];
 149  $THEME->enable_dock = false;
 150  $THEME->extrascsscallback = 'theme_classic_get_extra_scss';
 151  $THEME->prescsscallback = 'theme_classic_get_pre_scss';
 152  $THEME->precompiledcsscallback = 'theme_classic_get_precompiled_css';
 153  $THEME->yuicssmodules = array();
 154  $THEME->rendererfactory = 'theme_overridden_renderer_factory';
 155  $THEME->scss = function($theme) {
 156      return theme_classic_get_main_scss_content($theme);
 157  };
 158  $THEME->usefallback = true;
 159  $THEME->iconsystem = '\\theme_classic\\output\\icon_system_fontawesome';