Skip to content
Snippets Groups Projects
Commit 8064dc9e authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Changed the get_extra_scss functionality due to parent theme changes.

parent 50a5abd2
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ Changes ...@@ -6,6 +6,7 @@ Changes
### Unreleased ### Unreleased
* 2018-02-20 - Changed the get_extra_scss functionality due to parent theme changes.
* 2018-02-19 - Check compatibility for Moodle 3.4, no functionality change. * 2018-02-19 - Check compatibility for Moodle 3.4, no functionality change.
### v3.3-r1 ### v3.3-r1
......
...@@ -26,29 +26,14 @@ defined('MOODLE_INTERNAL') || die(); ...@@ -26,29 +26,14 @@ defined('MOODLE_INTERNAL') || die();
/** /**
* Inject additional SCSS. * Inject additional SCSS.
* This function needs to be implemented because we take most settings from the parent theme boost_campus.
* *
* @param theme_config $theme The theme config object. * @param theme_config $theme The theme config object.
* @return string * @return string
*/ */
function theme_boost_campus_child_get_extra_scss($theme) { function theme_boost_campus_child_get_extra_scss($theme) {
// MODIFICATION START: Add the variables from the theme Boost Campus settings.
// We need to work with stdclass here because the function expects the parameter to have a certain data structure.
// We rebuild this data structure here.
$boostcampusconfig = new stdclass();
// Get the config.
$boostcampusconfig->settings = get_config('theme_boost_campus');
// Get the pre scss from the parent theme Boost Campus.
$boostcampusrawscss = theme_boost_get_extra_scss($boostcampusconfig);
if (!empty($theme->settings->scss) || !empty($boostcampusrawscss)) {
// Return the Raw SCSS from Boost Campus and Boost Campus Child. // Return the Raw SCSS from Boost Campus and Boost Campus Child.
return $boostcampusrawscss . $theme->settings->scss; return theme_boost_campus_get_extra_scss(theme_config::load('boost_campus')) . $theme->settings->scss;
} else {
return '';
}
// MODIFICATION END.
/* ORIGINAL START.
return !empty($theme->settings->scss) ? $theme->settings->scss : '';
ORIGINAL END. */
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment