> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleverschool.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Sixth Form Applications

> Workflows & Admissions Deep Dive

## End-to-End Application Lifecycle

THis module coordinates sixth form admissions through a structured, multi-phase lifecycle that balances ease of student access, progressive data validation, and real-time administrative oversight.

```mermaid theme={null}
flowchart TD
    subgraph Phase1["Phase 1: Registration & Authentication"]
        P1["1. Applicant accesses /application<br/>2. Authenticates via Magic Link, Email OTP, or Social SSO (Google/MS)<br/>3. Email verification verified and logged"]
    end

    subgraph Phase2["Phase 2: Progressive Form Completion & Locking"]
        P2["Step 1: Student Details ➔ [Lock Student] (Internal vs External)<br/>Step 2: Predicted Grades ➔ [Lock Grades] (Core + Options)<br/>Step 3: Course Choices ➔ [Lock Courses] (1st, 2nd, 3rd, 4th)<br/>Step 4: Submission Info ➔ [Lock Submission] (Readiness verified)"]
    end

    subgraph Phase3["Phase 3: Formal Submission & PDF Dossier"]
        P3["1. Applicant clicks Submit Application<br/>2. Application state locks permanently for applicant<br/>3. PDF Application Dossier generated & downloaded<br/>4. Confirmation emails sent to Applicant and School Admissions Inbox"]
    end

    subgraph Phase4["Phase 4: Admissions Review & Coordination"]
        P4["• Search & Filter by Status, School Type, and September Age<br/>• Staff Impersonation for telephone consultations and open evenings<br/>• Unsubmit / Re-open facility if applicant needs to change courses<br/>• Bulk Reminders, Bulk Archiving, and CSV Export"]
    end

    subgraph Phase5["Phase 5: Automated Schedules & GDPR Data Lifecycle"]
        P5["• Weekly automated reminder job to unsubmitted applicants<br/>• Weekly missing manager alerts to administrators<br/>• 3-month stale warning for archived records<br/>• 4-month automated permanent deletion of dead records"]
    end

    Phase1 --> Phase2
    Phase2 --> Phase3
    Phase3 --> Phase4
    Phase4 --> Phase5
```

***

## 1. Applicant Journey & Step Validation

The self-service applicant portal at `/application` guides prospective students through four structured steps:

### Step 1: Student Personal Details (`/application/student`)

* **Core Identity**: Captures student forename, middle names, surname, mobile telephone number, and verified email address.
* **Pathway Branching**:
  * **Internal Year 11 Pupils (`This School`)**: Checking **This school** automatically hides residential address, parent/carer contact, and date-of-birth fields, as these are already verified in your school MIS.
  * **External Applicants (`Other Schools`)**: Applicants must provide their complete residential address (lines 1–3, town, county, postcode), parent/carer full name, email, and telephone number, their current secondary school name, and date of birth.
* **Admissions Criteria Tags**: External applicants can flag specific contextual admissions criteria:
  * *Sibling*: Brother or sister currently attending the school.
  * *Staff*: Child of a current member of school staff.
  * *SEND*: Special Educational Needs and Disabilities.
  * *LAC*: Looked After Child / Previously Looked After Child.
* **Section Locking**: Checking **Lock Student Details** validates the form and locks the step.

### Step 2: Predicted GCSE Grades (`/application/grades`)

Applicants record their mock or target GCSE grades:

* **Core Compulsory Subjects**:
  * *English Language*
  * *English Literature*
  * *Mathematics*
* **Sciences**:
  * Input for up to three science entries (e.g. Combined Science double award, or Triple Science: Biology, Chemistry, Physics).
* **Modern Foreign Languages**:
  * Subject name and predicted grade for languages (e.g. French, Spanish, German).
* **Option Subjects**:
  * Up to five additional GCSE/vocational option subjects (e.g. History, Geography, Art, Computing, Business).
* **Section Locking**: Checking **Lock Grades** validates that every entered subject has a grade assigned and locks the step.

### Step 3: Sixth Form Course Choices (`/application/courses`)

Applicants select their desired post-16 study programme:

* **Subject Options (1–3)**: Mandatory selection of first, second, and third choice subjects from your school's configured course catalogue.
* **Fourth Subject Option**: An optional fourth choice (e.g. Further Mathematics or an EPQ qualification), or selected as *N/A*.
* **Section Locking**: Checking **Lock Courses** locks their choices.

### Step 4: Final Submission & PDF Confirmation (`/application/submission`)

* **Readiness Check**: The system validates that all three previous section locks are active (`lock_student`, `lock_grades`, `lock_courses`).
* **Additional Information**: An optional text area for applicants to add supporting notes (e.g. university/career goals, special circumstances, or timetable clash preferences).
* **Final Lock & Submission**:
  1. The applicant checks **Lock Submission**.
  2. The **Submit Application** button activates.
  3. Clicking submit sets the formal submission timestamp, locks the application into read-only mode, and streams a downloadable PDF copy.
  4. An automated confirmation email is dispatched to the applicant and the school admissions inbox.

***

## 2. Admissions Management & Dashboard Operations

Admissions officers and heads of sixth form manage the entire cohort from `/applications`:

### Intelligent Cohort Filtering

