Skip to content

feat(exam_pack): rich per-option Gradescope grading note + TF/code answer normalization - #26

Open
agiacalone wants to merge 1 commit into
mainfrom
feat/grading-note-per-option-rubric
Open

feat(exam_pack): rich per-option Gradescope grading note + TF/code answer normalization#26
agiacalone wants to merge 1 commit into
mainfrom
feat/grading-note-per-option-rubric

Conversation

@agiacalone

Copy link
Copy Markdown
Owner

What & why

reg-exam-build's GRADING_NOTE.md only carried the answer letter, so it emitted a stripped | Q | Name | Answer | Rubric | summary. That can't drive per-option ISA grading, and it lacks the form·Qn·slot keys reg-gradescope-stats joins against for per-distractor item analysis. This was a tracked "Known gap" in the CHANGELOG; every exam built since regressed to it (Su26 Exam 2 and the Final).

Changes

  • parse_outline_from_tex extracts each option's text + correctness from the .tex (\correctchoice/\wrongchoice, balanced-brace aware) via a _detex LaTeX→plaintext pass.
  • emit_grading_note renders the canonical rich form (matching Exam 1): #### <Form>·Q<n> · name · pts · TYPE headings, per-option | Pts | Key | Rubric item | tables keyed <form>·Q<n>·<slot>, "No answer / multiple marks" rows, FIB per-blank rows, *Scoring:* captions on fib/code, and a <!-- reg-gradescope-stats:link --> Post-exam-statistics section.
  • Legacy-code fallback — pre-2026-06-09 inline \textsc{T/F} code items (no \correctchoice enumerate) synthesize their True/False rows from the answer, so keys still round-trip.
  • TF/code outline answers normalized to the verdict word True/False (never a letter), regardless of whether the reveal reads Answer: True or a deviating Answer: a (True). Docs reconciled to the bare-word house standard + the defensive normalization (docs/design/exam-tex-format.md).

Verification

  • 407 passed (3 new tests: rich structure, legacy-code synth, TF-reveal normalization).
  • Regenerated CECS 378 Su26 Exam 2 + Final grading notes; credited answers cross-checked against _outline.csv (0 real mismatches).
  • Exam 1's note left untouched (already correct + has live post-exam stats).

🤖 Generated with Claude Code

…swer normalization

The build's GRADING_NOTE.md only carried the answer letter, emitting a stripped
| Q | Name | Answer | Rubric | summary that couldn't drive per-option ISA grading
or round-trip to reg-gradescope-stats (the form·Qn·slot keys). Closes the tracked
"Known gap"; every exam built since (Exam 2, Final) had the broken note.

- parse_outline_from_tex extracts each option's text + correctness from the .tex
  (\correctchoice/\wrongchoice, balanced-brace aware) via a _detex LaTeX->text pass.
- emit_grading_note renders the canonical rich form: "#### <Form>.Q<n>" headings,
  per-option | Pts | Key | Rubric item | tables keyed <form>.Q<n>.<slot>, no-answer
  rows, FIB per-blank rows, *Scoring:* captions, and a reg-gradescope-stats link.
- Legacy inline \textsc{T/F} code items (no enumerate) synthesize True/False rows
  from the answer so keys still round-trip.
- TF/code outline answers normalized to the verdict word True/False (never a
  letter) regardless of reveal style; docs reconciled to the bare-word house
  standard + defensive normalization.

Regenerated CECS 378 Su26 Exam 2 + Final grading notes; answers cross-checked
against _outline.csv. Tests: 407 passed (3 new).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6bNoTCzWuc8zbyShHVKFB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant