From 6000b5dd2e47f6d821bf85173ab56d0f5b18395a Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Tue, 26 Mar 2019 00:17:22 +0100 Subject: [PATCH] maatma: display progress on home page --- token-validator/htdocs/js/adlin-main.js | 12 ++++++++++++ token-validator/htdocs/views/home.html | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/token-validator/htdocs/js/adlin-main.js b/token-validator/htdocs/js/adlin-main.js index b3accf0..a79d3b9 100644 --- a/token-validator/htdocs/js/adlin-main.js +++ b/token-validator/htdocs/js/adlin-main.js @@ -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": "", diff --git a/token-validator/htdocs/views/home.html b/token-validator/htdocs/views/home.html index 4906549..bb46cae 100644 --- a/token-validator/htdocs/views/home.html +++ b/token-validator/htdocs/views/home.html @@ -13,6 +13,12 @@

Qu'allons-nous faire aujourd'hui ?

+ +
+ HTTP + HTTPS + DNS +