Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a minor bug in the
cr_logging_info()
function inlocallib.php
. If more than one log reader is enabled on a Moodle site, it will ignore the order priority, as theforeach
that iterates through the readers doesn't stop once it obtains the first reader. In my proposed solution, it willbreak
theforeach
once it obtains the first log reader established in the configuration, be it the standard log, the legacy log, or whichever other log reader is preferred.This bug can be easily reproduced if you have some courses with user activity and try to create a configurable report that calculates the time spent on a course. If the preferred log reader is the Standard Log, it will show 0 hours for every user, as it won't find any record of user activity on the mdl_log, which is the one that is consulting due to this bug.