frontend: Add a message on submission timeout
This commit is contained in:
parent
4f98536f91
commit
3b15fda470
2 changed files with 4 additions and 0 deletions
|
@ -291,6 +291,8 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
|
|||
});
|
||||
}
|
||||
angular.forEach(data.exercices, function(exercice, eid) {
|
||||
if ($scope.my && $scope.my.exercices[eid] && $scope.my.exercices[eid].submitted)
|
||||
data.exercices[eid].timeouted = true;
|
||||
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].value !== undefined)
|
||||
data.exercices[eid].flags[fid].value = $scope.my.exercices[eid].flags[fid].value;
|
||||
|
@ -504,6 +506,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
|
|||
$scope.sberr = "Oups !";
|
||||
$scope.message = response.data.errmsg;
|
||||
});
|
||||
$scope.my.exercices[$rootScope.current_exercice].timeouted = false;
|
||||
$scope.my.exercices[$rootScope.current_exercice].submitted = true;
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue