Skip to content

Commit c91c5bb

Browse files
committed
Merge branch 'main' of github.com:moodle-an-hochschulen/moodle-theme_boost_union into css_snippets
2 parents 9cd3c83 + 66c24ba commit c91c5bb

File tree

82 files changed

+6238
-1093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+6238
-1093
lines changed

CHANGES.md

+32-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@ Changes
88

99
* 2024-09-04 - Feature: Add first version of CSS snippets feature, credits go to all members of the MoodleMootDACH dev camp team 22.
1010

11+
### v4.5-r5
12+
13+
* 2024-12-31 - Child theme support: Fully replicate Boost Union's extra SCSS if a Boost Union Child theme is the current theme, resolves #718, resolves theme_boost_union_child/#5.
14+
* 2024-12-31 - Bugfix / Child theme support: The theme_boost_union_get_pre_scss() and theme_boost_union_get_extra_scss() function used $theme->settings although they should not do that anymore, resolves #791
15+
* 2024-12-31 - Tests: Increase the test coverage for the background image setting, helps to resolve theme_boost_union_child/#5
16+
* 2024-12-31 - Bugfix: In flavours, not setting the brand color / bootstrap colors in a flavour did not result in the global brand color / bootstrap colors being served properly, resolves #790.
17+
* 2024-12-30 - Improvement: Add more flavour settings (Activity icon colors, navbar color, background image position), resolves #789.
18+
* 2024-12-25 - Documentation: Explain the SCSS stack order in the README.
19+
* 2024-12-25 - Bugfix: Fix the order in which all the pre SCSS assets are added to the SCSS stack, resolves #788.
20+
* 2024-12-22 - Feature: Allow overwriting of brand colors and the usage of SCSS (instead of pure CSS) in flavours, resolves #155.
21+
Child theme support: If you are running a Boost Union Child theme, please make sure to adapt your child theme to our latest boilerplate.
22+
* 2024-12-15 - Feature: Add declaration of accessibility page and accessibility support page, resolves #567.
23+
24+
### v4.5-r4
25+
26+
* 2024-12-06 - Tests: Add several Behat optimisations to bring down the test suite run time, resolves #765.
27+
* 2024-12-06 - Upstream change: Adopt changes from MDL-83759 ('System notification navbar popover is misplaced in Moodle 4.4 and 4.5')
28+
* 2024-12-06 - Upstream change: Adopt changes from MDL-75610 ('Quiz activity name no longer being displayed in quiz landing page when using Safe Exam Browser'), resolves #766.
29+
30+
### v4.5-r3
31+
32+
* 2024-11-19 - Bugfix: The starred courses popover showed a JavaScript error in the browser JS console, resolves #759.
33+
* 2024-11-19 - Bugfix: The starred courses popover in the navbar must only be shown if Boost Union or Boost Union child is active, resolves #759.
34+
* 2024-11-18 - Improvement: Add the possibility to restrict smart menus and smart menu items to site admins and non-site admins only, resolves #421.
35+
* 2024-11-18 - Bugfix: Footer displacement on pages with minimal content, resolves #655.
36+
* 2024-11-18 - Upstream change: Adopt changes from MDL-77732 ('Custom menu items do not receive active behaviour'), resolves #436 #620 #384 #715.
37+
* 2024-11-13 - Upstream change: Adopt changes from MDL-78999 ('Site logo does not appear in mobile view'), resolves #753.
38+
* 2024-11-11 - Release: Add ssystems GmbH to the list of maintainers in README.md.
39+
1140
### v4.5-r2
1241

