diff --git a/CHANGES.md b/CHANGES.md index 74b45bd1638..166dae6400e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/lang/en/theme_boost_union.php b/lang/en/theme_boost_union.php index 03020145d28..244f455999d 100644 --- a/lang/en/theme_boost_union.php +++ b/lang/en/theme_boost_union.php @@ -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"'; @@ -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. diff --git a/lib.php b/lib.php index 85dbfeb8dfc..8b7404dfe3e 100644 --- a/lib.php +++ b/lib.php @@ -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) { diff --git a/settings.php b/settings.php index 8c795acad74..914d8213b83 100644 --- a/settings.php +++ b/settings.php @@ -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) { @@ -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'), ]; diff --git a/tests/behat/theme_boost_union_looksettings_activitybranding.feature b/tests/behat/theme_boost_union_looksettings_activitybranding.feature index 58666157f52..2c82eec8691 100644 --- a/tests/behat/theme_boost_union_looksettings_activitybranding.feature +++ b/tests/behat/theme_boost_union_looksettings_activitybranding.feature @@ -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