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

Tables generate hidden empty rows impacting page size and load time



      Changing the display option "page size" on quiz reports has a big impact on page size and load time.
      For example on a quiz with one student and one attempt, with the default page size of 30 the response request is ~300kB
      On the same quiz, if you change the page size to 30000 the page size is then 25.35MB
      The page takes also longer to load.
      It seems weird to have a bigger page when the actual data is unchanged.

      Step to reproduce:

      • As a teacher
      • Create a quiz
      • Add a question to that quiz
      • As a student
      • Make an attempt on the quiz
      • As a teacher
      • go to the "Results" page of the quiz
      • keep the "page size" at 30 and "Show report"
      • check the browser's console network tab to see page size
      • change "page size" to 3000 and show report
      • check the browser's console again and notice that the page size is bigger

      This size difference is because for some reason Moodle is creating rows in the result table based on the "page size" parameter value instead of the actual DB results.
      The extra rows have the class `emptyrow` that makes them hidden but they are still in the DOM for no reason

            Unassigned Unassigned
            benjamin-unige Benjamin-unige
            0 Vote for this issue
            6 Start watching this issue


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