1342
* 2024-10-31 - Bugfix: Fix possible site failure when a cohort or role used as restriction of a smart menu item is deleted, resolves #737.
@@ -78,7 +107,7 @@ Changes
78107
* 2024-07-04 - Upgrade: Fix Behat tests which broke due to the introduction of section pages in Moodle core.
79108
* 2024-07-04 - Upgrade: Adopt changes in boostnavbar.php from Boost core.
80109
* 2024-07-04 - Upgrade: Fix Behat tests which broke due to changes in the section naming in Moodle core.
81-
* 2024-07-04 - Upgrade: Adapt a Behat test as planned regarding the new theme selector in Moodle core.
110+
* 2024-07-04 - Upgrade: Adapt a Behat test as planned regarding the new theme selector in Moodle core.
82111
* 2024-07-04 - Upgrade: Fix Behat tests which broke due to changes on the MyCourses page in Moodle core.
83112
* 2024-06-25 - Upgrade: Adopt and handle core changes for the footersuppressstandardfooter_* settings, moving from callback functions to hooks.
84113
* 2024-06-19 - Upgrade: Adopt changes in event-list-item.mustache from block_timeline in core.
@@ -87,15 +116,15 @@ Changes
87116
* 2024-06-19 - Upgrade: Adopt changes in navbar.mustache from Boost core.
88117
* 2024-06-01 - Prepare compatibility for Moodle 4.4.
89118

90-
### v4.3-r15
119+
### v4.3-r15
91120

92121
* 2024-07-11 - Bugfix: Allow external SCSS to use SCSS variables by disabling the SCSS validation, resolves #683.
93122
* 2024-06-23 - Upstream change: Adopt change in view-chards.mustache from MDL-70829.
94123
* 2024-06-18 - Release: Let codechecker ignore some sniffs in the language pack.
95124
* 2024-06-13 - Cleanup: Change @codingStandardsIgnore tags to phpcs:disable, resolves #676.
96125
* 2024-06-12 - Cleanup: Fix CSS warnings in external SCSS tests, resolves #674.
97126

98-
### v4.3-r14
127+
### v4.3-r14
99128

100129
* 2024-06-10 - Cleanup: Introduce a dedicated Behat step to deactivate and activate debugging, resolves #670.
101130
* 2024-05-05 - Cleanup: Fix 'Implicitly marking a parameter as nullable is deprecated since PHP 8.4' codechecker warning, resolves #667.

README.md

+77-2
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,18 @@ With these settings, you can add rich text content which will be shown on a gene
559559

560560
With these settings, you can add rich text content which will be shown on a generic page 3.
561561

562+
#### Tab "Accessibility"
563+
564+
In this tab there are the following settings:
565+
566+
#### Declaration of accessibility
567+
568+
With these settings, you can add rich text content which will be shown on a declaration of accessibility page.
569+
570+
#### Accessibility support page
571+
572+
With these settings, you can enable the accessibility support page which provides a contact form for accessibility issues.
573+
562574
#### Tab "Information banners"
563575

564576
In this tab, you can enable and configure multiple information banners to be shown on selected pages.
@@ -730,6 +742,63 @@ https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_child
730742
While Boost Union Child will surely help you to realize all your local Boost Union dreams, please do yourself and the whole community a favour and verify that your planned features are indeed not interesting as a pull request or feature request for the whole Boost Union community and could be contributed to Boost Union directly instead.
731743

732744

