Compare commits

..

2 Commits

Author SHA1 Message Date
fe731b934a token-validator: Fix static option
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-10 09:12:49 +01:00
1e41b709c6 maatma: Fix legend on home page 2022-03-10 09:12:49 +01:00
5 changed files with 9 additions and 1 deletions

View File

@ -79,6 +79,9 @@
<h6>TP {{tutoid+1}}</h6>
<span class="badge mr-1" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-warning': mychallenges[ch] && mychallenges[ch].recent && (tutoid != 0 && mychallenges[ch].recent > 300), 'badge-info': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent <= 300 && mychallenges[ch].recent >= 120, 'badge-success': mychallenges[ch] && mychallenges[ch].recent && (tutoid == 0 || mychallenges[ch].recent < 120), 'badge-danger': !mychallenges[ch] || !mychallenges[ch].recent}" title="{{ t.title }} @ {{ mychallenges[ch].time | date: 'medium' }} {{ mychallenges[ch].recent }}" ng-bind="t.label"></span>
</div>
<hr>
<h6>Légende</h6>
<span ng-repeat="(k,v) in tuto_legend" class="badge mr-2" ng-class="{'badge-success': k == 'success','badge-danger': k == 'danger','badge-warning': k == 'warning','badge-info': k == 'info'}">{{ v }}</span>
</p>
</div>
</div>

View File

@ -41,6 +41,7 @@ angular.module("AdLinApp")
})
.controller("StudentsProgressionController", function($scope, $interval, Progression) {
$scope.tuto_progress = tuto_progress;
$scope.tuto_legend = tuto_legend;
$scope.stats = {};
$scope.students = {};
$scope.filterBadgeState = {};
@ -105,6 +106,7 @@ angular.module("AdLinApp")
})
.controller("StudentProgressionController", function($scope, $interval, $http, Student, StudentProgression) {
$scope.tuto_progress = tuto_progress;
$scope.tuto_legend = tuto_legend;
var refreshStd = function() {
var student = Student.get({studentId: $scope.onestudent})
student.$promise.then(function(stdnt) {
@ -165,6 +167,7 @@ angular.module("AdLinApp")
})
.controller("ProgressionController", function($scope, $interval, $http) {
$scope.tuto_progress = tuto_progress;
$scope.tuto_legend = tuto_legend;
$scope.mychallenges = {};
var refreshChal = function() {
$http.get("/api/students/" + $scope.student.id + "/progress").then(function(response) {

View File

@ -112,6 +112,7 @@ angular.module("AdLinApp")
.controller("ProgressionController", function($scope, $interval, $http) {
$scope.tuto_progress = tuto_progress;
$scope.tuto_legend = tuto_legend;
$scope.mychallenges = {};
var refreshChal = function() {

View File

@ -28,7 +28,7 @@
<div class="mb-2 row">
<strong class="col-auto mr-2">Légende</strong>
<div class="col">
<span ng-repeat="(kid,k) in Object.keys(tuto_legend)" class="badge mr-2" ng-class="{'badge-success': k == 'success','badge-danger': k == 'danger','badge-warning': k == 'warning','badge-info': k == 'info'}">{{ tuto_legend[k] }}</span>
<span ng-repeat="(k,v) in tuto_legend" class="badge mr-2" ng-class="{'badge-success': k == 'success','badge-danger': k == 'danger','badge-warning': k == 'warning','badge-info': k == 'info'}">{{ v }}</span>
</div>
</div>
</div>

View File

@ -30,6 +30,7 @@ func (i *staticDevDir) String() string {
}
func (i *staticDevDir) Set(value string) error {
i.Path = &value
return nil
}