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

Tweak ordering on Assessment only page and Internships page to ignore case #4396

Merged

Conversation

sarahcrack
Copy link
Collaborator

@sarahcrack sarahcrack commented Dec 3, 2024

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

@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Dec 3, 2024
@github-actions github-actions bot added the Review label Dec 3, 2024
@@ -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 }
Copy link
Contributor

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.

@gemmadallmandfe
Copy link
Contributor

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

@github-actions github-actions bot added the content Content changes label Dec 3, 2024
martyn-w
martyn-w previously approved these changes Dec 3, 2024
Copy link
Contributor

@martyn-w martyn-w left a 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"
Copy link
Contributor

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?

Copy link
Contributor

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"
Copy link
Contributor

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?

Copy link
Contributor

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!

Copy link

github-actions bot commented Dec 3, 2024

Copy link
Contributor

@martyn-w martyn-w left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@sarahcrack sarahcrack merged commit 7b4a439 into master Dec 3, 2024
27 checks passed
@sarahcrack sarahcrack deleted the provider-ordering-assessment-only-and-internships branch December 3, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Content changes Review ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants