Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83584

report_log: Group filter unnecessarily fetches list of all users in system

XMLWordPrintable

      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.

        1. (1) 10 Passed -- (Main)MDL-83584.png
          243 kB
          Kim Jared Lucas
        2. (1) 7 Passed -- (Main)MDL-83584.png
          144 kB
          Kim Jared Lucas
        3. (1) 8 Passed -- (Main)MDL-83584.png
          176 kB
          Kim Jared Lucas
        4. (1) 9 Passed -- (Main)MDL-83584.png
          196 kB
          Kim Jared Lucas

            quen Sam Marshall
            quen Sam Marshall
            Katie Ransom Katie Ransom
            Amaia Anabitarte Amaia Anabitarte
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 9 minutes
                1d 1h 9m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.