Merge branch 'MDL-43784-master' of git://github.com/FMCorz/moodle

Conflicts:
	lib/classes/plugin_manager.php
	lib/db/upgrade.php
This commit is contained in:
Sam Hemelryk 2014-03-26 11:33:15 +13:00
commit bfb6e97eae
742 changed files with 56 additions and 31842 deletions

View File

@ -909,7 +909,9 @@ class core_plugin_manager {
'qformat' => array('blackboard'),
'enrol' => array('authorize'),
'tool' => array('bloglevelupgrade'),
'theme' => array('mymobile'),
'theme' => array('mymobile', 'afterburner', 'anomaly', 'arialist', 'binarius', 'boxxie', 'brick', 'formal_white',
'formfactor', 'fusion', 'leatherbound', 'magazine', 'nimble', 'nonzero', 'overlay', 'serenity', 'sky_high',
'splash', 'standard', 'standardold'),
);
if (!isset($plugins[$type])) {
@ -1111,11 +1113,7 @@ class core_plugin_manager {
),
'theme' => array(
'afterburner', 'anomaly', 'arialist', 'base', 'binarius', 'bootstrapbase',
'boxxie', 'brick', 'canvas', 'clean', 'formal_white', 'formfactor',
'fusion', 'leatherbound', 'magazine', 'more', 'nimble',
'nonzero', 'overlay', 'serenity', 'sky_high', 'splash',
'standard', 'standardold'
'base', 'bootstrapbase', 'canvas', 'clean', 'more'
),
'tool' => array(

View File

@ -3280,5 +3280,49 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2014032000.01);
}
if ($oldversion < 2014032600.00) {
// Removing the themes from core.
$themes = array('afterburner', 'anomaly', 'arialist', 'binarius', 'boxxie', 'brick', 'formal_white', 'formfactor',
'fusion', 'leatherbound', 'magazine', 'nimble', 'nonzero', 'overlay', 'serenity', 'sky_high', 'splash',
'standard', 'standardold');
foreach ($themes as $key => $theme) {
if (check_dir_exists($CFG->dirroot . '/theme/' . $theme, false)) {
// Ignore the themes that have been re-downloaded.
unset($themes[$key]);
}
}
list($insql, $inparams) = $DB->get_in_or_equal($themes, SQL_PARAMS_NAMED);
// Replace the theme usage.
$DB->set_field_select('course', 'theme', 'clean', "theme $insql", $inparams);
$DB->set_field_select('course_categories', 'theme', 'clean', "theme $insql", $inparams);
$DB->set_field_select('user', 'theme', 'clean', "theme $insql", $inparams);
$DB->set_field_select('mnet_host', 'theme', 'clean', "theme $insql", $inparams);
// Replace the theme configs.
if (in_array(get_config('core', 'theme'), $themes)) {
set_config('theme', 'clean');
}
if (in_array(get_config('core', 'thememobile'), $themes)) {
set_config('thememobile', 'clean');
}
if (in_array(get_config('core', 'themelegacy'), $themes)) {
set_config('themelegacy', 'clean');
}
if (in_array(get_config('core', 'themetablet'), $themes)) {
set_config('themetablet', 'clean');
}
// Hacky emulation of plugin uninstallation.
foreach ($themes as $theme) {
unset_all_config_for_plugin('theme_' . $theme);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2014032600.00);
}
return true;
}

View File

