@@ -3,11 +3,13 @@ module OrganisationsHelper
33
44 OFSTED_REPORT_ENDPOINT = "https://reports.ofsted.gov.uk/oxedu_providers/full/(urn)/" . freeze
55
6+ # :nocov:
67 def age_range ( school )
78 return I18n . t ( "vacancies.listing.schools.not_given" ) unless school . minimum_age? && school . maximum_age?
89
910 "#{ school . minimum_age } to #{ school . maximum_age } "
1011 end
12+ # :nocov:
1113
1214 def full_address ( organisation )
1315 address_join ( [ organisation . address , organisation . town , organisation . county , organisation . postcode ] )
@@ -21,6 +23,7 @@ def ofsted_report(school)
2123 OFSTED_REPORT_ENDPOINT + school . urn
2224 end
2325
26+ # :nocov:
2427 def organisation_type ( organisation )
2528 return organisation . group_type &.humanize if organisation . school_group?
2629
@@ -32,6 +35,7 @@ def organisation_type(organisation)
3235
3336 school_type_details . reject ( &:blank? ) . reject { |str | str == I18n . t ( "vacancies.listing.schools.not_given" ) } . join ( ", " )
3437 end
38+ # :nocov:
3539
3640 def organisation_types ( organisations )
3741 organisations . select ( &:school? ) . group_by { |org | [ org . school_type , org . religious_character ] } . map do |type , orgs_by_type |
@@ -59,15 +63,17 @@ def school_or_trust_visits(organisation)
5963 end
6064 end
6165
66+ # :nocov:
6267 def school_size ( school )
6368 return number_of_pupils ( school ) if school . number_of_pupils . present?
6469 return school_capacity ( school ) if school . school_capacity . present?
6570
6671 I18n . t ( "vacancies.listing.schools.no_information" )
6772 end
73+ # :nocov:
6874
6975 def school_has_school_size_data? ( school )
70- school . number_of_pupils . present? || school . school_capacity . present?
76+ number_of_pupils ( organisation ) || school . school_capacity . present?
7177 end
7278
7379 def school_is_part_of_a_trust? ( school )
@@ -92,9 +98,11 @@ def number_of_pupils(school)
9298 I18n . t ( "vacancies.listing.schools.size.enrolled" , number : school . number_of_pupils )
9399 end
94100
101+ # :nocov:
95102 def school_capacity ( school )
96103 I18n . t ( "vacancies.listing.schools.size.up_to" , capacity : school . school_capacity )
97104 end
105+ # :nocov:
98106
99107 def missing_profile_information_notification ( prompt )
100108 content_tag ( :div , class : %i[ govuk-inset-text govuk-inset-text--dark-blue inset-text--narrow-border ] ) do
0 commit comments