Add issue field for exercice, to be able to communicate about problem with exercice

This commit is contained in:
nemunaire 2018-11-21 02:20:37 +01:00 committed by Pierre-Olivier Mercier
commit 44d335bc9f
8 changed files with 43 additions and 17 deletions

View file

@ -40,6 +40,8 @@ type myTeamExercice struct {
SolvedRank int64 `json:"solved_rank,omitempty"`
Tries int64 `json:"tries,omitempty"`
VideoURI string `json:"video_uri,omitempty"`
Issue string `json:"issue,omitempty"`
IssueKind string `json:"issuekind,omitempty"`
}
type myTeam struct {
Id int64 `json:"team_id"`
@ -77,7 +79,14 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
if tid, err := e.GetThemeId(); err == nil {
exercice.ThemeId = tid
}
exercice.Statement = e.Statement
if len(e.Issue) > 0 {
exercice.Issue = e.Issue
exercice.IssueKind = e.IssueKind
}
if t == nil {
if e.Overview != "" {
exercice.Statement = e.Overview