Partial resolution of exercices

This commit is contained in:
nemunaire 2016-12-04 19:08:46 +01:00
commit 3cd6cd959d
8 changed files with 46 additions and 24 deletions

View file

@ -244,6 +244,12 @@ func IsSolved(e Exercice) (int, time.Time) {
}
}
func (t Team) HasPartiallySolved(k Key) (*time.Time) {
var tm *time.Time
DBQueryRow("SELECT MIN(time) FROM key_found WHERE id_team = ? AND id_key = ?", t.Id, k.Id).Scan(&tm)
return tm
}
type statLine struct {
Tip string `json:"tip"`
Total int `json:"total"`