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

Improve performance for regrading gradebook

    Details

    • Testing Instructions:
      Hide

      First, creating a test course:

      • Generate a large couse with the following command:
        php admin/tool/generator/cli/maketestcourse.php --shortname=GRADEBOOKM --size=M --fixeddataset --filesizelimit=1024
      • For Assignment 1, grade ~300 users. I did this by doing the following:
        • Go to Assignment 1
        • Enable quick grading and change number of items to show per page to 100.
        • Pop open the browser console and enter the following and hit return (it will enter random grades for you):
          Y.all('.quickgradingform input[type=text]').each(function(n) { n.setAttribute('value', Math.floor(Math.random() * 101)) });
        • Click on Save changes. Repeat for the next 2 pages.
      • Go into the gradebook.
      • Add a new Category, I used Natural for the aggregation method.

      Be sure to enable performance info in the footer so you can see DB reads/writes.

      Trigger a regrade and note performance. The way I was doing this was with the following:

      • Go to the gradebook, and then Setup
      • Take note of the DB reads/writes.
      • Move Assignment 1 into the newly created category
      • Take note of increase in the DB reads/writes.
      Show
      First, creating a test course: Generate a large couse with the following command: php admin/tool/generator/cli/maketestcourse.php --shortname=GRADEBOOKM --size=M --fixeddataset --filesizelimit=1024 For Assignment 1, grade ~300 users. I did this by doing the following: Go to Assignment 1 Enable quick grading and change number of items to show per page to 100. Pop open the browser console and enter the following and hit return (it will enter random grades for you): Y.all('.quickgradingform input[type=text]').each(function(n) { n.setAttribute('value', Math.floor(Math.random() * 101)) }); Click on Save changes. Repeat for the next 2 pages. Go into the gradebook. Add a new Category, I used Natural for the aggregation method. Be sure to enable performance info in the footer so you can see DB reads/writes. Trigger a regrade and note performance. The way I was doing this was with the following: Go to the gradebook, and then Setup Take note of the DB reads/writes. Move Assignment 1 into the newly created category Take note of increase in the DB reads/writes.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      MDL-51498_regrade_perf

      Description

      With very large courses (EG: thousands of students and hundreds of graded activities), the cost to regrade the gradebook is very high.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  5 Vote for this issue
                  Watchers:
                  16 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Nov/15