diff --git a/libfic/exercice.go b/libfic/exercice.go index d675381d..edcae96a 100644 --- a/libfic/exercice.go +++ b/libfic/exercice.go @@ -86,7 +86,7 @@ func (t *Theme) GetExerciceByPath(epath string) (*Exercice, error) { // GetExercices returns the list of all challenges present in the database. func GetExercices() ([]*Exercice, error) { - if rows, err := DBQuery("SELECT id_exercice, id_theme, title, url_id, path, statement, overview, headline, issue, issue_kind, depend, gain, coefficient_cur, video_uri, resolution, seealso, finished FROM exercices"); err != nil { + if rows, err := DBQuery("SELECT id_exercice, id_theme, title, url_id, path, statement, overview, headline, issue, issue_kind, depend, gain, coefficient_cur, video_uri, resolution, seealso, finished FROM exercices ORDER BY path ASC"); err != nil { return nil, err } else { defer rows.Close() @@ -109,7 +109,7 @@ func GetExercices() ([]*Exercice, error) { // GetExercices returns the list of all challenges in the Theme. func (t *Theme) GetExercices() ([]*Exercice, error) { - if rows, err := DBQuery("SELECT id_exercice, id_theme, title, url_id, path, statement, overview, headline, issue, issue_kind, depend, gain, coefficient_cur, video_uri, resolution, seealso, finished FROM exercices WHERE id_theme = ?", t.Id); err != nil { + if rows, err := DBQuery("SELECT id_exercice, id_theme, title, url_id, path, statement, overview, headline, issue, issue_kind, depend, gain, coefficient_cur, video_uri, resolution, seealso, finished FROM exercices WHERE id_theme = ? ORDER BY path ASC", t.Id); err != nil { return nil, err } else { defer rows.Close()