ソースを参照

Quitar los logs

コミット
b9e910470c
共有33 個のファイルを変更した746 個の追加785 個の削除を含む
  1. 15
    15
      app/controllers/ActivitiesController.php
  2. 26
    26
      app/controllers/AnnualPlansController.php
  3. 2
    2
      app/controllers/CoursesController.php
  4. 12
    12
      app/controllers/CriteriaController.php
  5. 10
    10
      app/controllers/Objective2Controller.php
  6. 5
    5
      app/controllers/OutcomesController.php
  7. 14
    14
      app/controllers/ProfessorsController.php
  8. 30
    30
      app/controllers/ProgramCoordinatorsController.php
  9. 5
    5
      app/controllers/ProgramsController.php
  10. 15
    15
      app/controllers/RubricsController.php
  11. 208
    225
      app/controllers/SchoolCoordinatorsController.php
  12. 265
    287
      app/controllers/SchoolsController.php
  13. 3
    3
      app/controllers/StudentsController.php
  14. 4
    4
      app/controllers/TemplatesController.php
  15. 9
    9
      app/controllers/ThreeYearPlanController.php
  16. 16
    16
      app/controllers/TransformativeActionsController.php
  17. 31
    31
      app/controllers/UsersController.php
  18. 5
    5
      app/models/Activity.php
  19. 26
    26
      app/models/Course.php
  20. 3
    3
      app/models/Objective.php
  21. 5
    5
      app/models/Outcome.php
  22. 2
    2
      app/models/Program.php
  23. 3
    3
      app/views/global/view-learning-outcomes-criteria.blade.php
  24. 5
    5
      app/views/local/managers/admins/assessment_report.blade.php
  25. 1
    1
      app/views/local/managers/admins/new_assessment_report.blade.php
  26. 1
    1
      app/views/local/managers/pCoords/new_assessment_report.blade.php
  27. 2
    2
      app/views/local/managers/pCoords/overview.blade.php
  28. 1
    1
      app/views/local/managers/sCoords/new_assessment_report.blade.php
  29. 3
    3
      app/views/local/managers/shared/limited-course.blade.php
  30. 8
    8
      app/views/local/professors/assessment_report.blade.php
  31. 2
    2
      app/views/local/professors/compare_activities.blade.php
  32. 2
    2
      app/views/local/professors/new_assessment_report.blade.php
  33. 7
    7
      app/views/local/professors/overview.blade.php

+ 15
- 15
app/controllers/ActivitiesController.php ファイルの表示

@@ -137,7 +137,7 @@ class ActivitiesController extends \BaseController
137 137
             $active_semesters[] = $active_semester->id;
138 138
         }
139 139
 
140
-        Log::info($active_semesters);
140
+        //Log::info($active_semesters);
141 141
         // Added the function htmlspecialchars to activity name string because it was corrupting Jquery code while using quotes on page rendering. - Carlos R Caraballo 1/18/2019
142 142
         $title = $course->code . $course->number . '-' . $course->section . ': ' . htmlspecialchars($activity->name, ENT_QUOTES) . ' <span class="small attention">(' . $course->semester->code . ')</span>';
143 143
 
@@ -170,8 +170,8 @@ class ActivitiesController extends \BaseController
170 170
             $outcomes_attempted = [];
171 171
         }
172 172
 
173
-        Log::info($outcomes_achieved);
174
-        Log::info($outcomes_achieved);
173
+        //Log::info($outcomes_achieved);
174
+        //Log::info($outcomes_achieved);
175 175
 
176 176
 
177 177
 
@@ -273,8 +273,8 @@ class ActivitiesController extends \BaseController
273 273
                     $activity_id = Input::get('activity_id');
274 274
                     $student_data = json_decode(Input::get('student_info'));
275 275
                     $weights = json_decode(Input::get('weights'));
276
-                    Log::info(json_encode($weights));
277
-                    Log::info(json_encode($student_data));
276
+                    //Log::info(json_encode($weights));
277
+                    //Log::info(json_encode($student_data));
278 278
 
279 279
                     foreach ($student_data as $index => $student_dict) {
280 280
                         $student_id = $student_dict->studentId;
@@ -303,7 +303,7 @@ class ActivitiesController extends \BaseController
303 303
                     }
304 304
                     $activity_draft = Input::get('draft');
305 305
                     $activity_diagnostic = Input::get('diagnostic');
306
-                    Log::info(json_encode($weights));
306
+                    //Log::info(json_encode($weights));
307 307
                     foreach ($weights as $act_crit => $weigh) {
308 308
                         DB::update("update activity_criterion set weight = {$weigh} where id = {$act_crit}");
309 309
                     }
@@ -505,7 +505,7 @@ class ActivitiesController extends \BaseController
505 505
                 return action('ActivitiesController@show', array(Input::get('activity_id')));
506 506
             }
507 507
         } catch (Exception $e) {
508
-            Log::info('e:' . $e);
508
+            //Log::info('e:' . $e);
509 509
             echo $e->getMessage();
510 510
             Session::flash('status', 'danger');
511 511
             Session::flash('message', 'Error saving assessment. Try again later.');
@@ -815,8 +815,8 @@ class ActivitiesController extends \BaseController
815 815
             ->addSelect('activity_criterion.activity_id', 'activity_criterion.weight', 'activity_criterion.id as activity_criterion_id')
816 816
             ->addSelect('rubric_criterion.rubric_id', 'rubric_criterion.id as rubric_criterion_id')
817 817
             ->get();
818
-        Log::info("EN mi cuarto o o o");
819
-        Log::info($rubric_criterion);
818
+        //Log::info("EN mi cuarto o o o");
819
+        //Log::info($rubric_criterion);
820 820
 
821 821
         foreach ($rubric_criterion as $index => $crit) {
822 822
             $crit->scales = DB::table('scales')
@@ -830,12 +830,12 @@ class ActivitiesController extends \BaseController
830 830
 
831 831
         // Get results
832 832
         $activity_criterion_ids = DB::table('activity_criterion')->where("activity_id", '=', $activity->id)->lists('id');
833
-        Log::info($activity_criterion_ids);
833
+        //Log::info($activity_criterion_ids);
834 834
         $assessments = DB::table('assessments')
835 835
             ->join('students', 'assessments.student_id', '=', 'students.id')
836 836
             ->whereIn('activity_criterion_id', $activity_criterion_ids)
837 837
             ->orderBy('assessments.id', 'asc')->get();
838
-        Log::info($assessments);
838
+        //Log::info($assessments);
839 839
         // Decode the scores (blade workaround)
840 840
         $scores_array = array();
841 841
 
@@ -905,12 +905,12 @@ class ActivitiesController extends \BaseController
905 905
         }*/
906 906
         // Get results
907 907
         $activity_criterion_ids = DB::table('activity_criterion')->where("activity_id", '=', $activity->id)->lists('id');
908
-        Log::info($activity_criterion_ids);
908
+        //Log::info($activity_criterion_ids);
909 909
         $assessments = DB::table('assessments')
910 910
             ->join('students', 'assessments.student_id', '=', 'students.id')
911 911
             ->whereIn('activity_criterion_id', $activity_criterion_ids)
912 912
             ->orderBy('assessments.id', 'asc')->get();
913
-        Log::info($assessments);
913
+        //Log::info($assessments);
914 914
         // Decode the scores (blade workaround)
915 915
         $scores_array = array();
916 916
 
@@ -952,7 +952,7 @@ class ActivitiesController extends \BaseController
952 952
 
953 953
         $semesters = DB::table('semesters')->where('id', $course->semester_id)->orderBy('start', 'ASC')->first();
954 954
 
955
-        Log::info($active_semesters);
955
+        //Log::info($active_semesters);
956 956
         // Added the function htmlspecialchars to activity name string because it was corrupting Jquery code while using quotes on page rendering. - Carlos R Caraballo 1/18/2019
957 957
         $title = $course->code . $course->number . '-' . $course->section . ': ' . htmlspecialchars($activity_1->name, ENT_QUOTES) . ' <span class="small attention">(' . $course->semester->code . ')</span>';
958 958
         $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
@@ -1002,4 +1002,4 @@ class ActivitiesController extends \BaseController
1002 1002
 
1003 1003
         return View::make('local.professors.compare_activities', compact('activity_1', 'activity_2', 'activity_criterion_1', 'activity_criterion_2', 'title', 'outcomes', 'outcomes_achieved_1', 'outcomes_attempted_1', 'outcomes_achieved_2', 'outcomes_attempted_2', 'course', 'student_count', 'active_semesters'));
1004 1004
     }
1005
-}
1005
+}

+ 26
- 26
app/controllers/AnnualPlansController.php ファイルの表示

@@ -180,12 +180,12 @@ class AnnualPlansController extends \BaseController
180 180
       )
181 181
       order by semester_start desc");*/
182 182
     // $annual_plans = DB::select("select academic_year, semester_start, semester_end, program_id, annual_plans.id as id from annual_plans, annual_cycle where program_id = {$program_id} and annual_cycle.id = annual_plans.annual_cycle_id order by annual_plans.id desc ");
183
-    // Log::info($annual_plans);
183
+    // //Log::info($annual_plans);
184 184
     $outcomes = array();
185 185
     $allSemesterOrder = array();
186
-    Log::info($annual_plans);
186
+    //Log::info($annual_plans);
187 187
     /*foreach ($annual_plans as $an_plan) {
188
-      Log::info($an_plan->id);
188
+      //Log::info($an_plan->id);
189 189
       $outcomes[$an_plan->id]["first"] = DB::select("select * from outcomes where id in (select outcome_id from typ_semester_outcome where semester_id = {$an_plan->semester_start} and typ_program_id in (select id from typ_program where program_id ={$an_plan->program_id} and three_year_plan_id ={$current_typ->id} ))");
190 190
       $allSemesterOrder[$an_plan->id]["first"] = DB::select("select * from semesters where id = {$an_plan->semester_start}")[0];
191 191
       $outcomes[$an_plan->id]["second"] = DB::select("select * from outcomes where id in (select outcome_id from typ_semester_outcome where semester_id ={$an_plan->semester_end} and typ_program_id in (select id from typ_program where program_id ={$an_plan->program_id} and three_year_plan_id = {$current_typ->id} ))");
@@ -198,7 +198,7 @@ class AnnualPlansController extends \BaseController
198 198
 
199 199
   public function fetchInfo()
200 200
   {
201
-    Log::info(Input::get('id'));
201
+    //Log::info(Input::get('id'));
202 202
     $an_plan = DB::table("annual_plans")
203 203
       ->join('annual_cycle', 'annual_cycle.id', '=', 'annual_plans.annual_cycle_id')
204 204
       ->where('annual_plans.id', '=', Input::get('id'))
@@ -214,8 +214,8 @@ class AnnualPlansController extends \BaseController
214 214
       ->where('semester_id', $an_plan->semester_start)
215 215
       ->select('typ_program.*')
216 216
       ->first();
217
-    Log::info(array($an_plan));
218
-    Log::info(array($current_typ_program));
217
+    //Log::info(array($an_plan));
218
+    //Log::info(array($current_typ_program));
219 219
 
220 220
     //DB::select("select * from typ_program where program_id = {$an_plan->program_id} and three_year_plan_id in (select id from three_year_plan where year_start <= {$years[0]} and year_end>= {$years[1]})")[0];
221 221
 
@@ -285,13 +285,13 @@ class AnnualPlansController extends \BaseController
285 285
       $typ_info['courses'][$objective->id] = DB::select("select c.id, c.number, c.name, c.code, typ.id typ_course_id from courses c, typ_semester_courses typ, (select course_id, id  from typ_semester_courses where typ_semester_objective_id in (select id from typ_semester_objectives where objective_id ={$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id =? and semester_id ={$semester->id} and typ_program_id in(select id from typ_program where program_id ={$program_id})))) rel where typ.course_id =c.id and rel.course_id = c.id and typ.id = rel.id ", array(Input::get('id')));
286 286
 
287 287
       $typ_info['criteria'][$objective->id] = DB::select("select * from criteria where deleted_at IS NULL and id in (select criterion_id from criterion_objective_outcome where outcome_id = ? and objective_id = {$objective->id})", array(Input::get('id')));
288
-      Log::info($typ_info['criteria'][$objective->id]);
288
+      //Log::info($typ_info['criteria'][$objective->id]);
289 289
       $typ_info['typ_objective_id'][$objective->id] = DB::select("select id from typ_semester_objectives where objective_id = {$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id =? and semester_id ={$semester->id} and typ_program_id in (select id from typ_program where program_id ={$program_id}))", array(Input::get('id')));
290
-      Log::info($typ_info['typ_objective_id'][$objective->id]);
290
+      //Log::info($typ_info['typ_objective_id'][$objective->id]);
291 291
       $typ_info['typ_objective_id'][$objective->id] = $typ_info['typ_objective_id'][$objective->id][0];
292 292
 
293
-      Log::info($typ_info['typ_objective_id'][$objective->id]->id);
294
-      Log::info($annual_plan->id);
293
+      //Log::info($typ_info['typ_objective_id'][$objective->id]->id);
294
+      //Log::info($annual_plan->id);
295 295
       //  $typ_info['annual_plans_transformative'][$objective->id] = DB::select(
296 296
       //    "select trans_id from annual_plan_transformative
297 297
       //     where annual_plan_id={$annual_plan->id} 
@@ -316,7 +316,7 @@ class AnnualPlansController extends \BaseController
316 316
       }
317 317
     }
318 318
     $typ_info['annual_plan'] = $annual_plan;
319
-    Log::info($typ_info);
319
+    //Log::info($typ_info);
320 320
 
321 321
     return json_encode($typ_info);
322 322
   }
@@ -431,8 +431,8 @@ class AnnualPlansController extends \BaseController
431 431
     foreach ($annual_plan['first']['outcomes'] as $outcomes) {
432 432
 
433 433
       $annual_plan['first']['objectives'][$outcomes->id] = DB::select("select * from objectives where id in (select objective_id from typ_semester_objectives where typ_semester_outcome_id in(select id from typ_semester_outcome where outcome_id = {$outcomes->id} and semester_id = {$an_semesters->semester_start} and typ_program_id in (select id from typ_program where program_id ={$an_semesters->program_id})))");
434
-      Log::info($outcomes->id);
435
-      Log::info($annual_plan['first']['objectives'][$outcomes->id]);
434
+      //Log::info($outcomes->id);
435
+      //Log::info($annual_plan['first']['objectives'][$outcomes->id]);
436 436
       foreach ($annual_plan['first']['objectives'][$outcomes->id] as $objective) {
437 437
         $annual_plan['first']['typ_objective_id'][$objective->id] = DB::select("select id from typ_semester_objectives where objective_id = {$objective->id} and  typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id ={$outcomes->id} and semester_id ={$an_semesters->semester_start} and typ_program_id in(select id from typ_program where program_id ={$an_semesters->program_id})) ")[0];
438 438
         $annual_plan['first']['courses'][$objective->id] = DB::select("select typ.id typ_course_id, typ.course_id, c.code, c.number, c.name from (select course_id, id from typ_semester_courses where typ_semester_objective_id = {$annual_plan['first']['typ_objective_id'][$objective->id]->id}) typ, courses c where c.id = typ.course_id");
@@ -441,15 +441,15 @@ class AnnualPlansController extends \BaseController
441 441
           $annual_plan['first']['trans_actions'][$objective->id][$course->typ_course_id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_course_id = {$course->typ_course_id})");
442 442
         }
443 443
 
444
-        Log::info($objective->id);
444
+        //Log::info($objective->id);
445 445
         /*$annual_plan['first']['trans_actions'][$objective->id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_objective_id ={$annual_plan['first']['typ_objective_id'][$objective->id]->id})");
446 446
         foreach ($annual_plan['first']['trans_actions'][$objective->id] as $trans) {
447
-          Log::info($annual_plan['first']['typ_objective_id'][$objective->id]->id);
448
-          Log::info($trans->id);
449
-          Log::info($an_id);
447
+          //Log::info($annual_plan['first']['typ_objective_id'][$objective->id]->id);
448
+          //Log::info($trans->id);
449
+          //Log::info($an_id);
450 450
           $annual_plan['fill_info'][$annual_plan['first']['typ_objective_id'][$objective->id]->id][$trans->id] = DB::select("select * from annual_report_transformative where annual_trans_id in (select id from annual_plan_transformative where trans_id = {$trans->id} and typ_semester_objective_id ={$annual_plan['first']['typ_objective_id'][$objective->id]->id} and annual_plan_id = {$an_id} )");
451 451
           if (count($annual_plan['fill_info'][$annual_plan['first']['typ_objective_id'][$objective->id]->id][$trans->id])) {
452
-            Log::info("entró");
452
+            //Log::info("entró");
453 453
             $annual_plan['fill_info'][$annual_plan['first']['typ_objective_id'][$objective->id]->id][$trans->id] =  $annual_plan['fill_info'][$annual_plan['first']['typ_objective_id'][$objective->id]->id][$trans->id][0];
454 454
           }
455 455
         }*/
@@ -467,13 +467,13 @@ class AnnualPlansController extends \BaseController
467 467
         }
