fix: seals after changes

This commit is contained in:
alexm committed 2026-09-22 00:58:32 -04:00
1 parent d3f21e913b
commit cea9769022
9 files changed
+106 -12

No files matched your search

+5 -4
View File
@@ -518,12 +518,13 @@ fn sealed_item(
fn sealed_form(catalog: &Catalog, record: &AssessmentFile, form: &Form) -> Result<SealedForm> {
let mut questions = Vec::new();
// Dropped placements are not printed, so they take no printed position. A
// drop recorded before sealing therefore shifts every later position, exactly
// as it shifts them on the page.
// Only an item pulled before printing takes no printed position. An item
// dropped from scoring after the exam was on the page and keeps its place,
// so re-sealing after a drop describes the same paper the students held
// rather than renumbering everything after it.
let printed: Vec<Placement> = select::layout(record, form)
.into_iter()
.filter(|p| !p.dropped)
.filter(|p| p.was_printed())
.collect();
for (index, placement) in printed.iter().enumerate() {