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

Grader report using way too much memory due to bad record counting

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1) create a course with a large number of users enrolled (say 10k)
      2) attempt to view the grader report
      Expected: report loads.
      Actual without this fix: page fails with out of memory error.

      Show
      1) create a course with a large number of users enrolled (say 10k) 2) attempt to view the grader report Expected: report loads. Actual without this fix: page fails with out of memory error.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The get_numusers function in the grade_report class makes a call to get_enrolled_users asking for all the user fields (u.*), but then only makes use of the id field.

      Additionally, it makes the get_enrolled_users call regardless of if it actually needs that data or not. The call should only be made if the user has requested to only show active enrolments.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Sep/14