瀏覽代碼

corregir errores al resolver conflictos

父節點
當前提交
02d188ae17
共有 2 個文件被更改,包括 3 次插入9 次删除
  1. 1
    3
      app/models/Outcome.php
  2. 2
    6
      app/models/Program.php

+ 1
- 3
app/models/Outcome.php 查看文件

@@ -319,9 +319,7 @@ class Outcome extends Eloquent
319 319
 
320 320
 			if ($students_attempted) {
321 321
 				$percentage_students_who_achieved = 100.0 * $students_achieved / $students_attempted;
322
-			} else {
323
-				$percentage_students_who_achieved = 0;
324
-			}
322
+			} 
325 323
 			else
326 324
 			{
327 325
 				$percentage_students_who_achieved=0;

+ 2
- 6
app/models/Program.php 查看文件

@@ -218,9 +218,7 @@ class Program extends Eloquent
218 218
 			foreach ($students_attempted as $criteria_id => $students_attempted_n) {
219 219
 				if ($students_attempted_n) {
220 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 222
 				else
225 223
 				{
226 224
 					$percentage_students_who_achieved=0;
@@ -308,9 +306,7 @@ class Program extends Eloquent
308 306
 			foreach ($students_attempted as $criteria_id => $students_attempted_n) {
309 307
 				if ($students_attempted_n) {
310 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 310
 				else
315 311
 				{
316 312
 					$percentage_students_who_achieved=0;