pdf-quiz-generator/backend/app/models
Daniel d1de9589ad feat: questions are soft-deleted, and the trash holds them
Question ids come from a sequence and are never reissued, and fourteen
tables point at them — attempts, quiz membership, exam membership,
media, article links, notes, favourites, feedback. Deleting the row took
all of that with it, so "restore" could only ever have meant typing the
text in again as a different question.

DELETE now sets deleted_at. The question leaves the bank, the builder,
search and every share path at once, because the exclusion lives in
general_question_predicate rather than at each call site. Restoring puts
back the same id, so everything that pointed at it still does. Erasing
for real requires the trash first and a moderator, and the confirmation
says what goes with it.

The trash page holds questions instead of tests. A test is a selection
you can remake in a minute; nobody wanted those back.

Used and withdrawn invite codes can be removed — an unused one is still
withdrawn rather than deleted, so it stays visible as having been issued
and stopped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-11 20:12:58 +02:00
..
__init__.py feat: one settings page, and comments removed 2026-09-11 19:40:24 +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
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
feedback.py feat: feedback replaces comments; Qbank is a landing page; one question page 2026-09-11 18:50:57 +02:00
flashcard.py feat: hybrid search for articles and cards; full-page question editor 2026-09-10 02:01:35 +02:00
invite.py feat: the player is a box; sharing and sign-up are the administrator's 2026-09-11 19:17: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: questions are soft-deleted, and the trash holds them 2026-09-11 20:12:58 +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 fix: one sessions list, at /sessions, with plan material out of it 2026-09-11 04:10:25 +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
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: cross-link the articles, and strip what the analysis page replaced 2026-09-11 03:44:44 +02:00
user_note.py feat: attending tip, per-question notes, save to folder, session clock 2026-09-11 02:59:32 +02:00