Skip to content

UC-4 Staff verifies a student directly

The high-assurance alternative to UC-3: the attendant scans the student, not the other way round.

Primary actor Event Attendant (any staff role)
Supporting actors Student
Priority Should
Satisfies FR-D3, FR-D4
Precondition The attendant is signed in with a staff role; the student is signed in and enrolled.
Trigger The attendant opens Verify and scans the student's My QR sheet.

Main success scenario

  1. The student opens "My QR". The app shows a short-lived personal token as a QR and as a short code, refreshed at half its lifetime.
  2. The attendant scans it. The system resolves the student and lists the active challenge's tasks, flagging the ones already complete.
  3. The attendant confirms one task.
  4. The system records a check-in with method = staff and verified_by set to the attendant, plus an audit row, in one transaction.

Extensions

  • 2a. Token invalid, expired, or from another campus. 400, rescan.
  • 3a. Task already complete. 409, "already completed".
  • Rehearsal mode. An admin rehearsing as a test student can be verified the same way; the rehearsal row is excluded from every report.

Acceptance criteria (Gherkin)

Feature file Test module
staff_scan_verification.feature test_staff_scan_verification_bdd.py
my_qr_short_code.feature and frontend/my_qr_short_code.feature test_my_qr_short_code_bdd.py

Plain pytest: test_staff_verify.py, test_passport_qr_token.py. Frontend: Verify.test.tsx, MyQr.test.tsx.

Views

Code: backend/app/routers/verify.py, backend/app/services/verify.py, frontend/src/components/admin/Verify/.