frontend: don't reuse tries in public interface; use a separate field to store total tries count for an exercice; and display it in interface

This commit is contained in:
nemunaire 2019-02-03 21:00:41 +01:00
parent 473332e101
commit c4aa220b2c
3 changed files with 5 additions and 1 deletions

View file

@ -539,6 +539,8 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
if (check !== undefined)
{
if (!$scope.my.exercices[$rootScope.current_exercice].tries)
$scope.my.exercices[$rootScope.current_exercice].tries = 0;
$scope.my.exercices[$rootScope.current_exercice].tries += 1;
$scope.my.exercices[$rootScope.current_exercice].solved_time = new Date();