Implementation of get_plugins_with_function() is not following Moodle core standard when custom metrics are to be collected from tool_cloudmetrics. #166
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.
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 suffixmetrics
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.