Can lock theme

This commit is contained in:
nemunaire 2023-03-20 15:20:20 +01:00
commit d4ce0dd474
9 changed files with 85 additions and 43 deletions

View file

@ -63,6 +63,12 @@ func treatSubmission(pathname string, team *fic.Team, exercice_id string) {
return
}
// Theme should not be locked
if theme.Locked {
log.Printf("%s [!!!] Submission received for locked theme %d (eid=%d): %s\n", id, exercice.IdTheme, eid, theme.Name)
return
}
// Read received file
cnt_raw, err := ioutil.ReadFile(pathname)
if err != nil {