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

fix: "An unexpected error occurred" after second opening any grade #386

Conversation

DmytroAlipov
Copy link

@DmytroAlipov DmytroAlipov commented Mar 16, 2024

This is a backport from the master branch.

Hi! I found a bug.

  1. Open Instructor -> Student admin -> View gradebook

  2. Click on some grade
    screen_35

  3. Set new grade or just click Cancel

  4. Open same grade or another one
    screen_36

This happens because doneViewingAssignment() executes when the modal window closes. The redux state is being cleaned, namely, gradeOverrideHistoryResults is removed.
Because of this, when we access this element again, we do not get the expected iterable object (list), but we get an undefined.
Previously, this was eliminated by the default value.
My suggestion is to also make the value default [] if undefined.

@DmytroAlipov DmytroAlipov requested a review from a team as a code owner March 16, 2024 16:46
@openedx-webhooks
Copy link

Thanks for the pull request, @DmytroAlipov! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 16, 2024
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.98%. Comparing base (ba9fb37) to head (bd25b6b).
Report is 1 commits behind head on open-release/quince.master.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           open-release/quince.master     #386   +/-   ##
===========================================================
  Coverage                       94.98%   94.98%           
===========================================================
  Files                             140      140           
  Lines                            1356     1356           
  Branches                          264      265    +1     
===========================================================
  Hits                             1288     1288           
  Misses                             60       60           
  Partials                            8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mphilbrick211 mphilbrick211 removed the request for review from a team March 19, 2024 20:52
@mphilbrick211 mphilbrick211 added the backport PR backports a change from main to a named release. label Mar 19, 2024
@mphilbrick211 mphilbrick211 requested a review from arbrandes March 20, 2024 21:02
@DmytroAlipov
Copy link
Author

Hi @arbrandes
Could you please merge this MR so that these changes are included in Quince.3?

@cmltaWt0
Copy link

cmltaWt0 commented Apr 9, 2024

@DmytroAlipov I think it's good to test and merge this since the master pr has been merged.
I'm going to build it and test on the test Quince env.

Copy link

@cmltaWt0 cmltaWt0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on test Env - looks great.
Merging.

@cmltaWt0 cmltaWt0 merged commit aa2b1a5 into openedx:open-release/quince.master Apr 9, 2024
6 checks passed
@openedx-webhooks
Copy link

@DmytroAlipov 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@DmytroAlipov DmytroAlipov deleted the fix-second-opening-grade-quince branch April 10, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PR backports a change from main to a named release. open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants