From 951f77006a151d15e54cf5a1473362401ac24b0d Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Mon, 8 Aug 2016 14:10:38 +0800 Subject: [PATCH 1/2] MDL-55494 tool_monitor: ignore only tool_monitor and logstore_legacy previously any plugin type ending with _monitor or _legacy would be ignored --- admin/tool/monitor/classes/eventlist.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/tool/monitor/classes/eventlist.php b/admin/tool/monitor/classes/eventlist.php index 989bc3cafa2..0f5cd1af9ec 100644 --- a/admin/tool/monitor/classes/eventlist.php +++ b/admin/tool/monitor/classes/eventlist.php @@ -103,15 +103,16 @@ class eventlist { foreach ($pluginlist as $plugin => $directory) { $plugindirectory = $directory . '/classes/event'; foreach (self::get_file_list($plugindirectory) as $eventname => $notused) { - $plugineventname = '\\' . $plugintype . '_' . $plugin . '\\event\\' . $eventname; + $fullpluginname = $plugintype . '_' . $plugin; + $plugineventname = '\\' . $fullpluginname . '\\event\\' . $eventname; // Check that this is actually an event. - if (method_exists($plugineventname, 'get_static_info') && $plugin != 'monitor') { // No selfie here. + if (method_exists($plugineventname, 'get_static_info') && $fullpluginname !== 'tool_monitor') { // No selfie here. $ref = new \ReflectionClass($plugineventname); - if (!$ref->isAbstract() && $plugin != 'legacy') { + if (!$ref->isAbstract() && $fullpluginname !== 'logstore_legacy') { if ($withoutcomponent) { $noncorepluginlist[$plugineventname] = $plugineventname::get_name(); } else { - $noncorepluginlist[$plugintype . '_' . $plugin][$plugineventname] = $plugineventname::get_name(); + $noncorepluginlist[$fullpluginname][$plugineventname] = $plugineventname::get_name(); } } } From d29a07030efff49d55dd55a0d8a60573e983b3fc Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Fri, 12 Aug 2016 13:55:38 +0800 Subject: [PATCH 2/2] MDL-55494 report_eventlist: ignore only logstore_legacy --- report/eventlist/classes/list_generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report/eventlist/classes/list_generator.php b/report/eventlist/classes/list_generator.php index b7483d61846..ab306888d55 100644 --- a/report/eventlist/classes/list_generator.php +++ b/report/eventlist/classes/list_generator.php @@ -197,7 +197,7 @@ class report_eventlist_list_generator { if (method_exists($plugineventname, 'get_static_info')) { if ($detail) { $ref = new \ReflectionClass($plugineventname); - if (!$ref->isAbstract() && $plugin != 'legacy') { + if (!$ref->isAbstract() && $plugintype . '_' . $plugin !== 'logstore_legacy') { $noncorepluginlist = self::format_data($noncorepluginlist, $plugineventname); } } else {