Able to check submission
This commit is contained in:
parent
a9f35d224b
commit
e3f7cce80a
4 changed files with 51 additions and 3 deletions
|
|
@ -37,7 +37,13 @@ func treatSubmission(pathname string, team_id string, exercice_id string) {
|
|||
cnt += scanner.Text()
|
||||
}
|
||||
|
||||
|
||||
log.Println(id, team, exercice, cnt)
|
||||
if solved, err := exercice.CheckResponse(cnt, team); err != nil {
|
||||
log.Println(id, "[ERR]", err)
|
||||
} else if solved {
|
||||
exercice.Solved(team)
|
||||
log.Printf("%s Team %d SOLVED exercice %d\n", id, team.Id, exercice.Id)
|
||||
} else {
|
||||
log.Printf("%s Team %d submit an invalid solution for exercice %d\n", id, team.Id, exercice.Id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue