From 8fee773cf89a6e96967c96fc7fae6ea59771ad55 Mon Sep 17 00:00:00 2001 From: Reynaldo Reyes Date: Tue, 12 Apr 2016 23:26:18 -0430 Subject: [PATCH] Fix section and course assistance calculation --- app/partials/report/course_assist.controller.js | 3 +-- app/partials/report/section_assist.controller.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/partials/report/course_assist.controller.js b/app/partials/report/course_assist.controller.js index 7a86b92..97cf6ce 100644 --- a/app/partials/report/course_assist.controller.js +++ b/app/partials/report/course_assist.controller.js @@ -32,7 +32,6 @@ function (value){ angular.forEach (value.students, function (valued){ - vm.lectures = valued.assistance; angular.forEach (valued.assistanceTotal, function (valueda){ if (valueda.assistance) { @@ -44,7 +43,7 @@ }); }); vm.total = vm.positive + vm.negative; - vm.percentage = ((vm.positive/vm.total)/vm.lectures)*100; + vm.percentage = (vm.positive/vm.total)*100; }, function (){ console.log("Error al obtener los datos."); diff --git a/app/partials/report/section_assist.controller.js b/app/partials/report/section_assist.controller.js index 807deff..567d8b6 100644 --- a/app/partials/report/section_assist.controller.js +++ b/app/partials/report/section_assist.controller.js @@ -30,7 +30,6 @@ angular.forEach (vm.section.students, function (value){ - vm.lectures = value.assistance; angular.forEach (value.assistanceTotal, function (valued){ if (valued.assistance) { @@ -41,7 +40,7 @@ }); }); vm.total = vm.positive + vm.negative; - vm.percentage = ((vm.positive/vm.total)/vm.lectures)*100; + vm.percentage = (vm.positive/vm.total)*100; }, function (){ console.log("Error al obtener los datos.");