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

Log report requests results twice from logstore for each page in report

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 4.2.1
    • Logging
    • None
    • MOODLE_402_STABLE

    Description

      It requests the results on line 504 below, then caches a list of user names from the user IDs returned in the report result data, but it has to then make a second request to get the exact same set of results in order to display them. It does this because a recordset implements PHP's iterator interface but doesn't implement the rewind method.
       
      https://github.com/moodle/moodle/blob/master/report/log/classes/table_log.php#L504
       
      So the call to $this->update_users_used(); iterates through the results but has no option other than to close the recordset, which means a new one has to be created in order for the results to be displayed.
       
       
       
       
       
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            daviesdale Dale Davies
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Clockify

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