-
Bug
-
Resolution: Fixed
-
Minor
-
4.4.4
When using report_log, in the following scenario:
- Course is set to separate groups
- User has access all groups permission
- User has not selected a specific group to filter
Then there is a point where it (effectively) obtains a list of all the users who are not in any group on the course, and also all the users who are in any group on the course, and uses this in-memory list to filter the log results.
Because this list is actually all users on the entire system, (a) it is pointless to filter by it, and (b) it can use a lot of memory and potentially (depending on other factors) exceed PHP memory limit and crash out, on a system with a large number of a user accounts. We had this issue reported on our live system.
I think this list of users to filter is useful if:
a) A specific group has been selected
or
b) User does not have access all groups and will be restricted to seeing users in the groups they belong to
When this is not the case it just wastes time and memory. I will update the code to avoid using it in that scenario.