diff --git a/src/Context/Initialisation/Version/v6/xlvoBasicInitialisation.php b/src/Context/Initialisation/Version/v6/xlvoBasicInitialisation.php index ff448a9c..6b4ed3ae 100755 --- a/src/Context/Initialisation/Version/v6/xlvoBasicInitialisation.php +++ b/src/Context/Initialisation/Version/v6/xlvoBasicInitialisation.php @@ -10,6 +10,7 @@ use ilAccess; use ilAppEventHandler; use ilBenchmark; +use ilCachedComponentData; use ilCtrl; use ilDBWrapperFactory; use ilErrorHandling; @@ -587,6 +588,11 @@ private function initControllFlow() private function initPluginAdmin() { + Closure::bind(function() : void { + $this->il_plugin_by_id = [ilLiveVotingPlugin::PLUGIN_ID => $this->il_plugin_by_id[ilLiveVotingPlugin::PLUGIN_ID]]; + $this->il_plugin_by_name = [ilLiveVotingPlugin::PLUGIN_NAME => $this->il_plugin_by_name[ilLiveVotingPlugin::PLUGIN_NAME]]; + $this->il_plugin_active = ["robj" => array_filter($this->il_plugin_active["robj"], function(array $plugin) : bool {return $plugin["plugin_id"] === ilLiveVotingPlugin::PLUGIN_ID;})]; + }, ilCachedComponentData::getInstance(), ilCachedComponentData::class)(); $this->makeGlobal("ilPluginAdmin", new ilPluginAdmin()); } diff --git a/src/Context/Initialisation/Version/v7/xlvoBasicInitialisation.php b/src/Context/Initialisation/Version/v7/xlvoBasicInitialisation.php index e719e7d4..a3c68ca8 100755 --- a/src/Context/Initialisation/Version/v7/xlvoBasicInitialisation.php +++ b/src/Context/Initialisation/Version/v7/xlvoBasicInitialisation.php @@ -10,6 +10,7 @@ use ilAccess; use ilAppEventHandler; use ilBenchmark; +use ilCachedComponentData; use ilCtrl; use ilDBWrapperFactory; use ilErrorHandling; @@ -574,6 +575,12 @@ private function initControllFlow() private function initPluginAdmin() { + Closure::bind(function() : void { + $this->il_plugin_by_id = [ilLiveVotingPlugin::PLUGIN_ID => $this->il_plugin_by_id[ilLiveVotingPlugin::PLUGIN_ID]]; + $this->il_plugin_by_name = [ilLiveVotingPlugin::PLUGIN_NAME => $this->il_plugin_by_name[ilLiveVotingPlugin::PLUGIN_NAME]]; + $this->il_plugin_by_slotid = ["robj" => array_filter($this->il_plugin_by_slotid["robj"], fn(array $plugin) : bool => $plugin["plugin_id"] === ilLiveVotingPlugin::PLUGIN_ID)]; + $this->il_plugin_active = ["robj" => array_filter($this->il_plugin_active["robj"], fn(array $plugin) : bool => $plugin["plugin_id"] === ilLiveVotingPlugin::PLUGIN_ID)]; + }, ilCachedComponentData::getInstance(), ilCachedComponentData::class)(); $this->makeGlobal("ilPluginAdmin", new ilPluginAdmin()); }