catalyst / moodle-tool_cloudmetrics

Realtime metrics for Moodle
https://moodle.org/plugins/tool_cloudmetrics
GNU General Public License v3.0
0 stars 3 forks source link

Implementation of get_plugins_with_function() is not following Moodle core standard when custom metrics are to be collected from tool_cloudmetrics. #166

Closed josepico01 closed 4 months ago

josepico01 commented 4 months ago

While implementing custom metrics in a local plugin, it was noticed that tool_cloudmetrics is using callback get_plugins_with_function('_metrics', lib.php) to find those custom metrics in a third party plugin where a function with the suffix metrics is declared in the lib.php . However, no custom metrics are found because of the _ character added as prefix in the function parameter.

Looking at other callbacks from core, none of those are with a _ character as part of the function's name, so this character should be removed for the tool to be able to collect those custom metrics.