From 6ff89c11e95670158c364d86343e2a1321930c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Massart?= Date: Thu, 2 May 2024 11:41:49 +0800 Subject: [PATCH] Include warning about usage of dev version in compatibility checks --- classes/local/setting/compatibility_check_setting.php | 7 +++++++ lang/en/block_xp.php | 2 ++ 2 files changed, 9 insertions(+) diff --git a/classes/local/setting/compatibility_check_setting.php b/classes/local/setting/compatibility_check_setting.php index 1ad30a0..88567e1 100644 --- a/classes/local/setting/compatibility_check_setting.php +++ b/classes/local/setting/compatibility_check_setting.php @@ -62,6 +62,13 @@ protected function get_html_content() { $recentishlocalxp = 2023100800; // Version 1.15.0. $humanbranch = moodle_major_version() ?: 'v?'; + if ($blockxp && strpos($blockxp->release, '-dev') !== false) { + $messages[] = [ + 'title' => get_string('unstableversioninstalled', 'block_xp'), + 'message' => get_string('unstableversioninstalledinfo', 'block_xp', ['version' => $blockxp->release]), + ]; + } + if ($localxp && $localxp->versiondb < $recentishlocalxp) { $messages[] = [ 'title' => get_string('outofsyncexcessive', 'block_xp'), diff --git a/lang/en/block_xp.php b/lang/en/block_xp.php index 866b3b6..554c67d 100644 --- a/lang/en/block_xp.php +++ b/lang/en/block_xp.php @@ -576,7 +576,9 @@ $string['tryme'] = 'Try me'; $string['unlockfeaturewithxpplus'] = 'Unlock this feature with XP+. Learn more'; $string['unavailable'] = 'Unavailable'; +$string['unstableversioninstalledinfo'] = 'This version of Level Up XP (block_xp) is still in development and considered unstable, please use an official release.'; $string['upgradingplugins'] = 'Upgrading the plugins'; +$string['unstableversioninstalled'] = 'Unstable version installed'; $string['value'] = 'Value'; $string['visualsintro'] = 'Customise the appearance of the levels, and the meaning of the points.'; $string['wherearexpused'] = 'Where are points used?';