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: request error for empty user list responses #291

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

DmytroAlipov
Copy link
Contributor

Description:

"An unexpected error occurred" if you try to get all responses when the users' list is empty:

  1. Open ORA Grading:

111

  1. In Search username fill in not existing student username:

222

  1. Click on View all responses:

333

I suggest not sending a request if the users are not on the list.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 14, 2023
@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.

1 similar comment
@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 Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (59a7d07) to head (20cd6bc).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #291   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          109       109           
  Lines         1078      1079    +1     
  Branches       159       160    +1     
=========================================
+ Hits          1078      1079    +1     

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

@mphilbrick211 mphilbrick211 added the waiting for eng review PR is ready for review. Review and merge it, or suggest changes. label Nov 14, 2023
@mphilbrick211 mphilbrick211 requested a review from a team November 14, 2023 18:23
@mphilbrick211
Copy link

Hi @openedx/content-aurora! This is ready for review.

@feanil feanil removed the request for review from a team March 20, 2024 15:09
@mphilbrick211 mphilbrick211 requested a review from arbrandes March 20, 2024 16:26
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.

While this solves the error message, it doesn't fix the problem completely: there's still no user feedback when the button is pressed with an empty list of results.

I believe a better fix would be to show a message in the ShowReview modal to the effect that no responses were selected. Is this something you can take on?

@arbrandes
Copy link
Contributor

Or, for a possibly an easier fix, to grey out the View all responses button when none are showing.

@DmytroAlipov
Copy link
Contributor Author

Hi, @arbrandes!
I think an inactive (gray) button would be a good option and, at first glance, not a difficult task. I'll try to implement this.

@DmytroAlipov DmytroAlipov force-pushed the fix-ora-filter branch 2 times, most recently from d1adcb7 to 3302aae Compare March 21, 2024 09:10
@DmytroAlipov
Copy link
Contributor Author

@arbrandes I made the button inactive. Now you can't send a request if the list is empty.

screen_40

@mphilbrick211 mphilbrick211 removed the waiting for eng review PR is ready for review. Review and merge it, or suggest changes. label Mar 21, 2024
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.

Brilliant! Not to be too picky, but do you mind adding a unit test for when the button should be disabled (and when it shouldn't)?

@DmytroAlipov
Copy link
Contributor Author

@arbrandes Now this is implemented as a snapshot (button enabled). If I make a test also based on a snapshot with only the button disabled, will such a test be ok?

@DmytroAlipov
Copy link
Contributor Author

@arbrandes I added a test😉

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.

Alright, looks good, thank you for bearing with me!

@arbrandes arbrandes merged commit 9cfab58 into openedx:master Apr 3, 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-ora-filter branch April 3, 2024 18:55
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.

4 participants