admin: Retrieve stats on exercices
This commit is contained in:
parent
63b4cdc622
commit
b409fa6806
10 changed files with 241 additions and 19 deletions
|
|
@ -71,6 +71,14 @@ func (k *FlagLabel) RecoverId() (Flag, error) {
|
|||
}
|
||||
}
|
||||
|
||||
func (k *FlagLabel) NbTries() (int64, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func (k *FlagLabel) TeamsOnIt() ([]int64, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// AddFlagLabel creates and fills a new struct Flag and registers it into the database.
|
||||
func (k *FlagLabel) Create(e *Exercice) (Flag, error) {
|
||||
if res, err := DBExec("INSERT INTO exercice_flag_labels (id_exercice, ordre, label, variant) VALUES (?, ?, ?, ?)", e.Id, k.Order, k.Label, k.Variant); err != nil {
|
||||
|
|
|
|||
Reference in a new issue