468 468
         /*
469 469
         $annual_plan['second']['trans_actions'][$objective->id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_objective_id ={$annual_plan['second']['typ_objective_id'][$objective->id]->id})");
470
-        Log::info($annual_plan['second']['typ_objective_id'][$objective->id]->id);
470
+        //Log::info($annual_plan['second']['typ_objective_id'][$objective->id]->id);
471 471
         foreach ($annual_plan['second']['trans_actions'][$objective->id] as $trans) {
472 472
 
473 473
           $annual_plan['fill_info'][$annual_plan['second']['typ_objective_id'][$objective->id]->id][$trans->id] = DB::select("select * from annual_report_transformative where annual_trans_id in (select id from annual_plan_transformative where trans_id = {$trans->id} and typ_semester_objective_id ={$annual_plan['second']['typ_objective_id'][$objective->id]->id} and annual_plan_id = {$an_id} )");
474
-          Log::info("lol");
474
+          //Log::info("lol");
475 475
           if (count($annual_plan['fill_info'][$annual_plan['second']['typ_objective_id'][$objective->id]->id][$trans->id])) {
476
-            Log::info("entró");
476
+            //Log::info("entró");
477 477
             $annual_plan['fill_info'][$annual_plan['second']['typ_objective_id'][$objective->id]->id][$trans->id] =  $annual_plan['fill_info'][$annual_plan['second']['typ_objective_id'][$objective->id]->id][$trans->id][0];
478 478
           }
479 479
         }*/
@@ -556,7 +556,7 @@ class AnnualPlansController extends \BaseController
556 556
       ->select('courses.code', 'courses.number')
557 557
       ->distinct()
558 558
       ->get();
559
-    Log::info($course_codes);
559
+    //Log::info($course_codes);
560 560
     $all_courses_info = [];
561 561
 
562 562
     foreach ($course_codes as $index => $course_code) {
@@ -569,8 +569,8 @@ class AnnualPlansController extends \BaseController
569 569
         ->where('number', $course_code->number)
570 570
         ->where('program_id', $program_id)
571 571
         ->get();
572
-      Log::info("run number " . $index);
573
-      Log::info($courses);
572
+      //Log::info("run number " . $index);
573
+      //Log::info($courses);
574 574
       foreach ($courses as $course) {
575 575
         $all_courses_info[$course_code->code . '_' . $course_code->number][] = $course->getReportObject();
576 576
       }
@@ -606,7 +606,7 @@ class AnnualPlansController extends \BaseController
606 606
         ->where('annual_plan_objective.typ_semester_course_id', $course_code->typ_sem_cou_id)
607 607
         ->toSql();
608 608
 
609
-      Log::info($course_code->sections);
609
+      //Log::info($course_code->sections);
610 610
     }*/
611 611
 
612 612
     return $all_courses_info;
@@ -644,4 +644,4 @@ class AnnualPlansController extends \BaseController
644 644
 
645 645
     return $outcome;
646 646
   }
647
-}
647
+}

+ 2
- 2
app/controllers/CoursesController.php ファイルの表示

@@ -108,7 +108,7 @@ CoursesController extends \BaseController
108 108
         $schools = School::all();
109 109
 
110 110
         $rubrics = array();
111
-        Log::info($activities);
111
+        //Log::info($activities);
112 112
         foreach ($activities as $activity) {
113 113
 
114 114
             if (!empty($activity->rubric)) {
@@ -507,4 +507,4 @@ CoursesController extends \BaseController
507 507
         } else {
508 508
         }
509 509
     }
510
-}
510
+}

+ 12
- 12
app/controllers/CriteriaController.php ファイルの表示

@@ -16,7 +16,7 @@ class CriteriaController extends \BaseController
16 16
         $userProgram = Auth::user()['id'];
17 17
 
18 18
         $userProgram = DB::select("select program_user.program_id from program_user where user_id = {$userProgram}");
19
-        Log::info($userProgram);
19
+        //Log::info($userProgram);
20 20
         $title = "Criteria";
21 21
         $outcomes = Outcome::whereNull("deactivation_date")->orderBy('name', 'ASC')->lists('name', 'id');
22 22
 
@@ -28,7 +28,7 @@ class CriteriaController extends \BaseController
28 28
     public function editSchool()
29 29
     {
30 30
         $userSchool = Auth::user()['school_id'];
31
-        Log::info($userSchool);
31
+        //Log::info($userSchool);
32 32
         $title = "Criteria";
33 33
         $outcomes = Outcome::whereNull("deactivation_date")->orderBy('name', 'ASC')->lists('name', 'id');
34 34
 
@@ -55,7 +55,7 @@ class CriteriaController extends \BaseController
55 55
         $json_to_send = array();
56 56
         $json_to_send['criterion'] = DB::table('criteria')->where('id', '=', Input::get('id'))->first();
57 57
         $outcomeIDS = DB::table('criterion_objective_outcome')->where('criterion_id', '=', $json_to_send['criterion']->id)->lists('outcome_id');
58
-        Log::info($outcomeIDS);
58
+        //Log::info($outcomeIDS);
59 59
 
60 60
         $json_to_send['scales'] = DB::table('criterion_scale')
61 61
             ->join('scales', 'scales.id', '=', 'criterion_scale.scale_id')
@@ -126,7 +126,7 @@ class CriteriaController extends \BaseController
126 126
                 break;
127 127
         }
128 128
         $outcome_id = Input::get('outcomeID');
129
-        Log::info($outcome_id);
129
+        //Log::info($outcome_id);
130 130
 
131 131
         $json = DB::table('objectives')
132 132
             ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
@@ -275,7 +275,7 @@ class CriteriaController extends \BaseController
275 275
     public function isCriterionUnique($input, $existing_criterion = NULL)
276 276
     {
277 277
         // dd($input);
278
-        Log::info('isCriterionUnique');
278
+        //Log::info('isCriterionUnique');
279 279
 
280 280
         if (Input::get('program_id') != 0)
281 281
             $program_id = $input['program_id'];
@@ -334,7 +334,7 @@ class CriteriaController extends \BaseController
334 334
 
335 335
         $trimmed = trim(preg_replace('/\t+/', '', Input::get('subcriteria')));
336 336
 
337
-        Log::info('trimmed 1 -->' . $trimmed . '<--');
337
+        //Log::info('trimmed 1 -->' . $trimmed . '<--');
338 338
 
339 339
 
340 340
         if ($trimmed == '') {
@@ -343,7 +343,7 @@ class CriteriaController extends \BaseController
343 343
             $trimmed = json_encode(preg_split('/\r\n/', $trimmed));
344 344
         }
345 345
 
346
-        Log::info('trimmed 2 -->' . $trimmed . '<--');
346
+        //Log::info('trimmed 2 -->' . $trimmed . '<--');
347 347
 
348 348
 
349 349
         $clean_input['subcriteria'] = $trimmed;
@@ -387,7 +387,7 @@ class CriteriaController extends \BaseController
387 387
 
388 388
         if (isset($clean_input['objective_id'][0]) && $clean_input['objective_id'][0] != '0') {
389 389
             $objective_id = $clean_input['objective_id'][0];
390
-            Log::info('Estamos');
390
+            //Log::info('Estamos');
391 391
         } else {
392 392
             $objective_id = NULL;
393 393
         }
@@ -451,7 +451,7 @@ class CriteriaController extends \BaseController
451 451
                     return Redirect::to('criteria')->withInput();
452 452
 
453 453
                 case 2:
454
-                    Log::info(Input::all());
454
+                    //Log::info(Input::all());
455 455
                     return Redirect::to('school-criteria')->withInput();
456 456
 
457 457
                 case 3:
@@ -642,7 +642,7 @@ class CriteriaController extends \BaseController
642 642
 
643 643
         $trimmed = trim(preg_replace('/\t+/', '', Input::get('subcriteria')));
644 644
 
645
-        Log::info('trimmed 1 -->' . $trimmed . '<--');
645
+        //Log::info('trimmed 1 -->' . $trimmed . '<--');
646 646
 
647 647
 
648 648
         if ($trimmed == '') {
@@ -651,7 +651,7 @@ class CriteriaController extends \BaseController
651 651
             $trimmed = json_encode(preg_split('/\r\n/', $trimmed));
652 652
         }
653 653
 
654
-        Log::info('trimmed 2 -->' . $trimmed . '<--');
654
+        //Log::info('trimmed 2 -->' . $trimmed . '<--');
655 655
 
656 656
 
657 657
         $clean_input['subcriteria'] = $trimmed;
@@ -1073,4 +1073,4 @@ class CriteriaController extends \BaseController
1073 1073
                 break;
1074 1074
         }
1075 1075
     }
1076
-}
1076
+}

+ 10
- 10
app/controllers/Objective2Controller.php ファイルの表示

@@ -22,7 +22,7 @@ class Objective2Controller extends \BaseController
22 22
 	public function isObjectiveUnique($input, $existing_Objective = NULL)
23 23
 	{
24 24
 
25
-		Log::info('isObjectiveUnique');
25
+		//Log::info('isObjectiveUnique');
26 26
 
27 27
 		if (Input::get('program_id') != 0)
28 28
 			$program_id = $input['program_id'];
@@ -78,14 +78,14 @@ class Objective2Controller extends \BaseController
78 78
 
79 79
 		$clean_input['outcome_id'] = Input::get('outcome');
80 80
 		$counter = Input::get('counter') + 0;
81
-		Log::info($clean_input);
81
+		//Log::info($clean_input);
82 82
 
83 83
 		foreach ($clean_input['outcome_id'] as $index => $outcome_id) {
84 84
 			$clean_input['outcome_id'][$index] = trim(preg_replace('/\t+/', '', $clean_input['outcome_id'][$index]));
85 85
 		}
86 86
 
87 87
 		$clean_input['program_id'] = Input::get('program_id');
88
-		Log::info(Input::get('program_id'));
88
+		//Log::info(Input::get('program_id'));
89 89
 
90 90
 		return $clean_input;
91 91
 	}
@@ -98,7 +98,7 @@ class Objective2Controller extends \BaseController
98 98
 
99 99
 
100 100
 		$clean_input['outcome_id'] = Input::get('assoc_outcome');
101
-		Log::info(Input::all());
101
+		//Log::info(Input::all());
102 102
 
103 103
 
104 104
 		$clean_input['program_id'] = Input::get('program_id');
@@ -121,7 +121,7 @@ class Objective2Controller extends \BaseController
121 121
 		$json['assessment'] = DB::select("select * from assessments where activity_criterion_id  in (select id from activity_criterion where criterion_id in (select criterion_id from criterion_objective_outcome where objective_id = ?))", array(Input::get('id')));
122 122
 
123 123
 		$json['assoc_criteria'] = DB::select("select name from criteria where id in(select criterion_id from criterion_objective_outcome where objective_id =?)", array(Input::get('id')));
124
-		Log::info('is here');
124
+		//Log::info('is here');
125 125
 		return json_encode($json);
126 126
 	}
127 127
 	public function fetchAllobjectives()
@@ -306,7 +306,7 @@ class Objective2Controller extends \BaseController
306 306
 	public function editProgram()
307 307
 	{
308 308
 		$userProgram = Auth::user()['id'];
309
-		Log::info(Auth::user());
309
+		//Log::info(Auth::user());
310 310
 
311 311
 		$userProgram = DB::select("select program_user.program_id from program_user where user_id = {$userProgram}");
312 312
 
@@ -328,7 +328,7 @@ class Objective2Controller extends \BaseController
328 328
 	public function editSchool()
329 329
 	{
330 330
 		$userSchool = Auth::user()['school_id'];
331
-		Log::info($userSchool);
331
+		//Log::info($userSchool);
332 332
 		$title = "Objective";
333 333
 		$outcomes = Outcome::whereNull("deactivation_date")->orderBy('name', 'ASC')->get();
334 334
 
@@ -360,7 +360,7 @@ class Objective2Controller extends \BaseController
360 360
 		$clean_input = $this->cleanAssocInput();
361 361
 
362 362
 
363
-		Log::info(print_r($clean_input, true));
363
+		//Log::info(print_r($clean_input, true));
364 364
 
365 365
 		/** Validation rules */
366 366
 		$validator = $this->makeValidator($clean_input);
@@ -399,7 +399,7 @@ class Objective2Controller extends \BaseController
399 399
 
400 400
 
401 401
 			/** Set info */
402
-			Log::info($clean_input);
402
+			//Log::info($clean_input);
403 403
 			$Objective->text = $clean_input['text'];
404 404
 
405 405
 
@@ -477,4 +477,4 @@ class Objective2Controller extends \BaseController
477 477
 	{
478 478
 		//
479 479
 	}
480
-}
480
+}

+ 5
- 5
app/controllers/OutcomesController.php ファイルの表示

@@ -708,7 +708,7 @@ class OutcomesController extends \BaseController
708 708
                     ->join('program_criterion', 'program_criterion.program_id', '=', 'programs.id')
709 709
                     ->where('criterion_id', $criteria_id->id)
710 710
                     ->lists('programs.name');
711
-                Log::info($scales);
711
+                //Log::info($scales);
712 712
 
713 713
                 /* $scales =
714 714
                     DB::select(
@@ -985,7 +985,7 @@ class OutcomesController extends \BaseController
985 985
                     ->groupBy(array('code', 'number'));
986 986
             }))
987 987
             ->first();
988
-        Log::info($program);
988
+        //Log::info($program);
989 989
 
990 990
 
991 991
         return View::make('local.managers.pCoords.new_assessment_report', compact('title', 'program'));
@@ -996,13 +996,13 @@ class OutcomesController extends \BaseController
996 996
     {
997 997
         $semesters = Session::get('semesters_ids');
998 998
         $semesters = DB::table('semesters')->whereIn('id', $semesters)->orderBy('start', 'ASC')->first();
999
-        Log::info($semesters->start);
999
+        //Log::info($semesters->start);
1000 1000
         $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
1001 1001
             ->whereNull('deleted_at')
1002 1002
             ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
1003 1003
             ->orderBy('name', 'ASC')->get();
1004 1004
 
1005
-        Log::info($outcomes);
1005
+        //Log::info($outcomes);
1006 1006
         $title = "My Courses' Assessment Reports";
1007 1007
 
1008 1008
         return View::make('local.professors.assessment_reports', compact('title', 'outcomes'));
@@ -1088,4 +1088,4 @@ class OutcomesController extends \BaseController
1088 1088
 
1089 1089
         return View::make('local.managers.shared.annual_report', compact('title', 'program_id', 'annual_plans', 'program'));
1090 1090
     }
1091
-}
1091
+}

+ 14
- 14
app/controllers/ProfessorsController.php ファイルの表示

@@ -16,14 +16,14 @@ class ProfessorsController extends \BaseController
16 16
         $grouped_courses = Course::with('program')->where('user_id', Auth::user()->id)->whereIn('semester_id', Session::get('semesters_ids'))->groupBy(array('code', 'number', 'semester_id'))->get();
17 17
         $semesters = Session::get('semesters_ids');
18 18
         $semesters = DB::table('semesters')->whereIn('id', $semesters)->orderBy('start', 'ASC')->first();
19
-        Log::info($semesters->start);
19
+        //Log::info($semesters->start);
20 20
         $outcomes = Outcome::select(array('id', 'name', 'expected_outcome', 'level'))
21 21
             ->whereNull('deleted_at')
22 22
             ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
23 23
             ->orderBy('name', 'ASC')->get();
24 24
         $outcomeCount = count($outcomes);
25 25
 
26
-Log::info($grouped_courses);
26
+        //Log::info($grouped_courses);
27 27
         $grouped_outcomes_achieved_results = array();
28 28
         $grouped_outcomes_attempted_results = array();
29 29
         $grouped_sections = array();
@@ -39,15 +39,15 @@ Log::info($grouped_courses);
39 39
 
40 40
             // Find sections belonging to user with identifier of one course
41 41
             $sections = Course::with('program')
42
-            	->where('user_id', Auth::user()->id)
42
+                ->where('user_id', Auth::user()->id)
43 43
                 ->where('code', $grouped_course->code)
44 44
                 ->whereIn('semester_id', Session::get('semesters_ids'))
45 45
                 ->where('number', $grouped_course->number)
46 46
                 ->where('semester_id', $grouped_course->semester_id)
47 47
                 ->get();
48 48
 
49
-// 			        Log::info($sections);
50
-			        
49
+            // 			        //Log::info($sections);
50
+
51 51
             // For each of the professor's course sections, add the attempted and achieved criteria per outcome
52 52
             foreach ($sections as $section) {
53 53
 
@@ -97,19 +97,19 @@ Log::info($grouped_courses);
97 97
         $program_courses = Course::where('program_id', '=', $program->id)->whereIn('semester_id', Session::get('semesters_ids'))->get();
98 98
         $semesters = Session::get('semesters_ids');
99 99
         $semesters = DB::table('semesters')->whereIn('id', $semesters)->orderBy('start', 'ASC')->first();
100
-        $semesters2 = Semester::whereIn('id',Session::get('semesters_ids'))->get();
100
+        $semesters2 = Semester::whereIn('id', Session::get('semesters_ids'))->get();
101 101
 
102
-//         $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
103
-//         	->where('level','=',)
104
-//             ->whereNull('deleted_at')
105
-//             ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
106
-//             ->orderBy('name', 'ASC')->get();
102
+        //         $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
103
+        //         	->where('level','=',)
104
+        //             ->whereNull('deleted_at')
105
+        //             ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
106
+        //             ->orderBy('name', 'ASC')->get();
107 107
         $outcomes = Outcome::active_by_semesters($semesters2, $program->is_graduate);
108
-	    $outcomeCount = count($outcomes);
108
+        $outcomeCount = count($outcomes);
109 109
         $outcomes_achieved = [];
110 110
         $outcomes_attempted = [];
111 111
 
112
-        Log::info($program_courses);
112
+        //Log::info($program_courses);
113 113
 
114 114
 
115 115
         foreach ($program_courses as $course) {
@@ -169,4 +169,4 @@ Log::info($grouped_courses);
169 169
 
170 170
         return View::make('local.managers.shared.general_studies_overview', compact('title', 'outcomes', 'schools', 'program_packs'));
171 171
     }
172
-}
172
+}

+ 30
- 30
app/controllers/ProgramCoordinatorsController.php ファイルの表示

@@ -17,17 +17,17 @@ class ProgramCoordinatorsController extends \BaseController
17 17
         return Redirect::to('school-coordinator');
18 18
         break;
19 19
     }
20
-    //Log::info(Auth::user()->programs);
20
+    ////Log::info(Auth::user()->programs);
21 21
     $title = 'Program Coordinator Overview';
22 22
 
23 23
     $programs = Auth::user()->programs;
24
-    //Log::info($programs);
24
+    ////Log::info($programs);
25 25
 
26 26
     //$outcomes = Outcome::orderBy('name', 'asc')->get();
27 27
 
28 28
     $semesters = Session::get('semesters_ids');
29 29
     $semesters = DB::table('semesters')->whereIn('id', $semesters)->orderBy('start', 'ASC')->first();
30
-    //Log::info($semesters->start);
30
+    ////Log::info($semesters->start);
31 31
     $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
32 32
       ->whereNull('deleted_at')
33 33
       ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
@@ -64,62 +64,62 @@ class ProgramCoordinatorsController extends \BaseController
64 64
       */
