total submission calculation corrected

This commit is contained in:
Paul Zinselmeyer 2023-11-06 15:08:36 +01:00
parent c9a2888506
commit 5ae2a2d4e2

View file

@ -88,7 +88,7 @@ impl Question for SingleChoiceQuestion {
Ok(ViewerTemplate {
show_result,
name: &self.inner.name,
total_submissions: self.submissions.iter().fold(0, |acc, (_, v)| acc + v),
total_submissions: self.submissions.len() as u32,
submissions: &self.submissions.iter().fold(
vec![0; self.inner.answers.len()],
|mut acc, (_, v)| {