# Way to graduate

For an existing installation, import `database/migrations/20261017_way_to_graduate.sql` once in phpMyAdmin before opening the new link. Fresh installations include these tables in the full schema. Existing student projects remain separate and are preserved.

All four panels include Way to graduate. Staff, admins and HODs act as practical instructors using the existing account roles. HODs manage their assigned departments across all campuses; staff/admins can manage all departments. Publishing selects a department, study years, academic period, stage, requirements and deadline. All active students in that department and selected years receive a notification regardless of campus.

Students submit ZIP/RAR archives through the existing Student Projects uploader. The first project must be approved before the second; the first two must be approved before the final, within the same department and academic period. Rejected attempts are retained, and students can upload a new attempt before the deadline. Each attempt has separate files and review history.

The list, full project file manager and source editor remain separate pages. Syntax highlighting uses the same local Ace assets and language detection as Student Projects. Students can edit submitted text files before the deadline; verification locks the attempt. Instructors inspect files without changing student source. A successful recorded defence is required before approval. Every verification, defence and decision requires a clear reason of at least 10 characters. Defence dates record completed defences. Review events notify the student, record the instructor and source revision, and reject concurrent stale decisions.

Dates are entered and displayed in Zambia time and stored in UTC. Uploaded archives and source storage retain the existing limits and protections. PHP ZIP/RAR extensions are needed for their respective extraction formats.

Validation covers state transitions, reasons, department/year targeting, dates, PHP syntax, and existing project/explorer/editor regressions. A live MySQL installation is needed to validate delivery against actual student accounts.

## Department editor update
Existing installations must also import `database/migrations/20261017_graduation_department_editor.sql` after the initial graduation migration. No course is required, including departments with no courses. Existing course-linked records remain readable. Requirements use the same local Quill editor and document formats as Practical Guidelines: headings, fonts, colour, lists, alignment, links, tables, code blocks and undo/redo. Images and resource attachments remain in Practical Guidelines; this requirements editor supports formatted text. Submitted source files retain the Ace code editor.

## Compact project pages
The overview now uses short requirement cards linked to a separate requirement document. Verification, defence and review history use `?project=ID&section=review`; project files remain at `?project=ID`, and the editor uses its existing file URL. Deadline updates are on the requirement document page. Existing plain-text Markdown requirements are rendered with the safe DOM formatter; Quill documents retain their rich formatting.

Student Projects and Way to graduate automatically attempt extraction when opening an unextracted archive. Errors remain visible through the extraction control and no language label filters archive contents. A single wrapper folder is expanded in the explorer. HTML, CSS and JavaScript (JS) are prominent submission choices. The shared archive path and both source editors preserve these files regardless of selected metadata, including Other. No new migration is required for this compact-page update.

## Deleting projects
Import `database/migrations/20261017_graduation_project_deletion.sql` once for existing installations. Staff/admins can delete published graduation projects or individual student attempts. An HOD may delete projects they created (and attempts under those projects), within their assigned department. Students cannot delete. Buttons are permission-controlled and the API independently checks ownership, role, department and CSRF. Confirmation explains the scope and requires a reason.

Deletion removes the item from active lists and direct file/download/review routes. Removing a published project hides all linked attempts. Its requirement, submitted files and reviews remain stored for accountability, and the deletion is audited. Deleted attempts no longer block replacement attempts or count toward stage prerequisites. Removing a published stage may therefore require students to complete a replacement stage before continuing. This is a retained-record deletion, not permanent disk erasure. No existing records are deleted by importing the migration.
