pdf-quiz-generator/backend/app/services
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 Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
ai_mode_service.py feat: the chat can put you into practice, and Settings stops crying wolf 2026-09-12 03:45:51 +02:00
ai_service.py refactor: name the study plans ourselves, and stop reserving 64k tokens a call 2026-09-11 01:41:18 +02:00
article_service.py fix: every cross-reference in the corpus was a dead link 2026-09-11 18:25:31 +02:00
article_writer.py feat: a real site footer, and better retrieval queries 2026-09-11 02:40:57 +02:00
attempt_expiry.py feat: right after a tip is its own slice 2026-09-12 01:51:03 +02:00
captcha.py feat: Cap replaces hCaptcha, self-hosted beside the app 2026-09-12 06:14:14 +02:00
certificate_service.py Add certificate generation, SCORM support, QTI export/import 2026-04-11 01:30:09 +02:00
clinical_library.py feat: short / long / clinical, and stop broad topics retrieving index lines 2026-09-10 18:21:21 +02:00
draft_questions.py refactor: remove per-question sharing 2026-09-12 08:42:51 +02:00
email_service.py feat: cross-link the articles, and strip what the analysis page replaced 2026-09-11 03:44:44 +02:00
embedding_service.py feat: media as a searchable corpus, ready for a vision embedder 2026-09-10 02:22:52 +02:00
exam_blueprint.py feat: study plans built to the board's content outline 2026-09-11 21:40:17 +02:00
extraction_modes.py refactor: name the study plans ourselves, and stop reserving 64k tokens a call 2026-09-11 01:41:18 +02:00
invites.py feat: the player is a box; sharing and sign-up are the administrator's 2026-09-11 19:17:35 +02:00
knowledge_groups.py feat: an organ system is a fact about a topic, not about a keyword 2026-09-12 04:32:25 +02:00
pdf_service.py refactor: name the study plans ourselves, and stop reserving 64k tokens a call 2026-09-11 01:41:18 +02:00
question_figures.py fix: choosing is answering; figures say only what an educator wrote 2026-09-12 00:19:35 +02:00
quiz_builder.py refactor: remove per-question sharing 2026-09-12 08:42:51 +02:00
quiz_service.py Junction table for shared questions; verification blocking; semantic bank search; bug fixes 2026-04-01 00:55:13 +02:00
search_service.py feat: media as a searchable corpus, ready for a vision embedder 2026-09-10 02:22:52 +02:00
site_settings.py feat: the tutor is an administrator's to allow, and a handbook explains the rest 2026-09-11 21:13:38 +02:00
storage_service.py feat: serve uploads through storage, and move all 3,852 files to MinIO 2026-09-10 10:23:34 +02:00
study_plan_context.py feat: an exam that runs out is a result; delete and reset go all the way down 2026-09-11 04:47:11 +02:00
vector_service.py fix: gateway-agnostic URL handling for TTS and embeddings, docs cleanup 2026-04-19 02:17:35 +02:00