backend: Don't consider non error in MCQ as good response

This commit is contained in:
nemunaire 2022-06-08 16:38:00 +02:00
commit 4b1b5445f7
5 changed files with 12 additions and 8 deletions

View file

@ -463,8 +463,9 @@ func (e *Exercice) CheckResponse(cksum []byte, respflags map[int]string, respmcq
// Validate MCQs if no error
if valid {
for _, mcq := range mcqs {
mcq.FoundBy(t)
goodResponses += 1
if mcq.FoundBy(t) == nil {
goodResponses += 1
}
}
}