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

Quiz reporting does not scale to a large number of user enrolments

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.3.1
    • None
    • Quiz
    • None
    • MOODLE_23_STABLE

    Description

      get_users_by_capability() without any limits is used throughout the quiz reporting, in courses with many enrolments this results in the max_memory_limit being hit and very large queries being created because of the use on IN() statements filled with enrolled users id's.

      Replacing get_users_by_capability() with get_enrolled_sql() may be a better approach. In my own testing it performs much better, but there may be some corner cases I'm not aware of that mean that get_enrolled_sql may be appropriate.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              matt.clarkson Matt Clarkson
              Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: