Skip to content

Commit

Permalink
Merge pull request #4359 from DFE-Digital/1755-remove-feature-flag-fo…
Browse files Browse the repository at this point in the history
…r-removing-personal-qualities-and-other-requirements

[1755] Remove redundant code relating to personal qualities and other requirements
  • Loading branch information
avinhurry authored Jul 10, 2024
2 parents 22c8b79 + ed3ef77 commit 3accf82
Show file tree
Hide file tree
Showing 22 changed files with 1 addition and 780 deletions.
58 changes: 0 additions & 58 deletions app/controllers/publish/courses/requirements_controller.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/controllers/publish/courses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ def show

authorize @course

@show_other_requirements = !provider.course_requirements_deprecated?

@errors = flash[:error_summary]
flash.delete(:error_summary)
end
Expand Down
23 changes: 0 additions & 23 deletions app/forms/publish/course_requirement_form.rb

This file was deleted.

4 changes: 0 additions & 4 deletions app/helpers/publish_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,4 @@ def ruby_pants_options
en_dash: '–'
}
end

def render_if(condition, &)
yield if condition
end
end
6 changes: 0 additions & 6 deletions app/models/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class Provider < ApplicationRecord
include PgSearch::Model
include VectorSearchable

CHANGES_INTRODUCED_IN_2022_CYCLE = 2022

before_save :update_searchable, if: :accredited_provider?
before_create :set_defaults

Expand Down Expand Up @@ -381,10 +379,6 @@ def tda_active?
recruitment_cycle_year.to_i > 2024 && FeatureService.enabled?(:teacher_degree_apprenticeship)
end

def course_requirements_deprecated?
recruitment_cycle.after_2024?
end

private

def accredited_provider_codes
Expand Down
11 changes: 0 additions & 11 deletions app/services/courses/copy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ class Copy
['Salary details', 'salary_details']
].freeze

POST_2022_CYCLE_REQUIREMENTS_FIELDS = [
['Personal qualities', 'personal_qualities'],
['Other requirements', 'other_requirements']
].freeze

PRE_2022_CYCLE_REQUIREMENTS_FIELDS = [
['Qualifications needed', 'required_qualifications'],
['Personal qualities', 'personal_qualities'],
['Other requirements', 'other_requirements']
].freeze

# TODO: This is to be utilised when we add these to a course form
VISA_FIELDS = [
['Can sponsor skilled worker visa', 'can_sponsor_skilled_worker_visa'],
Expand Down
20 changes: 0 additions & 20 deletions app/views/publish/courses/_description_content.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,4 @@
%w[accept_pending_gcse accept_gcse_equivalency accept_english_gcse_equivalency accept_maths_gcse_equivalency accept_science_gcse_equivalency additional_gcse_equivalencies],
action_path: !course.is_withdrawn? && course.gcse_section_complete? ? gcses_pending_or_equivalency_tests_publish_provider_recruitment_cycle_course_path(@provider.provider_code, @provider.recruitment_cycle_year, course.course_code) : nil
) %>

<% render_if(@show_other_requirements) do %>
<% enrichment_summary(
summary_list,
:course,
t("publish.providers.courses.description_content.personal_qualities_label"),
value_provided?(markdown(course.personal_qualities)),
%w[personal_qualities],
action_path: course.is_withdrawn? ? nil : "#{requirements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code)}#personal-qualities"
) %>

<% enrichment_summary(
summary_list,
:course,
t("publish.providers.courses.description_content.other_requirements_label"),
value_provided?(markdown(course.other_requirements)),
%w[other_requirements],
action_path: course.is_withdrawn? ? nil : "#{requirements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code)}#other-requirements"
) %>
<% end %>
<% end %>
21 changes: 0 additions & 21 deletions app/views/publish/courses/confirmation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -213,27 +213,6 @@
visually_hidden_text: "date course starts"
) %>
<% end %>

<% if course.gcse_subjects_required.any? && @provider.recruitment_cycle_year.to_i < Provider::CHANGES_INTRODUCED_IN_2022_CYCLE %>
<% summary_list.with_row(html_attributes: { data: { qa: "course__entry_requirements" } }) do |row| %>
<% row.with_key { "UCAS Apply: GCSE requirements for applicants" } %>
<% row.with_value do %>
<% course.gcse_subjects_required.each do |subject| %>
<%= render(
partial: "publish/courses/entry_requirements",
locals: {
gcse_subject: subject.titleize,
gcse_subject_code: course[subject]
}
) %>
<% end %>
<% end %>
<% row.with_action({
href: new_provider_recruitment_cycle_courses_entry_requirements_path(course.provider.provider_code, course.recruitment_cycle_year, params.to_unsafe_h.merge(goto_confirmation: true)),
visually_hidden_text: "entry requirements"
}) %>
<% end %>
<% end %>
<% end %>

