elemes/services
a2nr 24502380aa feat(quiz): strict focus-loss anti-cheat + audit attempt
Kebijakan strict: kehilangan fokus saat kuis aktif langsung mengakhiri kuis
dengan penalti, satu attempt per kuis tercatat audit, pembahasan disembunyikan
saat focus_lost, badge pelanggaran muncul di laporan guru.

Backend:
- tabel quiz_attempts (migration 0002) + endpoint POST /quiz-attempts/submit
  idempotent dengan unique constraint (satu attempt per token+lesson, 409
  untuk duplikat), bounded termination_reason
- models/repositories/storage: QuizAttempt + record/query pelanggaran untuk
  laporan guru (progress)

Frontend:
- quiz-integrity.ts: policy hub (isFocusLossEvent, terminateQuiz,
  shouldShowQuizReview) + attempt_id via crypto.randomUUID()
- lesson.svelte.ts: finalisasi idempotent; sendBeacon untuk exit path yang
  bisa suspend (focus_lost/page_unload), fetch keepalive untuk reason lain
- QuizTab.svelte: summary menyembunyikan pembahasan saat focus_lost
- progress/+page.svelte: badge pelanggaran focus_lost di laporan guru
- APP_VERSION 26 -> 27

Tests & docs:
- 204 backend test pass (unit host + integrasi container, DB elemes_test)
- 107 frontend test pass, svelte-check 0 error
- docs/12-quiz-integrity.md (baru), docs/07-quiz-authoring.md + README FAQ
  anti-cheat diperbarui
2026-08-11 20:55:39 +07:00
..
storage feat(quiz): strict focus-loss anti-cheat + audit attempt 2026-08-11 20:55:39 +07:00
tests feat(quiz): strict focus-loss anti-cheat + audit attempt 2026-08-11 20:55:39 +07:00
__init__.py
database.py feat(teacher): manajemen akun guru canonical + first-run otomatis; cabut backend CSV (PG only) 2026-08-09 11:21:08 +07:00
lesson_registry.py feat(teacher): manajemen akun guru canonical + first-run otomatis; cabut backend CSV (PG only) 2026-08-09 11:21:08 +07:00
lesson_service.py refactor(quiz): restructure quiz session, question view, and tab safety 2026-08-01 00:14:29 +07:00
models.py feat(quiz): strict focus-loss anti-cheat + audit attempt 2026-08-11 20:55:39 +07:00
progress_status.py feat(student-management): kelola siswa round-trip CSV + bulk delete (PG) 2026-08-09 07:29:19 +07:00
repositories.py feat(quiz): strict focus-loss anti-cheat + audit attempt 2026-08-11 20:55:39 +07:00
student_roundtrip.py feat(student-management): kelola siswa round-trip CSV + bulk delete (PG) 2026-08-09 07:29:19 +07:00
teacher_bootstrap.py feat(teacher): manajemen akun guru canonical + first-run otomatis; cabut backend CSV (PG only) 2026-08-09 11:21:08 +07:00
token_hashing.py feat(storage): migrasi penyimpanan CSV ke PostgreSQL (SQLAlchemy + Alembic) 2026-08-08 04:57:08 +00:00
token_service.py feat(teacher): manajemen akun guru canonical + first-run otomatis; cabut backend CSV (PG only) 2026-08-09 11:21:08 +07:00