# Student Projects: separate pages and grading

## Installation

Preserve the live environment configuration, database and private project storage when copying source files. Apply `database/migrations/20261016_student_project_grades.sql` to the existing SLPS database before opening Student Projects. The full schema also includes these new tables for fresh installations. Hard refresh the browser with Ctrl+F5. Earlier collaboration migrations are still required for Project Collaborations.

## Pages

Student Projects opens the project list only. A project card opens its own file-manager URL. Source files open their own code-editor URL, with a back button to the containing folder. The manager uses the same nested explorer, chevrons and short names as Project Collaborations. ZIP/RAR upload, original archive download, extraction, code editing and workspace ZIP export remain available with their previous safeguards.

## Grading

Administrators and HODs can use **Grade project** in the file manager. HOD access remains restricted to the assigned department and campus. Students can open only their own submissions and cannot publish grades. Enter a mark from 0 to 100 with up to two decimal places, add feedback, then Publish grade & notify student. Publishing writes the current result, appends grade history and sends a private notification to the submitting user in one database transaction.

| Mark | Grade | Result |
| --- | --- | --- |
| 0 to below 50 | D | Fail |
| 50 to below 60 | B | Pass |
| 60 to below 70 | B+ | Pass |
| 70 to below 80 | A | Pass |
| 80 to 100 inclusive | A+ | Pass |

The endpoints do not overlap: exactly 60 earns B+, exactly 70 earns A and exactly 80 earns A+.

## Student results

Students see the mark, letter and Pass/Fail result on their project card. **My grade & feedback** opens the result, marker, time and written feedback. A private project-grade notification is also delivered through the existing Notifications module. Project cards and open result summaries check for published updates every 30 seconds while the page is visible.

Grades record the workspace revision that was marked. If source files change later, the file manager flags that the files changed since grading. Publishing requires the reviewed workspace revision and last-read grade version, so changes from another contributor or marker require review before publishing. Published grade history is retained in the database.

## Verification

Automated checks passed: student list/files/editor navigation, nested explorer, student read-only result form, marker publication and feedback, all grade boundaries, invalid marks and decimal precision, PHP syntax checks and collaboration regressions. Run `node tests/student_projects_ui.cjs` and `php tests/student_project_grading.php`. Live MySQL migration, role-scoped API authorization, notification delivery and visual browser checks still need validation on the target server.
