Debugging persistent grade issues

We’ve been having ongoing issues with persistent grades, and we could use some pointers on how to debug them. We’re running off master (minus a couple of weeks), but I think the issues started for us with palm.

The problem manifests as users who complete a unit and can see their marks in the courseware. But when they look at their progress page, there are no grades.

Similarly, when the instructor looks at the gradebook, there are no grades there either.

If the instructor rescores a problem in the unit, then the progress page and the gradebook will update and then the courseware and the progress page and the gradebook are all consistent.

We’ve been looking through the error logs, hoping to find some failure with persistent grading, but we haven’t found a smoking gun yet.

We’re not 100% sure, but this may be happening with restricted content. At least, it seems to mostly happen with problems that are “Access restricted to: verified”

Any suggestions for further investigation or theories would be greatly appreciated.

Peter Pinch
MIT Open Learning

My one quick suggestion is, can you tell if the PersistentSubsectionGrade records in the database are created/modified when the user completes the unit? Or are they only updated after an instructor forces a rescore. And can you tell if the celery tasks to update such records are submitted to the broker after the learner completes the unit (usually you can grep the task name in the logs to figure this out)?

Thanks, those are great suggestions.

Do you recall what the task name is for student-initiated grading? We’ve found the rescoring tasks generated by the instructor. They weren’t helpful.

I belive it’s this one: https://github.com/openedx/edx-platform/blob/548d302610b9f39edd457c4c50b5feba38f2b188/lms/djangoapps/grades/tasks.py#L182

We believe we’ve found one issue. It seems like if you start a unit with audit-only content, the grading code will skip over graded content that appears later. We still have some work to do to verify this finding, though.