🌍 World Quiz Dataset Import
Historical record — 2026-07-28
Preserved as observed. Current truth: Program Masterplan.
Bench import only. Packs were adapted from
/tmp/questions.json(WQD row model) into the nativequizwizz.question-packv1 format and imported viaQuestionPackImporter::import_json(). Draft quizzes are ready for review — not published.
Source
- file:
/tmp/questions.json(590 371 B) - model: World Quiz Dataset — one row per
(question, language) - counts: 58 origins · 229 rows · languages
en/de/fr/es· 18 top categories - types: 217 MCQ (4 choices) · 12 localized boolean
- difficulty: level
2/3/4→ QuizWizzeasy/normal/hard - quality: 100% explanations · 0 HTML entities · 0 dangling origin refs
- one EN-only origin (
wqd:opentriviaqa:5767f0067cceaa89:en) → DE/FR/ES packs have 57
Adapter decisions
| Decision | Choice | Why |
|---|---|---|
| Packing | 4 packs, one per language | under the 100-question hard cap; language is pack-level in v1 |
| Subjects | 18 tops + 57 prefixed children (science-botany) | collision-proof under term_exists name matching |
| Music top | mapped to existing entertainment-music | name collision: bench already has term named “Music” |
| Correct index | deterministic shuffle (seeded) | balanced correct_idx histogram; never leave answer at 0 |
| Type map | mcq→multiple, boolean→boolean | matches QuestionValidator enums |
| Provenance | qw_wqd_id post meta + qw_wqd_pack on quiz | string IDs; qw_opentdb_id is int-only |
Result
| Quiz | ID | Status | Questions | Provenance |
|---|---|---|---|---|
| World Quiz — English | 413 | draft | 58 | 58/58 qw_wqd_id |
| World Quiz — Deutsch | 471 | draft | 57 | 57/57 |
| World Quiz — Français | 529 | draft | 57 | 57/57 |
| World Quiz — Español | 587 | draft | 57 | 57/57 |
Bench after import: 269 published questions · 89 subjects · question index 269/269 valid · probes --wave all 30/30.
Import recipe (repeatable)
# 1. Adapt WQD → 4 v1 packs (adapter lives at /tmp/qwfix/packs/)
# 2. Stage + dry-validate via reflection against QuestionPackImporter::validate
# 3. Import as admin:
sudo docker compose --profile cli run --rm -T wpcli wp eval-file wp-content/.wqd-import.php import
# Driver note: cleanup removed the driver; before rerunning, restage `/tmp/qwfix/wqd-import.php` as `wp/wp-content/.wqd-import.php` with owner `www-data:www-data` and mode `0644`.
# 4. Attach provenance by pack order → qw_wqd_id
# 5. Cleanup staged files from wp-contentKnown trap: term_exists( $slug ) matches by name as well as slug. A declared subject whose slug differs from an existing term’s slug but shares its display name will silently attach the wrong term and fail QuestionService::verify()’s strict subject comparison → full pack rollback. Prefix child slugs and reuse existing tops when names collide.
Browser smoke
- Admin edit of quiz 413: title
World Quiz — English, status Draft, 58 linked questions in the meta box. - Cache disabled; no new QuizWizz fatals in
debug.logbeyond the import session.
Artifacts retained
- packs + id map:
/tmp/qwfix/packs/world-quiz-{en,de,fr,es}.json,wqd-id-map.json - source:
/tmp/questions.json