<%= f.govuk_submit "Add course", data: { qa: "course__save" } %>
Expand Down
64 changes: 0 additions & 64 deletions app/views/publish/courses/requirements/edit.html.erb

This file was deleted.

11 changes: 0 additions & 11 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ en:
requirements_heading: Requirements and eligibility
degree_label: Degree
gcse_label: GCSEs
personal_qualities_label: Personal qualities
other_requirements_label: Other requirements
enter_a_levels: Enter A levels and equivalency test requirements
a_levels_heading: A levels and equivalency tests
a_levels_label: A levels
Expand Down Expand Up @@ -1125,15 +1123,6 @@ en:
attributes:
study_site_ids:
blank: "Add at least one study site"
publish/course_requirement_form:
attributes:
required_qualifications:
blank: "Enter details about the qualifications needed"
too_long: "Reduce the word count for required qualifications"
personal_qualities:
too_long: "Reduce the word count for personal qualities"
other_requirements:
too_long: "Reduce the word count for other requirements"
publish/course_study_mode_form:
attributes:
study_mode:
Expand Down
8 changes: 0 additions & 8 deletions config/routes/publish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@
get '/school-placements', on: :member, to: 'courses/school_placements#edit'
patch '/school-placements', on: :member, to: 'courses/school_placements#update'
get '/placements', on: :member, to: 'courses/school_placements#index', as: :placements

# This feature is deprecated and will be removed after the beginning of
# 2025 recruitment cycle.
scope constraints: { recruitment_cycle_year: /2024/ } do
get '/requirements', on: :member, to: 'courses/requirements#edit'
patch '/requirements', on: :member, to: 'courses/requirements#update'
end

get '/length', on: :member, to: 'courses/length#edit'
patch '/length', on: :member, to: 'courses/length#update'
get '/fees-and-financial-support', on: :member, to: 'courses/fees_and_financial_support#edit'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ def mock_course_attributes
accept_maths_gcse_equivalency: true,
accept_science_gcse_equivalency: true,
additional_gcse_equivalencies: 'much much more',
personal_qualities: 'Personal Qualities Text Goes Here',
other_requirements: 'Other Requirements Text Goes Here',
computed_subject_name_or_names: 'Biology',
subjects: [Subject.new(subject_name: 'foo', subject_code: 'sc')] }
end
Expand All @@ -83,7 +81,7 @@ def mock_course

class FakeCourse
include ActiveModel::Model
attr_accessor(:degree_grade, :degree_subject_requirements, :level, :name, :gcse_grade_required, :accept_pending_gcse, :accept_gcse_equivalency, :accept_english_gcse_equivalency, :accept_maths_gcse_equivalency, :accept_science_gcse_equivalency, :additional_gcse_equivalencies, :personal_qualities, :other_requirements, :computed_subject_name_or_names, :campaign_name, :subjects)
attr_accessor(:degree_grade, :degree_subject_requirements, :level, :name, :gcse_grade_required, :accept_pending_gcse, :accept_gcse_equivalency, :accept_english_gcse_equivalency, :accept_maths_gcse_equivalency, :accept_science_gcse_equivalency, :additional_gcse_equivalencies, :computed_subject_name_or_names, :campaign_name, :subjects)

def enrichment_attribute(params)
send(params)
Expand Down
2 changes: 0 additions & 2 deletions spec/factories/course_enrichments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
end
how_school_placements_work { Faker::Lorem.sentence }
interview_process { Faker::Lorem.sentence }
other_requirements { Faker::Lorem.sentence }
personal_qualities { Faker::Lorem.sentence }
required_qualifications { Faker::Educator.degree }
# Technically, salary_details should align with whether the course is
# salaried or not. Maybe worth implementing this somehow at some point.
Expand Down
2 changes: 0 additions & 2 deletions spec/features/find/search/viewing_a_course_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ def given_there_is_a_findable_course
fee_uk_eu: '9250',
fee_international: '9250',
fee_details: 'Optional fee details',
personal_qualities: 'We are looking for ambitious trainee teachers who are passionate.',
other_requirements: 'You will need three years of prior work experience, but not necessarily in an educational context.',
interview_process: 'Some helpful guidance about the interview process',
how_school_placements_work: 'Some info about how placements work',
about_course: 'This is a course',
Expand Down
Loading

0 comments on commit 3accf82

Please sign in to comment.