admin: Retrieve stats on exercices
This commit is contained in:
parent
63b4cdc622
commit
b409fa6806
10 changed files with 241 additions and 19 deletions
|
@ -358,6 +358,9 @@ angular.module("FICApp")
|
|||
})
|
||||
.factory("ExerciceMCQDeps", function ($resource) {
|
||||
return $resource("api/exercices/:exerciceId/quiz/:mcqId/dependancies", { exerciceId: '@idExercice', mcqId: '@id' })
|
||||
})
|
||||
.factory("ExerciceMCQStats", function ($resource) {
|
||||
return $resource("api/exercices/:exerciceId/quiz/:mcqId/statistics", { exerciceId: '@idExercice', mcqId: '@id' })
|
||||
});
|
||||
|
||||
angular.module("FICApp")
|
||||
|
@ -771,6 +774,20 @@ angular.module("FICApp")
|
|||
});
|
||||
};
|
||||
})
|
||||
.component('teamLink', {
|
||||
bindings: {
|
||||
idTeam: '=',
|
||||
},
|
||||
controller: function (Team) {
|
||||
var ctrl = this;
|
||||
ctrl.team = {};
|
||||
|
||||
ctrl.$onInit = function () {
|
||||
ctrl.team = Team.get({teamId: ctrl.idTeam});
|
||||
};
|
||||
},
|
||||
template: `<a href="/teams/{{ $ctrl.idTeam }}">{{ $ctrl.team.name }}</a> `
|
||||
})
|
||||
.component('repositoryUptodate', {
|
||||
bindings: {
|
||||
repository: '<',
|
||||
|
@ -2400,6 +2417,12 @@ angular.module("FICApp")
|
|||
}
|
||||
})
|
||||
|
||||
.controller("ExerciceMCQStatsController", function ($scope, $routeParams, ExerciceMCQStats) {
|
||||
$scope.init = function (mcq) {
|
||||
$scope.stats = ExerciceMCQStats.get({ exerciceId: $routeParams.exerciceId, mcqId: mcq.id });
|
||||
}
|
||||
})
|
||||
|
||||
.controller("TeamsListController", function ($scope, $rootScope, Team, $location, $http) {
|
||||
$scope.teams = Team.query();
|
||||
$scope.fields = ["id", "name"];
|
||||
|
|
Reference in a new issue