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

Add error handling to Students modal #5040

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

donnapep
Copy link
Collaborator

Changes proposed in this Pull Request

Adds an error message if something goes wrong with adding, removing, or resetting progress.

Testing instructions

To force errors to happen, I changed the following lines to return 404 instead of WP_HTTP::OK:

Then:

  • Select Add to Course from the dropdown, select a course, and click the Add to Course button.
  • Ensure the message "Unable to add student. Please try again." is displayed.
  • Close the modal.
  • Select Remove from Course from the dropdown, select a course, and click the Remove from Course button.
  • Ensure the message "Unable to remove student. Please try again." is displayed.
  • Close the modal.
  • Select Reset or Remove Progress from the dropdown, select a course, and click the Reset or Remove Progress button.
  • Ensure the message "Unable to reset or remove progress for this student. Please try again." is displayed.
  • Close the modal.

Screenshot / Video

Add

Screen Shot 2022-04-20 at 11 52 50 AM

Remove

Screen Shot 2022-04-20 at 11 52 36 AM

Reset or Remove Progress

Screen Shot 2022-04-20 at 11 53 01 AM

@donnapep donnapep added this to the 4.4.0 - Student Management milestone Apr 20, 2022
@donnapep donnapep self-assigned this Apr 20, 2022
@donnapep donnapep marked this pull request as draft April 20, 2022 16:05
@donnapep donnapep requested a review from a team April 20, 2022 20:01
@donnapep
Copy link
Collaborator Author

Note that the test that is failing was not introduced in this PR, but was added at some point when adding tests for the modal. We'll still need to look into this separately.

Copy link
Member

@merkushin merkushin left a comment

Choose a reason for hiding this comment

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

Looks good and works well 👍

As for tests, locally all tests passed.
CleanShot 2022-04-21 at 21 13 36@2x

@donnapep donnapep merged commit fd1556b into feature/student-management Apr 22, 2022
@donnapep donnapep deleted the add/modal-errors branch April 22, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants