# Practical examination transcripts and QR verification

## Installation
Import database/migrations/20261017_practical_transcripts.sql through phpMyAdmin into the existing SLPS database. This requires the practical examinations/stage migrations from the previous updates. Apply the updated files, preserving local connection/OpenRouter configuration and uploads. Refresh Ctrl+F5.

In Practical Examinations → Combined Results, choose View transcript on a published student row. Students can issue their own published transcript; staff/admin/HOD access follows their examination access scope. The transcript includes published results for the same academic period, a university logo/header, student details, weighted marks, totals/grades, grading criteria, issue reference/time, QR verification and blank name/signature/date lines for the practical instructor and HOD. HOD-issued transcripts include only the issuing HOD's permitted department/campus. Print / Save PDF uses the browser print dialog. This is a practical assessment transcript, not a claim to be a complete university degree transcript.

## QR configuration on XAMPP
Settings → General → Public system URL must include the application folder, for example http://192.168.1.20/slps for a computer reachable on your local network. Use your actual LAN address, not that example. A scanning phone must be on a network that can reach Apache on that address. localhost refers to the scanning device and cannot point a phone back to your computer. On hosting set the actual HTTPS system URL. After changing the setting, open/print the transcript again so its QR uses the new base URL.

QR generation is local browser JavaScript and does not send student results to an external QR service. The QR encodes an unguessable verification URL, not inline student data. Verification is public to anyone possessing that link and displays only the included student name/number, department/campus/year and published practical results. The database stores the SHA-256 hash of each token. Links are immutable result snapshots; if an included result changes or is unpublished, verification reports the transcript as superseded and withholds the result sheet. Issue a new transcript after staff republication. New results added after issuance do not rewrite an existing transcript.

Signature blocks are intentionally blank. QR verification confirms matching published records; it does not certify that handwritten signatures have been added or approved.

The bundled QR generator derives from Kazuhiko Arase's MIT-licensed QRCode JavaScript implementation; license included under shared/vendor/qr-code-LICENSE.txt. Automated checks cover matrix/SVG generation, token validation, result-revision matching, unpublished/superseded blocking, safe DOM output and public-URL validation. Tests do not substitute for printing and scanning with a physical phone against your reachable XAMPP/hosted URL. No live MySQL or physical scanner was available here.

## Certificate-style single-page layout
The transcript now uses a formal green/gold double border, centred logo/university heading and compact results/grading/signature sections. The document is fixed to A4 portrait (210 × 297 mm). JavaScript measures the certificate content after fonts/logo load and before printing, and scales long result lists to fit the available page height without dropping rows. Extremely long lists require smaller text; the toolbar reports substantial scaling. Print at A4 portrait with browser headers/footers off; use Save as PDF to preview. The exact physical result depends on browser/printer settings. Automated checks cover the scaling calculation for short/long content; a real browser/printer render was not available. No new SQL migration is required for this design update.
