chore: add dropped question to reports

This commit is contained in:
2026-09-19 23:15:31 -04:00
parent 92c8a8fc75
commit ba84c4d82a
4 changed files with 110 additions and 5 deletions
@@ -167,6 +167,7 @@
band-hit: 11,
biggest-surprise: (number: 14, expected: 0.45, observed: 0.86),
),
dropped-questions: (),
revise: (),
forms: (
(id: "A", students: 12, mean: 73.5, sd: 10.2),
@@ -989,6 +990,17 @@
One row per question, in the order they were numbered. Option letters are the
bank's, not any one form's. See the guide above for what p, r, and D mean; the
r column is colour-coded against the conventional cut points.
#{
let dropped = cb-data.at("dropped-questions", default: ())
if dropped.len() > 0 [
#plural(dropped.len(), "Question", "Questions")
#dropped.map(str).join(", ")
#plural(dropped.len(), "is", "are")
marked dropped in the assessment record, so
#plural(dropped.len(), "it is", "they are")
absent from this table and from every statistic above.
]
}
]
#table(
+33 -4
View File
@@ -121,6 +121,7 @@
correct: true,
credit: 1.0,
bonus: false,
dropped: false,
blank: false,
class-rate: 0.91,
taught-in: (),
@@ -451,6 +452,26 @@
},
)
#let dropped-questions = cb-data.at("dropped-questions", default: ())
#if dropped-questions.len() > 0 [
#block(above: entry-gap)[
#pad(right: prose-pad)[
#text(size: size-lead)[
#plural(dropped-questions.len(), "Question", "Questions")
#dropped-questions.map(str).join(", ")
#plural(dropped-questions.len(), "was", "were")
dropped after the exam and #plural(dropped-questions.len(), "is", "are")
not part of anyone's score. Your percentage above is out of the
#plural(dropped-questions.len(), "remaining question", "remaining questions").
Nothing you wrote on
#plural(dropped-questions.len(), "it", "them")
counted for or against you.
]
]
]
]
// ─────────────────────────────────────────────────────────────────────────────
// Levels
// ─────────────────────────────────────────────────────────────────────────────
@@ -750,7 +771,10 @@
#let questions = cb-data.at("questions", default: ())
#let question-box(q) = {
let color = if q.at("blank", default: false) { luma(160) } else if q.at("correct", default: false) == true {
let dropped = q.at("dropped", default: false)
let color = if dropped { luma(130) } else if q.at("blank", default: false) {
luma(160)
} else if q.at("correct", default: false) == true {
ok-color
} else if q.at("credit", default: 0.0) > 0.0 { mid-color } else { bad-color }
box(
@@ -763,10 +787,15 @@
#align(center)[
#text(size: size-small, weight: "bold", fill: color.darken(18%))[#q.number]
#{
let level = q.at("level", default: none)
if level != none {
if dropped {
linebreak()
text(size: size-tag, fill: luma(120))[L#level]
text(size: size-tag, fill: luma(110))[out]
} else {
let level = q.at("level", default: none)
if level != none {
linebreak()
text(size: size-tag, fill: luma(120))[L#level]
}
}
}
]