include id_theme in Exercice struct
This commit is contained in:
parent
69979ced1d
commit
78b6211b94
4 changed files with 11 additions and 27 deletions
|
@ -34,7 +34,7 @@ func treatOpeningHint(pathname string, team fic.Team) {
|
|||
log.Println("[WRN]", err)
|
||||
} else if lvl, err := exercice.GetLevel(); err != nil {
|
||||
log.Println("[WRN]", err)
|
||||
} else if theme, err := exercice.GetTheme(); err != nil {
|
||||
} else if theme, err := fic.GetTheme(exercice.IdTheme); err != nil {
|
||||
log.Println("[WRN]", err)
|
||||
} else if _, err := fic.NewEvent(fmt.Sprintf("L'équipe %s a dévoilé un indice pour le <strong>%d<sup>e</sup></strong> défi %s !", team.Name, lvl, theme.Name), "alert-info"); err != nil {
|
||||
log.Println("[WRN] Unable to create event:", err)
|
||||
|
|
|
@ -44,7 +44,7 @@ func treatSubmission(pathname string, team fic.Team, exercice_id string) {
|
|||
}
|
||||
|
||||
// Find the corresponding theme
|
||||
theme, err := exercice.GetTheme()
|
||||
theme, err := fic.GetTheme(exercice.IdTheme)
|
||||
if err != nil {
|
||||
log.Printf("%s [ERR] Unable to retrieve theme for exercice %d: %s\n", id, eid, err)
|
||||
return
|
||||
|
|
Reference in a new issue