65 65
 
66 66
     foreach ($programs as $program) {
67
-      //Log::info($program);
67
+      ////Log::info($program);
68 68
       $program_array = array();
69 69
       $program_object = new \stdClass();
70 70
       $program_object->name = $program->name;
71 71
       $program_object->school = $program->school->name;
72 72
       $program_object->id = $program->id;
73 73
       $program_array['program'] = $program_object;
74
-      //Log::info($program_array);
74
+      ////Log::info($program_array);
75 75
 
76 76
       $program_array['outcomes_achieved'] = [];
77 77
       $program_array['outcomes_attempted'] = [];
78
-      //Log::info($program_array);
78
+      ////Log::info($program_array);
79 79
 
80 80
       $program_array['program_courses'] = $program->courses;
81
-      //Log::info($program_array);
82
-      //Log::info('grouped_objectives, 1.variable, 2.array');
81
+      ////Log::info($program_array);
82
+      ////Log::info('grouped_objectives, 1.variable, 2.array');
83 83
 
84
-      ////Log::info(array($program->objectives()));
84
+      //////Log::info(array($program->objectives()));
85 85
       // $program_array['grouped_objectives'] = $program->objectives();
86
-      //Log::info($program_array);
87
-      //Log::info("program_courses");
88
-      //Log::info($program_array['program_courses']);
89
-      //Log::info($program_array);
86
+      ////Log::info($program_array);
87
+      ////Log::info("program_courses");
88
+      ////Log::info($program_array['program_courses']);
89
+      ////Log::info($program_array);
90 90
 
91 91
       $program_array['assessed_courses_count'] = 0;
92 92
       foreach ($program_array['program_courses'] as $course) {
93
-        //Log::info($program_array);
93
+        ////Log::info($program_array);
94 94
 
95 95
         $program_array['course_outcomes_achieved'] = $course->outcomes_ach();
96 96
 
97
-        //Log::info("course_outcomes_achieved");
98
-        //Log::info($program_array['course_outcomes_achieved']);
99
-        //Log::info($program_array);
97
+        ////Log::info("course_outcomes_achieved");
98
+        ////Log::info($program_array['course_outcomes_achieved']);
99
+        ////Log::info($program_array);
100 100
         if (($program_array['course_outcomes_achieved'])) {
101 101
           $program_array['course_outcomes_achieved'] = $course->outcomes_ach();
102 102
           $program_array['course_outcomes_attempted'] = $course->outcomes_att();
103
-          //Log::info('course_outcomes_achieved');
104
-          //Log::info($program_array['course_outcomes_achieved']);
105
-          //Log::info($program_array);
103
+          ////Log::info('course_outcomes_achieved');
104
+          ////Log::info($program_array['course_outcomes_achieved']);
105
+          ////Log::info($program_array);
106 106
 
107 107
           foreach ($program_array['course_outcomes_achieved'] as $i => $score) {
108 108
             if (array_key_exists($i, $program_array['outcomes_achieved']))  $program_array['outcomes_achieved'][$i] += $program_array['course_outcomes_achieved'][$i];
109 109
             else $program_array['outcomes_achieved'][$i] = $program_array['course_outcomes_achieved'][$i];
110
-            //Log::info('program["outcomes_achieved"]');
111
-            //Log::info($program_array['outcomes_achieved'][$i]);
112
-            //Log::info($program_array);
113
-            Log::info("outcomes_achieved");
114
-            Log::info($program_array['outcomes_achieved']);
110
+            ////Log::info('program["outcomes_achieved"]');
111
+            ////Log::info($program_array['outcomes_achieved'][$i]);
112
+            ////Log::info($program_array);
113
+            //Log::info("outcomes_achieved");
114
+            //Log::info($program_array['outcomes_achieved']);
115 115
           }
116 116
           foreach ($program_array['course_outcomes_attempted'] as $i => $score) {
117 117
 
118 118
             if (array_key_exists($i, $program_array['outcomes_attempted']))  $program_array['outcomes_attempted'][$i] += $program_array['course_outcomes_attempted'][$i];
119 119
             else $program_array['outcomes_attempted'][$i] = $program_array['course_outcomes_attempted'][$i];
120
-            //Log::info('program["outcomes_achieved"]');
121
-            //Log::info($program_array['outcomes_attempted'][$i]);
122
-            //Log::info($program_array);
120
+            ////Log::info('program["outcomes_achieved"]');
121
+            ////Log::info($program_array['outcomes_attempted'][$i]);
122
+            ////Log::info($program_array);
123 123
           }
124 124
 
125 125
           $program_array['assessed_courses_count'] += 1;
@@ -141,7 +141,7 @@ class ProgramCoordinatorsController extends \BaseController
141 141
         ->orderBy('number')
142 142
         ->orderBy('semester_id')
143 143
         ->get(); */
144
-      //Log::info($program_array);
144
+      ////Log::info($program_array);
145 145
       $program_array['grouped_courses'] = Course::select(DB::raw('name, code, number, semester_id, program_id'))
146 146
         ->with('semester')
147 147
         ->with('program')
@@ -152,7 +152,7 @@ class ProgramCoordinatorsController extends \BaseController
152 152
         ->orderBy('number')
153 153
         ->orderBy('semester_id')
154 154
         ->get();
155
-      //Log::info($program_array);
155
+      ////Log::info($program_array);
156 156
       $programs_array[] = $program_array;
157 157
 
158 158
 

+ 5
- 5
app/controllers/ProgramsController.php ファイルの表示

@@ -11,7 +11,7 @@ class ProgramsController extends \BaseController
11 11
   {
12 12
 
13 13
     $program = Program::find($id);
14
-    Log::info(debug_backtrace()[1]['function']);
14
+    //Log::info(debug_backtrace()[1]['function']);
15 15
     $title = $program->school->name . ': ' . $program->name;
16 16
     $program_courses = $program->courses;
17 17
     //     $outcomes = Outcome::orderBy('name', 'asc')->get();
@@ -378,7 +378,7 @@ class ProgramsController extends \BaseController
378 378
 
379 379
     $semesters = Session::get('semesters_ids');
380 380
     $semesters = DB::table('semesters')->whereIn('id', $semesters)->orderBy('start', 'ASC')->first();
381
-    Log::info($semesters->start);
381
+    //Log::info($semesters->start);
382 382
     $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
383 383
       ->whereNull('deleted_at')
384 384
       ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
@@ -406,7 +406,7 @@ class ProgramsController extends \BaseController
406 406
       if (!$program_array['course_outcomes_achieved'] = $course->outcomes_ach()) {
407 407
         //           $program_array['course_outcomes_achieved'] = $course->outcomes_ach();
408 408
         $program_array['course_outcomes_attempted'] = $course->outcomes_att();
409
-        Log::info($program_array['course_outcomes_achieved']);
409
+        //Log::info($program_array['course_outcomes_achieved']);
410 410
         foreach ($program_array['course_outcomes_achieved'] as $i => $score) {
411 411
           if (array_key_exists($i, $program_array['outcomes_achieved']))  $program_array['outcomes_achieved'][$i] += $program_array['course_outcomes_achieved'][$i];
412 412
           else $program_array['outcomes_achieved'][$i] = $program_array['course_outcomes_achieved'][$i];
@@ -496,7 +496,7 @@ class ProgramsController extends \BaseController
496 496
    */
497 497
   public function fetch()
498 498
   {
499
-    //Log::info('id:' . Input::get('id'));
499
+    ////Log::info('id:' . Input::get('id'));
500 500
     return School::find(Input::get('id'))->programs;
501 501
   }
502
-}
502
+}

+ 15
- 15
app/controllers/RubricsController.php ファイルの表示

@@ -33,8 +33,8 @@ class RubricsController extends \BaseController
33 33
         $outcomes = Outcome::orderBy('name', 'ASC')->get();
34 34
         $criteria = Criterion::orderBy('name', 'ASC')->get();
35 35
         $rubric = $activity->rubric;
36
-//         $draft=$activity->draft;
37
-//         Log::info("*****".$activity);
36
+        //         $draft=$activity->draft;
37
+        //         //Log::info("*****".$activity);
38 38
 
39 39
 
40 40
 
@@ -203,7 +203,7 @@ class RubricsController extends \BaseController
203 203
         $activity->save();
204 204
 
205 205
         // Get all the course's activities
206
-        Log::info($activity->course);
206
+        //Log::info($activity->course);
207 207
         $course = Course::find($activity->course->id);
208 208
         $activities = $course->activities;
209 209
 
@@ -215,7 +215,7 @@ class RubricsController extends \BaseController
215 215
                 break;
216 216
             }
217 217
         }
218
-        Log::info('entré4???');
218
+        //Log::info('entré4???');
219 219
 
220 220
         //If there are still evaluated activities in the course, recalculate course outcomes
221 221
         /*
@@ -247,7 +247,7 @@ class RubricsController extends \BaseController
247 247
                     }
248 248
                 }
249 249
             }
250
-            Log::info('entré5???');
250
+            //Log::info('entré5???');
251 251
             // Update course
252 252
             $course->outcomes_achieved = json_encode($course_outcomes_achieved);
253 253
             $course->outcomes_attempted = json_encode($course_outcomes_attempted);
@@ -259,7 +259,7 @@ class RubricsController extends \BaseController
259 259
 
260 260
         $course->save();
261 261
         */
262
-        Log::info('entré6???');
262
+        //Log::info('entré6???');
263 263
         DB::delete("delete from rubric_criterion where rubric_id ={$rubric->id}");
264 264
         DB::delete("delete from activity_criterion where activity_id = {$activity->id}");
265 265
         DB::delete("delete from rubric_title where rubric_id = {$rubric->id}");
@@ -279,7 +279,7 @@ class RubricsController extends \BaseController
279 279
         foreach ($titles as $index => $id) {
280 280
             DB::insert("insert into rubric_title (`rubric_id`, `title_id`, `position`) values ({$rubric->id},{$id},{$index}) ");
281 281
         }
282
-        Log::info('entré7???');
282
+        //Log::info('entré7???');
283 283
 
284 284
         DB::commit();
285 285
 
@@ -319,21 +319,21 @@ class RubricsController extends \BaseController
319 319
     {
320 320
         $activity = Activity::find($activity_id);
321 321
         // Get activity's course
322
-//         Log::info("actv".$activity);
322
+        //         //Log::info("actv".$activity);
323 323
         $course = Course::where('id', '=', $activity->course_id)->firstOrFail();
324
-//         Log::info("user".$course->user_id);
324
+        //         //Log::info("user".$course->user_id);
325 325
 
326 326
         // If activity does not belong to the requesting user, display 403
327 327
         if ($course->user_id != Auth::id())
328 328
             App::abort('403', 'Access Forbidden');
329
-//         Log::info("rubric".$activity->rubric);
330
-// exit();
329
+        //         //Log::info("rubric".$activity->rubric);
330
+        // exit();
331 331
         $rubric = Rubric::where('id', '=', $activity->rubric[0]->id)->firstOrFail();
332 332
         $rubric_criterion = DB::table('criteria')
333 333
             ->join('rubric_criterion', 'rubric_criterion.criterion_id', '=', 'criteria.id')
334 334
             ->where('rubric_criterion.rubric_id', '=', $activity->rubric[0]->id)
335 335
             ->get();
336
-        Log::info($rubric_criterion);
336
+        //Log::info($rubric_criterion);
337 337
 
338 338
         $rubric->titles = DB::table('titles')
339 339
             ->join('rubric_title', 'rubric_title.title_id', '=', 'titles.id')
@@ -352,7 +352,7 @@ class RubricsController extends \BaseController
352 352
         }
353 353
 
354 354
 
355
-        Log::info($rubric_criterion);
355
+        //Log::info($rubric_criterion);
356 356
 
357 357
         $title = $activity->name . ': ' . $rubric->name;
358 358
         return View::make('local.professors.viewrubric', compact('rubric', 'activity', 'rubric_criterion', 'title', 'course'));
@@ -470,14 +470,14 @@ class RubricsController extends \BaseController
470 470
 
471 471
     public function fetchRubricCriterion()
472 472
     {
473
-        Log::info(Input::all());
473
+        //Log::info(Input::all());
474 474
         $rubric = DB::table("criterion_scale")
475 475
             ->join('scales', 'scales.id', '=', 'criterion_scale.scale_id')
476 476
             ->where("criterion_id", '=', Input::get('criterion_id'))
477 477
             ->orderBy('position')
478 478
             ->get();
479 479
 
480
-        Log::info($rubric);
480
+        //Log::info($rubric);
481 481
 
482 482
         $rubric["criteria"] = DB::table("criteria")
483 483
 

+ 208
- 225
app/controllers/SchoolCoordinatorsController.php ファイルの表示

@@ -5,7 +5,7 @@ class SchoolCoordinatorsController extends \BaseController
5 5
 
6 6
     private function participatingPrograms($school)
7 7
     {
8
-         return DB::table('programs')
8
+        return DB::table('programs')
9 9
             ->join('courses', 'courses.program_id', '=', 'programs.id')
10 10
             ->join('activities', 'activities.course_id', '=', 'courses.id')
11 11
             ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
@@ -16,27 +16,27 @@ class SchoolCoordinatorsController extends \BaseController
16 16
             ->whereIn('semester_id', Session::get('semesters_ids'))
17 17
             ->lists('id');
18 18
 
19
-//        return DB::table('programs')
20
-//             ->join('courses', 'courses.program_id', '=', 'programs.id')
21
-//             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
22
-//             ->addSelect('courses.semester_id')
23
-//             ->where('school_id', $school->id)
24
-//             ->whereIn('semester_id', Session::get('semesters_ids'))
25
-//             ->lists('id');
19
+        //        return DB::table('programs')
20
+        //             ->join('courses', 'courses.program_id', '=', 'programs.id')
21
+        //             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
22
+        //             ->addSelect('courses.semester_id')
23
+        //             ->where('school_id', $school->id)
24
+        //             ->whereIn('semester_id', Session::get('semesters_ids'))
25
+        //             ->lists('id');
26 26
     }
27 27
 
28 28
     public function overview()
29 29
     {
30 30
         ini_set('memory_limit', '256M');
31 31
         DB::connection()->disableQueryLog();
32
-//         $school = School::find($id);
32
+        //         $school = School::find($id);
33 33
         $school = Auth::user()->school;
34 34
         $id = $school->id;
35 35
 
36 36
         $title = $school->name;
37 37
         $schools = School::all();
38 38
 
39
-        $semesters = Semester::whereIn('id',Session::get('semesters_ids'))->get();
39
+        $semesters = Semester::whereIn('id', Session::get('semesters_ids'))->get();
40 40
 
41 41
         $outcomes_grad = Outcome::active_by_semesters($semesters, 1);
42 42
         $outcomes_undergrad = Outcome::active_by_semesters($semesters, 0);
@@ -92,31 +92,25 @@ class SchoolCoordinatorsController extends \BaseController
92 92
             ->orderBy('courses.semester_id')
93 93
             ->get();
94 94
 
95
-		foreach($undergrad_grouped_courses as $key=>$courses)
96
-		{
97
-			$undergrad_grouped_courses[$key]->outcomes_attempted=NULL;	
98
-			$coursesT=Course::where('courses.code',$courses->code)->where('courses.number',$courses->number)->where('courses.semester_id',$courses->semester_id)->get();
99
-			foreach($coursesT as $course)
100
-    		{
101
-				if($course->isAssessed())
102
-				{
103
-					$undergrad_grouped_courses[$key]->outcomes_attempted=true;
104
-				}
105
-			}
106
-    	}
107
-
108
-		foreach($grad_grouped_courses as $key=>$courses)
109
-		{
110
-			$grad_grouped_courses[$key]->outcomes_attempted=NULL;	
111
-			$coursesT=Course::where('courses.code',$courses->code)->where('courses.number',$courses->number)->where('courses.semester_id',$courses->semester_id)->get();
112
-			foreach($coursesT as $course)
113
-    		{
114
-				if($course->isAssessed())
115
-				{
116
-					$grad_grouped_courses[$key]->outcomes_attempted=true;
117
-				}
118
-			}
119
-    	}
95
+        foreach ($undergrad_grouped_courses as $key => $courses) {
96
+            $undergrad_grouped_courses[$key]->outcomes_attempted = NULL;
97
+            $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
98
+            foreach ($coursesT as $course) {
99
+                if ($course->isAssessed()) {
100
+                    $undergrad_grouped_courses[$key]->outcomes_attempted = true;
101
+                }
102
+            }
103
+        }
104
+
105
+        foreach ($grad_grouped_courses as $key => $courses) {
106
+            $grad_grouped_courses[$key]->outcomes_attempted = NULL;
107
+            $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
108
+            foreach ($coursesT as $course) {
109
+                if ($course->isAssessed()) {
110
+                    $grad_grouped_courses[$key]->outcomes_attempted = true;
111
+                }
112
+            }
113
+        }
120 114
 
121 115
         // Fetch programs with participation
122 116
         $participating_programs = $this->participatingPrograms($school);
@@ -135,14 +129,13 @@ class SchoolCoordinatorsController extends \BaseController
135 129
         foreach ($school->programs as $program) {
136 130
             foreach ($program->courses as $course) {
137 131
 
138
-	            if (!$course->program->is_graduate){
139
-    	            $undergrad_school_sections_count += 1;
140
-    	        	if($course->isAssessed())$undergrad_assessed_sections_count += 1;
141
-    	        }
142
-        	    else {
143
-            	    $grad_school_sections_count += 1;
144
-            		if($course->isAssessed())$grad_assessed_sections_count += 1;
145
-           		}
132
+                if (!$course->program->is_graduate) {
133
+                    $undergrad_school_sections_count += 1;
134
+                    if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
135
+                } else {
136
+                    $grad_school_sections_count += 1;
137
+                    if ($course->isAssessed()) $grad_assessed_sections_count += 1;
138
+                }
146 139
             }
147 140
         }
148 141
 
@@ -152,37 +145,33 @@ class SchoolCoordinatorsController extends \BaseController
152 145
 
153 146
         // For each outcome 
154 147
         foreach ($outcomes_undergrad as $outcome) {
155
-//         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
156
-//         	$achieved_outcomes_per_undergrad_program[$outcome->id]=0;
157
-        	$attemptedUndergradProgramsPerOutcome[$outcome->id]=0;
158
-        	$achievedUndergradProgramsPerOutcome[$outcome->id]=0;
159
-        	$programs_attempted_in_school[$outcome->id]=$outcome->programs_attempted_in_school($semesters, $school->id);
160
-//         	var_dump($programs_attempted_in_school);exit();
161
-        	foreach($programs_attempted_in_school[$outcome->id] as $program_id)
162
-        	{
163
-//         		var_dump($program_id->id);exit();
164
-				$program = DB::table('programs')->where('id', '=', $program_id->id)->first();
165
-
166
-        		if(!$program->is_graduate)
167
-        		{
168
-        			$attemptedUndergradProgramsPerOutcome[$outcome->id]++;
169
-        			$programC=Program::where('id', '=', $program_id->id)->first();
170
-//         			var_dump($programC);exit();
171
-					if($programC->achieved_outcome($outcome->id,$semesters))
172
-					{
173
-						$achievedUndergradProgramsPerOutcome[$outcome->id]++;
174
-					}
175
-        		}
176
-        	}
177
- 			$undergrad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,0);
178
- 			$undergrad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,0);
179
- 			
148
+            //         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
149
+            //         	$achieved_outcomes_per_undergrad_program[$outcome->id]=0;
150
+            $attemptedUndergradProgramsPerOutcome[$outcome->id] = 0;
151
+            $achievedUndergradProgramsPerOutcome[$outcome->id] = 0;
152
+            $programs_attempted_in_school[$outcome->id] = $outcome->programs_attempted_in_school($semesters, $school->id);
153
+            //         	var_dump($programs_attempted_in_school);exit();
154
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
155
+                //         		var_dump($program_id->id);exit();
156
+                $program = DB::table('programs')->where('id', '=', $program_id->id)->first();
157
+
158
+                if (!$program->is_graduate) {
159
+                    $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
160
+                    $programC = Program::where('id', '=', $program_id->id)->first();
161
+                    //         			var_dump($programC);exit();
162
+                    if ($programC->achieved_outcome($outcome->id, $semesters)) {
163
+                        $achievedUndergradProgramsPerOutcome[$outcome->id]++;
164
+                    }
165
+                }
166
+            }
167
+            $undergrad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 0);
168
+            $undergrad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 0);
169
+
180 170
             // For each program with courses that do assessment
