Skip to content

Exam booklet layout and surname print order - #36

Merged
agiacalone merged 2 commits into
mainfrom
feat/exam-print-order-by-surname
Sep 28, 2026
Merged

agiacalone merged 2 commits into
mainfrom
feat/exam-print-order-by-surname

Conversation

@agiacalone

Copy link
Copy Markdown
Owner

Summary

Two exam changes from the CECS 378 Fa26 Exam 1 print run.

Booklet layout (references/reference_exam.tex). Exams print double-sided, so the scaffold now produces a closed booklet:

  • Page 1 is a cover with no exam material. It has the name/ID block, exam information (points, questions, time, page range, note-card and device rules), the directions, and an honor pledge with a signature line. An unsigned pledge is not graded, and the cover says so.
  • The last page is always a blank back cover on an even page. When the questions end on an even page, a scratch page fills the odd one.
  • The header centre prints the student ID (never the name) on every page of a pre-filled copy. A page separated from the cover stays identifiable, and the inner pages stay anonymous.
  • The footer centre reads "Page N of X".

Surname print order (lectern/exam_pack.py). The combined PDF and register.csv were sorted by display name, first name first. They now sort by surname, then given names. The surname comes from the roster's lms_name column (Last,First Middle) when present, which keeps multi-word surnames whole; otherwise it is the last word of the name. gradescope_roster.csv uses the same split.

Template-only for the layout: existing exam .tex files are not backfilled, and the \item ... \textit{(N pts)} pattern is unchanged, so exam_pack parsing is unaffected.

Test plan

  • pytest: 608 passed, 1 skipped (new tests for surname order with and without lms_name, and for the Gradescope roster split; fixtures use fictional names)
  • reference_exam.tex builds as a 4-page booklet (student and key), no unresolved page references
  • CECS 378 Fa26 Exam 1 built with both changes: 216 pages, reg-exam-verify ✓ 36 ✗ 0, print order matches the register for all 36

🤖 Generated with Claude Code

https://claude.ai/code/session_019vCMgevpwqjvXysvDivXBs

agiacalone and others added 2 commits September 28, 2026 14:24
The single-layout combined PDF and register.csv were sorted by the full
display name, first name first, so the stack matched no class list. Sort
both by surname, then given names. Take the surname from the roster's
lms_name column ("Last,First Middle") when present, which keeps
multi-word surnames whole; otherwise fall back to the last word of the
name. gradescope_roster.csv uses the same split for its Last Name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019vCMgevpwqjvXysvDivXBs
reference_exam.tex now opens with a cover page that holds no exam
material: the name/ID block, exam information with the note-card and
device rules, the directions, and an honor pledge that must be signed
for the exam to be graded. The last page is always a blank back cover
on an even page, with a scratch page first when needed. The header
prints the student ID (never the name) on every page of a pre-filled
copy, and the footer reads "Page N of X".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019vCMgevpwqjvXysvDivXBs
@agiacalone
agiacalone merged commit 8131a77 into main Sep 28, 2026
4 checks passed
@agiacalone
agiacalone deleted the feat/exam-print-order-by-surname branch September 28, 2026 21:32
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