Skip to content

Commit

Permalink
Tweak ordering on Assessment only page and Internships page to ignore…
Browse files Browse the repository at this point in the history
… case (#4396)

* adapted ListingComponent to order providers regardless of letter case

* removed case insentive sorting from ListingComponent and adapted rake tasks to handle sort

* removed date from internships and assessment only page template
  • Loading branch information
sarahcrack authored Dec 3, 2024
1 parent b39ec2f commit 7b4a439
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@ provider_groups:
telephone: "01227 925555"
international_phone: "+441227925555"

- header: "i2i Teaching Partnership SCITT"
link: "https://www.i2ipartnership.co.uk/"
name: "Krissy Taylor"
email: "[email protected]"
telephone: "01252 900550"
international_phone: "+441252900550"

- header: "Inspiring Futures Partnership Trust"
link: "https://cheppingviewscitt.com/Entry-Criteria/"
name: "Nicky Stephenson"
Expand Down Expand Up @@ -458,13 +465,6 @@ provider_groups:
telephone: "0118 378 7237"
international_phone: "+441183787237"

- header: "i2i Teaching Partnership SCITT"
link: "https://www.i2ipartnership.co.uk/"
name: "Krissy Taylor"
email: "[email protected]"
telephone: "01252 900550"
international_phone: "+441252900550"

South West:
providers:
- header: "Bournemouth Bay Teacher Training Partnership"
Expand Down
14 changes: 7 additions & 7 deletions app/views/content/train-to-be-a-teacher/teaching-internships.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ provider_groups:
areas: "West Berkshire"
name: "Claire Hickling"
email: "[email protected]"
- header: "i2i Teaching Partnership"
link: "https://www.i2ipartnership.co.uk/1243/undergraduate-teaching-internship-programme"
applications: "Open January"
subjects: "chemistry, computing, maths, physics, languages"
areas: "Hampshire, Surrey"
name: "Liz Wylie"
email: "[email protected]"
- header: "Ringwood School"
link: "https://www.ringwood.hants.sch.uk/teacher-training/paid-internships/"
applications: "Open April"
Expand Down Expand Up @@ -400,13 +407,6 @@ provider_groups:
areas: "Slough, Surrey"
name: "Natasha Bisset"
email: "[email protected]"
- header: "i2i Teaching Partnership"
link: "https://www.i2ipartnership.co.uk/1243/undergraduate-teaching-internship-programme"
applications: "Open January"
subjects: "chemistry, computing, maths, physics, languages"
areas: "Hampshire, Surrey"
name: "Liz Wylie"
email: "[email protected]"
South West:
providers:
- header: "Excalibur Academies Trust"
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/generate_assessment_only_providers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace :assessment_only_providers do
end
end

provider_groups = provider_groups.transform_values { |v| v["providers"].sort_by { |a| a["header"] } }.sort_by { |x, _y| [case x when "Non-UK"then 2; when "National" then 0; else 1 end, x] }
provider_groups = provider_groups.transform_values { |v| v["providers"].sort_by { |a| a["header"].to_s.downcase } }.sort_by { |x, _y| [case x when "Non-UK"then 2; when "National" then 0; else 1 end, x] }

File.open("app/views/content/train-to-be-a-teacher/assessment-only-route-to-qts.md", "w") do |f|
f.write ERB.new(File.read("lib/tasks/support/assessment-only-route-to-qts.md.erb"), trim_mode: "<>").result(binding)
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/generate_teaching_internship_providers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace :teaching_internship_providers do
h[ip.region.to_s]["providers"] << ip.to_h
end

providers.transform_values! { |v| v["providers"].sort_by { |a| a["header"] } }
providers.transform_values! { |v| v["providers"].sort_by { |a| a["header"].to_s.downcase } }
provider_groups = providers.sort

File.open("app/views/content/train-to-be-a-teacher/teaching-internships.md", "w") do |f|
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/support/assessment-only-route-to-qts.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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"
image: false
backlink: /
promo_content:
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/support/teaching-internship-providers.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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"
image: false
promo_content:
- content/train-to-be-a-teacher/promos/eta-promo-internships
Expand Down

0 comments on commit 7b4a439

Please sign in to comment.