@ -1261,7 +1261,7 @@ function disable_output_buffering() {
*/
function redirect_if_major_upgrade_required() {
global $CFG;
$lastmajordbchanges = 2014022600.00;
$lastmajordbchanges = 2014031900.00;
if (empty($CFG->version) or (float)$CFG->version < $lastmajordbchanges or
during_initial_install() or !empty($CFG->adminsetuppending)) {
try {

View File

@ -1,168 +0,0 @@
<?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/>.
/**
* Afterburner theme configuration.
*
* @package theme_afterburner
* @copyright 2011 Mary Evans
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$THEME->name = 'afterburner';
$THEME->parents = array('base');
$THEME->sheets = array(
'afterburner_pagelayout', // Must come first: page layout.
'afterburner_styles', // Must come second: default styles.
'afterburner_menu',
'afterburner_blocks',
'afterburner_mod',
'afterburner_calendar',
'afterburner_dock',
'afterburner_rtl',
'afterburner_responsive',
'afterburner_settings',
);
$THEME->parents_exclude_sheets = array(
'base' => array(
'pagelayout',
'dock'
),
);
$THEME->editor_sheets = array('editor');
$THEME->layouts = array(
// Most backwards compatible layout without the blocks - this is the layout used by default.
'base' => array(
'file' => 'default.php',
'regions' => array(),
),
// Standard layout with blocks, this is recommended for most pages with default information.
'standard' => array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
// Main course page.
'course' => array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'coursecategory' => array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
// part of course, typical for modules - default page layout if $cm specified in require_login().
'incourse' => array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
// The site home page.
'frontpage' => array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
// Server administration scripts.
'admin' => array(
'file' => 'default.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// My dashboard page.
'mydashboard' => array(
'file' => 'default.php',
'regions' => array('side-post'),
'defaultregion' => 'side-post',
'options' => array('langmenu'=>true),
),
// My public page.
'mypublic' => array(
'file' => 'default.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
'login' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('langmenu'=>true),
),
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologininfo'=>true, 'nocourseheaderfooter'=>true),
),
// No blocks and minimal footer - used for legacy frame layouts only!
'frametop' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
),
// Embedded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
'embedded' => array(
'file' => 'embedded.php',
'regions' => array()
),
// Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
// This must not have any blocks, and it is good idea if it does not have links to
// other places - for example there should not be a home link in the footer...
'maintenance' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'default.php',
'regions' => array(),
'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>false, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
'file' => 'embedded.php',
'regions' => array()
),
// The pagelayout used for reports.
'report' => array(
'file' => 'default.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// The pagelayout used for safebrowser and securewindow.
'secure' => array(
'file' => 'default.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nologinlinks'=>true, 'nocourseheaderfooter'=>true),
),
);
$THEME->enable_dock = true;
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
$THEME->csspostprocess = 'afterburner_process_css';

View File

@ -1,78 +0,0 @@
<?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/>.
/**
* Afterburner upgrades.
*
* @package theme_afterburner
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Upgrade steps for the Afterburner theme.
*
* @param int $oldversion
* @return bool
*/
function xmldb_theme_afterburner_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
$dbman = $DB->get_manager();
if ($oldversion < 2013041200) {
// Migrate logo URL.
$logo = get_config('theme_afterburner', 'logo');
if ($logo === '') {
// No logo means nothing to do.
} else if ($logo = clean_param($logo, PARAM_URL)) {
require_once("$CFG->libdir/filelib.php");
if ($content = download_file_content($logo)) {
$filename = preg_replace('/^.*\//', '', $logo);
if (!$filename = clean_param($filename, PARAM_FILE)) {
// Some name is better than no name...
$filename = 'logo.jpg';
}
$fs = get_file_storage();
$record = array(
'contextid' => context_system::instance()->id, 'component' => 'theme_afterburner',
'filearea' => 'logo', 'itemid'=>0, 'filepath'=>'/', 'filename'=>$filename);
$fs->create_file_from_string($record, $content);
set_config('logo', '/'.$filename, 'theme_afterburner');
unset($content);
} else {
unset_config('theme_afterburner', 'logo');
}
} else {
// Prompt for new logo, the old setting was invalid.
unset_config('theme_afterburner', 'logo');
}
upgrade_plugin_savepoint(true, 2013041200, 'theme', 'afterburner');
}
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}

View File

@ -1,60 +0,0 @@
<?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/>.
/**
* Strings for component 'theme_afterburner', language 'en'
*
* @package theme_afterburner
* @copyright 2011
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['configtitle'] = 'Afterburner Custom Settings';
$string['pluginname'] = 'Afterburner';
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['logo'] = 'Logo';
$string['logodesc'] = 'Please add your custom logo if you want to replace the default logo for this theme.<br />For your information, the default logo is a JPG image 320px (wide) by 75px (high)';
$string['footnote'] = 'Footnote';
$string['footnotedesc'] = 'Whatever you add to this textarea will be displayed in the footer of every page.';
$string['customcss'] = 'Custom CSS';
$string['customcssdesc'] = 'Whatever CSS rules you add to this textarea will be reflected in every page, making for easier customization of this theme.';
$string['choosereadme'] = '
<div class="clearfix">
<div class="theme_screenshot">
<h2>Afterburner</h2>
<img src="afterburner/pix/screenshot.jpg" />
<h3>Theme Discussion Forum:</h3>
<p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p>
<h3>Theme Credits</h3>
<p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
<h3>Theme Documentation:</h3>
<p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p><h3>Report a bug:</h3><p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p>
</div>
<div class="theme_description">
<h2>About</h2>
<p>Afterburner is a three-column, fluid-width theme coded for Moodle 2.0. It makes use of custom menus that appear below the site title on every page. An added function, which allows users to login and logout, has now been integrated into the custom menu for this theme.</p>
<h2>Parents</h2>
<p>This theme is built on Base, a parent theme included in the Moodle core. If you wish to modify aspects of this theme, beyond the settings offered, we advise creating a new theme using this theme and Base theme as parent themes, so any updates to these parent themes, in the core, will find their way into your new theme.</p>
<h2>Credits</h2>
<p>This design was originally created for Moodle 1.9 by Patrick Malley of NewSchool Learning (www.newschoollearning.com)from an original design by Rocket Themes (www.rockettheme.com) before being ported to Moodle 2.0 by Mary Evans of NewSchool Learning (contact@newschoollearning.com).</p>
<h2>License</h2>
<p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.</p>
</div>
</div>';

View File

@ -1,191 +0,0 @@
<?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 afterburner theme.
*
* @package theme_afterburner
* @copyright 2011 Mary Evans
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$hasheading = ($PAGE->heading);
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
$hasfooter = (empty($PAGE->layout_options['nofooter']));
$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));
$haslogininfo = (empty($PAGE->layout_options['nologininfo']));
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$hasfootnote = (!empty($PAGE->theme->settings->footnote));
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
$courseheader = $OUTPUT->course_header();
$coursecontentheader = $OUTPUT->course_content_header();
if (empty($PAGE->layout_options['nocoursefooter'])) {
$coursecontentfooter = $OUTPUT->course_content_footer();
$coursefooter = $OUTPUT->course_footer();
}
}
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
if (!right_to_left()) {
$bodyclasses[] = 'side-pre-only';
} else {
$bodyclasses[] = 'side-post-only';
}
} else if ($showsidepost && !$showsidepre) {
if (!right_to_left()) {
$bodyclasses[] = 'side-post-only';
} else {
$bodyclasses[] = 'side-pre-only';
}
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has_custom_menu';
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page-wrapper">
<div id="page">
<?php if ($hasheading) { ?>
<div id="page-header">
<a class="logo" href="<?php echo $CFG->wwwroot; ?>" title="<?php print_string('home'); ?>"></a>
<div class="headermenu"><?php
if ($haslogininfo) {
echo $OUTPUT->login_info();
}
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?></div>
</div>
<?php } ?>
<!-- END OF HEADER -->
<!-- START CUSTOMMENU AND NAVBAR -->
<div id="navcontainer">
<?php if ($hascustommenu) { ?>
<div id="custommenu" class="javascript-disabled"><?php echo $custommenu; ?></div>
<?php } ?>
</div>
<?php if (!empty($courseheader)) { ?>
<div id="course-header"><?php echo $courseheader; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
<!-- END OF CUSTOMMENU AND NAVBAR -->
<div id="page-content">
<div id="region-main-box">
<div id="region-pre-box">
<div id="region-main">
<div class="region-content">
<?php echo $coursecontentheader; ?>
<?php echo $OUTPUT->main_content() ?>
<?php echo $coursecontentfooter; ?>
</div>
</div>
<?php if ($hassidepre OR (right_to_left() AND $hassidepost)) { ?>
<div id="region-pre" class="block-region">
<div class="region-content">
<?php
if (!right_to_left()) {
echo $OUTPUT->blocks_for_region('side-pre');
} elseif ($hassidepost) {
echo $OUTPUT->blocks_for_region('side-post');
} ?>
</div>
</div>
<?php } ?>
<?php if ($hassidepost OR (right_to_left() AND $hassidepre)) { ?>
<div id="region-post" class="block-region">
<div class="region-content">
<?php
if (!right_to_left()) {
echo $OUTPUT->blocks_for_region('side-post');
} elseif ($hassidepre) {
echo $OUTPUT->blocks_for_region('side-pre');
} ?>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<!-- START OF FOOTER -->
<?php if (!empty($coursefooter)) { ?>
<div id="course-footer"><?php echo $coursefooter; ?></div>
<?php } ?>
<?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix">
<div class="footer-left">
<?php if ($hasfootnote) { ?>
<div id="footnote"><?php echo $PAGE->theme->settings->footnote;?></div>
<?php } ?>
<a href="http://moodle.org" title="Moodle">
<img src="<?php echo $OUTPUT->pix_url('footer/moodle-logo','theme')?>" alt="Moodle logo" />
</a>
</div>
<div class="footer-right">
<?php echo $OUTPUT->login_info();?>
</div>
<?php echo $OUTPUT->standard_footer_html(); ?>
</div>
<?php } ?>
<div class="clearfix"></div>
</div>
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>

View File

@ -1,49 +0,0 @@
<?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.
*
* This layout is used for content that is embedded within an existing Moodle page.
*
* @package theme_afterburner
* @copyright 2011 Mary Evans
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses) ?>">
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page">
<!-- END OF HEADER -->
<div id="content" class="clearfix">
<?php echo $OUTPUT->main_content() ?>
</div>
<!-- START OF FOOTER -->
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>

View File

@ -1,109 +0,0 @@
<?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/>.
/**
* This file contains functions specific to the needs of the afterburner theme.
*
* @package theme_afterburner
* @copyright 2011 Mary Evans
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Processes CSS for the afterburner theme before it is cached and delivered.
*
* This function performs any customisations on the CSS that this theme requires.
* This includes setting the theme logo, and including any custom CSS.
*
* @param string $css The raw CSS.
* @param theme_config $theme
* @return string The now processed CSS.
*/
function afterburner_process_css($css, $theme) {
// Set the background image for the logo.
$logo = $theme->setting_file_url('logo', 'logo');
$css = afterburner_set_logo($css, $logo, $theme);
// Set custom CSS.
if (!empty($theme->settings->customcss)) {
$customcss = $theme->settings->customcss;
} else {
$customcss = null;
}
$css = afterburner_set_customcss($css, $customcss);
return $css;
}
/**
* Adds the set logo to the CSS before it is cached and delivered.
*
* @param string $css
* @param string $logo
* @param theme_config $theme
* @return string
*/
function afterburner_set_logo($css, $logo, $theme) {
$tag = '[[setting:logo]]';
$replacement = $logo;
if (is_null($replacement)) {
$replacement = $theme->pix_url('images/logo', 'theme');
}
$css = str_replace($tag, $replacement, $css);
return $css;
}
/**
* Adds any custom CSS the admin has set to the CSS file before it is cached and delivered.
* @param string $css
* @param string $customcss
* @return string
*/
function afterburner_set_customcss($css, $customcss) {
$tag = '[[setting:customcss]]';
$replacement = $customcss;
if (is_null($replacement)) {
$replacement = '';
}
$css = str_replace($tag, $replacement, $css);
return $css;
}
/**
* Serves any theme associated files when they are requested.
*
* @param stdClass $course
* @param cm_info $cm
* @param context $context
* @param string $filearea
* @param array $args
* @param bool $forcedownload
* @param array $options
* @return bool
*/
function theme_afterburner_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
if ($context->contextlevel == CONTEXT_SYSTEM and $filearea === 'logo') {
$theme = theme_config::load('afterburner');
return $theme->setting_file_serve('logo', $args, $forcedownload, $options);
} else {
send_file_not_found();
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

Some files were not shown because too many files have changed in this diff Show More