feat: improve dropped question support
This commit is contained in:
@@ -355,7 +355,12 @@ pub fn student_value(diagnostic: &StudentDiagnostic, config: &RenderConfig) -> V
|
||||
diagnostic
|
||||
.dropped_questions
|
||||
.iter()
|
||||
.map(|n| Value::Int(*n as i64))
|
||||
.map(|dropped| {
|
||||
let mut value = Value::dict();
|
||||
value.insert("number", Value::Int(dropped.number as i64));
|
||||
value.insert("full-credit", Value::Bool(dropped.full_credit));
|
||||
value
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
@@ -630,7 +635,12 @@ pub fn cohort_value(diagnostic: &CohortDiagnostic, config: &RenderConfig) -> Val
|
||||
diagnostic
|
||||
.dropped_questions
|
||||
.iter()
|
||||
.map(|n| Value::Int(*n as i64))
|
||||
.map(|dropped| {
|
||||
let mut value = Value::dict();
|
||||
value.insert("number", Value::Int(dropped.number as i64));
|
||||
value.insert("full-credit", Value::Bool(dropped.full_credit));
|
||||
value
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user