Browse Source

corregir errores al resolver conflictos

parent
commit
02d188ae17
2 changed files with 3 additions and 9 deletions
  1. 1
    3
      app/models/Outcome.php
  2. 2
    6
      app/models/Program.php

+ 1
- 3
app/models/Outcome.php View File

319
 
319
 
320
 			if ($students_attempted) {
320
 			if ($students_attempted) {
321
 				$percentage_students_who_achieved = 100.0 * $students_achieved / $students_attempted;
321
 				$percentage_students_who_achieved = 100.0 * $students_achieved / $students_attempted;
322
-			} else {
323
-				$percentage_students_who_achieved = 0;
324
-			}
322
+			} 
325
 			else
323
 			else
326
 			{
324
 			{
327
 				$percentage_students_who_achieved=0;
325
 				$percentage_students_who_achieved=0;

+ 2
- 6
app/models/Program.php View File

218
 			foreach ($students_attempted as $criteria_id => $students_attempted_n) {
218
 			foreach ($students_attempted as $criteria_id => $students_attempted_n) {
219
 				if ($students_attempted_n) {
219
 				if ($students_attempted_n) {
220
 					$percentage_students_who_achieved = 100.0 * $students_achieved[$criteria_id] / $students_attempted[$criteria_id];
220
 					$percentage_students_who_achieved = 100.0 * $students_achieved[$criteria_id] / $students_attempted[$criteria_id];
221
-				} else {
222
-					$percentage_students_who_achieved = 0;
223
-				}
221
+				} 
224
 				else
222
 				else
225
 				{
223
 				{
226
 					$percentage_students_who_achieved=0;
224
 					$percentage_students_who_achieved=0;
308
 			foreach ($students_attempted as $criteria_id => $students_attempted_n) {
306
 			foreach ($students_attempted as $criteria_id => $students_attempted_n) {
309
 				if ($students_attempted_n) {
307
 				if ($students_attempted_n) {
310
 					$percentage_students_who_achieved = 100.0 * $students_achieved[$criteria_id] / $students_attempted[$criteria_id];
308
 					$percentage_students_who_achieved = 100.0 * $students_achieved[$criteria_id] / $students_attempted[$criteria_id];
311
-				} else {
312
-					$percentage_students_who_achieved = 0;
313
-				}
309
+				} 
314
 				else
310
 				else
315
 				{
311
 				{
316
 					$percentage_students_who_achieved=0;
312
 					$percentage_students_who_achieved=0;