challenge-sync-airbus: Add an option to not search for exercice validation
This commit is contained in:
parent
bd9d9e9402
commit
1bd30632d3
2 changed files with 6 additions and 1 deletions
|
|
@ -10,6 +10,10 @@ import (
|
|||
"srs.epita.fr/fic-server/libfic"
|
||||
)
|
||||
|
||||
var (
|
||||
noValidateChallenge bool
|
||||
)
|
||||
|
||||
type Walker struct {
|
||||
LastSync map[AirbusUserId]time.Time
|
||||
Exercices AirbusExercicesBindings
|
||||
|
|
@ -87,7 +91,7 @@ func (w *Walker) TreatScoreGrid(path string, airbusTeamId AirbusUserId) error {
|
|||
maxts = row.Time
|
||||
}
|
||||
if row.Time.After(w.LastSync[airbusTeamId]) {
|
||||
if row.Reason == "Validation" {
|
||||
if !noValidateChallenge && row.Reason == "Validation" {
|
||||
err = w.API.ValidateChallengeFromUser(airbusTeamId, w.Exercices[row.IdExercice])
|
||||
} else {
|
||||
err = w.API.AwardUser(airbusTeamId, int64(row.Points*row.Coeff*w.Coeff), row.Reason)
|
||||
|
|
|
|||
Reference in a new issue