Files
ruoyi-vue-pro/yudao-module-education/CONTEXT.md

9.0 KiB

Education

The Education context owns the language for educational content, practice, assessment, and student learning state.

Language

Question Content: The complete versioned educational prompt presented for answering, including its stem and any answer choices required by its question type. Avoid: Payload, raw question

Option-backed Question: A question whose answer must be selected from a finite, student-visible set of labeled options. The supported family is choice, multi, multi_choice, judge, and image. Avoid: Objective question when referring only to storage shape

Optionless Question: A question answered without selecting from a finite option list. The recognized family includes fill, text, terms, short_answer, composition, discuss, translation, case_analysis, brief_analysis, calculation, analysis_design, combination, and solution. Avoid: Subjective question when the distinction being made is only whether options are present

Composite Question: A container question, such as reading, whose answerable units are sub-questions rather than top-level options. It is not a valid standalone practice question until the sub-question model is supported by the target contract. Avoid: Reading question when other composite forms may use the same model

Safe Question: A student-visible projection of Question Content that contains only display fields and never contains an answer, explanation, analysis, scoring rule, correctness flag, or administrative metadata. Avoid: Sanitized DO, frontend question

Question Option: One distinct choice in an Option-backed Question, identified by a non-blank label and containing non-blank display content. Labels are unique within the question. Avoid: Answer, choice answer

Question Snapshot: The immutable, student-visible Question Content captured when a practice session is created so that later content edits do not change that session. It excludes answers and explanations; protected scoring data is not part of this projection even when stored beside it. Avoid: Question cache

Question Content Version: An immutable revision of Question Content identified by its question and positive version number. Publication selects lifecycle state for the current version; it does not rewrite an existing version or change content ownership. Avoid: Editable version row, question backup

Publication State: The server-controlled lifecycle of tenant Question Content: DRAFT → PUBLISHED → ARCHIVED. The current command surface has no reverse transition, and RETIRED is not yet a defined state. Avoid: Arbitrary status field, published boolean as an independent state

Draft Question Content: Tenant-owned Question Content that may still be completed by an author and is never available to fresh student reads. Avoid: Unpublished live question

Published Question Content: Question Content whose current immutable version passed publication safety checks and may be returned as a Safe Question to fresh student reads. Avoid: Public content (publication does not mean scope=PUBLIC)

Archived Question Content: Previously Published Question Content withdrawn from fresh student reads without changing ownership or previously captured Question Snapshots. It is terminal in the current command surface. Avoid: Deleted question, retired question

Content Write Authority: The catalog source allowed to accept authoring commands and produce student-visible read-after-write behavior. Native PostgreSQL authoring is authoritative only in JAVA_READ; other provider modes fail before persistence access. Avoid: Read provider switch as implicit write permission

Question Lifecycle Audit: An append-only Education domain fact recording actor, content version, and a valid Publication State transition in the same transaction as that transition. Avoid: Asynchronous operation log as publication proof

Question Placement: The optimistic assignment of a tenant Draft Question Content item to one active, visible, selectable Content Node that the current tenant may reference. Placement is mutable only while the question is DRAFT and is frozen by publication. It is the current question-classification seam; it is not Category CRUD. Avoid: Category assignment, editable published classification

Placement Version: A non-negative optimistic concurrency version for Question Placement. It advances exactly once when the node changes, is independent from the immutable Question Content Version, and participates in publication CAS. Avoid: Content version, lifecycle version

Content Node Publication State: The explicit state of a tenant-owned Content Node: Draft is author-editable and student-invisible, Active is immutable and available for student discovery/Question Placement, and Archived is terminal and unavailable. Avoid: is_active as an independent lifecycle, Category lifecycle

Content Node Authoring Version: The single non-negative optimistic concurrency version advanced exactly once by each Content Node draft revision or lifecycle transition. Avoid: Question Placement Version, Question Content Version

Content Node Lifecycle Audit: An append-only Education domain fact recording actor, authoring version, and a valid Content Node Publication State transition in the same transaction. Avoid: Operation log as activation proof

Manual Question Collection: A tenant-owned, author-curated ordered set of Published Question Content attached to one existing active, visible Content Node. Its membership is selected explicitly rather than derived from filters, categories, or blueprints. Avoid: Dynamic question bank, Category, Practice Blueprint

Collection Publication State: The lifecycle of a Manual Question Collection: Draft is author-editable and undiscoverable, Active is immutable and discoverable through its Content Node, and Archived is terminal and undiscoverable through the collection route. Avoid: Question Publication State, hidden flag

Collection Authoring Version: The single non-negative optimistic concurrency version advanced by each accepted draft revision, membership replacement, or collection lifecycle transition. Avoid: Question Content Version, Question Placement Version

Collection Membership: The complete ordered list of Published Question Content explicitly curated into a Manual Question Collection. It is replaceable only as a whole while the collection is Draft, and the same question cannot occur more than once. Avoid: Dynamic filter result, incremental published playlist

Collection Route Discovery: Student discovery of questions through an Active Manual Question Collection on its Content Node. Archiving the collection closes only this route and does not withdraw directly visible Question Content or alter historical Question Snapshots. Avoid: Question publication, snapshot invalidation

Collection Access Rules: Descriptive collection metadata reserved for a future access contract. Its presence does not grant, deny, or prove paid, private, membership, or other entitlement in the current Education model. Avoid: Entitlement policy, authorization rule

Protected Answer Key: Server-only correctness and explanation data captured for stable scoring of a practice session. It is never included in a Safe Question, Question Snapshot JSON, or pre-submit response. Avoid: Question Snapshot, frontend answer

Unavailable Question Content: Question Content that cannot safely be displayed or restored because its type, required options, option structure, publication state, or snapshot encoding is invalid or unsupported. Avoid: Empty question, best-effort question

Tenant Locator Claim: An unauthenticated pre-login value used to request tenant selection: either a browser-context hostname claim or an explicit Public Tenant Handle. It is not proof of caller identity or tenant authorization. Avoid: Trusted identity, authenticated hostname, tenant ID

Browser-context Evidence: A hostname claim derived from Origin, falling back to Referer, and used to keep browser login-routing inputs consistent. Any HTTP client can forge it, so it is not an authentication boundary. Avoid: Trusted browser identity, verified origin

Public Tenant Handle: The exact, published pre-login handle used by a headless client to request one tenant. In the current target it is the System tenant's unique name under a constrained, case-sensitive, operationally immutable contract; it is not the source system's distinct Tenant Code. Avoid: Tenant Code, display-name search, tenantName query

Student Principal: An authenticated Member identity acting as a student. An administrator or generic authenticated account is not a Student Principal. Avoid: User, account, logged-in principal

Public Tenant Resolution: The unauthenticated pre-login mapping of a Tenant Locator Claim to minimal login-routing fields. A successful result discloses that an available tenant exists; failed unknown, disabled, and expired tenants remain indistinguishable. Avoid: Tenant authentication, tenant administration lookup, non-enumerating discovery