-
Notifications
You must be signed in to change notification settings - Fork 11
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
Tweak ordering on Assessment only page and Internships page to ignore case #4396
Tweak ordering on Assessment only page and Internships page to ignore case #4396
Conversation
@@ -15,7 +15,7 @@ def group_link_anchor(group) | |||
end | |||
|
|||
def items(group) | |||
@data.dig(group, "providers") | |||
@data.dig(group, "providers").sort_by { |provider| provider["header"].to_s.downcase } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be more efficient to do the sort once when we generate the Yaml data (see lib/tasks/generate_assessment_only_providers.rake
), rather than sort here which will run on every request of the page.
Assessment only page and internships page tested successfully from a front end perspective - happy for this to be merged once Martyn's comments have been addressed |
… tasks to handle sort
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
@@ -4,6 +4,7 @@ heading: "Assessment only route to QTS for unqualified teachers" | |||
subcategory: Other routes into teaching | |||
description: |- | |||
Find out about the assessment only route to qualified teacher status (QTS) for unqualified teachers who have worked in a classroom. | |||
date: "2021-06-08" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this date shouldn't be here - its coming from a template, could you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One AO date was removed as part of #4377 but not this one - definitely needs removing!
@@ -4,6 +4,7 @@ heading: "Get teaching experience with an internship" | |||
subcategory: Postgraduate teacher training | |||
description: |- | |||
Find paid teaching internships to gain new skills and see what classroom life is like. Explore chemistry, computing, languages, maths and physics internships. | |||
date: "2021-04-14" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this date is coming from a template - could you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One internships page date was removed as part of #4377 but not this one - definitely needs removing!
Review app deployed to https://get-into-teaching-app-review-4396.test.teacherservices.cloud |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Trello card
https://trello.com/c/vQCGgTHI/7005-tweak-ordering-on-assessment-only-page-and-internships-page-to-ignore-case
Context
We have recently made a change to allow the upload of Assessment only provider listings, to make future maintenance easier. The upload process lists providers alphabetically within each regional section. However, it currently orders by providers starting with an uppercase letter first, and then lowercase letters later.
Changes proposed in this pull request
Adapted the rake tasks to convert provider value to a string and make it lowercase; this ensures case-insensitive sorting on the the Assessment only page and the Internships page.
Guidance to review