# Portfolio of Evidence Implementation Report

## Scope implemented

The Portfolio of Evidence module links evidence to the student's actual `student_unit_registrations` record. It supports:

- marked examination papers as PDF or image scans;
- practical-assessment photographs;
- practical documents, projects, assignments and other supporting evidence;
- T1–T3, P1–P3, Final Examination and General assessment components;
- multiple files in one evidence submission;
- review statuses: Pending Review, Verified, Needs Correction and Rejected;
- reviewer comments and a complete audit trail;
- unit-by-unit completion matrix showing marked-exam and practical-photo coverage;
- the recorded mark and grade beside the evidence summary where available.

## Access and security

Four menu-guided permissions are available from **Settings & Security → Privileges**:

- `portfolio_view`
- `portfolio_upload`
- `portfolio_review`
- `portfolio_manage`

Students are limited to their linked admission record. Other users can work on student portfolios only when their role has the applicable permission. Custom roles are supported.

Files are stored under `storage/private/portfolio`, protected from direct web access, and delivered through an authenticated endpoint after a row-level permission check. Uploads are MIME-validated and limited to PDF, JPG, PNG and WEBP, 15 MB per file and 12 files per submission.

## System integrations

- New sidebar **Portfolio of Evidence** menu.
- Student Portal **My Portfolio of Evidence** button.
- Portfolio action beside registered/assigned units.
- Portfolio button on every student row in Marks Entry.
- Existing marks are shown in the unit portfolio matrix.
- Existing activity logging records upload, review and deletion actions.
- XAMPP environment checker validates the module, migration and secure writable storage.

## Database installation

The schema is created automatically by `ensure_portfolio_schema()` during authenticated requests. The numbered migration can also be applied using:

```bat
C:\xampp\php\php.exe bin\migrate.php
```

Migration: `database/migrations/20260724_007_portfolio_of_evidence.sql`
