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 #387

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

DmytroAlipov
Copy link

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 17:04
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 16, 2024
@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.

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 (6450d86) to head (4e9270a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #387   +/-   ##
=======================================
  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:54
@mphilbrick211
Copy link

Hi @DmytroAlipov! I believe Aurora is no longer maintaining this repo, so I'm going to work on finding another reviewer for these. Thanks!

@mphilbrick211 mphilbrick211 requested a review from arbrandes March 20, 2024 21:03
@arbrandes
Copy link
Contributor

I have a strong suspicion that this will solve #384. Thanks, I'll review ASAP!

@cmltaWt0
Copy link

cmltaWt0 commented Apr 8, 2024

@arbrandes Could you take a look at this?

Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Looks safe enough. Approved!

@arbrandes arbrandes merged commit c3823c3 into openedx:master Apr 8, 2024
7 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 branch April 8, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants