diff --git a/app/models/application_form.rb b/app/models/application_form.rb index 1f52837f1b..f1de783c2a 100644 --- a/app/models/application_form.rb +++ b/app/models/application_form.rb @@ -281,7 +281,7 @@ def should_send_reminder_email?(name, number_of_reminders_sent) (days_until_expired <= 14 && number_of_reminders_sent.zero?) || (days_until_expired <= 7 && number_of_reminders_sent == 1) when "references" - unreviewed_reference_requests.any? do |reference_request| + reference_requests_not_yet_received_or_rejected.any? do |reference_request| reference_request.should_send_reminder_email?( "expiration", number_of_reminders_sent, @@ -302,7 +302,8 @@ def send_reminder_email(name, number_of_reminders_sent) .with( teacher:, number_of_reminders_sent:, - reference_requests: unreviewed_reference_requests.to_a, + reference_requests: + reference_requests_not_yet_received_or_rejected.to_a, ) .references_reminder .deliver_later @@ -327,10 +328,10 @@ def build_documents documents.build(document_type: :written_statement) end - def unreviewed_reference_requests + def reference_requests_not_yet_received_or_rejected ReferenceRequest .joins(:work_history) .where(work_histories: { application_form_id: id }) - .where(received_at: nil, expired_at: nil) + .where(received_at: nil, verify_passed: nil, review_passed: nil) end end diff --git a/app/views/assessor_interface/application_forms/status.html.erb b/app/views/assessor_interface/application_forms/status.html.erb index 9bafc26a6f..a660ad5cfa 100644 --- a/app/views/assessor_interface/application_forms/status.html.erb +++ b/app/views/assessor_interface/application_forms/status.html.erb @@ -1,5 +1,5 @@ <% title = if @view_object.assessment.review? - "An assessor will now review the application and make a decision on awarding or declining QTS." + "Application sent for review" elsif @view_object.application_form.waiting_on? "Reference requests sent successfully" elsif @view_object.application_form.awarded?