181 171
             $programs_with_courses = Program::with(array('courses' => function ($query) {
182 172
                 //                 $query->whereNotNull('outcomes_attempted');
183 173
                 $query->whereIn('semester_id', Session::get('semesters_ids'));
184 174
             }))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
185
-
186 175
         }
187 176
 
188 177
         /**
@@ -191,43 +180,39 @@ class SchoolCoordinatorsController extends \BaseController
191 180
 
192 181
         // For each outcome 
193 182
         foreach ($outcomes_grad as $outcome) {
194
-//         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
195
-        	$achieved_outcomes_per_grad_program[$outcome->id]=0;
196
-        	$attemptedGradProgramsPerOutcome[$outcome->id]=0;
197
-        	$achievedGradProgramsPerOutcome[$outcome->id]=0;
198
- 			$grad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,1);
199
- 			$grad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,1);
200
-           // For each program with courses that do assessment
201
-        	foreach($programs_attempted_in_school[$outcome->id] as $program_id)
202
-        	{
203
-//         		var_dump($program_id->id);exit();
204
-				$program = DB::table('programs')
205
-                        ->where('id', '=', $program_id->id)
206
-                        ->first();
207
-//         		$program=Program::where('id', $program_id->id);
208
-//         		var_dump($program);exit();
209
-        		if($program->is_graduate)
210
-        		{
211
-        			$attemptedGradProgramsPerOutcome[$outcome->id]++;
212
-        			$programC=Program::where('id', '=', $program_id->id)->first();
213
-//         			var_dump($programC);exit();
214
-					if($programC->achieved_outcome($outcome->id,$semesters))
215
-					{
216
-						$achievedGradProgramsPerOutcome[$outcome->id]++;
217
-					}
218
-        		}
219
-        	}
183
+            //         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
184
+            $achieved_outcomes_per_grad_program[$outcome->id] = 0;
185
+            $attemptedGradProgramsPerOutcome[$outcome->id] = 0;
186
+            $achievedGradProgramsPerOutcome[$outcome->id] = 0;
187
+            $grad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 1);
188
+            $grad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 1);
189
+            // For each program with courses that do assessment
190
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
191
+                //         		var_dump($program_id->id);exit();
192
+                $program = DB::table('programs')
193
+                    ->where('id', '=', $program_id->id)
194
+                    ->first();
195
+                //         		$program=Program::where('id', $program_id->id);
196
+                //         		var_dump($program);exit();
197
+                if ($program->is_graduate) {
198
+                    $attemptedGradProgramsPerOutcome[$outcome->id]++;
199
+                    $programC = Program::where('id', '=', $program_id->id)->first();
200
+                    //         			var_dump($programC);exit();
201
+                    if ($programC->achieved_outcome($outcome->id, $semesters)) {
202
+                        $achievedGradProgramsPerOutcome[$outcome->id]++;
203
+                    }
204
+                }
205
+            }
220 206
             $programs_with_courses = Program::with(array('courses' => function ($query) {
221 207
                 //                 $query->whereNotNull('outcomes_attempted');
222 208
                 $query->whereIn('semester_id', Session::get('semesters_ids'));
223 209
             }))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
224
-
225 210
         }
226 211
         if ($school->id == 13) {
227
-//             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
212
+            //             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
228 213
             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
229 214
         } else {
230
-//             return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
215
+            //             return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
231 216
             return View::make('local.managers.shared.school', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
232 217
         }
233 218
     }
@@ -377,48 +362,47 @@ class SchoolCoordinatorsController extends \BaseController
377 362
 
378 363
         foreach ($school->programs as $program) {
379 364
             foreach ($program->courses as $course) {
380
-                        if (!$course->program->is_graduate){
381
-                $undergrad_school_sections_count += 1;
382
-            	if($course->isAssessed())$undergrad_assessed_sections_count += 1;
383
-//             	            Log::info("aqui".$course);
365
+                if (!$course->program->is_graduate) {
366
+                    $undergrad_school_sections_count += 1;
367
+                    if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
368
+                    //             	            //Log::info("aqui".$course);
384 369
 
385
-            }
386
-            else {
387
-                $grad_school_sections_count += 1;
388
-            	if($course->isAssessed())$grad_assessed_sections_count += 1;
389
-//             	            	            Log::info("aqui".$course);
370
+                } else {
371
+                    $grad_school_sections_count += 1;
372
+                    if ($course->isAssessed()) $grad_assessed_sections_count += 1;
373
+                    //             	            	            //Log::info("aqui".$course);
390 374
 
391
-            }
392
-// 
393
-//                 if (!$course->program->is_graduate) {
394
-//                     if ($course_outcomes_achieved = $course->outcomes_ach()) {
395
-//                         //$course_outcomes_achieved = $course->outcomes_ach();
396
-//                         $course_outcomes_attempted = $course->outcomes_att();
397
-//                         foreach ($course_outcomes_attempted as $i => $score) {
398
-// 
399
-//                             $undergrad_outcomes_attempted[$i] += $score;
400
-//                         }
401
-//                         foreach ($course_outcomes_achieved as $i => $score) {
402
-//                             $undergrad_outcomes_achieved[$i] += $score;
403
-//                         }
404
-//                         $undergrad_assessed_sections_count += 1;
405
-//                     }
406
-//                     $undergrad_school_sections_count += 1;
407
-//                 } else {
408
-//                     if ($course_outcomes_achieved = $course->outcomes_ach()) {
409
-//                         //$course_outcomes_achieved = $course->outcomes_ach();
410
-//                         $course_outcomes_attempted = $course->outcomes_att();
411
-//                         foreach ($course_outcomes_attempted as $i => $score) {
412
-// 
413
-//                             $grad_outcomes_attempted[$i] += $score;
414
-//                         }
415
-//                         foreach ($course_outcomes_achieved as $i => $score) {
416
-//                             $grad_outcomes_achieved[$i] += $score;
417
-//                         }
418
-//                         $grad_assessed_sections_count += 1;
419
-//                     }
420
-//                     $grad_school_sections_count += 1;
421
-//                 }
375
+                }
376
+                // 
377
+                //                 if (!$course->program->is_graduate) {
378
+                //                     if ($course_outcomes_achieved = $course->outcomes_ach()) {
379
+                //                         //$course_outcomes_achieved = $course->outcomes_ach();
380
+                //                         $course_outcomes_attempted = $course->outcomes_att();
381
+                //                         foreach ($course_outcomes_attempted as $i => $score) {
382
+                // 
383
+                //                             $undergrad_outcomes_attempted[$i] += $score;
384
+                //                         }
385
+                //                         foreach ($course_outcomes_achieved as $i => $score) {
386
+                //                             $undergrad_outcomes_achieved[$i] += $score;
387
+                //                         }
388
+                //                         $undergrad_assessed_sections_count += 1;
389
+                //                     }
390
+                //                     $undergrad_school_sections_count += 1;
391
+                //                 } else {
392
+                //                     if ($course_outcomes_achieved = $course->outcomes_ach()) {
393
+                //                         //$course_outcomes_achieved = $course->outcomes_ach();
394
+                //                         $course_outcomes_attempted = $course->outcomes_att();
395
+                //                         foreach ($course_outcomes_attempted as $i => $score) {
396
+                // 
397
+                //                             $grad_outcomes_attempted[$i] += $score;
398
+                //                         }
399
+                //                         foreach ($course_outcomes_achieved as $i => $score) {
400
+                //                             $grad_outcomes_achieved[$i] += $score;
401
+                //                         }
402
+                //                         $grad_assessed_sections_count += 1;
403
+                //                     }
404
+                //                     $grad_school_sections_count += 1;
405
+                //                 }
422 406
             }
423 407
         }
424 408
 
@@ -433,16 +417,16 @@ class SchoolCoordinatorsController extends \BaseController
433 417
         $attemptedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
434 418
 
435 419
         // Fetch programs with participation for the school
436
-        
437
-//         $participating_undergrad_programs = DB::table('programs')
438
-//             ->join('courses', 'courses.program_id', '=', 'programs.id')
439
-//             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
440
-//             ->addSelect('courses.semester_id')
441
-//             ->whereIn('semester_id', Session::get('semesters_ids'))
442
-//             ->where('is_graduate', 0)
443
-//             ->where('school_id', $school->id)
444
-//             ->groupBy('id')
445
-//             ->get();
420
+
421
+        //         $participating_undergrad_programs = DB::table('programs')
422
+        //             ->join('courses', 'courses.program_id', '=', 'programs.id')
423
+        //             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
424
+        //             ->addSelect('courses.semester_id')
425
+        //             ->whereIn('semester_id', Session::get('semesters_ids'))
426
+        //             ->where('is_graduate', 0)
427
+        //             ->where('school_id', $school->id)
428
+        //             ->groupBy('id')
429
+        //             ->get();
446 430
 
447 431
         $output = array();
448 432
 
@@ -463,43 +447,43 @@ class SchoolCoordinatorsController extends \BaseController
463 447
             }))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
464 448
 
465 449
             foreach ($programs_with_courses as $program) {
466
-              if(in_array($program->id,$participating_programs)){
467
-               // To acummulate all criteria for one program
468
-                $achieved_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
469
-                $attempted_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
470
-
471
-                //Flag for counting programs
472
-                $flag = false;
473
-
474
-                // For each course in the program
475
-                foreach ($program->courses as $course) {
476
-                    // If the outcome in question is being evaluated
477
-                    $course_outcomes_attempted2 = $course->outcomes_att(); //json_decode($course->outcomes_attempted, true);
478
-                    $course_outcomes_achieved2 = $course->outcomes_ach(); //json_decode($course->outcomes_achieved, true);
479
-                    if (
480
-                        array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
481
-                        && $course_outcomes_attempted2[$outcome->id] > 0
482
-                    ) {
483
-                        $achieved_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
484
-                        $attempted_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
485
-
486
-                        // Add one to the programs assessing, if it wasn't added before
487
-                        if (!$flag) {
488
-                            $attemptedUndergradProgramsPerOutcome[$outcome->id] += 1;
489
-                            $flag = true;
450
+                if (in_array($program->id, $participating_programs)) {
451
+                    // To acummulate all criteria for one program
452
+                    $achieved_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
453
+                    $attempted_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
454
+
455
+                    //Flag for counting programs
456
+                    $flag = false;
457
+
458
+                    // For each course in the program
459
+                    foreach ($program->courses as $course) {
460
+                        // If the outcome in question is being evaluated
461
+                        $course_outcomes_attempted2 = $course->outcomes_att(); //json_decode($course->outcomes_attempted, true);
462
+                        $course_outcomes_achieved2 = $course->outcomes_ach(); //json_decode($course->outcomes_achieved, true);
463
+                        if (
464
+                            array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
465
+                            && $course_outcomes_attempted2[$outcome->id] > 0
466
+                        ) {
467
+                            $achieved_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
468
+                            $attempted_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
469
+
470
+                            // Add one to the programs assessing, if it wasn't added before
471
+                            if (!$flag) {
472
+                                $attemptedUndergradProgramsPerOutcome[$outcome->id] += 1;
473
+                                $flag = true;
474
+                            }
490 475
                         }
491
-                    }
492 476
 
493
-                    // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_undergrad_program);
494
-                    // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
477
+                        // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_undergrad_program);
478
+                        // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
495 479
 
480
+                    }
481
+                    //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
482
+                    if ($attempted_outcomes_per_undergrad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_undergrad_program[$outcome->id] / $attempted_outcomes_per_undergrad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
483
+                        $achievedUndergradProgramsPerOutcome[$outcome->id] += 1;
484
+                        // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
485
+                    }
496 486
                 }
497
-                //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
498
-                if ($attempted_outcomes_per_undergrad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_undergrad_program[$outcome->id] / $attempted_outcomes_per_undergrad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
499
-                    $achievedUndergradProgramsPerOutcome[$outcome->id] += 1;
500
-                    // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
501
-                }
502
-            }
503 487
             }
504 488
         }
505 489
 
@@ -514,15 +498,15 @@ class SchoolCoordinatorsController extends \BaseController
514 498
         $attemptedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
515 499
 
516 500
         // Fetch programs with participation for the school
517
-//         $participating_grad_programs = DB::table('programs')
518
-//             ->join('courses', 'courses.program_id', '=', 'programs.id')
519
-//             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
520
-//             ->addSelect('courses.semester_id')
521
-//             ->whereIn('semester_id', Session::get('semesters_ids'))
522
-//             ->where('is_graduate', 1)
523
-//             ->where('school_id', $school->id)
524
-//             ->groupBy('id')
525
-//             ->get();
501
+        //         $participating_grad_programs = DB::table('programs')
502
+        //             ->join('courses', 'courses.program_id', '=', 'programs.id')
503
+        //             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
504
+        //             ->addSelect('courses.semester_id')
505
+        //             ->whereIn('semester_id', Session::get('semesters_ids'))
506
+        //             ->where('is_graduate', 1)
507
+        //             ->where('school_id', $school->id)
508
+        //             ->groupBy('id')
509
+        //             ->get();
526 510
 
527 511
         $output = array();
528 512
 
@@ -543,47 +527,46 @@ class SchoolCoordinatorsController extends \BaseController
543 527
             }))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
544 528
 
545 529
             foreach ($programs_with_courses as $program) {
546
-             if(in_array($program->id,$participating_programs)){
547
-                // To acummulate all criteria for one program
548
-                $achieved_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
549
-                $attempted_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
550
-
551
-                //Flag for counting programs
552
-                $flag = false;
553
-
554
-                // For each course in the program
555
-                foreach ($program->courses as $course) {
556
-                    // If the outcome in question is being evaluated
557
-                    $course_outcomes_attempted2 = $course->outcomes_att();  // json_decode($course->outcomes_attempted, true);
558
-                    $course_outcomes_achieved2 = $course->outcomes_ach(); //json_decode($course->outcomes_achieved, true);
559
-                    if (
560
-                        array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
561
-                        && $course_outcomes_attempted2[$outcome->id] > 0
562
-                    ) {
563
-                        $achieved_outcomes_per_grad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
564
-                        $attempted_outcomes_per_grad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
565
-
566
-                        // Add one to the programs assessing, if it wasn't added before
567
-                        if (!$flag) {
568
-                            $attemptedGradProgramsPerOutcome[$outcome->id] += 1;
569
-                            $flag = true;
530
+                if (in_array($program->id, $participating_programs)) {
531
+                    // To acummulate all criteria for one program
532
+                    $achieved_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
533
+                    $attempted_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
534
+
535
+                    //Flag for counting programs
536
+                    $flag = false;
537
+
538
+                    // For each course in the program
539
+                    foreach ($program->courses as $course) {
540
+                        // If the outcome in question is being evaluated
541
+                        $course_outcomes_attempted2 = $course->outcomes_att();  // json_decode($course->outcomes_attempted, true);
542
+                        $course_outcomes_achieved2 = $course->outcomes_ach(); //json_decode($course->outcomes_achieved, true);
543
+                        if (
544
+                            array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
545
+                            && $course_outcomes_attempted2[$outcome->id] > 0
546
+                        ) {
547
+                            $achieved_outcomes_per_grad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
548
+                            $attempted_outcomes_per_grad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
549
+
550
+                            // Add one to the programs assessing, if it wasn't added before
551
+                            if (!$flag) {
552
+                                $attemptedGradProgramsPerOutcome[$outcome->id] += 1;
553
+                                $flag = true;
554
+                            }
570 555
                         }
571
-                    }
572 556
 
573
-                    // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_grad_program);
574
-                    // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
557
+                        // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_grad_program);
558
+                        // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
575 559
 
576
-                }
577
-                //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
578
-                if ($attempted_outcomes_per_grad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_grad_program[$outcome->id] / $attempted_outcomes_per_grad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
579
-                    $achievedGradProgramsPerOutcome[$outcome->id] += 1;
580
-                    // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
560
+                    }
561
+                    //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
562
+                    if ($attempted_outcomes_per_grad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_grad_program[$outcome->id] / $attempted_outcomes_per_grad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
563
+                        $achievedGradProgramsPerOutcome[$outcome->id] += 1;
564
+                        // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
565
+                    }
581 566
                 }
582 567
             }
583
- }
584 568
         }
585
-//         return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
569
+        //         return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
586 570
         return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
587 571
     }
588
-
589 572
 }

+ 265
- 287
app/controllers/SchoolsController.php ファイルの表示

@@ -16,13 +16,13 @@ class SchoolsController extends \BaseController
16 16
             ->whereIn('semester_id', Session::get('semesters_ids'))
17 17
             ->lists('id');
18 18
 
19
-//         return DB::table('programs')
20
-//             ->join('courses', 'courses.program_id', '=', 'programs.id')
21
-//             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
22
-//             ->addSelect('courses.semester_id')
23
-//             ->where('school_id', $school->id)
24
-//             ->whereIn('semester_id', Session::get('semesters_ids'))
25
-//             ->lists('id');
19
+        //         return DB::table('programs')
20
+        //             ->join('courses', 'courses.program_id', '=', 'programs.id')
21
+        //             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
22
+        //             ->addSelect('courses.semester_id')
23
+        //             ->where('school_id', $school->id)
24
+        //             ->whereIn('semester_id', Session::get('semesters_ids'))
25
+        //             ->lists('id');
26 26
     }
27 27
 
28 28
     public function show($id)
@@ -33,7 +33,7 @@ class SchoolsController extends \BaseController
33 33
         $title = $school->name;
34 34
         $schools = School::all();
35 35
 
36
-        $semesters = Semester::whereIn('id',Session::get('semesters_ids'))->get();
36
+        $semesters = Semester::whereIn('id', Session::get('semesters_ids'))->get();
37 37
 
38 38
         $outcomes_grad = Outcome::active_by_semesters($semesters, 1);
39 39
         $outcomes_undergrad = Outcome::active_by_semesters($semesters, 0);
@@ -88,32 +88,26 @@ class SchoolsController extends \BaseController
88 88
             ->orderBy('courses.number')
89 89
             ->orderBy('courses.semester_id')
90 90
             ->get();
91
-            
92
-		foreach($undergrad_grouped_courses as $key=>$courses)
93
-		{
94
-			$undergrad_grouped_courses[$key]->outcomes_attempted=NULL;	
95
-			$coursesT=Course::where('courses.code',$courses->code)->where('courses.number',$courses->number)->where('courses.semester_id',$courses->semester_id)->get();
96
-			foreach($coursesT as $course)
97
-    		{
98
-				if($course->isAssessed())
99
-				{
100
-					$undergrad_grouped_courses[$key]->outcomes_attempted=true;
101
-				}
102
-			}
103
-    	}
104
-
105
-		foreach($grad_grouped_courses as $key=>$courses)
106
-		{
107
-			$grad_grouped_courses[$key]->outcomes_attempted=NULL;	
108
-			$coursesT=Course::where('courses.code',$courses->code)->where('courses.number',$courses->number)->where('courses.semester_id',$courses->semester_id)->get();
109
-			foreach($coursesT as $course)
110
-    		{
111
-				if($course->isAssessed())
112
-				{
113
-					$grad_grouped_courses[$key]->outcomes_attempted=true;
114
-				}
115
-			}
116
-    	}
91
+
92
+        foreach ($undergrad_grouped_courses as $key => $courses) {
93
+            $undergrad_grouped_courses[$key]->outcomes_attempted = NULL;
94
+            $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
95
+            foreach ($coursesT as $course) {
96
+                if ($course->isAssessed()) {
97
+                    $undergrad_grouped_courses[$key]->outcomes_attempted = true;
98
+                }
99
+            }
100
+        }
101
+
102
+        foreach ($grad_grouped_courses as $key => $courses) {
103
+            $grad_grouped_courses[$key]->outcomes_attempted = NULL;
104
+            $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
105
+            foreach ($coursesT as $course) {
106
+                if ($course->isAssessed()) {
107
+                    $grad_grouped_courses[$key]->outcomes_attempted = true;
108
+                }
109
+            }
110
+        }
117 111
 
118 112
         // Fetch programs with participation
119 113
         $participating_programs = $this->participatingPrograms($school);
@@ -131,14 +125,13 @@ class SchoolsController extends \BaseController
131 125
         foreach ($school->programs as $program) {
132 126
             foreach ($program->courses as $course) {
133 127
 
134
-	            if (!$course->program->is_graduate){
135
-    	            $undergrad_school_sections_count += 1;
136
-    	        	if($course->isAssessed())$undergrad_assessed_sections_count += 1;
137
-    	        }
138
-        	    else {
139
-            	    $grad_school_sections_count += 1;
140
-            		if($course->isAssessed())$grad_assessed_sections_count += 1;
141
-           		}
128
+                if (!$course->program->is_graduate) {
129
+                    $undergrad_school_sections_count += 1;
130
+                    if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
131
+                } else {
132
+                    $grad_school_sections_count += 1;
133
+                    if ($course->isAssessed()) $grad_assessed_sections_count += 1;
134
+                }
142 135
             }
143 136
         }
144 137
 
@@ -148,37 +141,33 @@ class SchoolsController extends \BaseController
148 141
 
149 142
         // For each outcome 
150 143
         foreach ($outcomes_undergrad as $outcome) {
151
-//         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
152
-//         	$achieved_outcomes_per_undergrad_program[$outcome->id]=0;
153
-        	$attemptedUndergradProgramsPerOutcome[$outcome->id]=0;
154
-        	$achievedUndergradProgramsPerOutcome[$outcome->id]=0;
155
-        	$programs_attempted_in_school[$outcome->id]=$outcome->programs_attempted_in_school($semesters, $school->id);
156
-//         	var_dump($programs_attempted_in_school);exit();
157
-        	foreach($programs_attempted_in_school[$outcome->id] as $program_id)
158
-        	{
159
-//         		var_dump($program_id->id);exit();
160
-				$program = DB::table('programs')->where('id', '=', $program_id->id)->first();
161
-
162
-        		if(!$program->is_graduate)
163
-        		{
164
-        			$attemptedUndergradProgramsPerOutcome[$outcome->id]++;
165
-        			$programC=Program::where('id', '=', $program_id->id)->first();
166
-//         			var_dump($programC);exit();
167
-					if($programC->achieved_outcome($outcome->id,$semesters))
168
-					{
169
-						$achievedUndergradProgramsPerOutcome[$outcome->id]++;
170
-					}
171
-        		}
172
-        	}
173
- 			$undergrad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,0);
174
- 			$undergrad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,0);
175
- 			
144
+            //         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
145
+            //         	$achieved_outcomes_per_undergrad_program[$outcome->id]=0;
146
+            $attemptedUndergradProgramsPerOutcome[$outcome->id] = 0;
147
+            $achievedUndergradProgramsPerOutcome[$outcome->id] = 0;
148
+            $programs_attempted_in_school[$outcome->id] = $outcome->programs_attempted_in_school($semesters, $school->id);
149
+            //         	var_dump($programs_attempted_in_school);exit();
150
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
151
+                //         		var_dump($program_id->id);exit();
152
+                $program = DB::table('programs')->where('id', '=', $program_id->id)->first();
153
+
154
+                if (!$program->is_graduate) {
155
+                    $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
156
+                    $programC = Program::where('id', '=', $program_id->id)->first();
157
+                    //         			var_dump($programC);exit();
158
+                    if ($programC->achieved_outcome($outcome->id, $semesters)) {
159
+                        $achievedUndergradProgramsPerOutcome[$outcome->id]++;
160
+                    }
161
+                }
162
+            }
163
+            $undergrad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 0);
164
+            $undergrad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 0);
165
+
176 166
             // For each program with courses that do assessment
177 167
             $programs_with_courses = Program::with(array('courses' => function ($query) {
178 168
                 //                 $query->whereNotNull('outcomes_attempted');
179 169
                 $query->whereIn('semester_id', Session::get('semesters_ids'));
180 170
             }))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
181
-
182 171
         }
183 172
 
184 173
         /**
@@ -187,43 +176,39 @@ class SchoolsController extends \BaseController
187 176
 
188 177
         // For each outcome 
189 178
         foreach ($outcomes_grad as $outcome) {
190
-//         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
191
-        	$achieved_outcomes_per_grad_program[$outcome->id]=0;
192
-        	$attemptedGradProgramsPerOutcome[$outcome->id]=0;
193
-        	$achievedGradProgramsPerOutcome[$outcome->id]=0;
194
- 			$grad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,1);
195
- 			$grad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,1);
196
-           // For each program with courses that do assessment
197
-        	foreach($programs_attempted_in_school[$outcome->id] as $program_id)
198
-        	{
199
-//         		var_dump($program_id->id);exit();
200
-				$program = DB::table('programs')
201
-                        ->where('id', '=', $program_id->id)
202
-                        ->first();
203
-//         		$program=Program::where('id', $program_id->id);
204
-//         		var_dump($program);exit();
205
-        		if($program->is_graduate)
206
-        		{
207
-        			$attemptedGradProgramsPerOutcome[$outcome->id]++;
208
-        			$programC=Program::where('id', '=', $program_id->id)->first();
209
-//         			var_dump($programC);exit();
210
-					if($programC->achieved_outcome($outcome->id,$semesters))
211
-					{
212
-						$achievedGradProgramsPerOutcome[$outcome->id]++;
213
-					}
214
-        		}
215
-        	}
179
+            //         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
180
+            $achieved_outcomes_per_grad_program[$outcome->id] = 0;
181
+            $attemptedGradProgramsPerOutcome[$outcome->id] = 0;
182
+            $achievedGradProgramsPerOutcome[$outcome->id] = 0;
183
+            $grad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 1);
184
+            $grad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 1);
185
+            // For each program with courses that do assessment
186
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
187
+                //         		var_dump($program_id->id);exit();
188
+                $program = DB::table('programs')
189
+                    ->where('id', '=', $program_id->id)
190
+                    ->first();
191
+                //         		$program=Program::where('id', $program_id->id);
192
+                //         		var_dump($program);exit();
193
+                if ($program->is_graduate) {
194
+                    $attemptedGradProgramsPerOutcome[$outcome->id]++;
195
+                    $programC = Program::where('id', '=', $program_id->id)->first();
196
+                    //         			var_dump($programC);exit();
197
+                    if ($programC->achieved_outcome($outcome->id, $semesters)) {
198
+                        $achievedGradProgramsPerOutcome[$outcome->id]++;
199
+                    }
200
+                }
201
+            }
216 202
             $programs_with_courses = Program::with(array('courses' => function ($query) {
217 203
                 //                 $query->whereNotNull('outcomes_attempted');
218 204
                 $query->whereIn('semester_id', Session::get('semesters_ids'));
219 205
             }))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
220
-
221 206
         }
222 207
         if ($school->id == 13) {
223
-//             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
208
+            //             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
224 209
             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
225 210
         } else {
226
-//             return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
211
+            //             return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
227 212
             return View::make('local.managers.shared.school', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
228 213
         }
229 214
     }
@@ -236,11 +221,11 @@ class SchoolsController extends \BaseController
236 221
         $title = $school->name;
237 222
         $schools = School::all();
238 223
 
239
-//         $outcomes = Outcome::orderBy('name', 'asc')->get();
240
-//         $outcomeCount = Outcome::all()->count();
241
-        $semesters = Semester::whereIn('id',Session::get('semesters_ids'))->get();
242
-// var_dump($semesters);
243
-// exit();
224
+        //         $outcomes = Outcome::orderBy('name', 'asc')->get();
225
+        //         $outcomeCount = Outcome::all()->count();
226
+        $semesters = Semester::whereIn('id', Session::get('semesters_ids'))->get();
227
+        // var_dump($semesters);
228
+        // exit();
244 229
         $outcomes_grad = Outcome::active_by_semesters($semesters, 1);
245 230
         $outcomes_undergrad = Outcome::active_by_semesters($semesters, 0);
246 231
 
@@ -304,57 +289,56 @@ class SchoolsController extends \BaseController
304 289
          * Calculate how many sections are doing assessment
305 290
          */
