From 38aaff259a65b113a34993d9ab8d7a9ce6f299b8 Mon Sep 17 00:00:00 2001 From: Rey Reyes Date: Tue, 26 Apr 2016 12:04:47 -0430 Subject: [PATCH] Add list of students with 75 assistance --- .../report/section_assist.controller.js | 13 +++++++--- app/partials/report/section_assist.html | 26 +++++++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/app/partials/report/section_assist.controller.js b/app/partials/report/section_assist.controller.js index 7d3ebf9..d808226 100644 --- a/app/partials/report/section_assist.controller.js +++ b/app/partials/report/section_assist.controller.js @@ -16,8 +16,11 @@ vm.positive = 0; vm.professor = null; vm.students = []; + vm.studentsPassed = []; vm.negative = 0; vm.flag = false; + vm.positiveTotal = 0; + vm.negativeTotal = 0; professors.get({ id: professorid }, function (successResult){ @@ -45,9 +48,11 @@ vm.subTotal = vm.positive + vm.negative; }); if(((vm.positive/vm.subTotal)*100)<75){ - vm.students.push(value); - vm.flag = true; - }; + vm.students.push(value); + vm.flag = true; + }else{ + vm.studentsPassed.push(value); + } vm.positiveTotal = vm.positiveTotal + vm.positive; vm.negativeTotal = vm.negativeTotal + vm.negative; vm.positive = 0; @@ -55,7 +60,7 @@ vm.subTotal = 0; }); vm.total = vm.positiveTotal + vm.negativeTotal; - vm.percentage = (vm.positive/vm.total)*100; + vm.percentage = (vm.positiveTotal/vm.total)*100; }, function (){ console.log("Error al obtener los datos."); diff --git a/app/partials/report/section_assist.html b/app/partials/report/section_assist.html index 1e6f66d..1cafda2 100644 --- a/app/partials/report/section_assist.html +++ b/app/partials/report/section_assist.html @@ -10,8 +10,7 @@
- -

Estudiantes con menos de 75% de Asistencia

+

Estudiantes con menos de 75% de Asistencia

@@ -35,6 +34,29 @@
+

Estudiantes con más 75% de Asistencia

+ + + + + + + + + + + + + + + +
+ Cedula + + Nombre + + Apellido +
{{ student.id }}{{ student.name }}{{ student.lastname }}