pdf-quiz-generator/backend/app/models
Daniel 0e6c18d886 feat: figures as records, question-centred dashboard, fewer hints mid-quiz
Figures
A question could carry exactly one stem image and one explanation image, each a
bare path with no title, no legend, and no way for the prose to refer to it.
`question_media` makes a figure a row: it points at an image already in the bank,
carries a role, a label the text can name ("Figure 1"), a caption and an order,
and there can be as many as the question needs. The same radiograph can serve two
questions without being stored twice.

The 346 existing paths were backfilled into figure records and retitled —
`page_339_img_0.png` says where a file came from and nothing about what it shows,
so the filename moved into the caption where it is still searchable, and the
title became something a person can read.

On the editor question: no new platform needed. Milkdown is already installed —
ProseMirror-based, MIT, GFM tables, code blocks, LaTeX — and already used for
articles, courses and the quick question modal. Only the question *page* still
has plain textareas, and that swap is written down rather than rushed, because
the stem carries manual-highlight offsets and a WYSIWYG rewrite would move them.

Fewer hints during a quiz
The category trail and the difficulty pill were shown beside every stem. Being
told a question is filed under Neonatology, or that it is "hard", narrows the
answer before the stem has been read. Both now wait until the answer is in,
where the trail becomes a way to more of the same topic.

The dashboard is about questions
Quizzes and attempts describe how the material happens to be packaged. What a
learner is working through is questions: how many of the bank they have seen,
how many they have answered correctly, and their average. The old per-quiz
performance card — which needed two attempts before it showed anything — is
gone, superseded by the session analysis. The greeting sits above "continue your
study" rather than below it, where it read as a heading for the wrong section.

208 backend, 249 frontend green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-11 03:18:49 +02:00
..
__init__.py feat: facet filters, personal libraries, adaptive shortcuts, restart, rename support 2026-09-09 04:31:40 +02:00
ai_model_config.py Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
article.py feat: article CMS, three reading views, and articles written from the library 2026-09-10 17:13:07 +02:00
attempt.py feat: session analysis after a quiz, and a merged TODO for the rest 2026-09-11 03:07:05 +02:00
category_grant.py feat: grants can name an exam and a discipline, not only a category 2026-09-10 04:02:36 +02:00
collection.py feat: facet filters, personal libraries, adaptive shortcuts, restart, rename support 2026-09-09 04:31:40 +02:00
comment.py feat: shareable quiz links, moderated comments and AI authoring 2026-09-07 17:10:08 +02:00
conversation.py feat: AI Mode — a chat that cannot cite what it did not find 2026-09-10 15:19:24 +02:00
course.py Add LMS, user quiz creation, manual questions, course system 2026-04-05 02:07:04 +02:00
email_verification.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
embeddable.py feat: hybrid search for articles and cards; full-page question editor 2026-09-10 02:01:35 +02:00
exam.py feat: a study objective that changes what you see; purge unused figures 2026-09-11 02:47:01 +02:00
favorite.py Add switchable embedding model, Polly toggle, job cancellation, and UI fixes 2026-04-03 20:44:11 +02:00
flashcard.py feat: hybrid search for articles and cards; full-page question editor 2026-09-10 02:01:35 +02:00
lab_reference.py feat: Orthobullets-style lab panel with source deep links and card links 2026-09-08 16:20:55 +02:00
media.py feat: MinIO-backed media libraries, and file the last 316 questions 2026-09-10 06:45:22 +02:00
password_reset.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
pdf_document.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
question.py feat: attending tip, per-question notes, save to folder, session clock 2026-09-11 02:59:32 +02:00
question_category.py feat: multi-subcategory questions, statistics hardening, seeded lab values 2026-09-08 14:43:22 +02:00
question_media.py feat: figures as records, question-centred dashboard, fewer hints mid-quiz 2026-09-11 03:18:49 +02:00
quiz.py feat: key points smart links, difficulty tags, adaptive sessions, educator-only question management 2026-09-09 02:26:45 +02:00
quiz_category.py Major: categories, question bank, security fixes, mobile layout, UX improvements 2026-03-31 20:08:05 +02:00
quiz_question_link.py Junction table for shared questions; verification blocking; semantic bank search; bug fixes 2026-04-01 00:55:13 +02:00
reminder.py Add switchable embedding model, Polly toggle, job cancellation, and UI fixes 2026-04-03 20:44:11 +02:00
section.py CRITICAL: Remove cascade delete from Section→Quiz relationship 2026-04-01 18:26:22 +02:00
study_plan.py feat: study plans you can open, work through, and edit 2026-09-10 12:10:39 +02:00
user.py feat: exams as real data, AI-mode matching, and a continue-study panel 2026-09-10 02:08:38 +02:00
user_note.py feat: attending tip, per-question notes, save to folder, session clock 2026-09-11 02:59:32 +02:00