diff --git a/CHANGES.md b/CHANGES.md index 10d4fb3..f7bb586 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +### v1.1.1 (Build - 2024071001) + +* Always render Kialo icon on neutral background +* Prevent Kialo icon colors from being altered + ### v1.1.0 (Build - 2024053101) * Moodle 4.4 compatibility diff --git a/lib.php b/lib.php index 5f6acca..20aae1b 100644 --- a/lib.php +++ b/lib.php @@ -29,11 +29,6 @@ * @return true | string | null Truthy if the feature is supported, null otherwise. */ function kialo_supports($feature) { - if (defined("FEATURE_MOD_PURPOSE") && $feature === FEATURE_MOD_PURPOSE) { - // Moodle 4.0 and newer. - return MOD_PURPOSE_COLLABORATION; - } - switch ($feature) { case FEATURE_BACKUP_MOODLE2: return true; @@ -46,6 +41,13 @@ function kialo_supports($feature) { } } +/** + * Prevent the Kialo icon from having its colors modified on Moodle >= 4.4. + */ +function kialo_is_branded(): bool { + return true; +} + /** * Saves a new instance of the mod_kialo into the database. * diff --git a/tests/lib_test.php b/tests/lib_test.php index 4658158..8969172 100644 --- a/tests/lib_test.php +++ b/tests/lib_test.php @@ -59,7 +59,7 @@ public function test_kialo_supports(): void { // Moodle 4.0 and newer. if (defined("FEATURE_MOD_PURPOSE")) { - $this->assertEquals(MOD_PURPOSE_COLLABORATION, kialo_supports(FEATURE_MOD_PURPOSE)); + $this->assertNull(kialo_supports(FEATURE_MOD_PURPOSE)); } } diff --git a/version.php b/version.php index ca11fb4..8558c7f 100644 --- a/version.php +++ b/version.php @@ -28,8 +28,8 @@ $plugin->component = 'mod_kialo'; // See https://moodledev.io/docs/apis/commonfiles/version.php. -$plugin->version = 2024053101; // Must be incremented for each new release! -$plugin->release = '1.1.0'; // Semantic version. +$plugin->version = 2024071001; // Must be incremented for each new release! +$plugin->release = '1.1.1'; // Semantic version. // Officially we require PHP 7.4. The first Moodle version that requires this as a minimum is Moodle 4.1. // But technically this plugin also runs on older Moodle versions, as long as they run on PHP 7.4,