306 291
 
307
-//         $undergrad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
308
-//         $undergrad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
292
+        //         $undergrad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
293
+        //         $undergrad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
309 294
         $undergrad_assessed_sections_count = 0;
310 295
         $undergrad_school_sections_count = 0;
311 296
 
312
-//         $grad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
313
-//         $grad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
297
+        //         $grad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
298
+        //         $grad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
314 299
         $grad_assessed_sections_count = 0;
315 300
         $grad_school_sections_count = 0;
316 301
 
317 302
         foreach ($school->programs as $program) {
318 303
             foreach ($program->courses as $course) {
319
-//             	            Log::info("aqui".$course);
304
+                //             	            //Log::info("aqui".$course);
320 305
 
321
-            if (!$course->program->is_graduate){
322
-                $undergrad_school_sections_count += 1;
323
-            	if($course->isAssessed())$undergrad_assessed_sections_count += 1;
324
-//             	            Log::info("aqui".$course);
306
+                if (!$course->program->is_graduate) {
307
+                    $undergrad_school_sections_count += 1;
308
+                    if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
309
+                    //             	            //Log::info("aqui".$course);
325 310
 
326
-            }
327
-            else {
328
-                $grad_school_sections_count += 1;
329
-            	if($course->isAssessed())$grad_assessed_sections_count += 1;
330
-//             	            	            Log::info("aqui".$course);
311
+                } else {
312
+                    $grad_school_sections_count += 1;
313
+                    if ($course->isAssessed()) $grad_assessed_sections_count += 1;
314
+                    //             	            	            //Log::info("aqui".$course);
331 315
 
332
-            }
316
+                }
317
+
318
+                //                 if (!$course->program->is_graduate) {
319
+                //                     if ($course->outcomes_achieved != NULL) {
320
+                //                         $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
321
+                //                         $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
322
+                //                         for ($i = 1; $i <= count($undergrad_outcomes_attempted); $i++) {
323
+                //                             $undergrad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
324
+                //                             $undergrad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
325
+                //                         }
326
+                //                         $undergrad_assessed_sections_count += 1;
327
+                //                     }
328
+                //                     $undergrad_school_sections_count += 1;
329
+                //                 } else {
330
+                //                     if ($course->outcomes_achieved != NULL) {
331
+                //                         $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
332
+                //                         $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
333
+                //                         for ($i = 1; $i <= count($grad_outcomes_attempted); $i++) {
334
+                //                             $grad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
335
+                //                             $grad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
336
+                //                         }
337
+                //                         $grad_assessed_sections_count += 1;
338
+                //                     }
339
+                //                     $grad_school_sections_count += 1;
340
+                //                 }
333 341
 
334
-//                 if (!$course->program->is_graduate) {
335
-//                     if ($course->outcomes_achieved != NULL) {
336
-//                         $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
337
-//                         $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
338
-//                         for ($i = 1; $i <= count($undergrad_outcomes_attempted); $i++) {
339
-//                             $undergrad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
340
-//                             $undergrad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
341
-//                         }
342
-//                         $undergrad_assessed_sections_count += 1;
343
-//                     }
344
-//                     $undergrad_school_sections_count += 1;
345
-//                 } else {
346
-//                     if ($course->outcomes_achieved != NULL) {
347
-//                         $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
348
-//                         $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
349
-//                         for ($i = 1; $i <= count($grad_outcomes_attempted); $i++) {
350
-//                             $grad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
351
-//                             $grad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
352
-//                         }
353
-//                         $grad_assessed_sections_count += 1;
354
-//                     }
355
-//                     $grad_school_sections_count += 1;
356
-//                 }
357
-                
358 342
             }
359 343
         }
