diff --git a/admin/api/exercice.go b/admin/api/exercice.go index 039cc1df..580693ec 100644 --- a/admin/api/exercice.go +++ b/admin/api/exercice.go @@ -148,6 +148,10 @@ func partUpdateExercice(exercice fic.Exercice, body []byte) (interface{}, error) exercice.Headline = ue.Headline } + if len(ue.Finished) > 0 { + exercice.Finished = ue.Finished + } + if len(ue.Overview) > 0 { exercice.Overview = ue.Overview } @@ -203,7 +207,7 @@ func createExercice(theme fic.Theme, body []byte) (interface{}, error) { } } - return theme.AddExercice(ue.Title, ue.URLId, ue.Path, ue.Statement, ue.Overview, ue.Headline, depend, ue.Gain, ue.VideoURI) + return theme.AddExercice(ue.Title, ue.URLId, ue.Path, ue.Statement, ue.Overview, ue.Headline, depend, ue.Gain, ue.VideoURI, ue.Finished) } type uploadedHint struct { diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 0b2c4be0..5656ec6d 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -1044,7 +1044,7 @@ angular.module("FICApp") $scope.exercice = Exercice.get({ exerciceId: $routeParams.exerciceId }); } $scope.exercices = Exercice.query(); - $scope.fields = ["title", "urlid", "statement", "headline", "overview", "depend", "gain", "coefficient", "videoURI", "issue", "issuekind"]; + $scope.fields = ["title", "urlid", "statement", "headline", "overview", "finished", "depend", "gain", "coefficient", "videoURI", "issue", "issuekind"]; $scope.showTags = false; $scope.toggleTags = function(val) { diff --git a/admin/static/views/exercice.html b/admin/static/views/exercice.html index 563fc564..67221231 100644 --- a/admin/static/views/exercice.html +++ b/admin/static/views/exercice.html @@ -6,10 +6,10 @@
Vous êtes la {{ my.exercices[current_exercice].solved_rank }}