TODO: to be completed by NPQ reg team
When accepting an application we evaluate the funded_place
attribute passed in the payload against the funding_cap
of the cohort and eligible_for_funding
status of the application:
- The
funded_place
attribute in the accept application payload will be evaluated only for cohorts that have afunding_cap
. - The
funded_place
must betrue
orfalse
if the cohort has afunding_cap
.
When accepting an application with a funded_place
:
- The
funded_place
can betrue
orfalse
if the application iseligible_for_funding
. - The
funded_place
can only befalse
if the application is noteligible_for_funding
.
Lead providers can change the funded_place
of an application via the API:
- The application must be
accepted
. - The application must be
eligible_for_funding
if changing totrue
. - The cohort of the application must have a
funding_cap
. - If changing
funded_place
tofalse
the application must have noeligible
,payable
,paid
orsubmitted
declarations.
An application is considered previously_funded
if:
- Another application exists with an equivalent course (as determined by
rebranded_alternative_courses
).- If the application course is not
npq-additional-support-offer
ornpq-early-headship-coaching-offer
it must be the same course. - If the application course is
npq-additional-support-offer
ornpq-early-headship-coaching-offer
it can be an application with either of these two courses.
- If the application course is not
- The other application is
accepted
andeligible_for_funding
. - The
funded_place
of the application is either not set (nil
, i.e. prior to 2024) or istrue
.
When an application is serialized we determine the eligible_for_funding
state by inspecting the user eligibility and if the application has been previously_funded
.
An application is eligible_for_funding
if:
- They have no
previously_funded
applications. - They are
eligible_for_funding
.
On creating a new declaration, it is marked as eligible
if:
- There are no
previously_funded
applications. - They are
eligible_for_funding
andfunded_place
is not set (nil
, i.e. prior to 2024) or istrue
.
Prior to 2024 we only calculated eligibility for declarations using the eligible_for_funding
attribute (there was no notion of funded_place
). Similarly, we only checked only eligible_for_funding
during the previously_funded
method as well.
See ECF #4871 for how funded_place
was originally introduced in ECF (and later replicated in NPQ reg) for more details.