maatma: display progress on home page

This commit is contained in:
nemunaire 2019-03-26 00:17:22 +01:00
commit 6000b5dd2e
2 changed files with 18 additions and 0 deletions

View file

@ -49,6 +49,7 @@ angular.module("AdLinApp")
}
}).then(function(response) {
$rootScope.isLogged = response.data;
$rootScope.student = response.data;
}, function(response) {
$rootScope.isLogged = false;
});
@ -63,6 +64,17 @@ angular.module("AdLinApp")
}
})
.controller("ProgressionController", function($scope, $interval, $http) {
$scope.mychallenges = {};
var refreshChal = function() {
$http.get("/api/students/" + $scope.student.id + "/progress").then(function(response) {
$scope.mychallenges = response.data
});
}
refreshChal();
$interval(refreshChal, 15750);
})
.controller("AuthController", function($scope, $rootScope, $http, $location) {
$scope.auth = {
"username": "",