Grades not updating in gradebook, progress page, or database

Hi all,

I’ve been searching the forums for the past couple of days to figure out an answer to an issue we are running into with persistent grades. When a student completes a question and submits the answer the course page shows that the problem has been submitted and graded, but the gradebook, progress page and database tables (grades_persistentcoursegrade, grades_persistentsubsectiongrade) are not being updated.

Our configuration:

tutor 14.05
openedx: nutmeg
mfe plugin is enabled

lms production.py and development.py have the following enabled:
FEATURES[“PERSISTENT_GRADES_ENABLED_FOR_ALL_TESTS”] = True

Log files

When a user completes and submits an answer to a problem, this shows in the lms / all.log file:

2022-10-22 02:45:17,677 INFO 23 [tracking] [user 3701] [ip xxxxxxxxx] logger.py:41 - {“name”: “/courses/course-v1:courseid/xblock/block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032/handler/xmodule_handler/problem_check”, “context”: {“course_id”: “course-v1:courseid”, “course_user_tags”: {}, “user_id”: 3701, “path”: “/courses/course-v1:courseid/xblock/block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032/handler/xmodule_handler/problem_check”, “org_id”: “orgid”, “enterprise_uuid”: “”}, “username”: “username”, “session”: “92359968e9e02967b7db2abbd9541553”, “ip”: “xxxxxxx”, “agent”: “agent info”, “host”: “hostURL”, “referer”: “xxx”, “accept_language”: “en-US,en;q=0.9”, “event”: “{"GET": {}, "POST": {"input_6e430f35d983402b96291ff817cb5032_2_1": ["choice_3"]}}”, “time”: “2022-10-22T02:45:17.676463+00:00”, “event_type”: “/courses/course-v1:courseid/xblock/block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032/handler/xmodule_handler/problem_check”, “event_source”: “server”, “page”: null}

2022-10-22 02:45:17,686 INFO 7 [tracking] [user 3701] [ip xxxxxxx] logger.py:41 - {“name”: “problem_check”, “context”: {“user_id”: 3701, “path”: “/event”, “course_id”: “course-v1:courseid”, “org_id”: “orgid”, “enterprise_uuid”: “”}, “username”: “username”, “session”: “92359968e9e02967b7db2abbd9541553”, “ip”: “xxxxxxx”, “agent”: “agent info”, “host”: “hostURL”, “referer”: “referring page”, “accept_language”: “en-US,en;q=0.9”, “event”: “input_6e430f35d983402b96291ff817cb5032_2_1=choice_3”, “time”: “2022-10-22T02:45:17.685908+00:00”, “event_type”: “problem_check”, “event_source”: “browser”, “page”: “https://hostURL/xblock/block-v1:courseid+type@vertical+block@e29daac6feb543c4bdc58cb00120dab2?show_title=0&show_bookmark_button=0&recheck_access=1&view=student_view&format=Section%20Assessment”}

2022-10-22 02:45:17,783 INFO 23 [tracking] [user 3701] [ip xxxxxxx] logger.py:41 - {“name”: “edx.grades.problem.submitted”, “context”: {“course_id”: “course-v1:courseid”, “course_user_tags”: {}, “user_id”: 3701, “path”: “/courses/course-v1:courseid/xblock/block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032/handler/xmodule_handler/problem_check”, “org_id”: “orgid”, “enterprise_uuid”: “”, “module”: {“display_name”: “Multiple Choice”, “usage_key”: “block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032”}}, “username”: “username”, “session”: “92359968e9e02967b7db2abbd9541553”, “ip”: “xxxxxxx”, “agent”: “agent info”, “host”: “hostURL”, “referer”: “referring page”, “accept_language”: “en-US,en;q=0.9”, “event”: {“user_id”: “3701”, “course_id”: “course-v1:courseid”, “problem_id”: “block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032”, “event_transaction_id”: “249ef1be-0cb7-4c40-8862-5d95c71d8733”, “event_transaction_type”: “edx.grades.problem.submitted”, “weighted_earned”: 0.0, “weighted_possible”: 5.0}, “time”: “2022-10-22T02:45:17.782725+00:00”, “event_type”: “edx.grades.problem.submitted”, “event_source”: “server”, “page”: null}

2022-10-22 02:45:17,796 INFO 23 [celery_utils.logged_task] [user 3701] [ip xxxxxxx] logged_task.py:25 - Task lms.djangoapps.grades.tasks.recalculate_subsection_grade_v3[692e50b2-8acb-4f22-b586-7eb6828d4c76] submitted with arguments None, {‘user_id’: 3701, ‘anonymous_user_id’: None, ‘course_id’: ‘course-v1:courseid’, ‘usage_id’: ‘block-v1:courseid+type@problem+block@6e430f35d983402b96291ff817cb5032’, ‘only_if_higher’: None, ‘expected_modified_time’: 1666406717, ‘score_deleted’: None, ‘event_transaction_id’: ‘249ef1be-0cb7-4c40-8862-5d95c71d8733’, ‘event_transaction_type’: ‘edx.grades.problem.submitted’, ‘score_db_table’: ‘csm’, ‘force_update_subsections’: False}

Troubleshooting:

I tried the following suggestion to update Django admin and recompute grades for all courses, but to no avail.

Reference:
https://discuss.overhang.io/t/gradebook-mfe-does-not-upgrade-grades/2332
https://github.com/overhangio/tutor-mfe/pull/48#issuecomment-1110797622

  1. Enable persistent grades via PersistentGradesEnabledFlag in Django admin:
    /admin/grades/persistentgradesenabledflag/ - set to enabled and enabled for all courses
  2. Enable grades.assume_zero_grade_if_absent waffle switch at /admin/waffle/switch/
  3. Recompute grades for all courses
    tutor local run lms ./manage.py lms compute_grades --all_courses

The only thing that sticks out to me is the log entry where lms.djangoapps.grades.tasks.recalculate_subsection_grade_v3 is submitted with arguments None, but am not sure how to fix that.

Any suggestions on where to look next would be much appreciated. Thank you.

Hi @lmgonzales
Try starting/ restarting lms worker and cms worker.

Hi @nadheemabdulla
Thank you for the suggestion. I tried that but the issue still persisted unfortunately.

I did some more searching thru this forum and found this thread which suggested inspecting the size of the redis data. The appendonly.aof file was at 4.5GB, so I followed @regis recommendations in that thread and did these steps:

tutor local stop redis
sudo mv $(tutor config printroot)/data/redis $(tutor config printroot)/data/redis.backup
tutor local stop
tutor local start -d

(the recommended tutor local start redis cms-worker didn’t work for my issue which is why I did a full stop and restart of tutor).

Hope this is helpful to others who may run into the same issue.

1 Like