@@ -59,8 +59,23 @@ protected function get_html_content() {
59
59
60
60
$ blockxp = $ pluginman ->get_plugin_info ('block_xp ' );
61
61
$ localxp = $ pluginman ->get_plugin_info ('local_xp ' );
62
+ $ recentishlocalxp = 2023100800 ; // v1.15.0.
62
63
$ humanbranch = moodle_major_version () ?: 'v? ' ;
63
64
65
+ if ($ localxp && $ localxp ->versiondb < $ recentishlocalxp ) {
66
+ $ messages [] = [
67
+ 'title ' => get_string ('outofsyncexcessive ' , 'block_xp ' ),
68
+ 'message ' => get_string ('outofsyncexcessiveinfo ' , 'block_xp ' ),
69
+ 'url ' => 'https://docs.levelup.plus/xp/docs/requirements-compatibility#out-of-sync ' ,
70
+ ];
71
+ } else if ($ addon ->is_out_of_sync ()) {
72
+ $ messages [] = [
73
+ 'title ' => get_string ('outofsync ' , 'block_xp ' ),
74
+ 'message ' => get_string ('outofsyncinfo ' , 'block_xp ' ),
75
+ 'url ' => 'https://docs.levelup.plus/xp/docs/requirements-compatibility#out-of-sync ' ,
76
+ ];
77
+ }
78
+
64
79
if ($ CFG ->branch >= 39 ) {
65
80
if (!empty ($ blockxp ->pluginsupported ) && ($ CFG ->branch < $ blockxp ->pluginsupported [0 ]
66
81
|| $ CFG ->branch > $ blockxp ->pluginsupported [1 ])) {
@@ -82,20 +97,6 @@ protected function get_html_content() {
82
97
}
83
98
}
84
99
85
- if ($ addon ->get_version_diff () > 270 ) {
86
- $ messages [] = [
87
- 'title ' => get_string ('outofsyncexcessive ' , 'block_xp ' ),
88
- 'message ' => get_string ('outofsyncexcessiveinfo ' , 'block_xp ' ),
89
- 'url ' => 'https://docs.levelup.plus/xp/docs/requirements-compatibility#out-of-sync ' ,
90
- ];
91
- } else if ($ addon ->is_out_of_sync ()) {
92
- $ messages [] = [
93
- 'title ' => get_string ('outofsync ' , 'block_xp ' ),
94
- 'message ' => get_string ('outofsyncinfo ' , 'block_xp ' ),
95
- 'url ' => 'https://docs.levelup.plus/xp/docs/requirements-compatibility#out-of-sync ' ,
96
- ];
97
- }
98
-
99
100
return di::get ('renderer ' )->render_from_template ('block_xp/admin-compatibility-check ' , [
100
101
'haswarnings ' => !empty ($ messages ),
101
102
'warnings ' => $ messages ,
0 commit comments