libfic: Can indicate that an exercice is WIP

This commit is contained in:
nemunaire 2022-11-05 15:26:57 +01:00
commit c415e06237
10 changed files with 63 additions and 6 deletions

View file

@ -65,6 +65,7 @@ type myTeamMCQJustifiedChoice struct {
}
type myTeamExercice struct {
ThemeId int64 `json:"theme_id"`
WIP bool `json:"wip,omitempty"`
Statement string `json:"statement"`
Overview string `json:"overview,omitempty"`
Finished string `json:"finished,omitempty"`
@ -121,6 +122,7 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
for _, e := range exos {
if t == nil || t.HasAccess(e) {
exercice := myTeamExercice{}
exercice.WIP = e.WIP
exercice.ThemeId = e.IdTheme
exercice.Statement = strings.Replace(e.Statement, "$FILES$", FilesDir, -1)