From 249cfa21e3226fe3ca6f47c1121593af48b0ad6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Mon, 5 Jan 2015 11:33:50 +0100 Subject: [PATCH] Change conversion algorithm from x/100 to A-F grade --- front/src/js/directives/gradeDirective.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/front/src/js/directives/gradeDirective.js b/front/src/js/directives/gradeDirective.js index bbe82c8..7691c93 100644 --- a/front/src/js/directives/gradeDirective.js +++ b/front/src/js/directives/gradeDirective.js @@ -11,19 +11,19 @@ gradeDirective.directive('grade', function() { replace: true, controller : function($scope) { $scope.getGrade = function(score) { - if (score >= 85) { + if (score > 80) { return 'A'; } - if (score >= 65) { + if (score > 60) { return 'B'; } - if (score >= 45) { + if (score > 40) { return 'C'; } - if (score >= 30) { + if (score > 20) { return 'D'; } - if (score >= 15) { + if (score > 0) { return 'E'; } return 'F';