745+
SCSS stack order
746+
----------------
747+
748+
Within Boost Union, you have multiple possibilities to add your own SCSS code to the Moodle page. And many of the Boost Union settings add SCSS code as well to realize the particular setting's goal. However, as you know, in SCSS the order of the instructions is key.
749+
750+
The following list should give you an insight in which order all the SCSS code is added to the CSS stack which is shipped to the browser in the end.
751+
To fully understand this list, you have to be aware of two terms in Moodle theming:
752+
753+
* _Pre SCSS_ or _Raw Initial SCSS_:\
754+
This SCSS code is used only to initialize SCSS variables and not to write real SCSS code directly.
755+
* _Post SCSS_ or _Raw SCSS_:\
756+
This SCSS code is the real SCSS code which is compiled to CSS for the browser and which might consume the SCSS variables which have been set in the Pre SCSS.
757+
758+
Having said that, here's the order how all the SCSS code is added to the SCSS stack:
759+
760+
1. All plugins' `styles.css` files:\
761+
Each Moodle plugin can ship with a `styles.css` file which contains CSS code (not SCSS code!) for the plugin. These files are added at the very beginning in the order of the plugin names and types.
762+
763+
2. `theme_boost` > `get_pre_scss()`:
764+
* Adds the Boost Union Pre SCSS from the theme settings\
765+
(which is set on `/admin/settings.php?section=theme_boost_union_look#theme_boost_union_look_scss`).\
766+
Note: In fact, this function adds the _active theme's_ Pre SCSS which becomes important if you use a Boost Union Child theme.
767+
768+
3. `theme_boost_union` > `get_pre_scss()`:
769+
* Adds the Boost Union Pre SCSS from disk\
770+
(which is located on `/theme/boost_union/scss/boost_union/pre.scss` and which is empty currently)
771+
* Sets several SCSS variables based on Boost Union or Boost Union flavour settings
772+
* Adds the Boost Union external Pre SCSS\
773+
(which is set on `/admin/settings.php?section=theme_boost_union_look#theme_boost_union_look_scss`)
774+
* Adds the Boost Union flavour Pre SCSS\
775+
(which is set within the active flavour on `/theme/boost_union/flavours/overview.php`)
776+
777+
4. `theme_boost_union` > `get_main_scss()`:
778+
* Calls the `theme_boost` > `get_main_scss()` function
779+
* Adds the Boost Core Preset\
780+
(which is set on `/admin/settings.php?section=themesettingboost` and defaults to the `/theme/boost/scss/preset/default.scss` file).
781+
With this preset, the FontAwesome library, the Bootstrap library and all the Moodle core stylings are added which means that this preset is the place where all the Moodle core style is added.
782+
* Adds the Boost Union Post SCSS from disk\
783+
(which is located on `/theme/boost_union/scss/boost_union/post.scss`)
784+
This file holds all the Boost Union specific SCSS code which can be added to the stack without being dependent on specific configurations like configured colors or sizes.
785+
* Add the Boost Union external SCSS\
786+
(which is set on `/admin/settings.php?section=theme_boost_union_look#theme_boost_union_look_scss`)
787+
788+
5. `theme_boost` > `get_extra_scss()`:
789+
* Adds the Boost Union Post SCSS from the theme settings\
790+
(which is set on `/admin/settings.php?section=theme_boost_union_look#theme_boost_union_look_scss`).\
791+
Note: In fact, this function adds the _active theme's_ Post SCSS which becomes important if you use a Boost Union Child theme.
792+
* Adds the page background image and login page background image
793+
794+
6. `theme_boost_union` > `get_extra_scss()`:
795+
* Overrides / enhances the background images which have been set before
796+
* Adds the Boost Union flavour Post SCSS\
797+
(which is set within the active flavour on `/theme/boost_union/flavours/overview.php`)
798+
* Adds the Boost Union features' SCSS.
799+
This is the Boost Union specific SCSS code which has to be added to the stack based on specific configurations, for example for changing the activity icon purposes or for changing the login form order.
800+
801+
733802
Plugin repositories
734803
-------------------
735804

@@ -802,11 +871,14 @@ The plugin is maintained by\
802871
Moodle an Hochschulen e.V.
803872

804873
in cooperation with\
805-
lern.link GmbH
874+
ssystems GmbH
806875

807876
together with\
808877
bdecent GmbH
809878

879+
and\
880+
lern.link GmbH
881+
810882

