Fix section and course assistance calculation
This commit is contained in:
@@ -32,7 +32,6 @@
|
|||||||
function (value){
|
function (value){
|
||||||
angular.forEach (value.students,
|
angular.forEach (value.students,
|
||||||
function (valued){
|
function (valued){
|
||||||
vm.lectures = valued.assistance;
|
|
||||||
angular.forEach (valued.assistanceTotal,
|
angular.forEach (valued.assistanceTotal,
|
||||||
function (valueda){
|
function (valueda){
|
||||||
if (valueda.assistance) {
|
if (valueda.assistance) {
|
||||||
@@ -44,7 +43,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
vm.total = vm.positive + vm.negative;
|
vm.total = vm.positive + vm.negative;
|
||||||
vm.percentage = ((vm.positive/vm.total)/vm.lectures)*100;
|
vm.percentage = (vm.positive/vm.total)*100;
|
||||||
},
|
},
|
||||||
function (){
|
function (){
|
||||||
console.log("Error al obtener los datos.");
|
console.log("Error al obtener los datos.");
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
angular.forEach (vm.section.students,
|
angular.forEach (vm.section.students,
|
||||||
function (value){
|
function (value){
|
||||||
vm.lectures = value.assistance;
|
|
||||||
angular.forEach (value.assistanceTotal,
|
angular.forEach (value.assistanceTotal,
|
||||||
function (valued){
|
function (valued){
|
||||||
if (valued.assistance) {
|
if (valued.assistance) {
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
vm.total = vm.positive + vm.negative;
|
vm.total = vm.positive + vm.negative;
|
||||||
vm.percentage = ((vm.positive/vm.total)/vm.lectures)*100;
|
vm.percentage = (vm.positive/vm.total)*100;
|
||||||
},
|
},
|
||||||
function (){
|
function (){
|
||||||
console.log("Error al obtener los datos.");
|
console.log("Error al obtener los datos.");
|
||||||
|
Reference in New Issue
Block a user