backend: fix handling of invalid mcq justification
This commit is contained in:
parent
d40922629b
commit
5f660702eb
1 changed files with 3 additions and 2 deletions
|
@ -88,8 +88,9 @@ func treatSubmission(pathname string, team fic.Team, exercice_id string) {
|
||||||
log.Println(id, "[ERR] We retrieve an invalid MCQ: from exercice", mcq.IdExercice, "whereas expected from exercice", exercice.Id)
|
log.Println(id, "[ERR] We retrieve an invalid MCQ: from exercice", mcq.IdExercice, "whereas expected from exercice", exercice.Id)
|
||||||
return
|
return
|
||||||
} else if key, err := mcq.GetJustifiedFlag(exercice, choice); err != nil {
|
} else if key, err := mcq.GetJustifiedFlag(exercice, choice); err != nil {
|
||||||
log.Println(id, "[ERR] Unable to retrieve mcq justification flag:", err)
|
// Most probably, we enter here because the selected choice has not to be justified
|
||||||
return
|
// So, just ignore this case as it will be invalidated by the mcq validation
|
||||||
|
continue
|
||||||
} else {
|
} else {
|
||||||
if responses.Keys == nil {
|
if responses.Keys == nil {
|
||||||
responses.Keys = map[int64]string{}
|
responses.Keys = map[int64]string{}
|
||||||
|
|
Reference in a new issue