Skip to content

Commit

Permalink
Merge pull request #6653 from alphagov/eu-rebrand-changes-2024
Browse files Browse the repository at this point in the history
Changes caused by SLC EU rebrand work
  • Loading branch information
anatron authored Apr 11, 2024
2 parents c11aed6 + b4bde35 commit 08b58fd
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 149 deletions.
61 changes: 35 additions & 26 deletions app/flows/student_finance_calculator_flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,28 @@ def define
end

next_node do
question :what_type_of_student_are_you?
question :what_loans_are_you_eligible_for?
end
end

# Q2
radio :what_type_of_student_are_you? do
option :"uk-full-time"
option :"uk-part-time"
option :"eu-full-time"
option :"eu-part-time"
radio :what_loans_are_you_eligible_for? do
option :"tuition-and-maintenance"
option :"tuition-only"

on_response do |response|
calculator.loan_eligibility = response
end

next_node do
question :will_you_be_studying_full_or_part_time?
end
end

# Q3
radio :will_you_be_studying_full_or_part_time? do
option :"full-time"
option :"part-time"

on_response do |response|
calculator.course_type = response
Expand All @@ -35,7 +47,7 @@ def define
end
end

# Q3
# Q4
money_question :how_much_are_your_tuition_fees_per_year? do
on_response do |response|
calculator.tuition_fee_amount = SmartAnswer::Money.new(response)
Expand All @@ -46,18 +58,15 @@ def define
end

next_node do
case calculator.course_type
when "uk-full-time"
if calculator.loan_eligibility == "tuition-and-maintenance"
question :where_will_you_live_while_studying?
when "uk-part-time"
question :where_will_you_live_while_studying?
when "eu-full-time", "eu-part-time"
outcome :outcome_eu_students
elsif calculator.loan_eligibility == "tuition-only"
outcome :outcome_tuition_fee_only
end
end
end

# Q4
# Q5
radio :where_will_you_live_while_studying? do
option :'at-home'
option :'away-outside-london'
Expand All @@ -72,23 +81,23 @@ def define
end
end

# Q5
# Q6
money_question :whats_your_household_income? do
on_response do |response|
calculator.household_income = response
end

next_node do
case calculator.course_type
when "uk-full-time"
when "full-time"
question :do_any_of_the_following_apply_uk_full_time_students_only?
when "uk-part-time"
when "part-time"
question :how_many_credits_will_you_study?
end
end
end

# Q6a
# Q7a
value_question :how_many_credits_will_you_study?, parse: Float do
on_response do |response|
calculator.part_time_credits = response
Expand All @@ -103,7 +112,7 @@ def define
end
end

# Q6b
# Q7b
value_question :how_many_credits_does_a_full_time_student_study?, parse: Float do
on_response do |response|
calculator.full_time_credits = response
Expand All @@ -118,7 +127,7 @@ def define
end
end

# Q7a uk full-time students
# Q8a uk full-time students
checkbox_question :do_any_of_the_following_apply_uk_full_time_students_only? do
option :"children-under-17"
option :"dependant-adult"
Expand All @@ -135,7 +144,7 @@ def define
end
end

# Q7b uk students
# Q8b uk students
checkbox_question :do_any_of_the_following_apply_all_uk_students? do
option :"has-disability"
option :"low-income"
Expand All @@ -150,7 +159,7 @@ def define
end
end

# Q8a
# Q9a
radio :what_course_are_you_studying? do
option :"teacher-training"
option :"dental-medical-healthcare"
Expand All @@ -163,19 +172,19 @@ def define

next_node do |response|
case calculator.course_type
when "uk-full-time"
when "full-time"
if response == "dental-medical-healthcare"
question :are_you_a_doctor_or_dentist?
else
outcome :outcome_uk_full_time_students
end
when "uk-part-time"
when "part-time"
outcome :outcome_uk_part_time_students
end
end
end

# Q8b
# Q9b
radio :are_you_a_doctor_or_dentist? do
option :yes
option :no
Expand All @@ -197,7 +206,7 @@ def define

outcome :outcome_uk_part_time_students

outcome :outcome_eu_students
outcome :outcome_tuition_fee_only

outcome :outcome_uk_full_time_dental_medical_students
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You could get a [bursary or scholarship](/extra-money-pay-university) from your university or college.

<% if course_type == "uk-full-time" %>
<% if course_type == "full-time" %>
You might be able to get [help with the costs of travel for study or work placements](/travel-grants-students-england) as part of your course.
<% end %>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<% govspeak_for :body do %>
<%= render partial: 'disclaimer' %>

Read the [guidance](/student-finance/eu-students) about student finance and how to apply.
[Read the guidance](https://www.gov.uk/apply-for-student-finance) about how to apply.

##Tuition costs

You could get a [Tuition Fee Loan](/student-finance/eu-students) - <%= format_money(calculator.tuition_fee_amount, pounds_only: true) %> per year.

The loan pays for the cost of your course and must be paid back.

##Living costs

You might be eligible for help with living costs (known as 'maintenance'), depending on your nationality, residency status and address history.

[Find out if you're eligible](/student-finance/eu-students).

##Extra help

You could get a [bursary or scholarship](/extra-money-pay-university) from your university or college. Usually, this doesn't have to be paid back.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% text_for :title do %>
What loans are you eligible for?
<% end %>
<% options(
"tuition-and-maintenance": "Tuition fee and maintenance loans (full support)",
"tuition-only": "Tuition fee loans only"
) %>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% text_for :title do %>
Will you be studying full-time or part-time?
<% end %>
<% options(
"full-time": "Full-time",
"part-time": "Part-time"
) %>
32 changes: 18 additions & 14 deletions app/flows/student_finance_calculator_flow/start.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@
<% end %>
<% text_for :meta_description do %>
Student finance calculator - get a quick estimate of what student loans, grants, bursaries and other funding you could get - for full-time, part-time and EU students
Student finance calculator - get a quick estimate of what student loans, grants, bursaries and other funding you could get - for full-time, and part-time students
<% end %>
<% govspeak_for :body do %>
This calculator is for students from England or the European Union (EU) starting a new undergraduate course in academic years:

+ 2023 to 2024
+ 2024 to 2025

Use the student finance calculator to estimate:

+ student loans
+ extra student funding, for example if you’re disabled or have children

This calculator is for students living in England starting a new undergraduate course in academic years:

- 2023 to 2024
- 2024 to 2025

You'll need to [check if you're eligible for tuition fees and living costs (full support) or tuition fee-only funding before you start](https://www.gov.uk/student-finance/who-qualifies).

Use this calculator to estimate:

- how much student loan you could get
- extra funding, for example if you’re disabled or have children

Your result will be more accurate if you know your annual household income (your parents’ or partner’s income plus your own).
<% end %>
<% govspeak_for :post_body do %>
You must check what loans you’re eligible for before you start.

If you’re a part-time student you’ll need to know how many credits you’ll study and how many credits a full-time student would study.

You cannot use the calculator if you’re from [Scotland](http://www.saas.gov.uk/), [Wales](http://www.studentfinancewales.co.uk) or [Northern Ireland.](http://www.studentfinanceni.co.uk)
<% end %>
You cannot use the calculator if you’re from [Scotland](http://www.saas.gov.uk/), [Wales](http://www.studentfinancewales.co.uk/) or [Northern Ireland](http://www.studentfinanceni.co.uk/).
<% end %>
10 changes: 6 additions & 4 deletions lib/smart_answer/calculators/student_finance_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class StudentFinanceCalculator
:doctor_or_dentist,
:uk_ft_circumstances,
:uk_all_circumstances,
:tuition_fee_amount
:tuition_fee_amount,
:loan_eligibility

LOAN_MAXIMUMS = {
"2023-2024" => {
Expand Down Expand Up @@ -107,6 +108,7 @@ def initialize(params = {})
@full_time_credits = params[:full_time_credits]
@doctor_or_dentist = params[:doctor_or_dentist]
@uk_ft_circumstances = params.fetch(:uk_ft_circumstances, [])
@loan_eligibility = params[:loan_eligibility]
end

def reduced_maintenance_loan_for_healthcare
Expand Down Expand Up @@ -146,9 +148,9 @@ def adult_dependant_allowance
end

def tuition_fee_maximum
if @course_type == "uk-full-time" || @course_type == "eu-full-time"
if @course_type == "full-time"
tuition_fee_maximum_full_time
else
elsif @course_type == "part-time"
tuition_fee_maximum_part_time
end
end
Expand Down Expand Up @@ -217,7 +219,7 @@ def course_intensity
end

def loan_proportion
return 1 if @course_type == "uk-full-time" || course_intensity == 100
return 1 if @course_type == "full-time" || course_intensity == 100
return 0.75 if course_intensity >= 75
return 0.666 if course_intensity >= 66.6
return 0.5 if course_intensity >= 50
Expand Down
Loading

0 comments on commit 08b58fd

Please sign in to comment.