Fix exam grading workflow and redesign assignment creation - #23
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5cb319067
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if p_max_points is distinct from v_exam.max_points | ||
| and exists (select 1 from public.exam_attempts where exam_id = p_exam_id) then | ||
| raise exception 'exam_scale_locked_after_attempts' using errcode = '42501'; |
There was a problem hiding this comment.
Lock all grading inputs after attempts exist
When an exam already has attempts, this guard locks only max_points; the setup page can still change scoring_notes, and subsequent reference uploads overwrite the blank exam or answer-key OCR. Existing attempts therefore retain scores produced from the old inputs while later attempts or retries use different questions, answers, or rules under the same exam definition. Lock these grading inputs once attempts exist, or version the exam and bind each attempt to a version.
Useful? React with 👍 / 👎.
Reworks the teacher exam workflow into separate overview, setup, grading, and review stages. Adds optional OCR answer-key references, makes item-to-attempt AI grading a single backend operation, separates Writing OCR from exams, and replaces the long assignment form with a four-step wizard. Includes migration 0055 for answer-key OCR fields and staged workflow constraints. Production is not changed by this PR until merge/migration.