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

Grader report can get too large for the browser to handle

XMLWordPrintable

      • You may need to set your PHP memory limit and request time limit to unlimited, otherwise this test may just throw a PHP error.
      • Log in to Moodle as admin, in Chromium or a Chromium-based browser.
      • Go to Site Administration > Development > Make test course
      • Create an "L" sized test course (10000 users, 500 assignments).
      • (Wait)
      • Open the test course
      • Go to the Grader report
      • Set the page size to 100.
        • After a few seconds, the report should load.
      • Edit the perpage=100 URL parameter to perpage=400 and load the page
        • After a while, the report should load.
      • Edit the perpage=400 URL parameter to perpage=500 and load the page
        • The report will start to load, but after a while the tab will crash with a SIGILL error.
      • The largest page size option is 5000. This will also cause a SIGILL error on Chromium.

      I have also tested this with Firefox. It is able to load the with perpage=500 but the rendering is very laggy, it's not really usable. 5000 causes the browser to hang on my machine, until it eventually cancels the HTTP request.

      The issue here is that the maximum allowed page size doesn't take into account the number of grade items on the course. 400 users x 500 assignments = 200,000 grade items. More than this causes problems. I'm not sure if it's due to the size of the page being loaded (about 150MB), the number of DOM elements, or something else.

      This is obviously a theoretical example with an enormous generated course, but we have a client with a course that contains 150 grade items and 1800 users, and they are able to break the grader report by setting the page size to "All".

      It's not a good experience to try and serve a page too large for the browser to handle. I would suggest that rather than the current method of setting the maximum page size to 5000 if there are more than 5000 students, we check the number of grade items in the course and set the maximum page size to (200000/gradeitems).

        1. MDL-82545.png
          259 kB
          Ron Carl Alfon Yu

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            Simon Adams Simon Adams
            Glyn (Mathew) May Glyn (Mathew) May
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 8 minutes
                4h 8m

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