Skip to content

Commit

Permalink
Update decline email and view content
Browse files Browse the repository at this point in the history
This updates the content of the decline email and view to match the
changes requested by our content designers.
  • Loading branch information
thomasleese committed Nov 14, 2023
1 parent b7c21f9 commit 1beea5f
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 80 deletions.
3 changes: 3 additions & 0 deletions app/mailers/teacher_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def application_awarded
end

def application_declined
@view_object =
TeacherInterface::ApplicationFormViewObject.new(application_form:)

view_mail(
GOVUK_NOTIFY_TEMPLATE_ID,
to: teacher.email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
<% @assessment.sections.not_preliminary.each do |section| %>
<% if (selected_failure_reasons = section.selected_failure_reasons).present? %>
<h3 class="govuk-heading-m"><%= t(".assessment_section.#{section.key}") %></h3>
<ul class="govuk-list">
<ul class="govuk-list govuk-list--bullet">
<% selected_failure_reasons.each do |failure_reason| %>
<li>
<h4 class="govuk-heading-s">
<%= t(failure_reason.key, scope: %i[assessor_interface assessment_sections failure_reasons as_statement]) %>
</h4>

<% if FailureReasons.decline?(failure_reason: failure_reason.key) %>
<p class="govuk-body govuk-!-margin-bottom-2">Your note to the applicant:</p>
<% else %>
<p class="govuk-body govuk-!-margin-bottom-2">Your note (the applicant won’t see this):</p>
<% end %>
<% if (assessor_feedback = failure_reason.assessor_feedback).present? %>
<% if FailureReasons.decline?(failure_reason: failure_reason.key) %>
<p class="govuk-body govuk-!-margin-bottom-2">Your note to the applicant:</p>
<% else %>
<p class="govuk-body govuk-!-margin-bottom-2">Your note (the applicant won’t see this):</p>
<% end %>

<%= govuk_inset_text do %>
<%= simple_format failure_reason.assessor_feedback %>
<%= govuk_inset_text { simple_format assessor_feedback } %>
<% end %>
</li>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,58 +1,41 @@
<h2 class="govuk-heading-l">Your QTS application has been declined</h2>

<h3 class="govuk-heading-m">Why your application was declined</h3>
<p class="govuk-body">Thank you for applying for qualified teacher status (QTS) and for your patience while we reviewed your application.</p>

<% if (declined_reasons = view_object.declined_reasons).present? %>
<% declined_reasons.each do |title, reasons| %>
<% if title.present? %>
<h4 class="govuk-heading-s"><%= title %></h4>
<% end %>
<h3 class="govuk-heading-m">Reason for decline</h3>

<ul class="govuk-list">
<% reasons.each do |reason| %>
<li><%= simple_format reason %></li>
<% end %>
</ul>
<% view_object.declined_reasons.each do |title, reasons| %>
<% if title.present? %>
<h4 class="govuk-heading-s"><%= title %></h4>
<% end %>

<ul class="govuk-list govuk-list--bullet">
<% reasons.each do |reason| %>
<li><%= simple_format reason %></li>
<% end %>
</ul>
<% end %>

<% unless view_object.declined_cannot_reapply? %>
<h3 class="govuk-heading-m">What you can do next</h3>

<p class="govuk-body">While your QTS application was declined this time, you can make a new application in future, if you’re able to address the decline reasons we’ve set out.</p>

<p class="govuk-body">If you reapply for QTS, you will not be able to review the details of your previous application.</p>
<h2 class="govuk-heading-l">What you can do next</h2>

<p class="govuk-body"><%= govuk_button_link_to "Apply again", new_teacher_interface_application_form_path %></p>
<p class="govuk-body">You’ll be able to make a new application for QTS once you've addressed the decline reasons we've given. If you reapply for QTS, you’ll not be able to review the details of your previous application.</p>

<h3 class="govuk-heading-m">Other routes to teaching in England</h3>
<p class="govuk-body"><%= govuk_button_link_to "Apply again", %i[new teacher_interface application_form] %></p>

<p class="govuk-body">You may want to explore other routes to teaching in England. QTS is not a requirement to teach in independent (private) schools, academies, free schools and in the further education (FE) sector in England.</p>

<p class="govuk-body">You can find out more about working in these sectors from:</p>

<ul class="govuk-list">
<li><%= govuk_link_to "Independent Schools Council", "http://www.isc.co.uk/" %></li>
<li><%= govuk_link_to "The Education & Training Foundation", "http://www.et-foundation.co.uk/" %></li>
<li><%= govuk_link_to "Academies and Free Schools", "https://www.gov.uk/types-of-school" %></li>
</ul>

<p class="govuk-body">For further information on other routes to gaining QTS visit <%= govuk_link_to "Get Into Teaching", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas" %>.</p>
<p class="govuk-body">You can also learn more about <%= govuk_link_to "training to teach in England", "https://getintoteaching.education.gov.uk/non-uk-teachers/train-to-teach-in-england-as-an-international-student" %>.</p>
<p class="govuk-body">You may want to <%= govuk_link_to "explore other routes to getting QTS", "https://www.gov.uk/government/publications/apply-for-qualified-teacher-status-qts-if-you-teach-outside-the-uk/routes-to-qualified-teacher-status-qts-for-teachers-and-those-with-teaching-experience-outside-the-uk" %>.</p>
<% end %>

<h3 class="govuk-heading-m">Decision review</h3>
<h2 class="govuk-heading-l">Decision review</h2>

<p class="govuk-body">Applicants who have been declined for QTS are entitled to a review of the decline decision by a Casework Manager.</p>
<p class="govuk-body">If you would like to request a decision review, you will need to provide:</p>
<p class="govuk-body">If you would like to request a decision review, you’ll need to provide:</p>

<ul class="govuk-list govuk-list--bullet">
<li>formal evidence and reasoning as to how you meet the required assessment criteria</li>
<li>additional information not included in your original application that would support your decision review</li>
</ul>

<p class="govuk-body">Your request for review must be received within 28 days of receipt of the decision to decline QTS.</p>

<p class="govuk-body">Email your request for review, including the information required as above, to <%= govuk_link_to t("service.email.enquiries"), "mailto:#{t("service.email.enquiries")}" %>.</p>

<p class="govuk-body">If you are not satisfied with the outcome of the decision review, you can request a final formal appeal to a senior Teacher Qualification Manager.</p>
42 changes: 30 additions & 12 deletions app/views/teacher_mailer/application_declined.text.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
Dear <%= application_form_full_name(@application_form) %>

# Your QTS application has been declined

<%= render "shared/teacher_mailer/reference_number" %>

Thank you for applying for qualified teacher status (QTS) and for your patience while we reviewed your application.
Thank you for applying for QTS in England. Unfortunately, your application has been declined.

# Reason for decline

Unfortunately, we’re unable to award QTS status.
<% @view_object.declined_reasons.each do |title, reasons| %>
<% if title.present? %>
## <%= title %>

<%- if @further_information_requested -%>
<% end %>
<% reasons.each do |reason| %>
- <%= reason.gsub("\n\n", "\n").gsub("\n", "\n ") %>
<% end %>

<% end %>
<% unless @view_object.declined_cannot_reapply? %>
# What you can do next

You can sign in to find out why your application was declined:
<%- else -%>
# Why your QTS application was declined
You’ll be able to make a new application for QTS once you've addressed the decline reasons we've given. If you reapply for QTS, you’ll not be able to review the details of your previous application.

[Apply again](<%= new_teacher_interface_application_form_url %>)

You may want to [explore other routes to getting QTS](https://www.gov.uk/government/publications/apply-for-qualified-teacher-status-qts-if-you-teach-outside-the-uk/routes-to-qualified-teacher-status-qts-for-teachers-and-those-with-teaching-experience-outside-the-uk).

<% end %>
# Decision review

Applicants who have been declined for QTS are entitled to a review of the decline decision by a Casework Manager.
If you would like to request a decision review, you’ll need to provide:

- formal evidence and reasoning as to how you meet the required assessment criteria
- additional information not included in your original application that would support your decision review

You can sign in to find out why your application was declined:
<%- end -%>
Your request for review must be received within 28 days of receipt of the decision to decline QTS. Email your request for review, including the information required as above, to <%= t("service.email.enquiries") %>.

<%= new_teacher_session_url %>
If you are not satisfied with the outcome of the decision review, you can request a final formal appeal to a senior Teacher Qualification Manager.

<%= render "shared/teacher_mailer/help_us_to_improve_this_service" %>
[Sign in](<%= new_teacher_session_url %>) to review the outcome of your application.

<%= render "shared/teacher_mailer/footer" %>
2 changes: 1 addition & 1 deletion config/locales/mailer.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ en:
application_awarded:
subject: Your QTS application was successful
application_declined:
subject: Your QTS application has been declined
subject: Your QTS application was unsuccessful
application_not_submitted:
subject:
0: Your draft QTS application will be deleted in 2 weeks
Expand Down
24 changes: 2 additions & 22 deletions spec/mailers/teacher_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
describe "#subject" do
subject(:subject) { mail.subject }

it { is_expected.to eq("Your QTS application has been declined") }
it { is_expected.to eq("Your QTS application was unsuccessful") }
end

describe "#to" do
Expand All @@ -72,30 +72,10 @@

it { is_expected.to include("Dear First Last") }
it { is_expected.to include("abc") }
it do
is_expected.to include(
"You can sign in to find out why your application was declined:",
)
end
it { is_expected.to include("Reason for decline") }
end

it_behaves_like "an observable mailer", "application_declined"

context "further information requested" do
let(:assessment) do
create(:assessment, :with_further_information_request)
end

describe "#body" do
subject(:body) { mail.body.encoded }

it do
is_expected.to include(
"You can sign in to find out why your application was declined:",
)
end
end
end
end

describe "#application_not_submitted" do
Expand Down
6 changes: 3 additions & 3 deletions spec/views/teacher_interface/application_forms_show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
end

it { is_expected.to match(/Your QTS application has been declined/) }
it { is_expected.to match(/Why your application was declined/) }
it { is_expected.to match(/you can make a new application in future/) }
it { is_expected.to match(/Reason for decline/) }
it { is_expected.to match(/You’ll be able to make a new application/) }
end

context "and a further information request" do
Expand All @@ -62,7 +62,7 @@
end

it { is_expected.to match(/Your QTS application has been declined/) }
it { is_expected.to match(/you can make a new application in future/) }
it { is_expected.to match(/You’ll be able to make a new application/) }

it "does not show the assessor notes to the applicant" do
expect(subject).not_to match(/A note/)
Expand Down

0 comments on commit 1beea5f

Please sign in to comment.