Add a disabled state to exercices
This commit is contained in:
parent
0f41e44e13
commit
eb85b28f5b
10 changed files with 33 additions and 17 deletions
|
@ -44,6 +44,12 @@ func treatSubmission(pathname string, team *fic.Team, exercice_id string) {
|
|||
return
|
||||
}
|
||||
|
||||
// Check the exercice is not disabled
|
||||
if exercice.Disabled {
|
||||
log.Println("[!!!] The team submits something for a disabled exercice")
|
||||
return
|
||||
}
|
||||
|
||||
// Check the team can access this exercice
|
||||
if !team.HasAccess(exercice) {
|
||||
log.Println("[!!!] The team submits something for an exercice it doesn't have access yet")
|
||||
|
|
Reference in a new issue