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

[#10936] Show explicit enroll errors #10943

Merged
merged 10 commits into from
Mar 29, 2021

Conversation

daongochieu2810
Copy link
Contributor

Fixes #10936

  • Return error messages from backend through EnrollError class to be displayed by frontend.
  • Create a new column in the fail to enroll students table to show error messages.
  • Fix table layout so text will not overflow.
    Screenshot from 2021-01-31 12-44-23

@teammates-bot
Copy link

Hi @daongochieu2810, these parts of your pull request do not appear to follow our contributing guidelines:

  1. PR Title
    • Issue Reference (#<issue-number>) missing.

@daongochieu2810 daongochieu2810 changed the title Show explicit enroll errors [#10936] Show explicit enroll errors Jan 31, 2021
@Derek-Hardy Derek-Hardy added the s.ToReview The PR is waiting for review(s) label Feb 1, 2021
Copy link
Contributor

@hcwong hcwong left a comment

Choose a reason for hiding this comment

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

Any reason why the changes were made directly on the StudentsData response directly?

I'm uncomfortable with the idea because StudentsData is used by many Actions. It seems weird to add a failToEnrollStudents field when this would only be used for the EnrollStudentsAction.
EDIT: You can take a look at the rest of the files in ui/output. All of them only have one constructor iirc.

An alternative is to create a custom API response for this action, something like EnrollStudentsData. Do let me know what you think.

@daongochieu2810
Copy link
Contributor Author

Yes I think having a separate response for this action is better

@hcwong
Copy link
Contributor

hcwong commented Feb 2, 2021

Yes I think having a separate response for this action is better

Okay, on that note since EnrollError does not extend ApiOutput, consider making it a nested static class, or a map (not too particular about this). You can look at SessionResultsData for reference. Also consider renaming EnrollError if its still a class since it can be misleading as it is not exactly an Exception.

Copy link
Contributor

@hcwong hcwong left a comment

Choose a reason for hiding this comment

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

Few comments, but nothing major. LGTM, just address the stuff before merging

@hcwong hcwong added s.FinalReview The PR is ready for final review and removed s.ToReview The PR is waiting for review(s) labels Feb 3, 2021
@rrtheonlyone rrtheonlyone self-requested a review February 7, 2021 17:03
@rrtheonlyone rrtheonlyone self-assigned this Feb 7, 2021
@moziliar
Copy link
Contributor

One comment here: is it good/possible for the instructor to fold the error messages and have expand all option? In and expanded view, should the # of failed enrolments exceed ~20, it'd be hard for the instructor to view all?

@damithc
Copy link
Contributor

damithc commented Feb 16, 2021

Can we make it easier for the instructor to trace back the error to the spreadsheet? e.g.,

  • give the matching row number in this table
  • mark the offending rows in some way e.g., turn the bg color to red

@damithc
Copy link
Contributor

damithc commented Feb 16, 2021

One comment here: is it good/possible for the instructor to fold the error messages and have expand all option? In and expanded view, should the # of failed enrolments exceed ~20, it'd be hard for the instructor to view all?

hmm... given that the user is unlikely NOT to want to look at the errors, I think it is fine to show all errors by default. Otherwise it is just one more unnecessary step the user has to perform.

@madanalogy
Copy link
Contributor

Can we make it easier for the instructor to trace back the error to the spreadsheet? e.g.,

  • give the matching row number in this table
  • mark the offending rows in some way e.g., turn the bg color to red

@daongochieu2810 any response to the comment above? If not something you feel is within the scope of this PR maybe you could help create a feature request issue for it

@daongochieu2810
Copy link
Contributor Author

@madanalogy the highlighting is done in this PR #10968

@madanalogy madanalogy assigned hcwong and madanalogy and unassigned rrtheonlyone Mar 23, 2021
@madanalogy madanalogy added c.Feature User-facing feature; can be new feature or enhancement to existing feature s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging and removed s.FinalReview The PR is ready for final review labels Mar 23, 2021
@madanalogy madanalogy added this to the V7.13.0 milestone Mar 23, 2021
@madanalogy madanalogy merged commit 52139d4 into TEAMMATES:master Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c.Feature User-facing feature; can be new feature or enhancement to existing feature s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enrolling students: undocumented restriction on team name length
8 participants