pdf-quiz-generator/backend/app/models
Daniel 5d59e00144 refactor: remove per-question sharing
`Question.is_shared` defaulted to 1 and was only ever set by a route nothing
called, so in practice it divided the bank into "everything" and "everything,
plus your own private ones" — a distinction that cost every recommendation
denominator a join and never changed an answer. Who may reach the bank is the
site's own access rules; who may manage a question is the category grant tree.

So the two predicates the whole bank was built on are now the same thing, and
say what they actually mean: a question is out of reach if it has been deleted
or belongs to a course. Nothing else. The column is dropped, the route that set
it is gone, the bulk "share" action with it, and the Private tile and pill go
from the question manager.

The tests that turned on it have been rewritten rather than deleted, because
the rule they were really about survives: revoking a question still revokes
every session carrying it — by deleting it, which is the only revocation left.
Several others named a category holding exactly two reachable questions and
then answered two particular ids; that category holds four now, so they name
the pair instead. A session's own sharing flag is untouched — that is a
different thing, and it is still how a session is handed to somebody.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-12 08:42:51 +02:00
..
__init__.py feat: extracted questions are staged, and only acceptance takes an id 2026-09-11 22:57:08 +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: right after a tip is its own slice 2026-09-12 01:51:03 +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: a collections page 2026-09-12 03:33:37 +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
draft_question.py feat: extracted questions are staged, and only acceptance takes an id 2026-09-11 22:57:08 +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: exams are a group you can build, with the board's own blueprint 2026-09-11 20:27:48 +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 refactor: remove per-question sharing 2026-09-12 08:42:51 +02:00
question_category.py feat: an organ system is a fact about a topic, not about a keyword 2026-09-12 04:32:25 +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: a repetition does not raise your score; no more deleting a session 2026-09-12 01:08:42 +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 fix: user deletion, a real end-block dialog, and the axes people pick by 2026-09-12 05:28:16 +02:00
user_note.py feat: attending tip, per-question notes, save to folder, session clock 2026-09-11 02:59:32 +02:00