elemes/docs
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
..
01-architecture-setup.md feat(teacher): manajemen akun guru canonical + first-run otomatis; cabut backend CSV (PG only) 2026-08-09 11:21:08 +07:00
02-backend-flask.md feat(teacher): manajemen akun guru canonical + first-run otomatis; cabut backend CSV (PG only) 2026-08-09 11:21:08 +07:00
03-frontend-sveltekit.md
04-lesson-evaluation.md
05-velxio-ble-deployer.md feat(storage): migrasi penyimpanan CSV ke PostgreSQL (SQLAlchemy + Alembic) 2026-08-08 04:57:08 +00:00
06-embed-content.md feat(storage): migrasi penyimpanan CSV ke PostgreSQL (SQLAlchemy + Alembic) 2026-08-08 04:57:08 +00:00
07-quiz-authoring.md feat(quiz): strict focus-loss anti-cheat + audit attempt 2026-08-11 20:55:39 +07:00
08-playground-interactive.md feat(storage): migrasi penyimpanan CSV ke PostgreSQL (SQLAlchemy + Alembic) 2026-08-08 04:57:08 +00:00
09-slides.md feat(storage): migrasi penyimpanan CSV ke PostgreSQL (SQLAlchemy + Alembic) 2026-08-08 04:57:08 +00:00
10-flowchart.md feat(storage): migrasi penyimpanan CSV ke PostgreSQL (SQLAlchemy + Alembic) 2026-08-08 04:57:08 +00:00
11-database-migration.md docs: replace hard-coded container names with service-based podman-compose/label resolution 2026-08-10 11:34:54 +07:00
12-quiz-integrity.md feat(quiz): strict focus-loss anti-cheat + audit attempt 2026-08-11 20:55:39 +07:00