360 344
 
@@ -363,50 +347,47 @@ class SchoolsController extends \BaseController
363 347
          */
364 348
 
365 349
         // Number of programs that achieved a particular learning outcome
366
-//         $achievedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
350
+        //         $achievedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
367 351
 
368 352
         // Number of programs that attempted a particular learning outcome
369
-//         $attemptedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
353
+        //         $attemptedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
370 354
 
371 355
         // Fetch programs with participation for the school
372
-//         $participating_undergrad_programs = DB::table('programs')
373
-//             ->join('courses', 'courses.program_id', '=', 'programs.id')
374
-//             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
375
-//             ->addSelect('courses.semester_id')
376
-//             ->whereIn('semester_id', Session::get('semesters_ids'))
377
-//             ->where('is_graduate', 0)
378
-//             ->where('school_id', $school->id)
379
-//             ->groupBy('id')
380
-//             ->get();
356
+        //         $participating_undergrad_programs = DB::table('programs')
357
+        //             ->join('courses', 'courses.program_id', '=', 'programs.id')
358
+        //             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
359
+        //             ->addSelect('courses.semester_id')
360
+        //             ->whereIn('semester_id', Session::get('semesters_ids'))
361
+        //             ->where('is_graduate', 0)
362
+        //             ->where('school_id', $school->id)
363
+        //             ->groupBy('id')
364
+        //             ->get();
381 365
 
382 366
         $output = array();
383 367
 
384 368
 
385 369
         // For each outcome 
386 370
         foreach ($outcomes_undergrad as $outcome) {
387
-//         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
388
-        	$achieved_outcomes_per_undergrad_program[$outcome->id]=0;
389
-        	$attemptedUndergradProgramsPerOutcome[$outcome->id]=0;
390
-        	$achievedUndergradProgramsPerOutcome[$outcome->id]=0;
391
-        	$programs_attempted_in_school[$outcome->id]=$outcome->programs_attempted_in_school($semesters, $school->id);
392
-//         	var_dump($programs_attempted_in_school);exit();
393
-        	foreach($programs_attempted_in_school[$outcome->id] as $program_id)
394
-        	{
395
-//         		var_dump($program_id->id);exit();
396
-				$program = DB::table('programs')
397
-                        ->where('id', '=', $program_id->id)
398
-                        ->first();
399
-//         		$program=Program::where('id', $program_id->id);
400
-//         		var_dump($program);exit();
401
-        		if(!$program->is_graduate)
402
-        		{
403
-        			$attemptedUndergradProgramsPerOutcome[$outcome->id]++;
404
-        			
405
-        		}
406
-        	}
407
- 			$undergrad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,0);
408
- 			$undergrad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,0);
409
- 			
371
+            //         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
372
+            $achieved_outcomes_per_undergrad_program[$outcome->id] = 0;
373
+            $attemptedUndergradProgramsPerOutcome[$outcome->id] = 0;
374
+            $achievedUndergradProgramsPerOutcome[$outcome->id] = 0;
375
+            $programs_attempted_in_school[$outcome->id] = $outcome->programs_attempted_in_school($semesters, $school->id);
376
+            //         	var_dump($programs_attempted_in_school);exit();
377
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
378
+                //         		var_dump($program_id->id);exit();
379
+                $program = DB::table('programs')
380
+                    ->where('id', '=', $program_id->id)
381
+                    ->first();
382
+                //         		$program=Program::where('id', $program_id->id);
383
+                //         		var_dump($program);exit();
384
+                if (!$program->is_graduate) {
385
+                    $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
386
+                }
387
+            }
388
+            $undergrad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 0);
389
+            $undergrad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 0);
390
+
410 391
             // For each program with courses that do assessment
411 392
             $programs_with_courses = Program::with(array('courses' => function ($query) {
412 393
                 //                 $query->whereNotNull('outcomes_attempted');
@@ -414,46 +395,46 @@ class SchoolsController extends \BaseController
414 395
             }))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
415 396
 
416 397
             foreach ($programs_with_courses as $program) {
417
-            if(in_array($program->id,$participating_programs)){
418
-                // To acummulate all criteria for one program
419
-//                 $achieved_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
420
-//                 $attempted_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
421
-
422
-                //Flag for counting programs
423
-                $flag = false;
424
-
425
-                // For each course in the program
426
- //                foreach ($program->courses as $course) {
427
-//                 if($course->isAssessed()){
428
-//                     // If the outcome in question is being evaluated
429
-//                     $course_outcomes_attempted2 = $course->outcomes_att();
430
-//                     //                     $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
431
-//                     //                     $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
432
-//                     $course_outcomes_achieved2 = $course->outcomes_ach();
433
-//                     if (
434
-//                         array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
435
-//                         && $course_outcomes_attempted2[$outcome->id] > 0
436
-//                     ) {
437
-//                         $achieved_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
438
-// //                         $attempted_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
439
-// 
440
-//                         // Add one to the programs assessing, if it wasn't added before
441
-//                         if (!$flag) {
442
-//                             $attemptedUndergradProgramsPerOutcome[$outcome->id] += 1;
443
-//                             $flag = true;
444
-//                         }
445
-//                     }
446
-// 
447
-//                     // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_undergrad_program);
448
-//                     // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
449
-// 				}
450
-//                 }
451
-                //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
452
-//                 if ($attempted_outcomes_per_undergrad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_undergrad_program[$outcome->id] / $attempted_outcomes_per_undergrad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
453
-//                     $achievedUndergradProgramsPerOutcome[$outcome->id] += 1;
454
-//                     // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
455
-//                 }
456
-            }
398
+                if (in_array($program->id, $participating_programs)) {
399
+                    // To acummulate all criteria for one program
400
+                    //                 $achieved_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
401
+                    //                 $attempted_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
402
+
403
+                    //Flag for counting programs
404
+                    $flag = false;
405
+
406
+                    // For each course in the program
407
+                    //                foreach ($program->courses as $course) {
408
+                    //                 if($course->isAssessed()){
409
+                    //                     // If the outcome in question is being evaluated
410
+                    //                     $course_outcomes_attempted2 = $course->outcomes_att();
411
+                    //                     //                     $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
412
+                    //                     //                     $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
413
+                    //                     $course_outcomes_achieved2 = $course->outcomes_ach();
414
+                    //                     if (
415
+                    //                         array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
416
+                    //                         && $course_outcomes_attempted2[$outcome->id] > 0
417
+                    //                     ) {
418
+                    //                         $achieved_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
419
+                    // //                         $attempted_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
420
+                    // 
421
+                    //                         // Add one to the programs assessing, if it wasn't added before
422
+                    //                         if (!$flag) {
423
+                    //                             $attemptedUndergradProgramsPerOutcome[$outcome->id] += 1;
424
+                    //                             $flag = true;
425
+                    //                         }
426
+                    //                     }
427
+                    // 
428
+                    //                     // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_undergrad_program);
429
+                    //                     // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
430
+                    // 				}
431
+                    //                 }
432
+                    //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
433
+                    //                 if ($attempted_outcomes_per_undergrad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_undergrad_program[$outcome->id] / $attempted_outcomes_per_undergrad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
434
+                    //                     $achievedUndergradProgramsPerOutcome[$outcome->id] += 1;
435
+                    //                     // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
436
+                    //                 }
437
+                }
457 438
             }
458 439
         }
459 440
 
@@ -462,101 +443,98 @@ class SchoolsController extends \BaseController
462 443
          */
463 444
 
464 445
         // Number of programs that achieved a particular learning outcome
465
-//         $achievedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
446
+        //         $achievedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
466 447
 
467 448
         // Number of programs that attempted a particular learning outcome
468
-//         $attemptedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
469
-// 
449
+        //         $attemptedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
450
+        // 
470 451
         // Fetch programs with participation for the school
471
-//         $participating_grad_programs = DB::table('programs')
472
-//             ->join('courses', 'courses.program_id', '=', 'programs.id')
473
-//             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
474
-//             ->addSelect('courses.semester_id')
475
-//             ->whereIn('semester_id', Session::get('semesters_ids'))
476
-//             ->where('is_graduate', 1)
477
-//             ->where('school_id', $school->id)
478
-//             ->groupBy('id')
479
-//             ->get();
452
+        //         $participating_grad_programs = DB::table('programs')
453
+        //             ->join('courses', 'courses.program_id', '=', 'programs.id')
454
+        //             ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
455
+        //             ->addSelect('courses.semester_id')
456
+        //             ->whereIn('semester_id', Session::get('semesters_ids'))
457
+        //             ->where('is_graduate', 1)
458
+        //             ->where('school_id', $school->id)
459
+        //             ->groupBy('id')
460
+        //             ->get();
480 461
 
481 462
         $output = array();
482 463
 
483 464
 
484 465
         // For each outcome 
485 466
         foreach ($outcomes_grad as $outcome) {
486
-//         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
487
-        	$achieved_outcomes_per_grad_program[$outcome->id]=0;
488
-        	$attemptedGradProgramsPerOutcome[$outcome->id]=0;
489
-        	$achievedGradProgramsPerOutcome[$outcome->id]=0;
490
- 			$grad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,1);
491
- 			$grad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,1);
492
-           // For each program with courses that do assessment
493
-        	foreach($programs_attempted_in_school[$outcome->id] as $program_id)
494
-        	{
495
-//         		var_dump($program_id->id);exit();
496
-				$program = DB::table('programs')
497
-                        ->where('id', '=', $program_id->id)
498
-                        ->first();
499
-//         		$program=Program::where('id', $program_id->id);
500
-//         		var_dump($program);exit();
501
-        		if($program->is_graduate)
502
-        		{
503
-        			$attemptedGradProgramsPerOutcome[$outcome->id]++;
504
-        			
505
-        		}
506
-        	}
467
+            //         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
468
+            $achieved_outcomes_per_grad_program[$outcome->id] = 0;
469
+            $attemptedGradProgramsPerOutcome[$outcome->id] = 0;
470
+            $achievedGradProgramsPerOutcome[$outcome->id] = 0;
471
+            $grad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 1);
472
+            $grad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 1);
473
+            // For each program with courses that do assessment
474
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
475
+                //         		var_dump($program_id->id);exit();
476
+                $program = DB::table('programs')
477
+                    ->where('id', '=', $program_id->id)
478
+                    ->first();
479
+                //         		$program=Program::where('id', $program_id->id);
480
+                //         		var_dump($program);exit();
481
+                if ($program->is_graduate) {
482
+                    $attemptedGradProgramsPerOutcome[$outcome->id]++;
483
+                }
484
+            }
507 485
             $programs_with_courses = Program::with(array('courses' => function ($query) {
508 486
                 //                 $query->whereNotNull('outcomes_attempted');
509 487
                 $query->whereIn('semester_id', Session::get('semesters_ids'));
510 488
             }))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
511 489
 
512 490
             foreach ($programs_with_courses as $program) {
513
-             if(in_array($program->id,$participating_programs)){
514
-               // To acummulate all criteria for one program
515
-//                 $achieved_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
516
-//                 $attempted_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
517
-
518
-                //Flag for counting programs
519
-                $flag = false;
520
-
521
-                // For each course in the program
522
-                foreach ($program->courses as $course) {
523
-                if($course->isAssessed()){
524
-                    // If the outcome in question is being evaluated
525
-                    //                     $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
526
-                    $course_outcomes_attempted2 = ($course->outcomes_att());
527
-                    $course_outcomes_achieved2 = ($course->outcomes_ach());
528
-                    //                     $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
529
-                    if (
530
-                        array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
531
-                        && $course_outcomes_attempted2[$outcome->id] > 0
532
-                    ) {
533
-                        $achieved_outcomes_per_grad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
534
-                        $attempted_outcomes_per_grad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
535
-
536
-                        // Add one to the programs assessing, if it wasn't added before
537
-                        if (!$flag) {
538
-                            $attemptedGradProgramsPerOutcome[$outcome->id] += 1;
539
-                            $flag = true;
491
+                if (in_array($program->id, $participating_programs)) {
492
+                    // To acummulate all criteria for one program
493
+                    //                 $achieved_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
494
+                    //                 $attempted_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
495
+
496
+                    //Flag for counting programs
497
+                    $flag = false;
498
+
499
+                    // For each course in the program
500
+                    foreach ($program->courses as $course) {
501
+                        if ($course->isAssessed()) {
502
+                            // If the outcome in question is being evaluated
503
+                            //                     $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
504
+                            $course_outcomes_attempted2 = ($course->outcomes_att());
505
+                            $course_outcomes_achieved2 = ($course->outcomes_ach());
506
+                            //                     $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
507
+                            if (
508
+                                array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
509
+                                && $course_outcomes_attempted2[$outcome->id] > 0
510
+                            ) {
511
+                                $achieved_outcomes_per_grad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
512
+                                $attempted_outcomes_per_grad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
513
+
514
+                                // Add one to the programs assessing, if it wasn't added before
515
+                                if (!$flag) {
516
+                                    $attemptedGradProgramsPerOutcome[$outcome->id] += 1;
517
+                                    $flag = true;
518
+                                }
519
+                            }
520
+
521
+                            // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_grad_program);
522
+                            // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
540 523
                         }
541 524
                     }
542
-
543
-                    // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_grad_program);
544
-                    // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
545
-			}
546
-                }
547
-                //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
548
-                if ($attempted_outcomes_per_grad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_grad_program[$outcome->id] / $attempted_outcomes_per_grad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
549
-                    $achievedGradProgramsPerOutcome[$outcome->id] += 1;
550
-                    // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
525
+                    //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
526
+                    if ($attempted_outcomes_per_grad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_grad_program[$outcome->id] / $attempted_outcomes_per_grad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
527
+                        $achievedGradProgramsPerOutcome[$outcome->id] += 1;
528
+                        // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
529
+                    }
551 530
                 }
552
-           }
553 531
             }
554 532
         }
555 533
         if ($school->id == 13) {
556
-//             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
534
+            //             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
557 535
             return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
558 536
         } else {
559
-//             return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
537
+            //             return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
560 538
             return View::make('local.managers.shared.school', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
561 539
         }
562 540
     }

+ 3
- 3
app/controllers/StudentsController.php ファイルの表示

@@ -56,7 +56,7 @@ class StudentsController extends \BaseController
56 56
 
57 57
 
58 58
           if ($assessment_score) {
59
-            Log::info($assessment_score->student_id);
59
+            //Log::info($assessment_score->student_id);
60 60
 
61 61
             $assessments[$activity->id]["criteria"][$ac->id] = $ac;
62 62
             $sum_of_score += $ac->weight * $assessment_score->score;
@@ -130,7 +130,7 @@ class StudentsController extends \BaseController
130 130
       // }
131 131
     } else
132 132
       $assessments = NULL;
133
-    Log::info($assessments);
133
+    //Log::info($assessments);
134 134
 
135 135
     return View::make('local.professors.student', compact('student', 'course', 'title', 'assessments'));
136 136
   }
@@ -239,7 +239,7 @@ class StudentsController extends \BaseController
239 239
 
240 240
 
241 241
           if ($assessment_score) {
242
-            Log::info($assessment_score->student_id);
242
+            //Log::info($assessment_score->student_id);
243 243
 
244 244
             $assessments[$activity->id]["criteria"][$ac->id] = $ac;
245 245
             $sum_of_score += $ac->weight * $assessment_score->score;

+ 4
- 4
app/controllers/TemplatesController.php ファイルの表示

@@ -144,7 +144,7 @@ class TemplatesController extends \BaseController
144 144
 		$json_to_send["criteria"] = DB::table("criteria")->join('template_criterion', 'template_criterion.criterion_id', '=', 'criteria.id')
145 145
 			->where("template_criterion.template_id", '=', $template_id)
146 146
 			->get();
147
-		Log::info($json_to_send["criteria"]);
147
+		//Log::info($json_to_send["criteria"]);
148 148
 		foreach ($json_to_send['criteria'] as $criteria) {
149 149
 			$json_to_send['scales'][$criteria->criterion_id] = DB::table("scales")
150 150
 				->join('criterion_scale', 'criterion_scale.scale_id', '=', 'scales.id')
@@ -348,7 +348,7 @@ class TemplatesController extends \BaseController
348 348
 			->orderBy('position')
349 349
 			->get();
350 350
 
351
-		Log::info($template_info);
351
+		//Log::info($template_info);
352 352
 
353 353
 		return json_encode($template_info);
354 354
 	}
@@ -362,7 +362,7 @@ class TemplatesController extends \BaseController
362 362
 	{
363 363
 		DB::beginTransaction();
364 364
 		$template = Template::find(Input::get('id'));
365
-		Log::info(Input::all());
365
+		//Log::info(Input::all());
366 366
 		$template->name = Input::get('name');
367 367
 
368 368
 		$template->is_visible = Input::get('is_visible');
@@ -537,4 +537,4 @@ class TemplatesController extends \BaseController
537 537
 			return Redirect::back();
538 538
 		}
539 539
 	}
540
-}
540
+}

