Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400]

   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', 'side-post'),
  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 courses page.
  76      'mycourses' => array(
  77          'file' => 'columns.php',
  78          'regions' => ['side-pre', 'side-post'],
  79          'defaultregion' => 'side-pre',
  80      ),
  81      // My dashboard page.
  82      'mydashboard' => array(
  83          'file' => 'columns.php',
  84          'regions' => array('side-pre', 'side-post'),
  85          'defaultregion' => 'side-pre',
  86          'options' => array('langmenu' => true),
  87      ),
  88      // My public page.
  89      'mypublic' => array(
  90          'file' => 'columns.php',
  91          'regions' => array('side-pre'),
  92          'defaultregion' => 'side-pre',
  93      ),
  94      'login' => array(
  95          'theme' => 'boost',
  96          'file' => 'login.php',
  97          'regions' => array(),
  98          'options' => array('langmenu' => true),
  99      ),
 100  
 101      // Pages that appear in pop-up windows - no navigation, no blocks, no header.
 102      'popup' => array(
 103          'file' => 'contentonly.php',
 104          'regions' => array(),
 105          'options' => array(
 106              'nofooter' => true,
 107              'nonavbar' => true,
 108              'activityheader' => [
 109                  'notitle' => true,
 110                  'nocompletion' => true,
 111                  'nodescription' => true
 112              ]
 113          ),
 114      ),
 115      // No blocks and minimal footer - used for legacy frame layouts only!
 116      'frametop' => array(
 117          'file' => 'contentonly.php',
 118          'regions' => array(),
 119          'options' => array(
 120              'nofooter' => true,
 121              'nocoursefooter' => true,
 122              'activityheader' => [
 123                  'nocompletion' => true
 124              ]),
 125      ),
 126      // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
 127      'embedded' => array(
 128          'theme' => 'boost',
 129          'file' => 'embedded.php',
 130          'regions' => array()
 131      ),
 132      // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
 133      // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
 134      // Please be extremely careful if you are modifying this layout.
 135      'maintenance' => array(
 136          'theme' => 'boost',
 137          'file' => 'maintenance.php',
 138          'regions' => array(),
 139      ),
 140      // Should display the content and basic headers only.
 141      'print' => array(
 142          'file' => 'contentonly.php',
 143          'regions' => array(),
 144          'options' => array('nofooter' => true, 'nonavbar' => false, 'noactivityheader' => true),
 145      ),
 146      // The pagelayout used when a redirection is occuring.
 147      'redirect' => array(
 148          'theme' => 'boost',
 149          'file' => 'embedded.php',
 150          'regions' => array(),
 151      ),
 152      // The pagelayout used for reports.
 153      'report' => array(
 154          'file' => 'columns.php',
 155          'regions' => array('side-pre'),
 156          'defaultregion' => 'side-pre',
 157      ),
 158      // The pagelayout used for safebrowser and securewindow.
 159      'secure' => array(
 160          'file' => 'secure.php',
 161          'regions' => array('side-pre'),
 162          'defaultregion' => 'side-pre'
 163      )
 164  ];
 165  
 166  $THEME->editor_sheets = [];
 167  $THEME->parents = ['boost'];
 168  $THEME->enable_dock = false;
 169  $THEME->extrascsscallback = 'theme_classic_get_extra_scss';
 170  $THEME->prescsscallback = 'theme_classic_get_pre_scss';
 171  $THEME->precompiledcsscallback = 'theme_classic_get_precompiled_css';
 172  $THEME->yuicssmodules = array();
 173  $THEME->rendererfactory = 'theme_overridden_renderer_factory';
 174  $THEME->scss = function($theme) {
 175      return theme_classic_get_main_scss_content($theme);
 176  };
 177  $THEME->usefallback = true;
 178  $THEME->iconsystem = '\\theme_classic\\output\\icon_system_fontawesome';
 179  $THEME->haseditswitch = false;