Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401]

   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   * Moodle Generic plain page
  19   *
  20   * This is used for various pages, usually errors, early in the Moodle
  21   * bootstrap. It can be safetly customized by editing this file directly
  22   * but it MUST NOT contain any Moodle resources such as theme files generated
  23   * by php, it can only contain references to static css and images, and as a
  24   * precaution its recommended that everything is inlined rather than
  25   * references. This is why this file is located here as it cannot be inside
  26   * a Moodle theme.
  27   *
  28   * @package    core
  29   * @copyright  2020 Brendan Heywood <brendan@catalyst-au.net>
  30   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  31   */
  32  
  33  // phpcs:ignoreFile
  34  ?>
  35  <!DOCTYPE html>
  36  <html <?php echo $htmllang ?>>
  37      <head>
  38          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  39          <?php echo $meta ?>
  40          <title><?php echo $title ?></title>
  41          <style>
  42  <?php
  43  // This is a very small modified subset of the bootstrap / boost css classes.
  44  ?>
  45  body {
  46      margin: 0;
  47      font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  48      font-size: .9375rem;
  49      font-weight: 400;
  50      line-height: 1.5;
  51      color: #343a40;
  52      text-align: left;
  53      background-color: #f2f2f2;
  54  }
  55  #page {
  56      margin-top: 15px;
  57      background: white;
  58      max-width: 600px;
  59      margin: 0 auto;
  60      padding: 15px;
  61  }
  62  #region-main {
  63      margin: 0 auto;
  64      border: 1px solid rgba(0,0,0,.125);
  65      padding: 1rem 1.25rem 1.25rem;
  66      background-color: #fff;
  67  }
  68  h1 {
  69      font-size: 2.34rem;
  70      margin: 0 0 .5rem;
  71      font-weight: 300;
  72      line-height: 1.2;
  73  }
  74  .alert-danger {
  75      color: #6e211e;
  76      background-color: #f6d9d8;
  77      border-color: #f3c9c8;
  78      padding: .75rem 1.25rem;
  79  }
  80      </style>
  81      </head>
  82      <body>
  83          <div id="page">
  84              <div id="region-main">
  85                  <h1><?php echo $title ?></h1>
  86                  <?php echo $content ?>
  87                  <?php echo $footer ?>
  88              </div>
  89          </div>
  90      </body>
  91  </html>
  92