libfic: fix bad hints displayed
This commit is contained in:
parent
5e2e03f5e9
commit
2aa1d6eeca
@ -17,8 +17,8 @@ type myTeamFile struct {
|
||||
type myTeamHint struct {
|
||||
HintId int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Content *string `json:"content,omitempty"`
|
||||
File *string `json:"file,omitempty"`
|
||||
Content string `json:"content,omitempty"`
|
||||
File string `json:"file,omitempty"`
|
||||
Cost int64 `json:"cost"`
|
||||
}
|
||||
type myTeamMCQ struct {
|
||||
@ -124,9 +124,9 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
||||
} else {
|
||||
for _, h := range hints {
|
||||
if t == nil || t.HasHint(h) {
|
||||
exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, &h.Content, &h.File, h.Cost})
|
||||
exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, h.Content, h.File, h.Cost})
|
||||
} else {
|
||||
exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, nil, nil, h.Cost})
|
||||
exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, "", "", h.Cost})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user