frontend: really implement next challenge button

This commit is contained in:
nemunaire 2018-11-27 19:59:47 +01:00
parent 17ef0b0a32
commit bb33572b19
2 changed files with 6 additions and 1 deletions

View file

@ -106,7 +106,12 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
var tags = {};
angular.forEach($scope.themes, function(theme, key) {
$scope.themes[key].exercice_solved = 0;
var last_exercice = null;
angular.forEach(theme.exercices, function(exercice, k) {
if (last_exercice != null)
last_exercice.next = k;
last_exercice = exercice;
if ($scope.my.exercices && $scope.my.exercices[k] && $scope.my.exercices[k].solved) {
$scope.themes[key].exercice_solved++;
}