Skip to content

Contribute to upstream: Fix persistent grades IntegrityError on progress page #213

@ghost

Description

@shadinaif let's reach out to edX about this hack: #210 we did. I think they'll have more to share about the issue. The best way to report a bug is actually to open a pull request and ask for review.

Start the pull request with just:

 grades_with_blocks = PersistentSubsectionGrade.objects.select_related('visible_blocks').filter(
-    user_id=user_id,
     course_id=course_key,
 )

and then see if the issue is resolved.

Therefore I'm hacking VisibleBlocks.bulk_create to fix the IntegrityError.

I think the solution is to remove the user_id filter to fix but I wasn't sure.
So we need to report to edX and provide a more suitable solution in _initialize_cache like the following:

 grades_with_blocks = PersistentSubsectionGrade.objects.select_related('visible_blocks').filter(
-    user_id=user_id,
     course_id=course_key,
 )

Task: OU-426

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions