elemes/routes
a2nr 81cb9c69ca feat(quiz): taksonomi key quiz per jenis + MCQ berbobot (partial credit)
Fitur B — setiap jenis soal kini punya key sendiri sehingga model
penilaiannya eksplisit, tidak ditebak dari isi konten:

- ---QUIZ_MCQ---      pilihan ganda biner (tepat satu [x]; larang [N])
- ---QUIZ_WEIGHTED--- pilihan ganda berbobot ([N] >= 1, minimal satu [ ],
                      bobot tertinggi unik = kunci; poin parsial)
- ---FLASHCARD---     kartu hafalan tanpa penilaian (larang opsi)
- legacy ---QUIZ_FLASHCARD--- / ---INITIAL_QUIZ--- tetap dibaca tanpa
  perubahan perilaku (regex opsi legacy sengaja tidak berubah — baris
  '- [10]' di konten lama BUKAN opsi); dihapus dari docs/template
- ::diagnostic tetap kategori di dalam QUIZ_MCQ & tetap masuk skor resmi

Model skor: rata-rata persentase per jenis yang ada, Math.round,
lulus >= 75. statusString: "X/Y" bila hanya MCQ/legacy, "P/100" bila ada
weighted, "completed" bila hanya flashcard (auto-lulus). Satu sesi/
attempt untuk semua jenis; soal flat urut dokumen.

Parser (backend & frontend mirror, ekstraksi multi-blok per key urut
dokumen via loop marker-start paling awal; id q-N deterministik):
- lesson_service.py: regex [ xX]?[0-9]* utk key baru, _iter_option_lines
  kind-aware, _validate_quiz_options per kind, _parse_flashcards(kind,
  id_offset), _extract_quiz_sections + guard loop maju (marker end
  hilang tidak lagi infinite loop), get_lesson_quiz_total -> 100 bila
  ada weighted (round-trip CSV "P/100")
- parseFlashcards.ts / index.ts / detectActiveTabs.ts / extractSections.ts:
  mirror perilaku; heading soal <h3> kini fence-aware (fix fixture stale)

Payload attempt baru: quiz_type, earned_points, question_max_points —
opsional di validasi backend supaya klien lama tetap diterima; poin
di-recompute dari konten saat resume/review.

UI: QuizTab skor via statusString + alert berbasis percent, badge
weighted (✓ 10 / 🟡 7/10 / ✗ 0) di review, preview guru badge bobot +
"Berbobot (total N)", laporan guru badge MCQ/Bobot + tooltip, CSV
progress 2 kolom baru per lesson (_quiz_mcq, _quiz_weighted), template
editor konten QUIZ_MCQ/Quiz Bobot/Flashcard.

Tooling & docs: scripts/convert_quiz_keys.py (konversi legacy -> key
baru per run jenis, idempoten, verifikasi parse identik; examples/
content dikonversi), scanner mendukung semua key, docs/07 ditulis ulang,
docs/15 direvisi ke desain final, README/documentation/docs 02/04/09
diperbarui.

Tes: backend 444 lulus (+33: validasi ketat per key, urutan dokumen,
multi-blok, zero regression, field selalu di-emit), frontend 249 lulus
(+13 parser key baru, +11 model skor), parity fixture diregenerasi,
svelte-check 0 error, vite build OK.
2026-10-25 20:16:56 +07:00
..
__init__.py
…
auth.py perf: fix race conditions with file locking and optimize backend latency 2026-05-05 22:57:19 +07:00
compile.py feat(compiler-worker): sesi interaktif PTY untuk playground — Python input() dan C scanf() tanpa EOFError 2026-08-02 14:14:45 +00:00
content_editor.py fix(content-editor): diagnostik upload asset + kelengkapan bundle 2026-10-03 21:47:05 +07:00
docs.py feat: unified lesson progress — composite score & /api/lesson-progress 2026-08-29 00:22:10 +07:00
help.py feat(help): add interactive student tutorial with video and integrated help page 2026-04-20 13:43:45 +07:00
lesson_progress.py feat(quiz): taksonomi key quiz per jenis + MCQ berbobot (partial credit) 2026-10-25 20:16:56 +07:00
lessons.py feat(assets): optimasi serving gambar (WebP on-the-fly + cache disk) 2026-10-25 19:19:07 +07:00
progress.py feat(quiz): taksonomi key quiz per jenis + MCQ berbobot (partial credit) 2026-10-25 20:16:56 +07:00
student_management.py feat(progress): composite scoring, roundtrip CSV grammar, and report export 2026-08-30 04:12:23 +07:00