* **September Age Intelligence**: The system calculates the applicant's age as of **1st September of the upcoming academic year**:
  * *16 Next September*: Standard Year 11 transition cohort.
  * *Under 16*: Fast-track applicants or date-of-birth entry typos.
  * *Over 16*: Mature applicants, re-sit candidates, or third-year sixth formers.
* **School Origin**: Filter between *This School* (internal conversion tracking) and *Other Schools* (external recruitment tracking).
* **Progressive Status**: Filter by *New*, *Incomplete*, *Ready to submit*, or *Submitted*.

### Unsubmitting & Re-Opening Applications

If an applicant contacts the school wanting to change their course selections (e.g. following mock exam results):

1. In the applications table, locate the applicant and click the padlock icon beside their **Submitted** status badge.
2. A confirmation modal opens showing the applicant's email address.
3. Confirming the unsubmit action:
   * Clears the `submission_date` and unlocks the submission.
   * Reverts the status badge to *Ready to submit*.
   * Allows the applicant (or staff member via impersonation) to adjust choices and re-submit.

### Live Staff Impersonation

Admissions staff can assist applicants directly during telephone inquiries or open evenings:

* In the row dropdown menu (`...`), select **Impersonate**.
* The staff member's browser immediately switches into the applicant's portal session.
* Staff can review the applicant's screen, correct typos, assist with subject selections, or submit on their behalf.
* Logging out of the applicant session returns staff safely to the main staff workspace.

***

## 3. Bulk Actions & Timetable Planning

Admissions teams can select multiple applicants using the table checkboxes:

* **Bulk Reminders**: Click **Remind** to dispatch immediate email reminders to selected applicants who have not yet submitted. Submitted applicants are automatically skipped.
* **Bulk Archiving**: Move inactive or withdrawn applicants to the archive in a single operation.
* **CSV Data Export**: Click **Export** to download a comprehensive spreadsheet containing all applicant personal data, contact details, predicted grades, and 1st–4th course selections—ideal for subject demand modelling and block timetable creation.

***

## 4. Automated Reminders & GDPR Lifecycle

The module includes automated background jobs to maintain high submission rates and enforce strict data retention compliance:

```mermaid theme={null}
flowchart TD
    Reminders["<b>Weekly Automated Reminders</b><br/><i>Runs every week across all schools:</i><br/>• Dispatches completion reminders to Incomplete applicants<br/>• Dispatches submission reminders to Ready to Submit applicants<br/>• Alerts Administrators if Sixth Form Applications has no Manager"]
    Retention["<b>GDPR Data Retention Lifecycle</b><br/>• Month 0: Record archived by Admissions Manager<br/>• Month 3 (Stale): Yellow warning banner displayed on Manage view<br/>• Month 4 (Dead): Background job permanently deletes records<br/>• Notification sent to Application Managers reporting purged totals"]

    Reminders --> Retention
```

### Stale Warnings & Permanent Purging

* **3-Month Stale Warning**: Archived applications older than 3 months trigger a warning banner on the dashboard reminding managers that data will be purged shortly.
* **4-Month Automated Purge**: The `DeleteDeadApplications` job permanently purges soft-deleted records older than 4 months, ensuring compliance with UK GDPR storage limitation principles.
* **Manager Purge Notification**: When dead records are deleted, the system notifies `Application Managers` with the exact count of deleted, stale, and remaining archived records.

***

## Status & Progression Glossary

> [accordion] New
>
> The applicant has created an account and logged in, but has not yet completed or locked any form sections.

> [accordion] Incomplete
>
> The application is partially completed. One or more sections have been locked, but at least one required section remains unverified.

> [accordion] Ready to submit
>
> The applicant has successfully verified and locked all four sections (*Student Details*, *Predicted Grades*, *Course Choices*, and *Submission*), but has not yet clicked the final **Submit Application** button.

> [accordion] Submitted
>
> The application is formally submitted. A submission date timestamp is recorded, the form is read-only for the applicant, and confirmation emails with PDF dossiers have been dispatched.

> [accordion] Archived
>
> The application has been soft-deleted by an admissions manager (e.g. withdrawn application or duplicate). It can be restored or exported from the **Show Archived** view.

> [accordion] Stale
>
> An archived application that has been in the archive for more than 3 months. Displays an administrative warning banner.

> [accordion] Dead
>
> An archived application older than 4 months. Automatically and permanently purged by the system under GDPR data retention policies.

***

## Automated Notification Matrix

| Notification Event | Recipient | Trigger & Purpose |
| :- | :- | :- |
| **Email Verification** | Applicant | Dispatched upon registration to verify applicant email address or magic login link. |
| **Application Completion Reminder** | Applicant | Dispatched weekly (or manually) to applicants with *Incomplete* applications. |
| **Application Submission Reminder** | Applicant | Dispatched weekly (or manually) to applicants with *Ready to submit* applications. |
| **Application Received Confirmation** | Applicant & School Admissions Inbox | Dispatched immediately upon final submission, with official PDF application dossier attached. |
| **Missing Manager Alert** | System Administrators | Dispatched weekly when the module is active but no `Application Manager` role is assigned. |
| **Dead Applications Deleted Alert** | Application Managers | Dispatched when automated background cleanup permanently deletes archived records older than 4 months. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.