backend: implement hint dependencies
This commit is contained in:
parent
f3a34c00db
commit
56053f3350
@ -39,6 +39,8 @@ func treatOpeningHint(pathname string, team fic.Team) {
|
|||||||
log.Printf("%s [ERR] Unable to retrieve the hint's underlying exercice: %s\n", id, err)
|
log.Printf("%s [ERR] Unable to retrieve the hint's underlying exercice: %s\n", id, err)
|
||||||
} else if !team.HasAccess(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)
|
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) {
|
||||||
|
log.Printf("%s [!!!] The team asks to open an hint whereas it doesn't have access to it due to hint dependencies\n", id)
|
||||||
} else if err = team.OpenHint(hint); err != nil {
|
} else if err = team.OpenHint(hint); err != nil {
|
||||||
log.Printf("%s [ERR] Unable to open hint: %s\n", id, err)
|
log.Printf("%s [ERR] Unable to open hint: %s\n", id, err)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user