mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch '44196-27' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
c14a54c230
8 changed files with 121 additions and 15 deletions
|
@ -73,7 +73,11 @@ Examples:
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fixes SVG images for IE9.
|
||||||
|
*
|
||||||
|
* @param string $file
|
||||||
|
*/
|
||||||
function theme_base_svgtool_ie9fix($file) {
|
function theme_base_svgtool_ie9fix($file) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
|
||||||
|
@ -106,6 +110,11 @@ function theme_base_svgtool_ie9fix($file) {
|
||||||
file_put_contents($file, $content);
|
file_put_contents($file, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes preserveAspectRatio attributes from SVG images.
|
||||||
|
*
|
||||||
|
* @param string $file
|
||||||
|
*/
|
||||||
function theme_base_svgtool_noaspectratio($file) {
|
function theme_base_svgtool_noaspectratio($file) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
|
||||||
|
@ -138,6 +147,14 @@ function theme_base_svgtool_noaspectratio($file) {
|
||||||
file_put_contents($file, $content);
|
file_put_contents($file, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively works through directories of this theme, finding and fixing SVG images.
|
||||||
|
*
|
||||||
|
* @param string $base
|
||||||
|
* @param string $sub
|
||||||
|
* @param string $filecallback
|
||||||
|
* @param array $blacklist
|
||||||
|
*/
|
||||||
function theme_base_recurse_svgs($base, $sub, $filecallback, $blacklist) {
|
function theme_base_recurse_svgs($base, $sub, $filecallback, $blacklist) {
|
||||||
if (is_dir("$base/$sub")) {
|
if (is_dir("$base/$sub")) {
|
||||||
$items = new DirectoryIterator("$base/$sub");
|
$items = new DirectoryIterator("$base/$sub");
|
||||||
|
|
|
@ -37,8 +37,8 @@ $THEME->name = 'base';
|
||||||
$THEME->parents = array();
|
$THEME->parents = array();
|
||||||
|
|
||||||
$THEME->sheets = array(
|
$THEME->sheets = array(
|
||||||
'pagelayout', /** Must come first: Page layout **/
|
'pagelayout', // Must come first: Page layout.
|
||||||
'core', /** Must come second: General styles **/
|
'core', // Must come second: General styles.
|
||||||
'admin',
|
'admin',
|
||||||
'blocks',
|
'blocks',
|
||||||
'calendar',
|
'calendar',
|
||||||
|
@ -54,18 +54,18 @@ $THEME->sheets = array(
|
||||||
$THEME->editor_sheets = array('editor');
|
$THEME->editor_sheets = array('editor');
|
||||||
|
|
||||||
$THEME->layouts = array(
|
$THEME->layouts = array(
|
||||||
// Most backwards compatible layout without the blocks - this is the layout used by default
|
// Most backwards compatible layout without the blocks - this is the layout used by default.
|
||||||
'base' => array(
|
'base' => array(
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array(),
|
'regions' => array(),
|
||||||
),
|
),
|
||||||
// Standard layout with blocks, this is recommended for most pages with general information
|
// Standard layout with blocks, this is recommended for most pages with general information.
|
||||||
'standard' => array(
|
'standard' => array(
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array('side-pre', 'side-post'),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
'defaultregion' => 'side-pre',
|
'defaultregion' => 'side-pre',
|
||||||
),
|
),
|
||||||
// Main course page
|
// Main course page.
|
||||||
'course' => array(
|
'course' => array(
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array('side-pre', 'side-post'),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
|
@ -77,7 +77,7 @@ $THEME->layouts = array(
|
||||||
'regions' => array('side-pre', 'side-post'),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
'defaultregion' => 'side-pre',
|
'defaultregion' => 'side-pre',
|
||||||
),
|
),
|
||||||
// part of course, typical for modules - default page layout if $cm specified in require_login()
|
// Part of course, typical for modules - default page layout if $cm specified in require_login().
|
||||||
'incourse' => array(
|
'incourse' => array(
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array('side-pre', 'side-post'),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
|
@ -95,14 +95,14 @@ $THEME->layouts = array(
|
||||||
'regions' => array('side-pre'),
|
'regions' => array('side-pre'),
|
||||||
'defaultregion' => 'side-pre',
|
'defaultregion' => 'side-pre',
|
||||||
),
|
),
|
||||||
// My dashboard page
|
// My dashboard page.
|
||||||
'mydashboard' => array(
|
'mydashboard' => array(
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array('side-pre', 'side-post'),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
'defaultregion' => 'side-pre',
|
'defaultregion' => 'side-pre',
|
||||||
'options' => array('langmenu'=>true),
|
'options' => array('langmenu'=>true),
|
||||||
),
|
),
|
||||||
// My public page
|
// My public page.
|
||||||
'mypublic' => array(
|
'mypublic' => array(
|
||||||
'file' => 'general.php',
|
'file' => 'general.php',
|
||||||
'regions' => array('side-pre', 'side-post'),
|
'regions' => array('side-pre', 'side-post'),
|
||||||
|
@ -126,7 +126,7 @@ $THEME->layouts = array(
|
||||||
'regions' => array(),
|
'regions' => array(),
|
||||||
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
|
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
|
||||||
),
|
),
|
||||||
// Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible
|
// Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
|
||||||
'embedded' => array(
|
'embedded' => array(
|
||||||
'file' => 'embedded.php',
|
'file' => 'embedded.php',
|
||||||
'regions' => array(),
|
'regions' => array(),
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?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
|
||||||
|
|
|
@ -1,4 +1,28 @@
|
||||||
<?php echo $OUTPUT->doctype() ?>
|
<?php
|
||||||
|
// This file is part of Moodle - http://moodle.org/
|
||||||
|
//
|
||||||
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The embedded 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
|
@ -1,4 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
// This file is part of Moodle - http://moodle.org/
|
||||||
|
//
|
||||||
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The frontpage 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
|
||||||
|
*/
|
||||||
|
|
||||||
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
|
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
|
||||||
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
|
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
|
||||||
|
|
|
@ -1,4 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
// This file is part of Moodle - http://moodle.org/
|
||||||
|
//
|
||||||
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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);
|
$hasheading = ($PAGE->heading);
|
||||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||||
|
|
|
@ -1,4 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
|
// This file is part of Moodle - http://moodle.org/
|
||||||
|
//
|
||||||
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The report 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);
|
$hasheading = ($PAGE->heading);
|
||||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die;
|
defined('MOODLE_INTERNAL') || die;
|
||||||
|
|
||||||
$plugin->version = 2013110500; // The current module version (Date: YYYYMMDDXX)
|
$plugin->version = 2013110500; // The current module version (Date: YYYYMMDDXX).
|
||||||
$plugin->requires = 2013110500; // Requires this Moodle version
|
$plugin->requires = 2013110500; // Requires this Moodle version.
|
||||||
$plugin->component = 'theme_base'; // Full name of the plugin (used for diagnostics)
|
$plugin->component = 'theme_base'; // Full name of the plugin (used for diagnostics).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue