-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecation warnings still shown on Moodle 4.1.10+ #857
Comments
I have checked the Moodle path for some of those events, like in: https://github.com/moodle/moodle/tree/main/lib/classes/event in particular: and yes, there is the deprecation message. If I understand it correctly, since this plugin collects all possible events in Moodle, we will see these deprecation messages, unfortunately. So, maybe it is not a problem really. Maybe we just need to know that this deprecation warnings appear if developer level debug is activated on Moodle. |
The real problem, maybe, is that these deprecation messages appear everywhere, on every single page from administration menu and also on the Moodle Home page (moodle.url/). These deprecation messages do not appear on the moodle.url/my/ page nor on moodle.url/my/courses.php. Should these deprecation messages appear only when editing the plugin parameters and while running the scheduled task, if the developer level debug is activated? It is like the plugin is loaded on every single page. If we are telling the plugin that the events will be sent through scheduled task, maybe there is no need to load the plugin on every page. I do no know, just mentioning it. Thanks, Jordi |
What I detected also is that events from deprecation messages does not appear on the list of candidate events to send into the LRS. So, the list of events eligible to be sent into LRS seems correct. The only problem is regarding seeing everywhere the deprecation messages. Without this plugin, it does not happen. Thanks, Jordi |
I have reached to know why this debugging messages are shown. In our Moodle we make use of My idea was what it is actually done already on the core: However, I realize that having the $CFG->debugusers in use, it has no effect. Would you like to be provided with a patch like this? diff --git a/admin/tool/log/store/xapi/src/transformer/get_event_function_map.php b/admin/tool/log/store/xapi/src/transformer/get_event_function_map.php
index 4a325584277..1ed74740e03 100644
--- a/admin/tool/log/store/xapi/src/transformer/get_event_function_map.php
+++ b/admin/tool/log/store/xapi/src/transformer/get_event_function_map.php
@@ -97,8 +97,12 @@ function get_event_function_map() {
'\totara_program\event\program_assigned' => 'totara_program\program_assigned'
];
+ global $CFG;
+ $debugusers = $CFG->debugusers;
+ $CFG->debugusers = '';
$environmentevents = class_exists("report_eventlist_list_generator") ?
array_keys(\report_eventlist_list_generator::get_all_events_list(false)) : array_keys($availableevents);
+ $CFG->debugusers = $debugusers;
return array_filter($availableevents, function($k) use ($environmentevents) {
return in_array($k, $environmentevents); With this patch, we do not see any debugging message while navigating through administration options. It is really annoying. What do you think? Jordi |
Finally, we have added this patch #858 to our Moodle site, so that we would like to contribute it to you and this plugin. Thanks a lot for your support. Jordi |
Description
Version
Previously downloaded from Moodle Plugins, the file related to Moodle 4.1: https://moodle.org/plugins/logstore_xapi/2022101800/27762. But installed from master branch, since there are other commits after the last tag, also as suggested on last issue deprecation warnings still shown on Moodle 4.1.5+ #847.
Moodle version: Moodle 4.1.10+ (Build: 20240510)
Steps to reproduce the bug
Expected behaviour
Actual behaviour
Server information
Client information
Additional information
The text was updated successfully, but these errors were encountered: