瀏覽代碼

Unos bugs

父節點
當前提交
8352391314
共有 3 個文件被更改,包括 17 次插入5 次删除
  1. 1
    1
      app/controllers/ProgramCoordinatorsController.php
  2. 4
    4
      app/filters.php
  3. 12
    0
      app/models/Program.php

+ 1
- 1
app/controllers/ProgramCoordinatorsController.php 查看文件

@@ -14,7 +14,7 @@ class ProgramCoordinatorsController extends \BaseController
14 14
         return Redirect::to('administrator');
15 15
         break;
16 16
       case 2:
17
-        return Redirect::to('school-coordinator');
17
+        return Redirect::to('school/' . Auth::user()->school->id);
18 18
         break;
19 19
     }
20 20
     //Log::info(Auth::user()->programs);

+ 4
- 4
app/filters.php 查看文件

@@ -77,7 +77,7 @@ Route::filter('guest', function () {
77 77
 				break;
78 78
 
79 79
 			case 2:
80
-				return Redirect::to('school-coordinator');
80
+				return Redirect::to('school/' . Auth::user()->school->id);
81 81
 				break;
82 82
 
83 83
 			case 3:
@@ -105,7 +105,7 @@ Route::filter('admin', function () {
105 105
 	if (Auth::user()->role != 1) {
106 106
 		switch (Auth::user()->role) {
107 107
 			case 2:
108
-				return Redirect::to('school-coordinator');
108
+				return Redirect::to('school/' . Auth::user()->school->id);
109 109
 				break;
110 110
 
111 111
 			case 3:
@@ -181,7 +181,7 @@ Route::filter('prof', function () {
181 181
 				break;
182 182
 
183 183
 			case 2:
184
-				return Redirect::to('school-coordinator');
184
+				return Redirect::to('school/' . Auth::user()->school->id);
185 185
 				break;
186 186
 
187 187
 			case 3:
@@ -207,4 +207,4 @@ Route::filter('csrf', function () {
207 207
 	if (Session::token() !== $token) {
208 208
 		throw new Illuminate\Session\TokenMismatchException;
209 209
 	}
210
-});
210
+});

+ 12
- 0
app/models/Program.php 查看文件

@@ -145,10 +145,22 @@ class Program extends Eloquent
145 145
 					$the_processed_table[$student_id][$outcome_id]['criteria_achieved'] += $result->criteria_achieved;
146 146
 				}
147 147
 			}
148
+			//Log::info("ESTOY LOCO POR TI");
149
+			//Log::info($the_processed_table);
148 150
 
151
+			$out_att = [];
152
+			$out_ach = [];
153
+
154
+			foreach ($outcomes as $outcome) {
155
+				$out_att[$outcome->id] = 0;
156
+				$out_ach[$outcome->id] = 0;
157
+			}
149 158
 
150 159
 			foreach ($the_processed_table as $student_id => $outcome_ids) {
160
+				//Log::info("AQUI");
161
+				//Log::info($outcome_ids);
151 162
 				foreach ($outcome_ids as $outcome_id => $crit_information) {
163
+					Log::info($crit_information);
152 164
 					$crit_att = $crit_information['criteria_attempted'];
153 165
 					$crit_ach = $crit_information['criteria_achieved'];
154 166