challenge-sync-airbus: Handle individual try
This commit is contained in:
parent
ac966f9023
commit
f157d9c3bd
3 changed files with 54 additions and 0 deletions
|
|
@ -168,6 +168,10 @@ func (w *Walker) TreatScoreGrid(path string, airbusTeam *AirbusTeam) error {
|
|||
if row.Time.After(ts.Time) {
|
||||
if !noValidateChallenge && row.Reason == "Validation" {
|
||||
err = w.API.ValidateChallengeFromUser(airbusTeam, w.Exercices[row.IdExercice])
|
||||
} else if row.Reason == "Tries" {
|
||||
// Just add 1 try at a time as the field is updated
|
||||
row.Points = fic.TermTriesSeq(fic.ReverseTriesPoints(int64(row.Points)))
|
||||
err = w.API.AwardUser(airbusTeam, int64(math.Trunc(row.Points*row.Coeff*w.Coeff)), row.Reason)
|
||||
} else {
|
||||
err = w.API.AwardUser(airbusTeam, int64(row.Points*row.Coeff*w.Coeff), row.Reason)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue