handle justified MCQ in interface and submission

This commit is contained in:
nemunaire 2018-11-28 06:39:38 +01:00
commit 3dcb233c3f
4 changed files with 63 additions and 10 deletions

View file

@ -298,7 +298,7 @@ func (e Exercice) CheckResponse(cksum []byte, respflags map[int64]string, respmc
// Check flags
for _, flag := range flags {
if res, ok := respflags[flag.Id]; !ok {
if res, ok := respflags[flag.Id]; !ok && (!PartialValidation || t.HasPartiallySolved(flag) == nil) {
valid = false
} else if !flag.Check([]byte(res)) {
if !PartialValidation || t.HasPartiallySolved(flag) == nil {