Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Background

A learner’s grades are calculated by aggregated scores across individual XBlock usages. In the old days, grades would be recalculated from scores on-demand, every single time. This caused serious performance limitations around grade display, editing, reporting.

...

Starting in Olive, persistent grades are enabled by-default. There is no option to disable them. This simplifies LMS feature development, but it does require that all operators run the backfill (described below) as part of their Olive upgrade if they have not already enabled persistent grades. The backfill can be run before or after upgrading to Olive.

The Persistent Grades Backfill

Here's how we did it for edx.org.  Note that you could do things somewhat differently; for example, you could backfill grades for a subset of courses at a time (using the --courses flag) instead of all your courses.

...

The ComputeGradesSetting configuration model stores a list of course ids that the compute_grades management command does a backfill for.  In addition, it also stores the chunk size (i.e. number of enrollments) of each backfill celery task.

Running the Backfill

  • In your LMS instance, go to /admin/grades/computegradessetting/ to create a new instance of this model, specifying the per-task enrollment batch size (defaults to 100) and the course ids to do the backfill for.

  • Now it's time to run your backfill job.  Note that this could take quite a while to complete - we suggest using something like Jenkins to actually invoke the command.

  • It is run from an LMS installation as follows: 

    Code Block
    python manage.py lms compute_grades -v1 --settings=production --from_settings --routing_key=edx.lms.core.grades_backfill


  • The --from-settings flag specifies that the command should use the batch size and course id list from the latest ComputeGradesSetting configuration model.

Old Configuration Details

These are the toggles that controlled persistent grading from Hawthorne to Nutmeg. They have been removed for Olive.

...