ROCKVIEW UNIVERSITY SLPS — ELECTORAL COMMISSION PHASE 2

Based on the Phase 1 SLPS project and adds:
- Official voter register populated from existing active university student records.
- Search by student number, student name, programme/department and campus.
- Add eligible students to a specific election, with duplicate prevention.
- Voter register status management (approve, suspend/reject, remove from this election only).
- Polling station records with campus, building, room, computer count and assigned supervisor.
- Station setup/active/closed administrative status.
- One-time random station activation code; only its SHA-256 hash is stored. Rotating a code invalidates the previous code.
- Station audit events for creation, status changes and credential rotation.
- UI remains inside SLPS and uses its existing staff shell/theme.

DEPLOYMENT
1. Back up the current live SLPS files and database.
2. Upload the patch contents into the existing /slps/ directory, preserving folders.
3. Import database/migrations/20261103_electoral_voter_register_polling_stations.sql exactly once using phpMyAdmin.
4. Do not re-import the original Electoral Commission migration if it has already been applied.
5. Sign in as staff/admin, hard refresh with Ctrl+F5, open Electoral Commission, open an election, then use Voter register and Polling stations tabs.

IMPORTANT
- Voter eligibility is sourced from the existing students and users tables. Only students with students.status='active', users.role='student' and users.is_active=1 are returned.
- Adding a voter creates an election-specific register record. It does not create, alter or delete the university student account.
- Existing main Data Collections records are not modified.
- The station activation code is displayed once at creation or rotation. Store it securely. Only the hash is retained in the database.
- Station setup in this phase is administrative configuration. It does NOT yet pair a browser/computer, open a ballot, or allow votes to be cast.
- No remote registration or remote voting links are enabled. The intended model remains supervised in-person voting.
- The next phase must implement station pairing, staff operator session, student identity verification at the station, and anonymous secret ballot casting with transaction-safe duplicate-vote prevention.

TEST PLAN
A. Apply migration once.
B. Open an election and choose Voter register.
C. Search an active student by number or name; add the correct record. Search again and confirm the added student is no longer offered.
D. Confirm voter totals and status controls work.
E. Create a polling station, assign an active staff member, and save the one-time code securely.
F. Confirm station starts in Setup; activate only after assigning a supervisor; then close it.
G. Confirm Data Collections and Electoral Data Collections remain separate and unchanged.

VALIDATION
PHP syntax checks passed for the changed PHP files. Node syntax check passed for the Electoral Commission JavaScript. ZIP integrity tests passed. The package has not been deployed or tested against the live Bluehost/cPanel database.