+ 9
- 9
app/controllers/ThreeYearPlanController.php ファイルの表示

@@ -23,9 +23,9 @@ class ThreeYearPlanController extends \BaseController
23 23
 
24 24
         $Firstsemester = DB::table('semesters')->where('name', '=', $string)->first();
25 25
         $secondSemester = DB::table('semesters')->where('name', '=', $string2)->first();
26
-        Log::info($Firstsemester->id);
27
-        Log::info($secondSemester->id);
28
-        Log::info($typ->id);
26
+        //Log::info($Firstsemester->id);
27
+        //Log::info($secondSemester->id);
28
+        //Log::info($typ->id);
29 29
         DB::insert("insert into typ_semesters (typ_id, semester_id) values ({$typ->id}, {$Firstsemester->id}), ({$typ->id}, {$secondSemester->id})");
30 30
       }
31 31
       DB::commit();
@@ -35,7 +35,7 @@ class ThreeYearPlanController extends \BaseController
35 35
     } catch (Exception $e) {
36 36
       Session::flash('status', 'danger');
37 37
       Session::flash('message', "<p>Could not create cycle</p>");
38
-      Log::info($e);
38
+      //Log::info($e);
39 39
       DB::rollback();
40 40
       return Redirect::to("three-years-plan/{$program_id}");
41 41
     }
@@ -554,8 +554,8 @@ class ThreeYearPlanController extends \BaseController
554 554
     $count = 0;
555 555
     $yearStartPlusOne = $current_typ->year_start + 1;
556 556
     $yearStart = $current_typ->year_start;
557
-    Log::info($yearStart);
558
-    Log::info($yearStartPlusOne);
557
+    //Log::info($yearStart);
558
+    //Log::info($yearStartPlusOne);
559 559
     while ($count < 3) {
560 560
 
561 561
 
@@ -564,8 +564,8 @@ class ThreeYearPlanController extends \BaseController
564 564
 
565 565
       $secondSemester = DB::select("select * from semesters where name like 'Second Semester {$yearStart}-{$yearStartPlusOne}'");
566 566
       if (count($firstSemester) && count($secondSemester)) {
567
-        Log::info($firstSemester);
568
-        Log::info($secondSemester);
567
+        //Log::info($firstSemester);
568
+        //Log::info($secondSemester);
569 569
         $query = DB::select("select * from annual_cycle where semester_start ={$firstSemester[0]->id} and semester_end ={$secondSemester[0]->id} ");
570 570
         if (!count($query)) {
571 571
           DB::insert("insert into annual_cycle (academic_year, semester_start, semester_end) values ('{$yearStart}-{$yearStartPlusOne}', {$firstSemester[0]->id}, {$secondSemester[0]->id})");
@@ -626,7 +626,7 @@ class ThreeYearPlanController extends \BaseController
626 626
         }
627 627
       }
628 628
     }
629
-    Log::info($typ_semester_outcome);
629
+    //Log::info($typ_semester_outcome);
630 630
 
631 631
 
632 632
     return View::make('global.print_three_year_plan', compact('typ_semesters', 'program', 'three_year_plan', 'typ_semesters', 'typ_semester_outcome'));

+ 16
- 16
app/controllers/TransformativeActionsController.php ファイルの表示

@@ -239,7 +239,7 @@ class TransformativeActionsController extends \BaseController
239 239
 
240 240
     $trimmed = trim(preg_replace('/\t+/', '', Input::get('text')));
241 241
 
242
-    Log::info('trimmed 1 -->' . $trimmed . '<--');
242
+    //Log::info('trimmed 1 -->' . $trimmed . '<--');
243 243
 
244 244
     // if ($trimmed == '') {
245 245
     //     $trimmed = NULL;
@@ -247,7 +247,7 @@ class TransformativeActionsController extends \BaseController
247 247
     //     $trimmed = json_encode(preg_split('/\r\n/', $trimmed));
248 248
     // }
249 249
 
250
-    Log::info('trimmed 2 -->' . $trimmed . '<--');
250
+    //Log::info('trimmed 2 -->' . $trimmed . '<--');
251 251
 
252 252
 
253 253
     $clean_input['text'] = $trimmed;
@@ -255,7 +255,7 @@ class TransformativeActionsController extends \BaseController
255 255
     //////
256 256
     $trimmed = trim(preg_replace('/\t+/', '', Input::get('description')));
257 257
 
258
-    Log::info('trimmed 3 -->' . $trimmed . '<--');
258
+    //Log::info('trimmed 3 -->' . $trimmed . '<--');
259 259
 
260 260
     // if ($trimmed == '') {
261 261
     //     $trimmed = NULL;
@@ -263,7 +263,7 @@ class TransformativeActionsController extends \BaseController
263 263
     //     $trimmed = json_encode(preg_split('/\r\n/', $trimmed));
264 264
     // }
265 265
 
266
-    Log::info('trimmed 4 -->' . $trimmed . '<--');
266
+    //Log::info('trimmed 4 -->' . $trimmed . '<--');
267 267
 
268 268
 
269 269
     $clean_input['description'] = $trimmed;
@@ -346,7 +346,7 @@ class TransformativeActionsController extends \BaseController
346 346
       if ($role != 4) {
347 347
         $by_professor = 0;
348 348
       }
349
-      Log::info($clean_input['courseid']);
349
+      //Log::info($clean_input['courseid']);
350 350
       // $by_professor = $clean_input['approval'];
351 351
 
352 352
       $parentesis = array('(', ')');
@@ -728,7 +728,7 @@ class TransformativeActionsController extends \BaseController
728 728
       ->select('objectives.text as text', 'objectives.id as id')
729 729
       ->orderBy('objectives.text', 'ASC')
730 730
       ->lists('objectives.id');
731
-    Log::info($ta_id);
731
+    //Log::info($ta_id);
732 732
 
733 733
     //$an_objective = $objectives[0]->id;
734 734
     $outcome_ids = DB::table('objective_outcome')
@@ -736,8 +736,8 @@ class TransformativeActionsController extends \BaseController
736 736
       ->select('objective_outcome.outcome_id')
737 737
       ->lists('outcome_id');
738 738
     //$outcome_id = $outcome_id[0]->outcome_id;
739
-    Log::info("outcomes");
740
-    Log::info($outcome_ids);
739
+    //Log::info("outcomes");
740
+    //Log::info($outcome_ids);
741 741
     $objectives_from_outcome = DB::table('objectives')
742 742
       ->join('objective_program', 'objective_program.objective_id', '=', 'objectives.id')
743 743
       ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
@@ -1215,7 +1215,7 @@ class TransformativeActionsController extends \BaseController
1215 1215
     $title = "Formative Actions";
1216 1216
     $semesters = Session::get('semesters_ids');
1217 1217
     $semesters = DB::table('semesters')->whereIn('id', $semesters)->orderBy('start', 'ASC')->first();
1218
-    Log::info($semesters->start);
1218
+    //Log::info($semesters->start);
1219 1219
     $outcomes = Outcome::select(array('id', 'name', 'expected_outcome'))
1220 1220
       ->whereNull('deleted_at')
1221 1221
       ->whereRaw("(deactivation_date IS NULL or deactivation_date >= '{$semesters->start}')")
@@ -1254,8 +1254,8 @@ class TransformativeActionsController extends \BaseController
1254 1254
     $semesters = Input::get('semesters');
1255 1255
     $outcome_id = Input::get('id');
1256 1256
 
1257
-    Log::info($programs);
1258
-    Log::info($semesters);
1257
+    //Log::info($programs);
1258
+    //Log::info($semesters);
1259 1259
 
1260 1260
 
1261 1261
     /* if (in_array(0, $semesters)) {
@@ -1365,7 +1365,7 @@ class TransformativeActionsController extends \BaseController
1365 1365
           ->join('criteria','activity_criterion.criterion_id','=','criteria.id')
1366 1366
           ->where('activity_id', $activity->id)
1367 1367
           ->select('criteria')*/
1368
-          //Log::info($activity->trans_action_id);
1368
+          ////Log::info($activity->trans_action_id);
1369 1369
           $activity->criterion_with_objective = DB::table('transformative_activity_criterion')
1370 1370
             ->join('activity_criterion', 'activity_criterion.id', '=', 'transformative_activity_criterion.activity_criterion_id')
1371 1371
             ->join('criteria', 'activity_criterion.criterion_id', '=', 'criteria.id')
@@ -1380,9 +1380,9 @@ class TransformativeActionsController extends \BaseController
1380 1380
             ->get();*/
1381 1381
 
1382 1382
           /*foreach ($activity->objectives as $objective) {
1383
-            // Log::info($activity->activity_id);
1384
-            // Log::info($objective->objective_id);
1385
-            /* Log::info(DB::table('criterion_objective_outcome')
1383
+            // //Log::info($activity->activity_id);
1384
+            // //Log::info($objective->objective_id);
1385
+            /* //Log::info(DB::table('criterion_objective_outcome')
1386 1386
               ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
1387 1387
               ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
1388 1388
               ->where('activity_criterion.activity_id', $activity->activity_id)
@@ -1404,4 +1404,4 @@ class TransformativeActionsController extends \BaseController
1404 1404
     }
1405 1405
     return $grouped_courses;
1406 1406
   }
1407
-}
1407
+}

+ 31
- 31
app/controllers/UsersController.php ファイルの表示

@@ -16,53 +16,53 @@ class UsersController extends \BaseController
16 16
 			->orderBy('surnames')
17 17
 			->orderBy('first_name')
18 18
 			->get();
19
-		Log::info('LmaOOOOO get cocked');
19
+		//Log::info('LmaOOOOO get cocked');
20 20
 
21 21
 
22 22
 		$schools = School::orderBy('name', 'asc')->get();
23 23
 		$access_level  = count(User::select('role')->where('has_access', 1)->groupBy('role')->get());
24 24
 		try {
25
-			Log::info("Schools");
25
+			//Log::info("Schools");
26 26
 			foreach ($schools as $school) {
27
-				Log::info(print_r($school, true));
27
+				//Log::info(print_r($school, true));
28 28
 			}
29 29
 			foreach ($users as $user) {
30
-				Log::info("ID");
31
-				Log::info($user->id);
32
-				Log::info("Name");
33
-				Log::info($user->surname . $user->first_name);
34
-				Log::info("if funciona??");
35
-				Log::info($user->school_id);
36
-				Log::info("elseif??");
37
-				Log::info(count($user->programs));
30
+				//Log::info("ID");
31
+				//Log::info($user->id);
32
+				//Log::info("Name");
33
+				//Log::info($user->surname . $user->first_name);
34
+				//Log::info("if funciona??");
35
+				//Log::info($user->school_id);
36
+				//Log::info("elseif??");
37
+				//Log::info(count($user->programs));
38 38
 				if ($user->school_id) {
39
-					Log::info("Schoool");
40
-					Log::info($user->school->name);
41
-					Log::info($user->school_id);
39
+					//Log::info("Schoool");
40
+					//Log::info($user->school->name);
41
+					//Log::info($user->school_id);
42 42
 				} elseif (count($user->programs) > 0) {
43
-					Log::info("Entre aqui");
44
-					Log::info($user->programs[0]->school_id);
45
-					Log::info($user->programs[0]->school->name);
46
-				} else Log::info("Not so cocked");
43
+					//Log::info("Entre aqui");
44
+					//Log::info($user->programs[0]->school_id);
45
+					//Log::info($user->programs[0]->school->name);
46
+				} else //Log::info("Not so cocked");
47 47
 
48
-				Log::info("bueno vamos a ver que hay???");
49
-				Log::info(count($user->programs));
48
+				//Log::info("bueno vamos a ver que hay???");
49
+				//Log::info(count($user->programs));
50 50
 				if (count($user->programs)) {
51 51
 					foreach ($user->programs as $program) {
52
-						Log::info($program->id);
53
-						Log::info($program->name);
52
+						//Log::info($program->id);
53
+						//Log::info($program->name);
54 54
 					}
55
-				} else Log::info("Tal vez cocked");
56
-				Log::info("email");
57
-				Log::info($user->email);
58
-				Log::info("Role" . $user->role);
59
-				Log::info($user->office_phone);
60
-				Log::info($user->cell_phone);
55
+				} else //Log::info("Tal vez cocked");
56
+				//Log::info("email");
57
+				//Log::info($user->email);
58
+				//Log::info("Role" . $user->role);
59
+				//Log::info($user->office_phone);
60
+				//Log::info($user->cell_phone);
61 61
 			}
62 62
 		} catch (Exception $e) {
63
-			Log::info("get Cocked" . $e);
63
+			//Log::info("get Cocked" . $e);
64 64
 		}
65
-		Log::info("el error era en la base de datos XDDDDDDD");
65
+		//Log::info("el error era en la base de datos XDDDDDDD");
66 66
 
67 67
 
68 68
 		return View::make('local.managers.admins.users', compact('title', 'users', 'schools', 'access_level'));
@@ -77,7 +77,7 @@ class UsersController extends \BaseController
77 77
 	public function edit()
78 78
 	{
79 79
 		$user = Auth::user();
80
-		Log::info($user);
80
+		//Log::info($user);
81 81
 		$title = "Profile";
82 82
 		$schools = School::orderBy('name', 'asc')->get();
83 83
 		$programs = $user->programs;

+ 5
- 5
app/models/Activity.php ファイルの表示

@@ -220,7 +220,7 @@ class Activity extends Eloquent
220 220
             ->where('b.score', '>=', $rubric->expected_points);
221 221
         })
222 222
         ->select('a.student_id', DB::raw('count(`a`.`activity_criterion_id`) attempted'), DB::raw('count(`b`.`activity_criterion_id`) achieved'));
223
-      Log::info($students_attempted->get());*/
223
+      //Log::info($students_attempted->get());*/
224 224
       $students_attempted = DB::table('assessments as a')
225 225
         ->whereIn('a.activity_criterion_id', $ac_criteria)
226 226
         ->groupBy('a.student_id')
@@ -235,7 +235,7 @@ class Activity extends Eloquent
235 235
       $conteo_outcome_achieved = 0;
236 236
 
237 237
       foreach ($students_attempted as $student) {
238
-        Log::info($student->achieved / $student->attempted * 100);
238
+        //Log::info($student->achieved / $student->attempted * 100);
239 239
         if ($student->achieved / $student->attempted * 100 >= $outcome->expected_outcome) {
240 240
           $conteo_outcome_achieved++;
241 241
         }
@@ -299,9 +299,9 @@ class Activity extends Eloquent
299 299
       $attempted_criteria = count(DB::table('assessments')
300 300
         ->where('activity_criterion_id', '=', $activity_crit->id)
301 301
         ->lists('student_id'));
302
-      Log::info("For activity_crit " . ($activity_crit->id));
302
+      //Log::info("For activity_crit " . ($activity_crit->id));
303 303
       $percent_for_criteria = ($passed_criteria / $attempted_criteria) * 100;
304
-      Log::info('Percent calculated' . $percent_for_criteria);
304
+      //Log::info('Percent calculated' . $percent_for_criteria);
305 305
 
306 306
 
307 307
       $percent_for_criteria = ($passed_criteria / $attempted_criteria) * 100;
@@ -414,4 +414,4 @@ class Activity extends Eloquent
414 414
     //return json_decode($this->outcomes_attempted, true);
415 415
     return $outcomes_attempted;
416 416
   }
417
-}
417
+}

+ 26
- 26
app/models/Course.php ファイルの表示

@@ -43,7 +43,7 @@ class Course extends Eloquent
43 43
       ->select('activities.id')
44 44
       ->distinct()
45 45
       ->lists('activities.id');
46
-    Log::info($activitiesAssessed);
46
+    //Log::info($activitiesAssessed);
47 47
 
48 48
     return $this->hasMany('Activity')->whereIn('activities.id', $activitiesAssessed)->orderBy('date', 'asc');
49 49
 
@@ -111,8 +111,8 @@ class Course extends Eloquent
111 111
         else $outcomes_attempted[$outcome_id] = 1;
112 112
       }
113 113
     }
114
-    Log::info("outcomes_attempted");
115
-    Log::info($outcomes_attempted);
114
+    //Log::info("outcomes_attempted");
115
+    //Log::info($outcomes_attempted);
116 116
 
117 117
     return $outcomes_attempted;
118 118
   }
@@ -122,15 +122,15 @@ class Course extends Eloquent
122 122
       $criteria_id = DB::table('annual_plan_objective')
123 123
         ->where('typ_semester_course_id', $course_code->typ_semester_course_id)
124 124
         ->lists('criteria_id');
125
-      Log::info($course_code->typ_semester_course_id);
126
-      Log::info("dame ese id");
125
+      //Log::info($course_code->typ_semester_course_id);
126
+      //Log::info("dame ese id");
127 127
       $program = Program::where('id', $course_code->program_id)->first();
128
-      // Log::info($program->code);
128
+      // //Log::info($program->code);
129 129
       if ($program->code == "") {
130 130
         $program_ids = DB::table('programs')
131 131
           ->where('school_id', $program->school->id)
132 132
           ->lists('programs.id');
133
-        //Log::info("estamos");
133
+        ////Log::info("estamos");
134 134
       } else $program_ids = array($program->id);
135 135
 