811883
Copyright
812884
---------
@@ -844,6 +916,7 @@ Moodle an Hochschulen e.V. would like to thank these main contributors (in alpha
844916
* lern.link GmbH, Alexander Bias: Code, Peer Review, Ideating, Funding
845917
* lern.link GmbH, Lukas MuLu Müller: Code
846918
* lern.link GmbH, Beata Waloszczyk: Code
919+
* Lutheran University of Applied Sciences Nuremberg: Funding
847920
* Moodle.NRW / Ruhr University Bochum, Annika Lambert: Code
848921
* Moodle.NRW / Ruhr University Bochum, Matthias Buttgereit: Code, Ideating
849922
* Moodle.NRW / Ruhr University Bochum, Tim Trappen: Code, Ideating
@@ -853,9 +926,11 @@ Moodle an Hochschulen e.V. would like to thank these main contributors (in alpha
853926
* RWTH Aachen, Amrita Deb Dutta: Code
854927
* RWTH Aachen, Josha Bartsch: Code
855928
* Solent University, Mark Sharp: Code
929+
* ssystems GmbH, Alexander Bias: Code, Peer Review, Ideating, Funding
856930
* Technische Universität Berlin, Lars Bonczek: Code
931+
* University of Bayreuth, Nikolai Jahreis: Code
857932
* University of Graz, André Menrath: Code
858933
* University of Lübeck, Christian Wolters: Code, Peer Review, Ideating
859-
* Zurich University of Applied Sciences (ZHAW): Funding, Ideating
934+
* Zurich University of Applied Sciences (ZHAW): Code, Funding, Ideating
860935

861936
Additionally, we thank all other contributors who contributed ideas, feedback and code snippets within the Github issues and pull requests as well as all contributors who contributed additional translations in AMOS, the Moodle translation tool.

accessibility/declaration.php

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
* Theme Boost Union - Declaration of accessibility page.
19+
*
20+
* @package theme_boost_union
21+
* @copyright 2024 Katalin Lukacs Toth, ZHAW Zurich University of Applied Sciences <[email protected]>
22+
* @copyright 2024 Simon Schoenenberger, ZHAW Zurich University of Applied Sciences <[email protected]>
23+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24+
*/
25+
26+
// Include config.php.
27+
// Let codechecker ignore the next line because otherwise it would complain about a missing login check
28+
// after requiring config.php which is really not needed.
29+
require(__DIR__ . '/../../../config.php'); // phpcs:disable moodle.Files.RequireLogin.Missing
30+
31+
// Require the necessary libraries.
32+
require_once($CFG->dirroot.'/theme/boost_union/lib.php');
33+
require_once($CFG->dirroot.'/theme/boost_union/locallib.php');
34+
35+
// Set page URL.
36+
$PAGE->set_url('/theme/boost_union/accessibility/declaration.php');
37+
38+
// Set page layout.
39+
$PAGE->set_pagelayout('standard');
40+
41+
// Set page context.
42+
$PAGE->set_context(context_system::instance());
43+
44+
// Add page name as body class.
45+
$PAGE->add_body_class('theme_boost_union-accessibilitydeclaration');
46+
47+
// Get theme config.
48+
$config = get_config('theme_boost_union');
49+
50+
// If the declaration of accessibility page is disabled, we just show a short friendly warning page and are done.
51+
if ($config->enableaccessibilitydeclaration != THEME_BOOST_UNION_SETTING_SELECT_YES) {
52+
echo $OUTPUT->header();
53+
$notification = new \core\output\notification(get_string('accessibilitydeclarationdisabled', 'theme_boost_union'),
54+
\core\output\notification::NOTIFY_INFO);
55+
$notification->set_show_closebutton(false);
56+
echo $OUTPUT->render($notification);
57+
echo $OUTPUT->footer();
58+
die;
59+
}
60+
61+
// Set page title.
62+
$PAGE->set_title(theme_boost_union_get_accessibility_pagetitle('declaration'));
63+
64+
// Start page output.
65+
echo $OUTPUT->header();
66+
67+
// Show page heading.
68+
echo $OUTPUT->heading(theme_boost_union_get_accessibility_pagetitle('declaration'));
69+
70+
// Output declaration of accessibility page content.
71+
echo format_text($config->accessibilitydeclarationcontent, FORMAT_MOODLE, ['trusted' => true, 'noclean' => true]);
72+
73+
// Finish page.
74+
echo $OUTPUT->footer();

0 commit comments

Comments
 (0)