Teacher Assessment
AssessmentSession is the teacher-facing assessment modality. It manages the question pool, assessment configuration, student assignments, and session lifecycle.
Struct
Section titled “Struct”pub struct AssessmentSession { state: State<AssessmentSessionSynced, AssessmentSessionEphemeral>, services: Arc<AssessmentSessionServices>, cmd_tx: CommandSender<...>, cmd_rx: CommandReceiver<...>,}Synced State
Section titled “Synced State”pub struct AssessmentSessionSynced { pub meta: ResourceMeta, pub config: AssessmentConfig, pub skill_targets: Vec<String>, pub network_index: usize, pub curriculum_index: usize, pub placements: Vec<ComponentPlacement<QuestionPoolPosition>>, pub status: SessionStatus, pub assigned_students: Vec<String>,}AssessmentConfig
Section titled “AssessmentConfig”Controls assessment constraints:
pub struct AssessmentConfig { pub duration: Option<Duration>, // overall time limit pub question_timer: Option<Duration>, // per-question time limit pub question_count: usize, // target number of questions pub calculators_allowed: bool, pub notes_allowed: bool, pub show_answers: AnswerVisibility, // Never, AfterSubmit, AfterComplete pub assessment_type: AssessmentType, // Practice, Test, Exam}Position
Section titled “Position”QuestionPoolPosition describes a question’s metadata in the pool:
pub struct QuestionPoolPosition { pub skill_ids: Vec<String>, pub question_type: QuestionFormat, pub difficulty: f32,}Status Lifecycle
Section titled “Status Lifecycle”Created → Started → Paused → Finished ↑ | └─────────┘| Status | Meaning |
|---|---|
Created | Assessment is being authored, not yet available to students |
Started | Assessment is live, students can begin |
Paused | Temporarily suspended, students cannot submit |
Finished | Assessment is complete, no more submissions |
Intents
Section titled “Intents”| Intent | Parameters | Purpose |
|---|---|---|
UpdateConfig | duration?, question_timer?, question_count?, calculators_allowed?, notes_allowed?, show_answers?, assessment_type? | Update assessment configuration |
SetSkillTargets | skill_ids: String | Set target skills (comma-separated IDs) |
AddQuestion | question_data: QuestionData, position: QuestionPoolPosition | Add a question to the pool |
RemoveQuestion | id: String | Remove a question by placement ID |
AssignStudents | student_ids: String | Assign students (comma-separated IDs) |
SetStatus | status: SessionStatus | Change session status |
ListQuestions | — | List all questions with their positions |
Recompile | — | Force recompilation (hidden from AI) |
Metadata
Section titled “Metadata”pub struct AssessmentSessionMetadata { pub question_count: usize, pub show_answers: AnswerVisibility,}Hashed for the incremental compilation cache — changes to question count or answer visibility trigger full recompilation.
Snapshot
Section titled “Snapshot”pub struct AssessmentSessionSnapshot { pub id: String, pub name: String, pub description: Option<String>, pub config: AssessmentConfig, pub skill_targets: Vec<String>, pub placements: Vec<AssessmentPoolPlacement>, pub status: SessionStatus, pub assigned_students: Vec<String>, pub version: u64, pub export_ready: bool,}Related
Section titled “Related”- Overview — architecture and shared types
- Student — the student submission modality
- Components — question compilation
Reducer— state management trait