Add a disabled state to exercices
This commit is contained in:
parent
0f41e44e13
commit
eb85b28f5b
10 changed files with 33 additions and 17 deletions
|
@ -38,6 +38,8 @@ func treatOpeningHint(pathname string, team *fic.Team) {
|
|||
log.Printf("%s [ERR] Unable to retrieve the given hint: %s\n", id, err)
|
||||
} else if exercice, err := hint.GetExercice(); err != nil {
|
||||
log.Printf("%s [ERR] Unable to retrieve the hint's underlying exercice: %s\n", id, err)
|
||||
} else if exercice.Disabled {
|
||||
log.Println("[!!!] The team submits something for a disabled exercice")
|
||||
} else if !team.HasAccess(exercice) {
|
||||
log.Printf("%s [!!!] The team asks to open an hint whereas it doesn't have access to the exercice\n", id)
|
||||
} else if !team.CanSeeHint(hint) {
|
||||
|
|
Reference in a new issue