From b1279188641c7451f9ee44fae62125b579854186 Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Mon, 11 Nov 2019 21:13:51 -0800 Subject: [PATCH 01/31] Set high needs bar to 50% --- .../app/models/circuit_playground_discount_application.rb | 5 ++--- dashboard/app/models/school.rb | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dashboard/app/models/circuit_playground_discount_application.rb b/dashboard/app/models/circuit_playground_discount_application.rb index eff11ddeda30e..6299b9fc23722 100644 --- a/dashboard/app/models/circuit_playground_discount_application.rb +++ b/dashboard/app/models/circuit_playground_discount_application.rb @@ -68,12 +68,11 @@ def self.user_pd_eligible?(user) pd_workshops: { course: Pd::Workshop::COURSE_CSD, subject: [ - Pd::Workshop::SUBJECT_SUMMER_WORKSHOP, - Pd::Workshop::SUBJECT_TEACHER_CON + Pd::Workshop::SUBJECT_SUMMER_WORKSHOP ] } ). - where("pd_workshops.started_at > '2018-05-01'"). + where("pd_workshops.started_at > '2019-05-01'"). exists? end diff --git a/dashboard/app/models/school.rb b/dashboard/app/models/school.rb index 64885350f2e6d..eae74b995bf0c 100644 --- a/dashboard/app/models/school.rb +++ b/dashboard/app/models/school.rb @@ -57,13 +57,13 @@ def full_address # discount codes - this is not a definition we apply broadly. # @return [Boolean] True if high-needs, false otherwise. def maker_high_needs? - # As of January 2019, "high-needs" is defined as having >= 40% of the student population + # As of January 2020, "high-needs" is defined as having >= 50% of the student population # eligible for free-and-reduced lunch programs. stats = school_stats_by_year.order(school_year: :desc).first if stats.nil? || stats.frl_eligible_total.nil? || stats.students_total.nil? return false end - stats.frl_eligible_total.to_f / stats.students_total.to_f >= 0.4 + stats.frl_eligible_total.to_f / stats.students_total.to_f >= 0.5 end # Public school ids from NCES are always 12 digits, possibly with From 21413d960823e968c441187bbab92828b0df3160 Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Sun, 24 Nov 2019 21:30:28 -0800 Subject: [PATCH 02/31] Non-i18n String changes for 19-20 Adafruit discount codes --- .../lib/kits/maker/ui/DiscountAdminOverride.jsx | 2 +- .../lib/kits/maker/ui/EligibilityChecklist.jsx | 6 +++--- .../src/lib/kits/maker/ui/Unit6ValidationStep.jsx | 15 ++++++++++++--- apps/src/lib/kits/maker/util/discountLogic.js | 6 +++--- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/apps/src/lib/kits/maker/ui/DiscountAdminOverride.jsx b/apps/src/lib/kits/maker/ui/DiscountAdminOverride.jsx index c19f2cfa50147..9416892abdf60 100644 --- a/apps/src/lib/kits/maker/ui/DiscountAdminOverride.jsx +++ b/apps/src/lib/kits/maker/ui/DiscountAdminOverride.jsx @@ -221,7 +221,7 @@ export default class DiscountAdminOverride extends Component { Studio Person ID admin page{' '} {' '} - to link this acccount to the account associated with the email + to link this account to the account associated with the email address we have on file.

Option 2: Give teacher a discount code

diff --git a/apps/src/lib/kits/maker/ui/EligibilityChecklist.jsx b/apps/src/lib/kits/maker/ui/EligibilityChecklist.jsx index 6f8300fee57c9..9013c17d85960 100644 --- a/apps/src/lib/kits/maker/ui/EligibilityChecklist.jsx +++ b/apps/src/lib/kits/maker/ui/EligibilityChecklist.jsx @@ -196,7 +196,7 @@ export default class EligibilityChecklist extends React.Component { const discountPageHeader = `Subsidized Circuit Playground Kits`; const discountPageDescriptionMd = ` Code.org is able to offer a 100% subsidy for one Circuit Playground classroom kit to eligible -teachers at schools with 40% or greater free and reduced-price meals. To learn more about +teachers at schools with 50% or greater free and reduced-price meals. To learn more about the full eligibility requirements, read the overview [here](//code.org/circuitplayground). `; @@ -216,7 +216,7 @@ Just use the code \`ADAEDU\` at checkout. const schoolIsNotEligibleMd = ncesId => ` Unfortunately, you’re not eligible for the Code.org-provided subsidy for the kit because -your school has fewer than 40% of students that are eligible for free/reduced-price lunches +your school has fewer than 50% of students that are eligible for free/reduced-price lunches ([source](https://nces.ed.gov/ccd/schoolsearch/school_detail.asp?ID=${ncesId})). However, you are still eligible for a discount! Adafruit has made available a 10% off educator discount that this kit is eligible for. Just use the code \`ADAEDU\` at checkout. @@ -237,5 +237,5 @@ Sorry, it doesn’t look like you have enough students in your sections that hav Units 2 and 3. Please check back here once your students have finished the first semester of CS Discoveries. If you are using a different account to track the progress of students or if you think there has been an error in detecting how much progress your students have made in Units -2 and 3, please contact us at [teacher@code.org](mailto:teacher@code.org). +2 and 3, please contact us at [teacher@code.org](mailto:teacher@code.org). `; diff --git a/apps/src/lib/kits/maker/ui/Unit6ValidationStep.jsx b/apps/src/lib/kits/maker/ui/Unit6ValidationStep.jsx index 1ceaa2d937459..2ecd77a9c4177 100644 --- a/apps/src/lib/kits/maker/ui/Unit6ValidationStep.jsx +++ b/apps/src/lib/kits/maker/ui/Unit6ValidationStep.jsx @@ -92,9 +92,18 @@ export default class Unit6ValidationStep extends Component { {[ [Unit6Intention.NO, i18n.eligibilityYearNo()], - [Unit6Intention.YES_18_19, i18n.eligibilityYearYes1819()], - [Unit6Intention.YES_19_20, i18n.eligibilityYearYes1920()], - [Unit6Intention.YES_AFTER, i18n.eligibilityYearAfter()], + [ + Unit6Intention.YES_SPRING_2020, + i18n.eligibilityYearYesSpring2020() + ], + [ + Unit6Intention.YES_FALL_2020, + i18n.eligibilityYearYesFall2020() + ], + [ + Unit6Intention.YES_SPRING_2021, + i18n.eligibilityYearYesSpring2021() + ], [Unit6Intention.UNSURE, i18n.eligibilityYearUnknown()] ].map(([value, description]) => ( +