checker: Ensure a flag is found before considering a good response
This commit is contained in:
parent
c53140b88e
commit
76606b3c80
@ -594,10 +594,13 @@ func (e *Exercice) CheckResponse(cksum []byte, respflags map[int]string, respmcq
|
|||||||
valid = valid && flag.IsOptionnal()
|
valid = valid && flag.IsOptionnal()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag.FoundBy(t)
|
err := flag.FoundBy(t)
|
||||||
|
if err == nil {
|
||||||
|
// err is unicity issue, probably flag already found
|
||||||
goodResponses += 1
|
goodResponses += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if diff > 0 || goodResponses > 0 {
|
if diff > 0 || goodResponses > 0 {
|
||||||
e.UpdateTry(t, diff, goodResponses > 0)
|
e.UpdateTry(t, diff, goodResponses > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user