Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-theme_boost_campus_child
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-theme_boost_campus_child
Commits
8064dc9e
Commit
8064dc9e
authored
7 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.md
+1
-0
1 addition, 0 deletions
CHANGES.md
lib.php
+3
-18
3 additions, 18 deletions
lib.php
with
4 additions
and
18 deletions
CHANGES.md
+
1
−
0
View file @
8064dc9e
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib.php
+
3
−
18
View file @
8064dc9e
...
@@ -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. */
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment