frontend: when a justification is valid, check the MCQ box

This commit is contained in:
nemunaire 2018-11-28 07:09:05 +01:00
commit 69a866bbbf
2 changed files with 14 additions and 1 deletions

View file

@ -261,6 +261,19 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
}
}
}
} else if PartialValidation {
m.PSolved = map[int64]int{}
for _, e := range mcq.Entries {
if _, ok := justifiedMCQ[m.Title + "%" + e.Label]; ok {
if _, ok := justifiedMCQ_ids[m.Title + "%" + e.Label]; !ok {
m.PSolved[e.Id] = 2
} else {
m.PSolved[e.Id] = -1
}
} else {
m.PSolved[e.Id] = -1
}
}
}
} else {
h := getHashedFlag([]byte(soluce))