# Interactive quiz web app

A static, offline, vanilla-JS app that turns quiz/mock-exam Markdown into a self-grading,
self-testing UI. No build step, no npm, no external dependencies.

**This copy is a published snapshot.** The source of truth — the Markdown quizzes,
`mock-exams/`, `full-mock-exams/`, and the `shared/scripts/build_quiz_data.py` generator —
lives in the private `claude-competencies` repo, not here. This repo only carries the
generated output (`data.js`) plus the static app shell. To publish new/edited questions:
regenerate `web/data.js` in `claude-competencies` (see that repo's `web/README.md`), then copy
the resulting `web/data.js` here and commit.

The study plans (`../ccar-f-study-plan.html`, `../ccdv-f-study-plan.html`) deep-link into
specific sets here via `index.html?set=<setId>` (e.g. `?set=ccar-f/01/quiz`) — see
`js/app.js`'s query-param handling.

## Running it

Just open `web/index.html` directly in a browser (double-click it, or `file://` it). No
server required — that's a deliberate design constraint: all JS here is loaded via classic
`<script>` tags, never ES modules, because `file://` pages block `import`/`type="module"` in
Chromium and Firefox.

If you'd rather have a URL instead of a `file://` path, you can optionally run a local server
from this directory instead:

```bash
cd web
python3 -m http.server
```

Either way works identically — the app has no server-side logic.

## What it does

- **Quizzes**: Tier 1 (recall) and Tier 3 (spot-the-antipattern) questions are free-response —
  rendered as a flashcard (reveal the answer, self-grade "got it" / "missed it"). Tier 2 is
  multiple-choice and auto-graded. The two subtotals are shown separately, never blended, to
  avoid implying false precision on the self-graded half.
- **Domain mocks / full mocks**: 100% multiple-choice/multiple-response, auto-graded,
  all-or-nothing on multi-select (no partial credit — matches real exam grading). A
  non-punitive countdown timer runs for these (each file's own suggested time; full mocks are
  120 minutes) — it flags when time is up but never force-submits.
- **Results**: raw score, percentage, and — for mocks/full-mocks only — a ≥72%-correct
  passing-equivalent proxy verdict (the real 720/1000 scaling is proprietary, so this is an
  approximation, same convention used throughout this repo's mock exams). Full-mock results
  are broken down by scenario (CCAR-F) or domain (CCDV-F), read from each question's own tag.
- **History**: past attempts are saved to `localStorage` (key
  `claude-competencies-quiz-history-v1`) and shown on the home screen next to each quiz/mock.

## Known limitations (accepted for v1)

- **In-progress answers don't survive a page reload.** There's no autosave of an attempt in
  progress — if you reload mid-quiz, you start that attempt over. Only *completed* attempts
  are saved to history.
- The timer is a visual cue only; it doesn't force-submit or lock the UI at zero.
