Export themes.json
This commit is contained in:
parent
47610f0e2a
commit
5a8d2c36b7
2 changed files with 56 additions and 3 deletions
|
@ -133,6 +133,15 @@ func (e Exercice) Solved(t Team) error {
|
|||
}
|
||||
}
|
||||
|
||||
func (e Exercice) SolvedCount() int64 {
|
||||
var nb int64
|
||||
if err := DBQueryRow("SELECT COUNT(id_exercice) FROM exercice_solved WHERE id_exercice = ?", e.Id).Scan(&nb); err != nil {
|
||||
return 0
|
||||
} else {
|
||||
return nb
|
||||
}
|
||||
}
|
||||
|
||||
func (e Exercice) CheckResponse(response string, t Team) (bool, error) {
|
||||
s, _, _ := t.HasSolved(e)
|
||||
if s {
|
||||
|
|
Reference in a new issue