chore: add dropped question to reports
This commit is contained in:
@@ -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]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user