frontend: allow two defi in 2 differents themes to have the same name
This commit is contained in:
parent
d1ce2a0740
commit
3f9e5f887a
1 changed files with 2 additions and 2 deletions
|
|
@ -111,7 +111,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
|
|||
this[key].gain = 0;
|
||||
this[key].solved = 0;
|
||||
angular.forEach(theme.exercices, function(ex, k) {
|
||||
$scope.exercicesUrl[ex.urlid] = k;
|
||||
$scope.exercicesUrl[theme.urlid + "/" + ex.urlid] = k;
|
||||
this.gain += ex.gain;
|
||||
this.solved += ex.solved;
|
||||
this.exercice_coeff_max = Math.max(this.exercice_coeff_max, ex.curcoeff);
|
||||
|
|
@ -234,7 +234,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
|
|||
if ($routeParams.exercice) {
|
||||
$scope.$watch("exercicesUrl", function(exercicesUrl) {
|
||||
if (exercicesUrl != undefined)
|
||||
$rootScope.current_exercice = exercicesUrl[$routeParams.exercice];
|
||||
$rootScope.current_exercice = exercicesUrl[$routeParams.theme + "/" + $routeParams.exercice];
|
||||
})
|
||||
} else {
|
||||
$rootScope.current_exercice = 0;
|
||||
|
|
|
|||
Reference in a new issue