136 136
       /*tabla es asi por curso codigo
@@ -168,13 +168,13 @@ class Course extends Eloquent
168 168
         ->addSelect(DB::raw('count(assessments.activity_criterion_id) as criteria_attempted'))
169 169
         ->groupBy('criteria.id');
170 170
 
171
-      /* Log::info($table_per_criterion->toSql());
172
-      Log::info(array($course_code));
173
-      Log::info($program_ids);
174
-      Log::info($criteria_id);*/
175
-      Log::info('mera 1');
176
-      Log::info(array($course_code));
177
-      Log::info($table_per_criterion->get());
171
+      /* //Log::info($table_per_criterion->toSql());
172
+      //Log::info(array($course_code));
173
+      //Log::info($program_ids);
174
+      //Log::info($criteria_id);*/
175
+      //Log::info('mera 1');
176
+      //Log::info(array($course_code));
177
+      //Log::info($table_per_criterion->get());
178 178
       return $table_per_criterion->get();
179 179
     }
180 180
   }
@@ -185,15 +185,15 @@ class Course extends Eloquent
185 185
         ->where('typ_semester_course_id', $course_code->typ_semester_course_id)
186 186
         ->lists('criteria_id');
187 187
       $program = Program::where('id', $course_code->program_id)->first();
188
-      // // Log::info($program->code);
188
+      // // //Log::info($program->code);
189 189
       if ($program->code == "") {
190 190
         $program_ids = DB::table('programs')
191 191
           ->where('school_id', $program->school->id)
192 192
           ->lists('programs.id');
193
-        //    Log::info("estamos");
193
+        //    //Log::info("estamos");
194 194
       } else $program_ids = array($program->id);
195 195
 
196
-      // Log::info(array($course_code));
196
+      // //Log::info(array($course_code));
197 197
 
198 198
       //Table
199 199
       /* Student  criterion_attempted criterion passed
@@ -231,11 +231,11 @@ class Course extends Eloquent
231 231
 
232 232
 
233 233
 
234
-      //Log::info($criteria_id);
234
+      ////Log::info($criteria_id);
235 235
 
236
-      //Log::info($program_ids);
236
+      ////Log::info($program_ids);
237 237
 
238
-      //Log::info($table_per_student->toSql());
238
+      ////Log::info($table_per_student->toSql());
239 239
       $students = $table_per_student->get();
240 240
 
241 241
 
@@ -261,7 +261,7 @@ class Course extends Eloquent
261 261
       ->where('courses.id', $this->id)
262 262
       ->groupBy('criteria.id')
263 263
       ->get();
264
-    //Log::info($this->id);
264
+    ////Log::info($this->id);
265 265
     $reportObject->outcomesReport = DB::table('courses')
266 266
       ->join('activities', 'activities.course_id', '=', 'courses.id')
267 267
       ->join('rubric_activity', 'rubric_activity.activity_id', '=', 'activities.id')
@@ -311,8 +311,8 @@ class Course extends Eloquent
311 311
       $students_attempted = Criterion::students_attempted($criterion->id, $criterion->activity_id);
312 312
       $students_achieved = Criterion::students_achieved($criterion->id, $criterion->activity_id);
313 313
 
314
-      Log::info('estamos aqui');
315
-      Log::info($students_attempted);
314
+      //Log::info('estamos aqui');
315
+      //Log::info($students_attempted);
316 316
 
317 317
       if ($students_attempted) {
318 318
         $percentage_students_who_achieved = 100.0 * $students_achieved / $students_attempted;
@@ -332,10 +332,10 @@ class Course extends Eloquent
332 332
         }
333 333
       }
334 334
     }
335
-    Log::info(
335
+    //Log::info(
336 336
       "OUTCOMES_ACHIEVED: "
337 337
     );
338
-    Log::info(
338
+    //Log::info(
339 339
       $outcomes_achieved
340 340
     );
341 341
     return $outcomes_achieved;
@@ -370,7 +370,7 @@ class Course extends Eloquent
370 370
       ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
371 371
       ->where('activities.course_id', $this->id)
372 372
       ->count();
373
-    //             Log::info("aqui".$assessed);
373
+    //             //Log::info("aqui".$assessed);
374 374
 
375 375
     if ($assessed) return true;
376 376
     else return false;

+ 3
- 3
app/models/Objective.php ファイルの表示

@@ -36,7 +36,7 @@ class Objective extends Eloquent
36 36
             ->where('courses.program_id', $objective->program_id)
37 37
             ->select('courses.code', 'courses.number', 'typ_semester_courses.id as typ_semester_course_id', DB::raw("'{$objective->semester_id}' as semester_id"), "courses.program_id")
38 38
             ->get();
39
-        Log::info($course_codes);
39
+        //Log::info($course_codes);
40 40
 
41 41
         //$course_codes['studentPerOutcome'] = array();
42 42
 
@@ -47,7 +47,7 @@ class Objective extends Eloquent
47 47
                 ->select('transformative_actions.*')
48 48
                 ->get();
49 49
             $course_code->students = Course::getStudentReportForOutcome($course_code);
50
-            Log::info(array($course_code));
50
+            //Log::info(array($course_code));
51 51
             $course_code->criteria = Course::getCriteriaPlanReport($course_code);
52 52
         }
53 53
         return $course_codes;
@@ -71,4 +71,4 @@ class Objective extends Eloquent
71 71
     {
72 72
         return $this->hasMany('Objective_Outcome', 'objective_id');
73 73
     }
74
-}
74
+}

+ 5
- 5
app/models/Outcome.php ファイルの表示

@@ -36,8 +36,8 @@ class Outcome extends Eloquent
36 36
 			->where('outcome_id', $this->id)
37 37
 			->select('objectives.*', 'typ_semester_objectives.id as typ_semester_objective_id', 'program_id', 'semester_id')
38 38
 			->distinct();
39
-		Log::info($objectives->toSql());
40
-		Log::info('semester_program_outcome' . $semester_id . ',' . $program_id . ',' . $this->id);
39
+		//Log::info($objectives->toSql());
40
+		//Log::info('semester_program_outcome' . $semester_id . ',' . $program_id . ',' . $this->id);
41 41
 
42 42
 
43 43
 		return $objectives->get();
@@ -221,7 +221,7 @@ class Outcome extends Eloquent
221 221
 			->select('criteria.id', 'expected_percentage', 'activity_criterion.activity_id')
222 222
 			->distinct()
223 223
 			->get();
224
-			
224
+
225 225
 		$conteo = 0;
226 226
 		foreach ($criteria as $criterion) {
227 227
 			$students_attempted = Criterion::students_attempted($criterion->id, $criterion->activity_id);
@@ -268,7 +268,7 @@ class Outcome extends Eloquent
268 268
 			->select('criteria.id', 'expected_percentage', 'activity_criterion.activity_id')
269 269
 			->distinct()
270 270
 			->get();
271
-			
271
+
272 272
 		$conteo = 0;
273 273
 		foreach ($criteria as $criterion) {
274 274
 			$students_attempted = Criterion::students_attempted($criterion->id, $criterion->activity_id);
@@ -315,7 +315,7 @@ class Outcome extends Eloquent
315 315
 			->select('criteria.id', 'expected_percentage', 'activity_criterion.activity_id')
316 316
 			->distinct()
317 317
 			->get();
318
-			
318
+
319 319
 		$conteo = 0;
320 320
 		foreach ($criteria as $criterion) {
321 321
 			$students_attempted = Criterion::students_attempted($criterion->id, $criterion->activity_id);

+ 2
- 2
app/models/Program.php ファイルの表示

@@ -161,7 +161,7 @@ class Program extends Eloquent
161 161
 			->count(DB::raw('DISTINCT criterion_objective_outcome.outcome_id'));
162 162
 
163 163
 
164
-		Log::info(DB::table('activity_criterion')
164
+		//Log::info(DB::table('activity_criterion')
165 165
 			->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
166 166
 			->join('courses', 'activities.course_id', '=', 'courses.id')
167 167
 			->join('programs', 'programs.id', '=', 'courses.program_id')
@@ -385,7 +385,7 @@ class Program extends Eloquent
385 385
 			->orderBy('semester_id')
386 386
 			->get();
387 387
 
388
-		Log::info(Course::select(DB::raw('name, code, number, max(outcomes_attempted) as outcomes_attempted, semester_id, program_id'))
388
+		//Log::info(Course::select(DB::raw('name, code, number, max(outcomes_attempted) as outcomes_attempted, semester_id, program_id'))
389 389
 			->with('semester')
390 390
 			->with('program')
391 391
 			->where('program_id', $this->id)

+ 3
- 3
app/views/global/view-learning-outcomes-criteria.blade.php ファイルの表示

@@ -45,10 +45,10 @@
45 45
       <div class="list-group" id='list'>
46 46
         @foreach ($outcomes as $outcome)
47 47
           @foreach ($semesters as $semester)
48
-          <?php Log::info($outcome->deactivation_date <= $semester->start)
48
+          <?php //Log::info($outcome->deactivation_date <= $semester->start)
49 49
           
50
-        ; Log::info($outcome->deactivation_date);
51
-        Log::info($semester->start) ?>
50
+        ; //Log::info($outcome->deactivation_date);
51
+        //Log::info($semester->start) ?>
52 52
             @if(!$outcome->deleted_at && ( !$outcome->deactivation_date  ||$outcome->deactivation_date >= $semester->start))
53 53
             <!--if(!$outcome->deleted_at && $outcome->activation_date >= $semester->start && $outcome->activation_date <= $semester->end)-->
54 54
               <li data-outcome-id="{{ $outcome->id }}"class="list-group-item">{{ $outcome->name }} [{{$semester->code}}]</li>

+ 5
- 5
app/views/local/managers/admins/assessment_report.blade.php ファイルの表示

@@ -106,11 +106,11 @@
106 106
                                                 @foreach($section->activities as $activity_index => $activity)
107 107
                                                         <?php
108 108
 
109
-Log::info($activity->o_att_array);
110
-Log::info(array_key_exists($outcome->id, $activity->o_att_array));
111
-Log::info($activity->o_att_array[$outcome->id] >=1);
112
-Log::info(isset($section)); 
113
-Log::info($activity->rubric[0]);
109
+//Log::info($activity->o_att_array);
110
+//Log::info(array_key_exists($outcome->id, $activity->o_att_array));
111
+//Log::info($activity->o_att_array[$outcome->id] >=1);
112
+//Log::info(isset($section)); 
113
+//Log::info($activity->rubric[0]);
114 114
 
115 115
 ?>
116 116
                                                     <!-- If activity has a rubric and the rubric has the outcome being evaluated -->

+ 1
- 1
app/views/local/managers/admins/new_assessment_report.blade.php ファイルの表示

@@ -117,7 +117,7 @@
117 117
                                             <br>
118 118
                                             <h5 style="display: inline;">Performance Indicators: </h5>
119 119
                                             <?php
120
-                                            Log::info($activity->rubric[0]);
120
+                                            //Log::info($activity->rubric[0]);
121 121
                                             ?>
122 122
                                             <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
123 123
                                                     <?php

+ 1
- 1
app/views/local/managers/pCoords/new_assessment_report.blade.php ファイルの表示

@@ -101,7 +101,7 @@
101 101
                                     <br>
102 102
                                     <h5 style="display: inline;">Performance Indicators: </h5>
103 103
                                     <?php
104
-                                    Log::info($activity->rubric[0]);
104
+                                    //Log::info($activity->rubric[0]);
105 105
                                     ?>
106 106
                                     <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
107 107
                                             <?php

+ 2
- 2
app/views/local/managers/pCoords/overview.blade.php ファイルの表示

@@ -333,8 +333,8 @@
333 333
                     y:-1
334 334
                 }, 
335 335
                 <?php
336
-                Log::info('program_item');
337
-                Log::info($program_item);
336
+                //Log::info('program_item');
337
+                //Log::info($program_item);
338 338
 
339 339
                 ?>
340 340
                 data: [

+ 1
- 1
app/views/local/managers/sCoords/new_assessment_report.blade.php ファイルの表示

@@ -115,7 +115,7 @@
115 115
                                         <br>
116 116
                                         <h5 style="display: inline;">Performance Indicators: </h5>
117 117
                                         <?php
118
-                                        Log::info($activity->rubric[0]);
118
+                                        //Log::info($activity->rubric[0]);
119 119
                                         ?>
120 120
                                         <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
121 121
                                                 <?php

+ 3
- 3
app/views/local/managers/shared/limited-course.blade.php ファイルの表示

@@ -92,10 +92,10 @@
92 92
                         @foreach($course->activities as $activity)
93 93
                         <tr>
94 94
                             <?php
95
-                                Log::info($activity);
96
-                                Log::info($activity->rubric);
95
+                                //Log::info($activity);
96
+                                //Log::info($activity->rubric);
97 97
                                 $bool = empty($activity->rubric);
98
-                                Log::info($bool);
98
+                                //Log::info($bool);
99 99
                                 
100 100
                                 ?>
101 101
                             <td>{{{ $activity->name }}}</td>

+ 8
- 8
app/views/local/professors/assessment_report.blade.php ファイルの表示

@@ -76,11 +76,11 @@
76 76
 
77 77
                                     <!-- For each activity in the section -->
78 78
                                     @foreach($section->activities as $index4 => $activity)
79
-<?php Log::info($section); Log::info($section->activities) ;
80
-Log::info($activity->o_att_array);
81
-Log::info("this is the cap_array for ". $activity->name);
82
-Log::info($activity->cap_array);
83
-Log::info('aqui papi');?>
79
+<?php //Log::info($section); //Log::info($section->activities) ;
80
+//Log::info($activity->o_att_array);
81
+//Log::info("this is the cap_array for ". $activity->name);
82
+//Log::info($activity->cap_array);
83
+//Log::info('aqui papi');?>
84 84
 
85 85
                                         <!-- If activity is not draft, has a rubric and the rubric has the outcome being evaluated -->
86 86
                                         @if($activity->draft ==0 && $activity->diagnostic ==0&& array_key_exists($outcome->id, (array)$activity->o_att_array))
@@ -118,9 +118,9 @@ Log::info('aqui papi');?>
118 118
                                             <?php
119 119
                                                 $o_att_array = $activity->o_att_array;
120 120
                                                 $o_ach_array = $activity->o_ach_array;
121
-                                                Log::info($o_att_array);
122
-                                                Log::info($o_ach_array);
123
-                                                Log::info('los outcomes');
121
+                                                //Log::info($o_att_array);
122
+                                                //Log::info($o_ach_array);
123
+                                                //Log::info('los outcomes');
124 124
                                                 $percentage = ($o_ach_array[$outcome->id]/$o_att_array[$outcome->id])*100;
125 125
                                             ?>
126 126
                                             @if($percentage >= 100)

+ 2
- 2
app/views/local/professors/compare_activities.blade.php ファイルの表示

@@ -129,7 +129,7 @@
129 129
 
130 130
                 <h5 style="display: inline;">Performance Indicators: </h5>
131 131
                 <?php
132
-                Log::info($activity_1->rubric[0]);
132
+                //Log::info($activity_1->rubric[0]);
133 133
                 ?>
134 134
                 <p style="display: inline;"><i>{{ $activity_1->rubric[0]->num_scales }} (
135 135
                         <?php
@@ -369,7 +369,7 @@
369 369
 
370 370
                 <h5 style="display: inline;">Performance Indicators: </h5>
371 371
                 <?php
372
-                Log::info($activity_2->rubric[0]);
372
+                //Log::info($activity_2->rubric[0]);
373 373
                 ?>
374 374
                 <p style="display: inline;"><i>{{ $activity_2->rubric[0]->num_scales }} (
375 375
                         <?php

+ 2
- 2
app/views/local/professors/new_assessment_report.blade.php ファイルの表示

@@ -98,7 +98,7 @@
98 98
                             <h3 style="text-align: center"> Course: {{ $course->code }}
99 99
                                 {{ $course->number }}-{{ $section->section }}</h3>
100 100
                             <?php
101
-                            Log::info($section->publishedActivities);
101
+                            //Log::info($section->publishedActivities);
102 102
                             ?>
103 103
                             @foreach ($section->publishedActivities as $index4 => $activity)
104 104
 
@@ -110,7 +110,7 @@
110 110
                                 <br>
111 111
                                 <h5 style="display: inline;">Performance Indicators: </h5>
112 112
                                 <?php
113
-                                Log::info($activity->rubric[0]);
113
+                                //Log::info($activity->rubric[0]);
114 114
                                 ?>
115 115
                                 <p style="display: inline;"><i>{{ $activity->rubric[0]->num_scales }} (
116 116
                                         <?php

+ 7
- 7
app/views/local/professors/overview.blade.php ファイルの表示

@@ -176,15 +176,15 @@ function loadGraphs() {
176 176
                 data:[
177 177
                     @foreach($outcomes as $outcome)
178 178
                     <?php
179
-// Log::info($grouped_outcomes_attempted_results[$index]);
180
-// Log::info(array_key_exists($outcome->id, $grouped_outcomes_attempted_results[$index]));
179
+// //Log::info($grouped_outcomes_attempted_results[$index]);
180
+// //Log::info(array_key_exists($outcome->id, $grouped_outcomes_attempted_results[$index]));
181 181
 // 
182 182
 
183
-// Log::info($grouped_course);
184
-// Log::info($outcome->level);
185
-// Log::info($grouped_course->is_graduate);
186
-// Log::info($grouped_course->is_graduate==0);
187
-// Log::info($outcome->level==3 || ($grouped_course->program->is_graduate==0 && $outcome->level==1));
183
+// //Log::info($grouped_course);
184
+// //Log::info($outcome->level);
185
+// //Log::info($grouped_course->is_graduate);
186
+// //Log::info($grouped_course->is_graduate==0);
187
+// //Log::info($outcome->level==3 || ($grouped_course->program->is_graduate==0 && $outcome->level==1));
188 188
 //                          
189 189
                     ?>
190 190
 					@if($outcome->level==3 || ($grouped_course->program->is_graduate==0 && $outcome->level==1))