File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 33
33
34
34
use context_course ;
35
35
use context_system ;
36
+ use core_plugin_manager ;
36
37
37
38
/**
38
39
* Class before_http_headers.
@@ -50,13 +51,20 @@ class before_http_headers {
50
51
*/
51
52
public static function callback (): void {
52
53
53
- global $ COURSE , $ PAGE ;
54
+ global $ COURSE , $ PAGE , $ CFG ;
54
55
55
56
if (isloggedin () === false ) {
56
57
return ;
57
58
}
58
59
59
60
$ context = empty ($ COURSE ->id ) ? context_system::instance () : context_course::instance ($ COURSE ->id );
61
+
62
+ // Check if the plugin is installed.
63
+ $ plugininfo = core_plugin_manager::instance ()->get_plugin_info ('local_commander ' );
64
+ if (empty ($ plugininfo ->versiondb )) {
65
+ return ;
66
+ }
67
+
60
68
if (!has_capability ('local/commander:display ' , $ context )) {
61
69
return ;
62
70
}
Original file line number Diff line number Diff line change 25
25
**/
26
26
defined ('MOODLE_INTERNAL ' ) || die ();
27
27
28
- $ plugin ->release = '4.5.0 ' ;
28
+ $ plugin ->release = '4.5.1 ' ;
29
29
$ plugin ->maturity = MATURITY_STABLE ;
30
- $ plugin ->version = 2024101002 ;
30
+ $ plugin ->version = 2024111700 ;
31
31
$ plugin ->requires = 2015111602 ;
32
32
$ plugin ->component = 'local_commander ' ;
33
33
$ plugin ->supported = [39 , 405 ];
You can’t perform that action at this time.
0 commit comments