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

Validate A/AS level grades #3458

Merged
merged 3 commits into from
Nov 20, 2020
Merged

Conversation

malcolmbaig
Copy link
Contributor

Context

As a candidate
I need to… provide the required information efficiently and accurately
So that… I can complete my application

We want grade data for A/AS level qualifications to be more structured. It should remain a free text input because there are usability issues with autcompletes, radio buttons, and selects.

Changes proposed in this pull request

  • Remove whitespace and upcase grades before validating the form
  • Validate by comparing against a list of standard A/AS level grades
  • A refactor related to how we refer to Other Qualification types
    Peek 2020-11-18 16-31

Guidance to review

Can be tested by adding an A/AS level in the review app.

Link to Trello card

https://trello.com/c/7sDY3Doc

Things to check

  • This code does not rely on migrations in the same Pull Request
  • If this code includes a migration adding or changing columns, it also backfills existing records for consistency
  • API release notes have been updated if necessary
  • New environment variables have been added to the Azure config

@tijmenb tijmenb temporarily deployed to apply-for-te-2508-a-lev-qfgkaw November 18, 2020 17:01 Inactive
@malcolmbaig malcolmbaig force-pushed the 2508-a-level-grades-structured-input branch from ab57614 to 4d33d42 Compare November 19, 2020 10:19
@malcolmbaig malcolmbaig temporarily deployed to apply-for-te-2508-a-lev-qfgkaw November 19, 2020 10:19 Inactive
@malcolmbaig malcolmbaig added the Candidate Candidate facing issue label Nov 19, 2020
@malcolmbaig
Copy link
Contributor Author

Closing temporarily - needs a couple of changes

@malcolmbaig malcolmbaig force-pushed the 2508-a-level-grades-structured-input branch from 4d33d42 to 7e57634 Compare November 19, 2020 12:38
The Other Qualifications flow uses several string values to identify the
qualification type. Using constants to refer these is useful because:

- We can see the list of valid types handled by this flow in a single
  place (the top of the OtherQualificationWizard class)
- The relationship between the string values and the places they are
  used is a little easier to see when scanning, and easier to grep for.
- Remove whitespace and upcase grades before validating the form
- Validate by comparing against a list of standard A/AS level grades
@malcolmbaig malcolmbaig temporarily deployed to apply-for-te-2508-a-lev-qfgkaw November 19, 2020 12:38 Inactive
Copy link
Contributor

@davidgisbey davidgisbey left a comment

Choose a reason for hiding this comment

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

Great work as always. I really like the sanitize_grade_where_required method. We should use that across our grade validation 👍

Copy link
Contributor

@paulrobertlloyd paulrobertlloyd left a comment

Choose a reason for hiding this comment

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

👌

@malcolmbaig malcolmbaig merged commit 4d0fdf3 into master Nov 20, 2020
@malcolmbaig malcolmbaig deleted the 2508-a-level-grades-structured-input branch November 20, 2020 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Candidate Candidate facing issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants