Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue May 18, 2020 · 0 comments
Open
Assignees

Comments

@ghost
Copy link

ghost commented May 18, 2020

@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

@ghost ghost assigned shadinaif May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant