admin: Obtain full current gains from a solved exercice
This commit is contained in:
parent
9f25bc54d3
commit
38e3a4efdf
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ func (e *Exercice) AppendHistoryItem(tId int64, kind string, secondary *int64) e
|
||||||
if kind == "tries" {
|
if kind == "tries" {
|
||||||
bid := make([]byte, 5)
|
bid := make([]byte, 5)
|
||||||
binary.LittleEndian.PutUint32(bid, rand.Uint32())
|
binary.LittleEndian.PutUint32(bid, rand.Uint32())
|
||||||
_, err = (&Exercice{Id: e.Id}).NewTry(team, bid)
|
_, err = e.NewTry(team, bid)
|
||||||
return err
|
return err
|
||||||
} else if kind == "hint" && secondary != nil {
|
} else if kind == "hint" && secondary != nil {
|
||||||
return team.OpenHint(&EHint{Id: *secondary})
|
return team.OpenHint(&EHint{Id: *secondary})
|
||||||
|
@ -79,7 +79,7 @@ func (e *Exercice) AppendHistoryItem(tId int64, kind string, secondary *int64) e
|
||||||
} else if kind == "mcq_found" && secondary != nil {
|
} else if kind == "mcq_found" && secondary != nil {
|
||||||
return (&MCQ{Id: int(*secondary)}).FoundBy(team)
|
return (&MCQ{Id: int(*secondary)}).FoundBy(team)
|
||||||
} else if kind == "solved" {
|
} else if kind == "solved" {
|
||||||
return (&Exercice{Id: e.Id}).Solved(team)
|
return e.Solved(team)
|
||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue