Skip to content

Commit

Permalink
Upgrade: Adopt new activity purpose 'Interactive content' when colori…
Browse files Browse the repository at this point in the history
…ng activity icons, resolves moodle-an-hochschulen#611.
  • Loading branch information
abias committed Jul 13, 2024
1 parent 99dd366 commit 7ec17a7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2024-07-12 - Upgrade: Adopt new activity purpose "Interactive content" when coloring activity icons, resolves #611.
* 2024-07-07 - Upgrade: Adopt changes for coloring the activity icons, moving from background-colors to CSS filters, resolves #631.
* 2024-07-04 - Upgrade: Fix Behat tests which broke due to the introduction of section pages in Moodle core.
* 2024-07-04 - Upgrade: Adopt changes in boostnavbar.php from Boost core.
Expand Down
4 changes: 4 additions & 0 deletions lang/en/theme_boost_union.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
// ... ... Setting: Activity icon color for 'Content'.
$string['activityiconcolorcontentsetting'] = 'Activity icon color for "Content"';
$string['activityiconcolorcontentsetting_desc'] = 'The activity icon color for "Content"';
// ... ... Setting: Activity icon color for 'Interactive content'.
$string['activityiconcolorinteractivecontentsetting'] = 'Activity icon color for "Interactive content"';
$string['activityiconcolorinteractivecontentsetting_desc'] = 'The activity icon color for "Interactive content"';
// ... ... Setting: Activity icon color for 'Interface'.
$string['activityiconcolorinterfacesetting'] = 'Activity icon color for "Interface"';
$string['activityiconcolorinterfacesetting_desc'] = 'The activity icon color for "Interface"';
Expand All @@ -216,6 +219,7 @@
$string['activitypurposecollaboration'] = 'Collaboration';
$string['activitypurposecommunication'] = 'Communication';
$string['activitypurposecontent'] = 'Content';
$string['activitypurposeinteractivecontent'] = 'Interactive content';
$string['activitypurposeinterface'] = 'Interface';
$string['activitypurposeother'] = 'Other';
// ... Section: Activity icons.
Expand Down
1 change: 1 addition & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ function theme_boost_union_get_pre_scss($theme) {
MOD_PURPOSE_COLLABORATION,
MOD_PURPOSE_COMMUNICATION,
MOD_PURPOSE_CONTENT,
MOD_PURPOSE_INTERACTIVECONTENT,
MOD_PURPOSE_INTERFACE];
// Iterate over all purposes.
foreach ($purposes as $purpose) {
Expand Down
2 changes: 2 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@
MOD_PURPOSE_COLLABORATION,
MOD_PURPOSE_COMMUNICATION,
MOD_PURPOSE_CONTENT,
MOD_PURPOSE_INTERACTIVECONTENT,
MOD_PURPOSE_INTERFACE];
// Iterate over all purposes.
foreach ($purposes as $purpose) {
Expand Down Expand Up @@ -597,6 +598,7 @@
MOD_PURPOSE_COLLABORATION => get_string('activitypurposecollaboration', 'theme_boost_union'),
MOD_PURPOSE_COMMUNICATION => get_string('activitypurposecommunication', 'theme_boost_union'),
MOD_PURPOSE_CONTENT => get_string('activitypurposecontent', 'theme_boost_union'),
MOD_PURPOSE_INTERACTIVECONTENT => get_string('activitypurposeinteractivecontent', 'theme_boost_union'),
MOD_PURPOSE_INTERFACE => get_string('activitypurposeinterface', 'theme_boost_union'),
MOD_PURPOSE_OTHER => get_string('activitypurposeother', 'theme_boost_union'),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ Feature: Configuring the theme_boost_union plugin for the "Activity branding" ta
# Unfortunately, we can only test 4 out of 6 purpose types as Moodle does does not ship with any activity with the
# administration and interface types. But this should be an acceptable test coverage anyway.
Examples:
| purposename | modname | colorhex | originalfilter |
| assessment | assign | #FF0000 | invert(0.36) sepia(0.98) saturate(69.69) hue-rotate(315deg) brightness(0.9) contrast(1.19) |
| collaboration | data | #00FF00 | invert(0.25) sepia(0.54) saturate(62.26) hue-rotate(245deg) brightness(1) contrast(1.02) |
| communication | choice | #0000FF | invert(0.48) sepia(0.74) saturate(48.87) hue-rotate(11deg) brightness(1.02) contrast(1.01) |
| content | book | #FFFF00 | invert(0.49) sepia(0.52) saturate(46.75) hue-rotate(156deg) brightness(0.89) contrast(1.02) |
| purposename | modname | colorhex | originalfilter |
| assessment | assign | #FF0000 | invert(0.36) sepia(0.98) saturate(69.69) hue-rotate(315deg) brightness(0.9) contrast(1.19) |
| collaboration | data | #00FF00 | invert(0.25) sepia(0.54) saturate(62.26) hue-rotate(245deg) brightness(1) contrast(1.02) |
| communication | choice | #0000FF | invert(0.48) sepia(0.74) saturate(48.87) hue-rotate(11deg) brightness(1.02) contrast(1.01) |
| content | book | #FFFF00 | invert(0.49) sepia(0.52) saturate(46.75) hue-rotate(156deg) brightness(0.89) contrast(1.02) |
| interactivecontent | lesson | #00FFFF | invert(0.25) sepia(0.63) saturate(11.52) hue-rotate(344deg) brightness(0.94) contrast(0.91) |

@javascript
Scenario Outline: Setting: Activity icon purposes - Setting the purpose
Expand Down

0 comments on commit 7ec17a7

Please sign in to comment.