frontend: public interface: keep number of tries between refresh

This commit is contained in:
nemunaire 2019-02-03 21:01:17 +01:00
parent 8790d6d678
commit 8803852d47
1 changed files with 4 additions and 0 deletions

View File

@ -342,6 +342,10 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
data.exercices[eid].timeouted = true;
if ($scope.my && $scope.my.exercices[eid] && $scope.my.exercices[eid].solved !== undefined)
data.exercices[eid].solved = $scope.my.exercices[eid].solved;
if ($scope.my && $scope.my.exercices[eid] && $scope.my.exercices[eid].solved_time !== undefined && data.exercices[eid].solved_time === undefined)
data.exercices[eid].solved_time = $scope.my.exercices[eid].solved_time;
if ($scope.my && $scope.my.exercices[eid] && $scope.my.exercices[eid].tries !== undefined && data.exercices[eid].tries === undefined)
data.exercices[eid].tries = $scope.my.exercices[eid].tries;
angular.forEach(exercice.flags, function(flag, fid) {
if ($scope.my && $scope.my.exercices[eid] && $scope.my.exercices[eid].flags && $scope.my.exercices[eid].flags[fid] && $scope.my.exercices[eid].flags[fid].found !== undefined)
data.exercices[eid].flags[fid].found = $scope.my.exercices[eid].flags[fid].found;