Browse Source

Los ultimos cambios del momento

parent
commit
6fb0cd7597
100 changed files with 241 additions and 97 deletions
  1. 4
    3
      app/controllers/ActivitiesController.php
  2. 26
    11
      app/controllers/AnnualPlansController.php
  3. 205
    71
      app/controllers/TransformativeActionsController.php
  4. 4
    6
      app/database/migrations/2021_06_06_001211_create_transformative_objective_table.php
  5. 2
    6
      app/database/migrations/2021_06_14_000848_create_ta_course_table.php
  6. 0
    0
      app/database/unusedMigrations/old_migrations/2014_10_05_052350_create_schools_table.php
  7. 0
    0
      app/database/unusedMigrations/old_migrations/2014_10_05_055013_create_programs_table.php
  8. 0
    0
      app/database/unusedMigrations/old_migrations/2014_10_06_050335_create_users_table.php
  9. 0
    0
      app/database/unusedMigrations/old_migrations/2014_10_12_100000_create_password_resets_table.php
  10. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_10_035949_create_rubrics_table.php
  11. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_29_210957_create_templates_table.php
  12. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_29_211309_create_courses_table.php
  13. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_29_211310_create_activities_table.php
  14. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_29_212240_create_outcomes_table.php
  15. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_29_212341_create_criteria_table.php
  16. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_29_214028_create_semesters_table.php
  17. 0
    0
      app/database/unusedMigrations/old_migrations/2014_11_30_134022_create_students_table.php
  18. 0
    0
      app/database/unusedMigrations/old_migrations/2014_12_07_214036_create_course_student_table.php
  19. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_09_171350_create_assessments_table.php
  20. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_12_204310_add_columns_to_activities_table.php
  21. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_12_222859_add_columns_to_assessments_table.php
  22. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_13_010052_add_index_to_assessments_table.php
  23. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_13_142849_add_column_to_criteria_table.php
  24. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_14_140724_add_columns_to_courses_table.php
  25. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_21_124809_add_column_to_courses_table.php
  26. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_22_195515_add_column_to_templates_table.php
  27. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_23_175455_remove_total_from_assessments_table.php
  28. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_23_175923_rename_average_in_assessments_table.php
  29. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_28_121848_add_index_to_course_student_table.php
  30. 0
    0
      app/database/unusedMigrations/old_migrations/2015_01_28_133036_add_criteria_achieved_count_to_activities_table.php
  31. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_05_133245_add_transforming_actions_to_activities_table.php
  32. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_05_143641_add_assessment_comments_to_activities_table.php
  33. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_06_145359_create_password_reminders_table.php
  34. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_19_143311_add_is_graduate_to_programs_table.php
  35. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_25_170516_add_deleted_at_to_outcomes_table.php
  36. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_25_170529_add_deleted_at_to_criteria_table.php
  37. 0
    0
      app/database/unusedMigrations/old_migrations/2015_02_27_201953_add_criteria_achieved_percentage_to_activities_table.php
  38. 0
    0
      app/database/unusedMigrations/old_migrations/2015_03_04_132321_add_copyright_and_notes_to_criteria_table.php
  39. 0
    0
      app/database/unusedMigrations/old_migrations/2015_04_13_183730_add_program_id_to_templates_table.php
  40. 0
    0
      app/database/unusedMigrations/old_migrations/2015_04_28_141931_add_is_visible_to_templates_table.php
  41. 0
    0
      app/database/unusedMigrations/old_migrations/2015_05_04_162918_remove_expected_outcome_from_outcomes_table.php
  42. 0
    0
      app/database/unusedMigrations/old_migrations/2015_05_05_083800_add_decimal_expected_outcome_to_outcomes_table.php
  43. 0
    0
      app/database/unusedMigrations/old_migrations/2015_05_18_095002_add_first_login_to_users_table.php
  44. 0
    0
      app/database/unusedMigrations/old_migrations/2015_05_18_131259_add_columns_to_semesters_table.php
  45. 0
    0
      app/database/unusedMigrations/old_migrations/2015_05_18_134926_add_semester_id_to_courses.php
  46. 0
    0
      app/database/unusedMigrations/old_migrations/2015_06_10_092319_add_name_to_semesters_table.php
  47. 0
    0
      app/database/unusedMigrations/old_migrations/2015_06_12_085247_add_visibility_to_semesters_table.php
  48. 0
    0
      app/database/unusedMigrations/old_migrations/2015_06_16_092223_add_has_access_to_users.php
  49. 0
    0
      app/database/unusedMigrations/old_migrations/2015_06_18_103255_add_expected_percentage_and_points_to_templates_table.php
  50. 0
    0
      app/database/unusedMigrations/old_migrations/2015_07_10_150430_add_email_to_students_table.php
  51. 0
    0
      app/database/unusedMigrations/old_migrations/2015_07_13_111726_add_code_to_programs_table.php
  52. 0
    0
      app/database/unusedMigrations/old_migrations/2015_07_13_132620_add_ssn_and_employee_number_to_users_table.php
  53. 0
    0
      app/database/unusedMigrations/old_migrations/2015_08_19_130733_add_semester_id_to_course_student_table.php
  54. 0
    0
      app/database/unusedMigrations/old_migrations/2015_12_10_145451_add_criteria_weights_to_activities_table.php
  55. 0
    0
      app/database/unusedMigrations/old_migrations/2016_01_12_132034_add_program_id_to_criteria_table.php
  56. 0
    0
      app/database/unusedMigrations/old_migrations/2016_01_27_093808_add_date_to_activities_table.php
  57. 0
    0
      app/database/unusedMigrations/old_migrations/2016_01_27_134306_add_draft_to_activities_table.php
  58. 0
    0
      app/database/unusedMigrations/old_migrations/2016_03_11_085258_add_school_and_concentration_codes_to_students_table.php
  59. 0
    0
      app/database/unusedMigrations/old_migrations/2016_05_09_145427_create_program_user_table.php
  60. 0
    0
      app/database/unusedMigrations/old_migrations/2016_05_10_091847_remove_program_id_from_users_table.php
  61. 0
    0
      app/database/unusedMigrations/old_migrations/2016_05_23_153434_create_objectives_table.php
  62. 0
    0
      app/database/unusedMigrations/old_migrations/2016_05_25_090412_add_active_to_objectives_table.php
  63. 0
    0
      app/database/unusedMigrations/old_migrations/2016_05_26_092328_create_criterion_objective_table.php
  64. 0
    0
      app/database/unusedMigrations/old_migrations/2016_07_15_084546_create_quinquenniums_table.php
  65. 0
    0
      app/database/unusedMigrations/old_migrations/2016_07_15_084751_create_five_year_plans_table.php
  66. 0
    0
      app/database/unusedMigrations/old_migrations/2016_07_15_090133_create_fyp_parts_table.php
  67. 0
    0
      app/database/unusedMigrations/old_migrations/2016_07_15_090203_create_fyp_part_outcomes_table.php
  68. 0
    0
      app/database/unusedMigrations/old_migrations/2016_08_03_120016_remove_methods_from_fyp_part_outcomes_table.php
  69. 0
    0
      app/database/unusedMigrations/old_migrations/2016_08_03_140525_add_unique_index_to_five_year_plans_table.php
  70. 0
    0
      app/database/unusedMigrations/old_migrations/2016_08_11_150848_remove_semester_id_from_annual_plans_table.php
  71. 0
    0
      app/database/unusedMigrations/old_migrations/2016_08_11_151247_add_year_start_and_year_end_to_annual_plans_table.php
  72. 0
    0
      app/database/unusedMigrations/old_migrations/2017_02_03_150052_add_comments_to_assessments_table.php
  73. 0
    0
      app/database/unusedMigrations/old_migrations/2018_02_12_144827_add_subcriteria_to_criteria_table.php
  74. 0
    0
      app/database/unusedMigrations/old_migrations/2018_07_26_132933_add_last_login_to_users_table.php
  75. 0
    0
      app/database/unusedMigrations/old_migrations/2018_07_26_134316_add_phone_numbers_and_extension_to_users_table.php
  76. 0
    0
      app/database/unusedMigrations/old_migrations/2018_08_09_110432_remove_password_from_users_table.php
  77. 0
    0
      app/database/unusedMigrations/old_migrations/2018_08_09_110813_remove_password_updated_and_remember_token_from_users_table.php
  78. 0
    0
      app/database/unusedMigrations/old_migrations/2018_08_10_083743_add_remember_token_to_users_table.php
  79. 0
    0
      app/database/unusedMigrations/old_migrations/2018_08_28_140328_remove_outcome_id_from_objectives_table.php
  80. 0
    0
      app/database/unusedMigrations/old_migrations/2018_08_28_141547_drop_criterion_objective_table.php
  81. 0
    0
      app/database/unusedMigrations/old_migrations/2018_08_28_142111_create_objective_outcome_table.php
  82. 0
    0
      app/database/unusedMigrations/old_migrations/2018_09_13_134104_entrust_setup_tables.php
  83. 0
    0
      app/database/unusedMigrations/old_migrations/2019_08_07_100303_add_participants_achievers_counts_to_activities_table.php
  84. 0
    0
      app/database/unusedMigrations/old_migrations/2020_03_06_122426_create_participating_programs_view.php
  85. 0
    0
      app/database/unusedMigrations/old_migrations/2020_04_04_002657_create_new_criteria_table.php
  86. 0
    0
      app/database/unusedMigrations/old_migrations/2020_04_04_005817_add_outcome_id_to_objectives_table.php
  87. 0
    0
      app/database/unusedMigrations/old_migrations/2020_04_22_090200_alter_activities_table.php
  88. 0
    0
      app/database/unusedMigrations/old_migrations/2020_04_22_095649_create_new_criterion_rubric_table.php
  89. 0
    0
      app/database/unusedMigrations/old_migrations/2020_04_22_101110_create_new_rubric_activity_table.php
  90. 0
    0
      app/database/unusedMigrations/old_migrations/2020_05_15_123430_create_new_outcomes_table.php
  91. 0
    0
      app/database/unusedMigrations/old_migrations/2020_05_15_123902_add_mapping_columns_to_outcomes_table.php
  92. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_04_142756_create_new_assessments_table.php
  93. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_05_124915_create_activity_criterion_table.php
  94. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_05_130252_add_max_score_num_scales_new_criteria_table.php
  95. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_05_142424_create_scales_table.php
  96. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_05_142912_create_criterion_scale_table.php
  97. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_05_232429_add_assessment_comments_to_activity_criterion.php
  98. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_09_131800_add_level_activation_date_to_outcomes.php
  99. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_16_190923_create_criterion_objective_outcome_table.php
  100. 0
    0
      app/database/unusedMigrations/old_migrations/2020_10_18_145108_create_outcome_performance_table.php

+ 4
- 3
app/controllers/ActivitiesController.php View File

522
                 DB::table('assessments')->where('activity_id', $activity->id)->delete();
522
                 DB::table('assessments')->where('activity_id', $activity->id)->delete();
523
 
523
 
524
                 // Recalculate course outcomes
524
                 // Recalculate course outcomes
525
-                $activities = DB::table('activities')
525
+                /*$activities = DB::table('activities')
526
                     ->where('course_id', $course->id)
526
                     ->where('course_id', $course->id)
527
                     ->where('draft', 0)
527
                     ->where('draft', 0)
528
                     ->get();
528
                     ->get();
588
                             'updated_at' => date('Y-m-d H:i:s')
588
                             'updated_at' => date('Y-m-d H:i:s')
589
                         ));
589
                         ));
590
                 }
590
                 }
591
+            });*/
591
             });
592
             });
592
 
593
 
593
             if (is_null($exception)) {
594
             if (is_null($exception)) {
721
                 $activity->name = Input::get('name');
722
                 $activity->name = Input::get('name');
722
                 $activity->description = Input::get('description');
723
                 $activity->description = Input::get('description');
723
                 $activity->date = Input::get('date');
724
                 $activity->date = Input::get('date');
724
-            } elseif (Input::has('update_transforming_actions')) {
725
+            } /*elseif (Input::has('update_transforming_actions')) {
725
                 if (trim(Input::get('transforming_actions')) != "")
726
                 if (trim(Input::get('transforming_actions')) != "")
726
                     $activity->transforming_actions = Input::get('transforming_actions');
727
                     $activity->transforming_actions = Input::get('transforming_actions');
727
                 else
728
                 else
728
                     $activity->transforming_actions = NULL;
729
                     $activity->transforming_actions = NULL;
729
-            } elseif (Input::has('update_assessment_comments')) {
730
+            }*/ elseif (Input::has('update_assessment_comments')) {
730
                 if (trim(Input::get('assessment_comments')) != "")
731
                 if (trim(Input::get('assessment_comments')) != "")
731
                     $activity->assessment_comments = Input::get('assessment_comments');
732
                     $activity->assessment_comments = Input::get('assessment_comments');
732
                 else
733
                 else

+ 26
- 11
app/controllers/AnnualPlansController.php View File

220
 
220
 
221
       Log::info($typ_info['typ_objective_id'][$objective->id]->id);
221
       Log::info($typ_info['typ_objective_id'][$objective->id]->id);
222
       Log::info($annual_plan->id);
222
       Log::info($annual_plan->id);
223
-      $typ_info['annual_plans_transformative'][$objective->id] = DB::select("select trans_id from annual_plan_transformative where annual_plan_id={$annual_plan->id} and typ_semester_objective_id ={$typ_info['typ_objective_id'][$objective->id]->id}");
223
+      //  $typ_info['annual_plans_transformative'][$objective->id] = DB::select(
224
+      //    "select trans_id from annual_plan_transformative
225
+      //     where annual_plan_id={$annual_plan->id} 
226
+      //     and typ_semester_objective_id ={$typ_info['typ_objective_id'][$objective->id]->id}"
227
+      //  );
224
       foreach ($typ_info['courses'][$objective->id] as $course) {
228
       foreach ($typ_info['courses'][$objective->id] as $course) {
225
-        $typ_info['selected_criteria'][$objective->id][$course->id] = DB::select("select criteria_id, typ_semester_course_id typ_course_id from annual_plan_objective where annual_plan_id ={$annual_plan->id} and typ_semester_course_id ={$course->typ_course_id} ");
229
+        $typ_info['selected_criteria'][$objective->id][$course->typ_course_id] = DB::select("select criteria_id, typ_semester_course_id typ_course_id from annual_plan_objective where annual_plan_id ={$annual_plan->id} and typ_semester_course_id ={$course->typ_course_id} ");
230
+        $typ_info['annual_plans_transformative'][$objective->id][$course->typ_course_id] = DB::table('annual_plan_transformative')
231
+          ->select('trans_id')
232
+          ->where('annual_plan_id', $annual_plan->id)
233
+          ->where('typ_semester_course_id', $course->typ_course_id)
234
+          ->get();
235
+        $typ_info['custom_transformative'][$objective->id][$course->id] = DB::table('transformative_actions')
236
+          ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
237
+          ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
238
+          ->where('is_custom', 1)
239
+          ->where('by_professor', 0)
240
+          ->where('ta_course.course_number', $course->number)
241
+          ->where('ta_course.course_code', $course->code)
242
+          ->where('transformative_objective.objective_id', $objective->id)
243
+          ->get();
226
       }
244
       }
227
-
228
-
229
-      $typ_info['custom_transformative'][$objective->id] = DB::select("select * from transformative_actions where is_custom =1 and by_professor=0 and id in (select ta_id from transformative_objective_course where objective_id = {$objective->id})");
230
     }
245
     }
231
     $typ_info['annual_plan'] = $annual_plan;
246
     $typ_info['annual_plan'] = $annual_plan;
232
     Log::info($typ_info);
247
     Log::info($typ_info);
239
     $typ_id = Input::get('typ_id') + 0;
254
     $typ_id = Input::get('typ_id') + 0;
240
     $trans_id = Input::get('TA_id') + 0;
255
     $trans_id = Input::get('TA_id') + 0;
241
 
256
 
242
-    DB::delete("delete from `annual_plan_transformative` where annual_plan_id ={$annual_id} and typ_semester_objective_id ={$typ_id} and trans_id={$trans_id}");
257
+    DB::delete("delete from `annual_plan_transformative` where annual_plan_id ={$annual_id} and typ_semester_course_id ={$typ_id} and trans_id={$trans_id}");
243
     return;
258
     return;
244
   }
259
   }
245
 
260
 
247
   {
262
   {
248
     $annual_id = Input::get('annual_id') + 0;
263
     $annual_id = Input::get('annual_id') + 0;
249
     $TA_id = Input::get('TA_id') + 0;
264
     $TA_id = Input::get('TA_id') + 0;
250
-    $typ_id = Input::get('typ_id') + 0;
265
+    $typ_id = Input::get('typ_course_id') + 0;
251
     $old_ta = Input::get('old_ta') + 0;
266
     $old_ta = Input::get('old_ta') + 0;
252
     $id = Auth::user()['id'];
267
     $id = Auth::user()['id'];
253
     $date = date('Y-m-d');
268
     $date = date('Y-m-d');
254
     $date = strtotime($date);
269
     $date = strtotime($date);
255
 
270
 
256
 
271
 
257
-    $query = DB::select("select * from annual_plan_transformative where annual_plan_id ={$annual_id} and trans_id ={$old_ta} and typ_semester_objective_id ={$typ_id}");
272
+    $query = DB::select("select * from annual_plan_transformative where annual_plan_id ={$annual_id} and trans_id ={$old_ta} and typ_semester_course_id ={$typ_id}");
258
 
273
 
259
     if (!count($query)) {
274
     if (!count($query)) {
260
-      DB::insert("insert into `annual_plan_transformative` (`annual_plan_id`,`trans_id`, `typ_semester_objective_id`, `proposing_coordinator_id`, `proposed_date`) values({$annual_id},{$TA_id},{$typ_id}, {$id}, now() ) ");
275
+      DB::insert("insert into `annual_plan_transformative` (`annual_plan_id`,`trans_id`, `typ_semester_course_id`, `proposing_coordinator_id`, `proposed_date`) values({$annual_id},{$TA_id},{$typ_id}, {$id}, now() ) ");
261
       return "Insert Successful";
276
       return "Insert Successful";
262
     } else {
277
     } else {
263
       if ($TA_id == 0) {
278
       if ($TA_id == 0) {
264
-        DB::delete("delete from annual_plan_transformative where trans_id={$TA_id} and annual_plan_id ={$annual_id} and typ_semester_objective_id ={$typ_id}");
279
+        DB::delete("delete from annual_plan_transformative where trans_id={$TA_id} and annual_plan_id ={$annual_id} and typ_semester_course_id ={$typ_id}");
265
         return "deleted";
280
         return "deleted";
266
       } else {
281
       } else {
267
-        DB::update("update annual_plan_transformative set trans_id = {$TA_id}, proposing_coordinator_id = {$id}, proposed_date = now() where trans_id={$old_ta} and annual_plan_id ={$annual_id} and typ_semester_objective_id ={$typ_id}");
282
+        DB::update("update annual_plan_transformative set trans_id = {$TA_id}, proposing_coordinator_id = {$id}, proposed_date = now() where trans_id={$old_ta} and annual_plan_id ={$annual_id} and typ_semester_course_id ={$typ_id}");
268
         return "updated";
283
         return "updated";
269
       }
284
       }
270
     }
285
     }

+ 205
- 71
app/controllers/TransformativeActionsController.php View File

27
       ->orWhereNull('deactivation_date')
27
       ->orWhereNull('deactivation_date')
28
       ->get();
28
       ->get();
29
     $objectives = array();
29
     $objectives = array();
30
-
30
+    $types = DB::table('transformative_actions')
31
+      ->select('type_of_TA')
32
+      ->where('type_of_TA', '<>', '')
33
+      ->distinct()
34
+      ->get();
31
     // if user is program coordinator
35
     // if user is program coordinator
32
     if ($role == 3) {
36
     if ($role == 3) {
33
       //1 edit panel: load the TA that
37
       //1 edit panel: load the TA that
64
       // get the courses from asociated with a TA
68
       // get the courses from asociated with a TA
65
       $course_filter_approvePanel = DB::table('ta_course')
69
       $course_filter_approvePanel = DB::table('ta_course')
66
         ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
70
         ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
67
-        ->join('courses', 'courses.id', '=', 'ta_course.course_id')
71
+        ->join('courses', function ($join) {
72
+          $join->on('courses.number', '=', 'ta_course.course_number');
73
+          $join->on('courses.code', '=', 'ta_course.course_code');
74
+        })
68
         ->where('transformative_actions.is_custom', 1)
75
         ->where('transformative_actions.is_custom', 1)
69
         ->where('transformative_actions.program_id', $program_id)
76
         ->where('transformative_actions.program_id', $program_id)
70
         ->where('transformative_actions.by_professor', 1)
77
         ->where('transformative_actions.by_professor', 1)
71
         ->select('courses.*')
78
         ->select('courses.*')
72
-        ->groupBy('courses.name', 'courses.code')
79
+        ->groupBy('courses.number', 'courses.code')
73
         ->orderBy('courses.name', 'ASC')
80
         ->orderBy('courses.name', 'ASC')
74
         ->orderBy('courses.code', 'ASC')
81
         ->orderBy('courses.code', 'ASC')
75
         ->get();
82
         ->get();
76
       // get the outcome asociated with a TA
83
       // get the outcome asociated with a TA
77
       $outcome_filter_approvePanel = DB::table('transformative_actions')
84
       $outcome_filter_approvePanel = DB::table('transformative_actions')
78
-        ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
79
-        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
80
-        ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
85
+        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
86
+        ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
87
+        ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
81
         ->where('transformative_actions.is_custom', 1)
88
         ->where('transformative_actions.is_custom', 1)
82
         ->where('transformative_actions.program_id', $program_id)
89
         ->where('transformative_actions.program_id', $program_id)
83
         ->where('transformative_actions.by_professor', 1)
90
         ->where('transformative_actions.by_professor', 1)
100
         ->get();
107
         ->get();
101
       $course_filter_editPanel =  DB::table('ta_course')
108
       $course_filter_editPanel =  DB::table('ta_course')
102
         ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
109
         ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
103
-        ->join('courses', 'courses.id', '=', 'ta_course.course_id')
110
+        ->join('courses', function ($join) {
111
+          $join->on('courses.number', '=', 'ta_course.course_number');
112
+          $join->on('courses.code', '=', 'ta_course.course_code');
113
+        })
104
         ->where('transformative_actions.is_custom', 1)
114
         ->where('transformative_actions.is_custom', 1)
105
         ->where('transformative_actions.program_id', $program_id)
115
         ->where('transformative_actions.program_id', $program_id)
106
         ->where('transformative_actions.by_professor', 0)
116
         ->where('transformative_actions.by_professor', 0)
107
         ->select('courses.*')
117
         ->select('courses.*')
108
-        ->groupBy('courses.name', 'courses.code')
118
+        ->groupBy('courses.number', 'courses.code')
109
         ->orderBy('courses.name', 'ASC')
119
         ->orderBy('courses.name', 'ASC')
110
         ->orderBy('courses.code', 'ASC')
120
         ->orderBy('courses.code', 'ASC')
111
         ->get();
121
         ->get();
112
       $outcome_filter_editPanel = DB::table('transformative_actions')
122
       $outcome_filter_editPanel = DB::table('transformative_actions')
113
-        ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
114
-        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
123
+        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
124
+        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
115
         ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
125
         ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
116
         ->where('transformative_actions.is_custom', 1)
126
         ->where('transformative_actions.is_custom', 1)
117
         ->where('transformative_actions.program_id', $program_id)
127
         ->where('transformative_actions.program_id', $program_id)
124
       $courses_create = DB::table('courses')
134
       $courses_create = DB::table('courses')
125
         ->where('courses.program_id', $program_id)
135
         ->where('courses.program_id', $program_id)
126
         ->select('courses.*')
136
         ->select('courses.*')
127
-        ->groupBy('courses.name', 'courses.code')
137
+        ->groupBy('courses.number', 'courses.code')
128
         ->orderBy('courses.name', 'ASC')
138
         ->orderBy('courses.name', 'ASC')
129
         ->orderBy('courses.code', 'ASC')
139
         ->orderBy('courses.code', 'ASC')
130
         ->get();
140
         ->get();
131
-    }
141
+    }/*
132
     // if user is profesor
142
     // if user is profesor
133
     elseif ($role == 4) {
143
     elseif ($role == 4) {
134
       // 1 the user can only edit TA that need approval and has been submited by the same user
144
       // 1 the user can only edit TA that need approval and has been submited by the same user
157
         ->orderBy('courses.code', 'ASC')
167
         ->orderBy('courses.code', 'ASC')
158
         ->get();
168
         ->get();
159
       $outcome_filter_editPanel = DB::table('transformative_actions')
169
       $outcome_filter_editPanel = DB::table('transformative_actions')
160
-        ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
161
-        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
170
+        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
171
+        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
162
         ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
172
         ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
163
         ->where('transformative_actions.is_custom', 1)
173
         ->where('transformative_actions.is_custom', 1)
164
         ->where('transformative_actions.user_id', Auth::user()->id)
174
         ->where('transformative_actions.user_id', Auth::user()->id)
183
         ->orderBy('courses.code', 'ASC')
193
         ->orderBy('courses.code', 'ASC')
184
         ->get();
194
         ->get();
185
     }
195
     }
186
-
196
+*/
187
     return View::make('local.managers.admins.transformativeAction', compact(
197
     return View::make('local.managers.admins.transformativeAction', compact(
188
       'title',
198
       'title',
189
       'role',
199
       'role',
200
+      'types',
190
       'outcomes',
201
       'outcomes',
191
       'schools',
202
       'schools',
192
       'criteria',
203
       'criteria',
246
     $clean_input['objectiveid'] = Input::get('objectiveid');
257
     $clean_input['objectiveid'] = Input::get('objectiveid');
247
     $clean_input['courseid'] = Input::get('courseid');
258
     $clean_input['courseid'] = Input::get('courseid');
248
     $clean_input['approval'] = Input::get('approval');
259
     $clean_input['approval'] = Input::get('approval');
260
+    $clean_input['type'] = Input::get('type_of_ta');
249
     $clean_input['ta_id'] = Input::get('ta_id');
261
     $clean_input['ta_id'] = Input::get('ta_id');
262
+    $clean_input['new_type'] = Input::get('new_type');
250
 
263
 
251
     return $clean_input;
264
     return $clean_input;
252
   }
265
   }
263
         'courseid' => $clean_input['courseid'],
276
         'courseid' => $clean_input['courseid'],
264
         'approval' => $clean_input['approval'],
277
         'approval' => $clean_input['approval'],
265
         'ta_id' => $clean_input['ta_id'],
278
         'ta_id' => $clean_input['ta_id'],
279
+        'type_of_ta' => $clean_input['type'],
266
       ),
280
       ),
267
       array(
281
       array(
268
         'text' => 'required|string',
282
         'text' => 'required|string',
269
         'description' => 'required|string',
283
         'description' => 'required|string',
270
         'objectiveid' => 'required|array',
284
         'objectiveid' => 'required|array',
271
-        'courseid' => 'required|array',
285
+        'courseid' => 'required|string',
272
         'approval' => 'integer',
286
         'approval' => 'integer',
273
         'ta_id' => 'integer',
287
         'ta_id' => 'integer',
288
+        'type_of_ta' => 'required|string'
274
       )
289
       )
275
     );
290
     );
276
   }
291
   }
302
       return Redirect::to('transformativeAction')->withInput();
317
       return Redirect::to('transformativeAction')->withInput();
303
     } else {
318
     } else {
304
 
319
 
305
-      $user_id = auth::user()->id;
320
+      $user_id = Auth::user()->id;
306
       $program_id = DB::table('program_user')
321
       $program_id = DB::table('program_user')
307
         ->where('user_id', $user_id)
322
         ->where('user_id', $user_id)
308
         ->select('program_id')
323
         ->select('program_id')
313
       if ($role == 3) {
328
       if ($role == 3) {
314
         $by_professor = 0;
329
         $by_professor = 0;
315
       }
330
       }
316
-
331
+      Log::info($clean_input['courseid']);
317
       // $by_professor = $clean_input['approval'];
332
       // $by_professor = $clean_input['approval'];
318
 
333
 
334
+      $parentesis = array('(', ')');
335
+      $course_code_number = str_replace($parentesis, '', $clean_input['courseid']);
336
+
337
+      $course_code_number = explode(',', $course_code_number);
338
+
319
       $current_timestamp = date('Y/m/d H:i:s', time());
339
       $current_timestamp = date('Y/m/d H:i:s', time());
340
+      if ($clean_input['new_type']) $type = $clean_input['new_type'];
341
+      else $type = $clean_input['type'];
320
       // insert the TA
342
       // insert the TA
321
       $ta_id = DB::table('transformative_actions')->insertGetId(
343
       $ta_id = DB::table('transformative_actions')->insertGetId(
322
         array(
344
         array(
327
           'program_id' => $program_id,
349
           'program_id' => $program_id,
328
           'created_at' => $current_timestamp,
350
           'created_at' => $current_timestamp,
329
           'by_professor' => $by_professor,
351
           'by_professor' => $by_professor,
352
+          'type_of_TA' => $type
330
         )
353
         )
331
       );
354
       );
332
 
355
 
333
       //
356
       //
334
       // // insert the multiple TA_objective_program
357
       // // insert the multiple TA_objective_program
335
       foreach ($clean_input['objectiveid'] as $objective_id) {
358
       foreach ($clean_input['objectiveid'] as $objective_id) {
336
-        DB::table('transformative_objective_course')->insert(
359
+        DB::table('transformative_objective')->insert(
337
           array(
360
           array(
338
             'ta_id' => $ta_id,
361
             'ta_id' => $ta_id,
339
             'objective_id' => $objective_id,
362
             'objective_id' => $objective_id,
340
-            'program_id' => $program_id,
341
-            'created_at' => $current_timestamp,
363
+
364
+
342
           )
365
           )
343
         );
366
         );
344
       }
367
       }
345
 
368
 
346
       //
369
       //
347
       // // insert the multiple TA_course
370
       // // insert the multiple TA_course
348
-      foreach ($clean_input['courseid'] as $course_id) {
349
-        DB::table('TA_course')->insert(
350
-          array(
351
-            'ta_id' => $ta_id,
352
-            'course_id' => $course_id,
353
-          )
354
-        );
355
-      }
371
+      DB::table('TA_course')->insert(
372
+        array(
373
+          'ta_id' => $ta_id,
374
+          'course_number' => $course_code_number[1],
375
+          'course_code' => $course_code_number[0],
376
+
377
+        )
378
+      );
379
+
356
 
380
 
357
       Session::flash('status', 'success');
381
       Session::flash('status', 'success');
358
       Session::flash('message', 'Transformative Action created: "' . $clean_input['text'] . '".');
382
       Session::flash('message', 'Transformative Action created: "' . $clean_input['text'] . '".');
387
 
411
 
388
     $current_timestamp = date('Y/m/d H:i:s', time());
412
     $current_timestamp = date('Y/m/d H:i:s', time());
389
 
413
 
414
+    if (Input::get('new_type')) {
415
+      $type = Input::get('new_type');
416
+    } else {
417
+      $type = Input::get('type_of_ta');
418
+    }
419
+
390
     // edit the TA
420
     // edit the TA
391
     DB::table('transformative_actions')
421
     DB::table('transformative_actions')
392
       ->where('id', $ta_id)
422
       ->where('id', $ta_id)
393
       ->update([
423
       ->update([
394
         'by_professor' => 0,
424
         'by_professor' => 0,
395
         'updated_at' => $current_timestamp,
425
         'updated_at' => $current_timestamp,
426
+        'type_of_TA' => $type
396
       ]);
427
       ]);
397
 
428
 
398
     Session::flash('status', 'success');
429
     Session::flash('status', 'success');
442
 
473
 
443
       // $by_professor = $clean_input['approval'];
474
       // $by_professor = $clean_input['approval'];
444
 
475
 
476
+      if ($clean_input['new_type']) $type = $clean_input['new_type'];
477
+      else $type = $clean_input['type'];
478
+
445
       $current_timestamp = date('Y/m/d H:i:s', time());
479
       $current_timestamp = date('Y/m/d H:i:s', time());
446
       // edit the TA
480
       // edit the TA
447
       DB::table('transformative_actions')
481
       DB::table('transformative_actions')
451
           'at_text' => $clean_input['text'],
485
           'at_text' => $clean_input['text'],
452
           'description' => $clean_input['description'],
486
           'description' => $clean_input['description'],
453
           'updated_at' => $current_timestamp,
487
           'updated_at' => $current_timestamp,
488
+          'type_of_TA' => $type
489
+
454
         ]);
490
         ]);
455
 
491
 
456
 
492
 
457
       $ta_id = $clean_input['ta_id'];
493
       $ta_id = $clean_input['ta_id'];
458
       $new_objective_id = $clean_input['objectiveid'];
494
       $new_objective_id = $clean_input['objectiveid'];
459
-      $old_objective_id = DB::table('transformative_objective_course')
495
+      $old_objective_id = DB::table('transformative_objective')
460
         ->where('ta_id', $ta_id)
496
         ->where('ta_id', $ta_id)
461
         ->select('objective_id')
497
         ->select('objective_id')
462
         ->lists('objective_id');
498
         ->lists('objective_id');
467
           //do nothing if a new id is already in atble
503
           //do nothing if a new id is already in atble
468
         } else {
504
         } else {
469
           //if old id not in new id, delete
505
           //if old id not in new id, delete
470
-          DB::table('transformative_objective_course')
506
+          DB::table('transformative_objective')
471
             ->where('ta_id', $ta_id)
507
             ->where('ta_id', $ta_id)
472
             ->where('objective_id', $old_id)
508
             ->where('objective_id', $old_id)
473
             ->delete();
509
             ->delete();
476
 
512
 
477
       //
513
       //
478
       foreach ($new_objective_id as $new_id) {
514
       foreach ($new_objective_id as $new_id) {
479
-        $result = DB::table('transformative_objective_course')
515
+        $result = DB::table('transformative_objective')
480
           ->where('objective_id', $new_id)
516
           ->where('objective_id', $new_id)
481
           ->select('objective_id')
517
           ->select('objective_id')
482
           ->lists('objective_id');
518
           ->lists('objective_id');
483
 
519
 
484
         if (count($result) == 0) {
520
         if (count($result) == 0) {
485
           //if the new_id does not exists, do nothing
521
           //if the new_id does not exists, do nothing
486
-          DB::table('transformative_objective_course')->insert(
522
+          DB::table('transformative_objective')->insert(
487
             array(
523
             array(
488
               'ta_id' => $ta_id,
524
               'ta_id' => $ta_id,
489
               'objective_id' => $new_id,
525
               'objective_id' => $new_id,
490
-              'program_id' => $program_id,
491
               'created_at' => $current_timestamp,
526
               'created_at' => $current_timestamp,
492
             )
527
             )
493
           );
528
           );
496
         }
531
         }
497
       }
532
       }
498
 
533
 
534
+      $parentesis = array('(', ')');
535
+      $course_code_number = str_replace($parentesis, '', $clean_input['courseid']);
536
+
537
+      $course_code_number = explode(',', $course_code_number);
538
+
539
+      DB::update(
540
+        "UPDATE `ta_course` set `course_number` = '{$course_code_number[1]}', `course_code` = '{$course_code_number[0]}' where ta_id = {$ta_id}"
541
+      );
542
+
543
+      /*$new_course_id = $clean_input['courseid'];
499
 
544
 
500
-      $new_course_id = $clean_input['courseid'];
501
       $old_course_id = DB::table('ta_course')
545
       $old_course_id = DB::table('ta_course')
502
         ->where('ta_id', $ta_id)
546
         ->where('ta_id', $ta_id)
503
         ->select('course_id')
547
         ->select('course_id')
534
         } else {
578
         } else {
535
           //if the new_id already exists, do nothing
579
           //if the new_id already exists, do nothing
536
         }
580
         }
537
-      }
581
+      } */
538
 
582
 
539
       Session::flash('status', 'success');
583
       Session::flash('status', 'success');
540
       Session::flash('message', 'Updated Transformative Action: "' . $clean_input['text'] . '".');
584
       Session::flash('message', 'Updated Transformative Action: "' . $clean_input['text'] . '".');
617
     $program_id = $program_id[0]->program_id;
661
     $program_id = $program_id[0]->program_id;
618
 
662
 
619
     $objectives = DB::table('transformative_actions')
663
     $objectives = DB::table('transformative_actions')
620
-      ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
621
-      ->join('objectives', 'objectives.id', '=', 'transformative_objective_course.objective_id')
664
+      ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
665
+      ->join('objectives', 'objectives.id', '=', 'transformative_objective.objective_id')
622
       ->where('transformative_actions.id', $ta_id)
666
       ->where('transformative_actions.id', $ta_id)
623
       ->select('objectives.text as text', 'objectives.id as id')
667
       ->select('objectives.text as text', 'objectives.id as id')
624
       ->orderBy('objectives.text', 'ASC')
668
       ->orderBy('objectives.text', 'ASC')
625
       ->get();
669
       ->get();
670
+    Log::info($ta_id);
626
 
671
 
627
     $an_objective = $objectives[0]->id;
672
     $an_objective = $objectives[0]->id;
628
     $outcome_id = DB::table('criterion_objective_outcome')
673
     $outcome_id = DB::table('criterion_objective_outcome')
641
       ->select('objectives.text as text', 'objectives.id as id')
686
       ->select('objectives.text as text', 'objectives.id as id')
642
       ->get();
687
       ->get();
643
     $selected_courses = DB::table('ta_course')
688
     $selected_courses = DB::table('ta_course')
644
-      ->join('courses', 'courses.id', '=', 'ta_course.course_id')
689
+      ->join('courses', function ($join) {
690
+        $join->on('courses.number', '=', 'ta_course.course_number');
691
+        $join->on('courses.code', '=', 'ta_course.course_code');
692
+      })
645
       ->where('ta_id', $ta_id)
693
       ->where('ta_id', $ta_id)
646
       ->orderBy('courses.name', 'ASC')
694
       ->orderBy('courses.name', 'ASC')
647
       ->orderBy('courses.code', 'ASC')
695
       ->orderBy('courses.code', 'ASC')
694
 
742
 
695
     $objectives = DB::table('objectives')
743
     $objectives = DB::table('objectives')
696
       ->join('objective_program', 'objective_program.objective_id', '=', 'objectives.id')
744
       ->join('objective_program', 'objective_program.objective_id', '=', 'objectives.id')
697
-      ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'objectives.id')
698
-      ->where('criterion_objective_outcome.outcome_id', $outcome_id)
745
+      ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
746
+      ->where('objective_outcome.outcome_id', $outcome_id)
699
       ->where('objective_program.program_id', $program_id)
747
       ->where('objective_program.program_id', $program_id)
700
       ->orderBy('objectives.text', 'ASC')
748
       ->orderBy('objectives.text', 'ASC')
701
       ->select('objectives.text as text', 'objectives.id as id')
749
       ->select('objectives.text as text', 'objectives.id as id')
743
       if ($course_id == 0) {
791
       if ($course_id == 0) {
744
         $courses =  DB::table('ta_course')
792
         $courses =  DB::table('ta_course')
745
           ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
793
           ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
746
-          ->join('courses', 'courses.id', '=', 'ta_course.course_id')
794
+          ->join('courses', function ($join) {
795
+            $join->on('courses.number', '=', 'ta_course.course_number');
796
+            $join->on('courses.code', '=', 'ta_course.course_code');
797
+          })
747
           ->where('transformative_actions.is_custom', 1)
798
           ->where('transformative_actions.is_custom', 1)
748
           ->where('transformative_actions.program_id', $program_id)
799
           ->where('transformative_actions.program_id', $program_id)
749
           ->where('transformative_actions.by_professor', 1)
800
           ->where('transformative_actions.by_professor', 1)
750
-          ->select('courses.id')
801
+          ->select('ta_course.course_number', 'ta_course.course_code')
802
+          ->distinct()
751
           ->get();
803
           ->get();
752
 
804
 
753
         $course_id = array();
805
         $course_id = array();
754
         foreach ($courses as $key => $course) {
806
         foreach ($courses as $key => $course) {
755
-          array_push($course_id, $course->id);
807
+          array_push($course_id["number"], $course->course_number);
808
+          array_push($course_id["code"], $course->code);
756
         }
809
         }
757
       } else {
810
       } else {
758
-        $course_id = array($course_id);
811
+
812
+        $parentesis = array('(', ')');
813
+        $course_code_number = str_replace($parentesis, '', $course_id);
814
+
815
+        $course_code_number = explode(',', $course_code_number);
816
+
817
+        $course_id = array();
818
+        $course_id['number'] = $course_code_number[1];
819
+        $course_id['code'] = $course_code_number[0];
759
       }
820
       }
760
       // if outcome isnt a desired filter, search all outcomes
821
       // if outcome isnt a desired filter, search all outcomes
761
       if ($outcome_id == 0) {
822
       if ($outcome_id == 0) {
762
         $outcomes = DB::table('transformative_actions')
823
         $outcomes = DB::table('transformative_actions')
763
-          ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
764
-          ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
824
+          ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
825
+          ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
765
           ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
826
           ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
766
           ->where('transformative_actions.is_custom', 1)
827
           ->where('transformative_actions.is_custom', 1)
767
           ->where('transformative_actions.program_id', $program_id)
828
           ->where('transformative_actions.program_id', $program_id)
778
       }
839
       }
779
 
840
 
780
       // search TA with filters
841
       // search TA with filters
842
+
781
       $filtered_at = DB::table('transformative_actions')
843
       $filtered_at = DB::table('transformative_actions')
782
         ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
844
         ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
783
-        ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
784
-        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
845
+        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
846
+        ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
785
         ->where('transformative_actions.is_custom', 1)
847
         ->where('transformative_actions.is_custom', 1)
786
         ->where('transformative_actions.program_id', $program_id)
848
         ->where('transformative_actions.program_id', $program_id)
787
         ->where('transformative_actions.by_professor', 1)
849
         ->where('transformative_actions.by_professor', 1)
788
         ->whereIn('transformative_actions.user_id', $professor_id)
850
         ->whereIn('transformative_actions.user_id', $professor_id)
789
-        ->whereIn('criterion_objective_outcome.outcome_id', $outcome_id)
790
-        ->whereIn('ta_course.course_id', $course_id)
851
+        ->whereIn('objective_outcome.outcome_id', $outcome_id)
852
+        ->whereIn('ta_course.course_code', $course_id['code'])
853
+        ->whereIn('ta_course.course_number', $course_id['number'])
791
         ->select('transformative_actions.*')
854
         ->select('transformative_actions.*')
792
         ->groupBy('transformative_actions.id')
855
         ->groupBy('transformative_actions.id')
793
         ->orderBy('transformative_actions.at_text', 'ASC')
856
         ->orderBy('transformative_actions.at_text', 'ASC')
816
       if ($course_id == 0) {
879
       if ($course_id == 0) {
817
         $courses =  DB::table('ta_course')
880
         $courses =  DB::table('ta_course')
818
           ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
881
           ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
819
-          ->join('courses', 'courses.id', '=', 'ta_course.course_id')
882
+          ->join('courses', function ($join) {
883
+            $join->on('courses.number', '=', 'ta_course.course_number');
884
+            $join->on('courses.code', '=', 'ta_course.course_code');
885
+          })
820
           ->where('transformative_actions.is_custom', 1)
886
           ->where('transformative_actions.is_custom', 1)
821
           ->where('transformative_actions.program_id', $program_id)
887
           ->where('transformative_actions.program_id', $program_id)
822
           ->where('transformative_actions.by_professor', 0)
888
           ->where('transformative_actions.by_professor', 0)
823
-          ->select('courses.id')
889
+          ->select('ta_course.course_number', 'ta_course.course_code')
890
+          ->distinct()
824
           ->get();
891
           ->get();
825
 
892
 
826
         $course_id = array();
893
         $course_id = array();
827
         foreach ($courses as $key => $course) {
894
         foreach ($courses as $key => $course) {
828
-          array_push($course_id, $course->id);
895
+          array_push($course_id["number"], $course->course_number);
896
+          array_push($course_id["code"], $course->code);
829
         }
897
         }
830
       } else {
898
       } else {
831
-        $course_id = array($course_id);
899
+
900
+        $parentesis = array('(', ')');
901
+        $course_code_number = str_replace($parentesis, '', $course_id);
902
+
903
+        $course_code_number = explode(',', $course_code_number);
904
+
905
+        $course_id = array();
906
+        $course_id['number'] = $course_code_number[1];
907
+        $course_id['code'] = $course_code_number[0];
832
       }
908
       }
833
       // if outcome isnt a desired filter, search all outcomes
909
       // if outcome isnt a desired filter, search all outcomes
834
       if ($outcome_id == 0) {
910
       if ($outcome_id == 0) {
835
         $outcomes = DB::table('transformative_actions')
911
         $outcomes = DB::table('transformative_actions')
836
-          ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
837
-          ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
838
-          ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
912
+          ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
913
+          ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
914
+          ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
839
           ->where('transformative_actions.is_custom', 1)
915
           ->where('transformative_actions.is_custom', 1)
840
           ->where('transformative_actions.program_id', $program_id)
916
           ->where('transformative_actions.program_id', $program_id)
841
           ->where('transformative_actions.by_professor', 0)
917
           ->where('transformative_actions.by_professor', 0)
853
       // search TA with filters
929
       // search TA with filters
854
       $filtered_at = DB::table('transformative_actions')
930
       $filtered_at = DB::table('transformative_actions')
855
         ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
931
         ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
856
-        ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
857
-        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
932
+        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
933
+        ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
858
         ->where('transformative_actions.is_custom', 1)
934
         ->where('transformative_actions.is_custom', 1)
859
         ->where('transformative_actions.program_id', $program_id)
935
         ->where('transformative_actions.program_id', $program_id)
860
         ->where('transformative_actions.by_professor', 0)
936
         ->where('transformative_actions.by_professor', 0)
861
         ->whereIn('transformative_actions.user_id', $professor_id)
937
         ->whereIn('transformative_actions.user_id', $professor_id)
862
-        ->whereIn('criterion_objective_outcome.outcome_id', $outcome_id)
863
-        ->whereIn('ta_course.course_id', $course_id)
938
+        ->whereIn('objective_outcome.outcome_id', $outcome_id)
939
+        ->whereIn('ta_course.course_code', $course_id['code'])
940
+        ->whereIn('ta_course.course_number', $course_id['number'])
864
         ->select('transformative_actions.*')
941
         ->select('transformative_actions.*')
865
         ->groupBy('transformative_actions.id')
942
         ->groupBy('transformative_actions.id')
866
         ->orderBy('transformative_actions.at_text', 'ASC')
943
         ->orderBy('transformative_actions.at_text', 'ASC')
879
           ->where('transformative_actions.is_custom', 1)
956
           ->where('transformative_actions.is_custom', 1)
880
           ->where('transformative_actions.program_id', $program_id)
957
           ->where('transformative_actions.program_id', $program_id)
881
           ->where('transformative_actions.by_professor', 1)
958
           ->where('transformative_actions.by_professor', 1)
882
-          ->select('courses.id')
959
+          ->select('ta_course.course_number', 'ta_course.course_code')
960
+          ->distinct()
883
           ->get();
961
           ->get();
884
 
962
 
885
         $course_id = array();
963
         $course_id = array();
886
         foreach ($courses as $key => $course) {
964
         foreach ($courses as $key => $course) {
887
-          array_push($course_id, $course->id);
965
+          array_push($course_id["number"], $course->course_number);
966
+          array_push($course_id["code"], $course->code);
888
         }
967
         }
889
       } else {
968
       } else {
890
-        $course_id = array($course_id);
969
+
970
+        $parentesis = array('(', ')');
971
+        $course_code_number = str_replace($parentesis, '', $course_id);
972
+
973
+        $course_code_number = explode(',', $course_code_number);
974
+
975
+        $course_id = array();
976
+        $course_id['number'] = $course_code_number[1];
977
+        $course_id['code'] = $course_code_number[0];
891
       }
978
       }
892
       // if outcome isnt a desired filter, search all outcomes
979
       // if outcome isnt a desired filter, search all outcomes
893
       if ($outcome_id == 0) {
980
       if ($outcome_id == 0) {
894
         $outcomes = DB::table('transformative_actions')
981
         $outcomes = DB::table('transformative_actions')
895
-          ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
896
-          ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
897
-          ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
982
+          ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
983
+          ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
984
+          ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
898
           ->where('transformative_actions.user_id', Auth::user()->id)
985
           ->where('transformative_actions.user_id', Auth::user()->id)
899
           ->where('transformative_actions.is_custom', 1)
986
           ->where('transformative_actions.is_custom', 1)
900
           ->where('transformative_actions.program_id', $program_id)
987
           ->where('transformative_actions.program_id', $program_id)
913
       // search TA with filters
1000
       // search TA with filters
914
       $filtered_at = DB::table('transformative_actions')
1001
       $filtered_at = DB::table('transformative_actions')
915
         ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
1002
         ->join('ta_course', 'ta_course.ta_id', '=', 'transformative_actions.id')
916
-        ->join('transformative_objective_course', 'transformative_objective_course.ta_id', '=', 'transformative_actions.id')
917
-        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective_course.objective_id')
1003
+        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
1004
+        ->join('criterion_objective_outcome', 'criterion_objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
918
         ->where('transformative_actions.user_id', Auth::user()->id)
1005
         ->where('transformative_actions.user_id', Auth::user()->id)
919
         ->where('transformative_actions.is_custom', 1)
1006
         ->where('transformative_actions.is_custom', 1)
920
         ->where('transformative_actions.program_id', $program_id)
1007
         ->where('transformative_actions.program_id', $program_id)
921
         ->where('transformative_actions.by_professor', 1)
1008
         ->where('transformative_actions.by_professor', 1)
922
         ->whereIn('criterion_objective_outcome.outcome_id', $outcome_id)
1009
         ->whereIn('criterion_objective_outcome.outcome_id', $outcome_id)
923
-        ->whereIn('ta_course.course_id', $course_id)
1010
+        ->whereIn('ta_course.course_code', $course_id['code'])
1011
+        ->whereIn('ta_course.course_number', $course_id['number'])
924
         ->select('transformative_actions.*')
1012
         ->select('transformative_actions.*')
925
         ->groupBy('transformative_actions.id')
1013
         ->groupBy('transformative_actions.id')
926
         ->orderBy('transformative_actions.at_text', 'ASC')
1014
         ->orderBy('transformative_actions.at_text', 'ASC')
933
   function postActivityCriterion($activity_id)
1021
   function postActivityCriterion($activity_id)
934
   {
1022
   {
935
     DB::beginTransaction();
1023
     DB::beginTransaction();
1024
+
1025
+    $existing_transformative_action = DB::table('transformative_actions')
1026
+      ->join('transformative_activity_criterion', 'transformative_activity_criterion.trans_action_id', '=', 'transformative_actions.id')
1027
+      ->join('activity_criterion', 'activity_criterion.id', '=', 'transformative_activity_criterion.activity_criterion_id')
1028
+      ->where('activity_id', $activity_id)
1029
+      ->delete();
936
     $activity_criterion = Input::get('trans_act');
1030
     $activity_criterion = Input::get('trans_act');
937
 
1031
 
938
     $trans = new TransformativeAction;
1032
     $trans = new TransformativeAction;
949
     $trans->at_text = Input::get('name_trans');
1043
     $trans->at_text = Input::get('name_trans');
950
     $trans->description = Input::get('transforming_actions');
1044
     $trans->description = Input::get('transforming_actions');
951
 
1045
 
1046
+    $activity = DB::table('activities')
1047
+      ->where('id', $activity_id)
1048
+      ->first();
1049
+    $course_credentials = DB::table('courses')
1050
+      ->where('id', $activity->course_id)
1051
+      ->first();
1052
+
1053
+
952
     if ($trans->save()) {
1054
     if ($trans->save()) {
953
 
1055
 
1056
+
1057
+
1058
+
954
       foreach ($activity_criterion as $single_ac) {
1059
       foreach ($activity_criterion as $single_ac) {
955
         $result = DB::insert("insert into `transformative_activity_criterion` (`trans_action_id`, `activity_criterion_id`) values ($trans->id, $single_ac)");
1060
         $result = DB::insert("insert into `transformative_activity_criterion` (`trans_action_id`, `activity_criterion_id`) values ($trans->id, $single_ac)");
956
         if (!$result) {
1061
         if (!$result) {
961
           return Redirect::to("professor/activities/{$activity_id}");
1066
           return Redirect::to("professor/activities/{$activity_id}");
962
         }
1067
         }
963
       }
1068
       }
1069
+      $criteria = DB::table('activity_criterion')
1070
+        ->whereIn('id', $activity_criterion)
1071
+        ->lists('criterion_id');
1072
+
1073
+      $allObjectives = DB::table('criterion_objective_outcome')
1074
+        ->whereIn('criterion_id', $criteria)
1075
+        ->select('objective_id')
1076
+        ->distinct()
1077
+        ->lists('objective_id');
1078
+
1079
+
1080
+      foreach ($allObjectives as $objective) {
1081
+        $result2 = DB::insert("insert into `transformative_objective` (`ta_id`, `objective_id`) values ({$trans->id},{$objective})");
1082
+        if (!$result2) {
1083
+          DB::rollback();
1084
+          Session::flash('status', 'danger');
1085
+          Session::flash('message', 'Error saving Transforming Action. Try again later.');
1086
+
1087
+          return Redirect::to("professor/activities/{$activity_id}");
1088
+        }
1089
+      }
1090
+      $result3 = DB::insert("insert into `ta_course` (`ta_id`, `course_number`, `course_code`) values ({$trans->id}, '{$course_credentials->number}', '{$course_credentials->code}')");
1091
+
1092
+      if (!($result3)) {
1093
+        DB::rollback();
1094
+        Session::flash('status', 'danger');
1095
+        Session::flash('message', 'Error saving Transforming Action. Try again later.');
1096
+        return Redirect::to("professor/activities/{$activity_id}");
1097
+      }
964
       DB::commit();
1098
       DB::commit();
965
       Session::flash('status', 'success');
1099
       Session::flash('status', 'success');
966
       Session::flash('message', 'Transformative Actions Saved.');
1100
       Session::flash('message', 'Transformative Actions Saved.');

app/database/migrations/2021_06_06_001211_create_transformative_objective_course_table.php → app/database/migrations/2021_06_06_001211_create_transformative_objective_table.php View File

3
 use Illuminate\Database\Schema\Blueprint;
3
 use Illuminate\Database\Schema\Blueprint;
4
 use Illuminate\Database\Migrations\Migration;
4
 use Illuminate\Database\Migrations\Migration;
5
 
5
 
6
-class CreateTransformativeObjectiveCourseTable extends Migration
6
+class CreateTransformativeObjectiveTable extends Migration
7
 {
7
 {
8
 
8
 
9
 	public function up()
9
 	public function up()
10
 	{
10
 	{
11
-		Schema::create('transformative_objective_course', function (Blueprint $table) {
11
+		Schema::create('transformative_objective', function (Blueprint $table) {
12
 			$table->increments('id');
12
 			$table->increments('id');
13
-			$table->timestamps();
13
+
14
 
14
 
15
 			$table->integer('ta_id')->unsigned();
15
 			$table->integer('ta_id')->unsigned();
16
 			$table->foreign('ta_id')
16
 			$table->foreign('ta_id')
26
 				->onDelete('cascade')
26
 				->onDelete('cascade')
27
 				->onUpdate('cascade');
27
 				->onUpdate('cascade');
28
 
28
 
29
-			$table->string('course_code');
30
-			$table->string('course_number');
31
 
29
 
32
 			/*$table->integer('program_id')->unsigned();
30
 			/*$table->integer('program_id')->unsigned();
33
 			$table->foreign('program_id')
31
 			$table->foreign('program_id')
45
 	 */
43
 	 */
46
 	public function down()
44
 	public function down()
47
 	{
45
 	{
48
-		Schema::drop('transformative_objective_course');
46
+		Schema::drop('transformative_objective');
49
 	}
47
 	}
50
 }
48
 }

+ 2
- 6
app/database/migrations/2021_06_14_000848_create_ta_course_table.php View File

18
 				->onDelete('cascade')
18
 				->onDelete('cascade')
19
 				->onUpdate('cascade');
19
 				->onUpdate('cascade');
20
 
20
 
21
-			$table->integer('course_id')->unsigned();
22
-			$table->foreign('course_id')
23
-				->references('id')
24
-				->on('courses')
25
-				->onDelete('cascade')
26
-				->onUpdate('cascade');
21
+			$table->string('course_number');
22
+			$table->string('course_code');
27
 		});
23
 		});
28
 	}
24
 	}
29
 
25
 

app/database/old_migrations/2014_10_05_052350_create_schools_table.php → app/database/unusedMigrations/old_migrations/2014_10_05_052350_create_schools_table.php View File


app/database/old_migrations/2014_10_05_055013_create_programs_table.php → app/database/unusedMigrations/old_migrations/2014_10_05_055013_create_programs_table.php View File


app/database/old_migrations/2014_10_06_050335_create_users_table.php → app/database/unusedMigrations/old_migrations/2014_10_06_050335_create_users_table.php View File


app/database/old_migrations/2014_10_12_100000_create_password_resets_table.php → app/database/unusedMigrations/old_migrations/2014_10_12_100000_create_password_resets_table.php View File


app/database/old_migrations/2014_11_10_035949_create_rubrics_table.php → app/database/unusedMigrations/old_migrations/2014_11_10_035949_create_rubrics_table.php View File


app/database/old_migrations/2014_11_29_210957_create_templates_table.php → app/database/unusedMigrations/old_migrations/2014_11_29_210957_create_templates_table.php View File


app/database/old_migrations/2014_11_29_211309_create_courses_table.php → app/database/unusedMigrations/old_migrations/2014_11_29_211309_create_courses_table.php View File


app/database/old_migrations/2014_11_29_211310_create_activities_table.php → app/database/unusedMigrations/old_migrations/2014_11_29_211310_create_activities_table.php View File


app/database/old_migrations/2014_11_29_212240_create_outcomes_table.php → app/database/unusedMigrations/old_migrations/2014_11_29_212240_create_outcomes_table.php View File


app/database/old_migrations/2014_11_29_212341_create_criteria_table.php → app/database/unusedMigrations/old_migrations/2014_11_29_212341_create_criteria_table.php View File


app/database/old_migrations/2014_11_29_214028_create_semesters_table.php → app/database/unusedMigrations/old_migrations/2014_11_29_214028_create_semesters_table.php View File


app/database/old_migrations/2014_11_30_134022_create_students_table.php → app/database/unusedMigrations/old_migrations/2014_11_30_134022_create_students_table.php View File


app/database/old_migrations/2014_12_07_214036_create_course_student_table.php → app/database/unusedMigrations/old_migrations/2014_12_07_214036_create_course_student_table.php View File


app/database/old_migrations/2015_01_09_171350_create_assessments_table.php → app/database/unusedMigrations/old_migrations/2015_01_09_171350_create_assessments_table.php View File


app/database/old_migrations/2015_01_12_204310_add_columns_to_activities_table.php → app/database/unusedMigrations/old_migrations/2015_01_12_204310_add_columns_to_activities_table.php View File


app/database/old_migrations/2015_01_12_222859_add_columns_to_assessments_table.php → app/database/unusedMigrations/old_migrations/2015_01_12_222859_add_columns_to_assessments_table.php View File


app/database/old_migrations/2015_01_13_010052_add_index_to_assessments_table.php → app/database/unusedMigrations/old_migrations/2015_01_13_010052_add_index_to_assessments_table.php View File


app/database/old_migrations/2015_01_13_142849_add_column_to_criteria_table.php → app/database/unusedMigrations/old_migrations/2015_01_13_142849_add_column_to_criteria_table.php View File


app/database/old_migrations/2015_01_14_140724_add_columns_to_courses_table.php → app/database/unusedMigrations/old_migrations/2015_01_14_140724_add_columns_to_courses_table.php View File


app/database/old_migrations/2015_01_21_124809_add_column_to_courses_table.php → app/database/unusedMigrations/old_migrations/2015_01_21_124809_add_column_to_courses_table.php View File


app/database/old_migrations/2015_01_22_195515_add_column_to_templates_table.php → app/database/unusedMigrations/old_migrations/2015_01_22_195515_add_column_to_templates_table.php View File


app/database/old_migrations/2015_01_23_175455_remove_total_from_assessments_table.php → app/database/unusedMigrations/old_migrations/2015_01_23_175455_remove_total_from_assessments_table.php View File


app/database/old_migrations/2015_01_23_175923_rename_average_in_assessments_table.php → app/database/unusedMigrations/old_migrations/2015_01_23_175923_rename_average_in_assessments_table.php View File


app/database/old_migrations/2015_01_28_121848_add_index_to_course_student_table.php → app/database/unusedMigrations/old_migrations/2015_01_28_121848_add_index_to_course_student_table.php View File


app/database/old_migrations/2015_01_28_133036_add_criteria_achieved_count_to_activities_table.php → app/database/unusedMigrations/old_migrations/2015_01_28_133036_add_criteria_achieved_count_to_activities_table.php View File


app/database/old_migrations/2015_02_05_133245_add_transforming_actions_to_activities_table.php → app/database/unusedMigrations/old_migrations/2015_02_05_133245_add_transforming_actions_to_activities_table.php View File


app/database/old_migrations/2015_02_05_143641_add_assessment_comments_to_activities_table.php → app/database/unusedMigrations/old_migrations/2015_02_05_143641_add_assessment_comments_to_activities_table.php View File


app/database/old_migrations/2015_02_06_145359_create_password_reminders_table.php → app/database/unusedMigrations/old_migrations/2015_02_06_145359_create_password_reminders_table.php View File


app/database/old_migrations/2015_02_19_143311_add_is_graduate_to_programs_table.php → app/database/unusedMigrations/old_migrations/2015_02_19_143311_add_is_graduate_to_programs_table.php View File


app/database/old_migrations/2015_02_25_170516_add_deleted_at_to_outcomes_table.php → app/database/unusedMigrations/old_migrations/2015_02_25_170516_add_deleted_at_to_outcomes_table.php View File


app/database/old_migrations/2015_02_25_170529_add_deleted_at_to_criteria_table.php → app/database/unusedMigrations/old_migrations/2015_02_25_170529_add_deleted_at_to_criteria_table.php View File


app/database/old_migrations/2015_02_27_201953_add_criteria_achieved_percentage_to_activities_table.php → app/database/unusedMigrations/old_migrations/2015_02_27_201953_add_criteria_achieved_percentage_to_activities_table.php View File


app/database/old_migrations/2015_03_04_132321_add_copyright_and_notes_to_criteria_table.php → app/database/unusedMigrations/old_migrations/2015_03_04_132321_add_copyright_and_notes_to_criteria_table.php View File


app/database/old_migrations/2015_04_13_183730_add_program_id_to_templates_table.php → app/database/unusedMigrations/old_migrations/2015_04_13_183730_add_program_id_to_templates_table.php View File


app/database/old_migrations/2015_04_28_141931_add_is_visible_to_templates_table.php → app/database/unusedMigrations/old_migrations/2015_04_28_141931_add_is_visible_to_templates_table.php View File


app/database/old_migrations/2015_05_04_162918_remove_expected_outcome_from_outcomes_table.php → app/database/unusedMigrations/old_migrations/2015_05_04_162918_remove_expected_outcome_from_outcomes_table.php View File


app/database/old_migrations/2015_05_05_083800_add_decimal_expected_outcome_to_outcomes_table.php → app/database/unusedMigrations/old_migrations/2015_05_05_083800_add_decimal_expected_outcome_to_outcomes_table.php View File


app/database/old_migrations/2015_05_18_095002_add_first_login_to_users_table.php → app/database/unusedMigrations/old_migrations/2015_05_18_095002_add_first_login_to_users_table.php View File


app/database/old_migrations/2015_05_18_131259_add_columns_to_semesters_table.php → app/database/unusedMigrations/old_migrations/2015_05_18_131259_add_columns_to_semesters_table.php View File


app/database/old_migrations/2015_05_18_134926_add_semester_id_to_courses.php → app/database/unusedMigrations/old_migrations/2015_05_18_134926_add_semester_id_to_courses.php View File


app/database/old_migrations/2015_06_10_092319_add_name_to_semesters_table.php → app/database/unusedMigrations/old_migrations/2015_06_10_092319_add_name_to_semesters_table.php View File


app/database/old_migrations/2015_06_12_085247_add_visibility_to_semesters_table.php → app/database/unusedMigrations/old_migrations/2015_06_12_085247_add_visibility_to_semesters_table.php View File


app/database/old_migrations/2015_06_16_092223_add_has_access_to_users.php → app/database/unusedMigrations/old_migrations/2015_06_16_092223_add_has_access_to_users.php View File


app/database/old_migrations/2015_06_18_103255_add_expected_percentage_and_points_to_templates_table.php → app/database/unusedMigrations/old_migrations/2015_06_18_103255_add_expected_percentage_and_points_to_templates_table.php View File


app/database/old_migrations/2015_07_10_150430_add_email_to_students_table.php → app/database/unusedMigrations/old_migrations/2015_07_10_150430_add_email_to_students_table.php View File


app/database/old_migrations/2015_07_13_111726_add_code_to_programs_table.php → app/database/unusedMigrations/old_migrations/2015_07_13_111726_add_code_to_programs_table.php View File


app/database/old_migrations/2015_07_13_132620_add_ssn_and_employee_number_to_users_table.php → app/database/unusedMigrations/old_migrations/2015_07_13_132620_add_ssn_and_employee_number_to_users_table.php View File


app/database/old_migrations/2015_08_19_130733_add_semester_id_to_course_student_table.php → app/database/unusedMigrations/old_migrations/2015_08_19_130733_add_semester_id_to_course_student_table.php View File


app/database/old_migrations/2015_12_10_145451_add_criteria_weights_to_activities_table.php → app/database/unusedMigrations/old_migrations/2015_12_10_145451_add_criteria_weights_to_activities_table.php View File


app/database/old_migrations/2016_01_12_132034_add_program_id_to_criteria_table.php → app/database/unusedMigrations/old_migrations/2016_01_12_132034_add_program_id_to_criteria_table.php View File


app/database/old_migrations/2016_01_27_093808_add_date_to_activities_table.php → app/database/unusedMigrations/old_migrations/2016_01_27_093808_add_date_to_activities_table.php View File


app/database/old_migrations/2016_01_27_134306_add_draft_to_activities_table.php → app/database/unusedMigrations/old_migrations/2016_01_27_134306_add_draft_to_activities_table.php View File


app/database/old_migrations/2016_03_11_085258_add_school_and_concentration_codes_to_students_table.php → app/database/unusedMigrations/old_migrations/2016_03_11_085258_add_school_and_concentration_codes_to_students_table.php View File


app/database/old_migrations/2016_05_09_145427_create_program_user_table.php → app/database/unusedMigrations/old_migrations/2016_05_09_145427_create_program_user_table.php View File


app/database/old_migrations/2016_05_10_091847_remove_program_id_from_users_table.php → app/database/unusedMigrations/old_migrations/2016_05_10_091847_remove_program_id_from_users_table.php View File


app/database/old_migrations/2016_05_23_153434_create_objectives_table.php → app/database/unusedMigrations/old_migrations/2016_05_23_153434_create_objectives_table.php View File


app/database/old_migrations/2016_05_25_090412_add_active_to_objectives_table.php → app/database/unusedMigrations/old_migrations/2016_05_25_090412_add_active_to_objectives_table.php View File


app/database/old_migrations/2016_05_26_092328_create_criterion_objective_table.php → app/database/unusedMigrations/old_migrations/2016_05_26_092328_create_criterion_objective_table.php View File


app/database/old_migrations/2016_07_15_084546_create_quinquenniums_table.php → app/database/unusedMigrations/old_migrations/2016_07_15_084546_create_quinquenniums_table.php View File


app/database/old_migrations/2016_07_15_084751_create_five_year_plans_table.php → app/database/unusedMigrations/old_migrations/2016_07_15_084751_create_five_year_plans_table.php View File


app/database/old_migrations/2016_07_15_090133_create_fyp_parts_table.php → app/database/unusedMigrations/old_migrations/2016_07_15_090133_create_fyp_parts_table.php View File


app/database/old_migrations/2016_07_15_090203_create_fyp_part_outcomes_table.php → app/database/unusedMigrations/old_migrations/2016_07_15_090203_create_fyp_part_outcomes_table.php View File


app/database/old_migrations/2016_08_03_120016_remove_methods_from_fyp_part_outcomes_table.php → app/database/unusedMigrations/old_migrations/2016_08_03_120016_remove_methods_from_fyp_part_outcomes_table.php View File


app/database/old_migrations/2016_08_03_140525_add_unique_index_to_five_year_plans_table.php → app/database/unusedMigrations/old_migrations/2016_08_03_140525_add_unique_index_to_five_year_plans_table.php View File


app/database/old_migrations/2016_08_11_150848_remove_semester_id_from_annual_plans_table.php → app/database/unusedMigrations/old_migrations/2016_08_11_150848_remove_semester_id_from_annual_plans_table.php View File


app/database/old_migrations/2016_08_11_151247_add_year_start_and_year_end_to_annual_plans_table.php → app/database/unusedMigrations/old_migrations/2016_08_11_151247_add_year_start_and_year_end_to_annual_plans_table.php View File


app/database/old_migrations/2017_02_03_150052_add_comments_to_assessments_table.php → app/database/unusedMigrations/old_migrations/2017_02_03_150052_add_comments_to_assessments_table.php View File


app/database/old_migrations/2018_02_12_144827_add_subcriteria_to_criteria_table.php → app/database/unusedMigrations/old_migrations/2018_02_12_144827_add_subcriteria_to_criteria_table.php View File


app/database/old_migrations/2018_07_26_132933_add_last_login_to_users_table.php → app/database/unusedMigrations/old_migrations/2018_07_26_132933_add_last_login_to_users_table.php View File


app/database/old_migrations/2018_07_26_134316_add_phone_numbers_and_extension_to_users_table.php → app/database/unusedMigrations/old_migrations/2018_07_26_134316_add_phone_numbers_and_extension_to_users_table.php View File


app/database/old_migrations/2018_08_09_110432_remove_password_from_users_table.php → app/database/unusedMigrations/old_migrations/2018_08_09_110432_remove_password_from_users_table.php View File


app/database/old_migrations/2018_08_09_110813_remove_password_updated_and_remember_token_from_users_table.php → app/database/unusedMigrations/old_migrations/2018_08_09_110813_remove_password_updated_and_remember_token_from_users_table.php View File


app/database/old_migrations/2018_08_10_083743_add_remember_token_to_users_table.php → app/database/unusedMigrations/old_migrations/2018_08_10_083743_add_remember_token_to_users_table.php View File


app/database/old_migrations/2018_08_28_140328_remove_outcome_id_from_objectives_table.php → app/database/unusedMigrations/old_migrations/2018_08_28_140328_remove_outcome_id_from_objectives_table.php View File


app/database/old_migrations/2018_08_28_141547_drop_criterion_objective_table.php → app/database/unusedMigrations/old_migrations/2018_08_28_141547_drop_criterion_objective_table.php View File


app/database/old_migrations/2018_08_28_142111_create_objective_outcome_table.php → app/database/unusedMigrations/old_migrations/2018_08_28_142111_create_objective_outcome_table.php View File


app/database/old_migrations/2018_09_13_134104_entrust_setup_tables.php → app/database/unusedMigrations/old_migrations/2018_09_13_134104_entrust_setup_tables.php View File


app/database/old_migrations/2019_08_07_100303_add_participants_achievers_counts_to_activities_table.php → app/database/unusedMigrations/old_migrations/2019_08_07_100303_add_participants_achievers_counts_to_activities_table.php View File


app/database/old_migrations/2020_03_06_122426_create_participating_programs_view.php → app/database/unusedMigrations/old_migrations/2020_03_06_122426_create_participating_programs_view.php View File


app/database/old_migrations/2020_04_04_002657_create_new_criteria_table.php → app/database/unusedMigrations/old_migrations/2020_04_04_002657_create_new_criteria_table.php View File


app/database/old_migrations/2020_04_04_005817_add_outcome_id_to_objectives_table.php → app/database/unusedMigrations/old_migrations/2020_04_04_005817_add_outcome_id_to_objectives_table.php View File


app/database/old_migrations/2020_04_22_090200_alter_activities_table.php → app/database/unusedMigrations/old_migrations/2020_04_22_090200_alter_activities_table.php View File


app/database/old_migrations/2020_04_22_095649_create_new_criterion_rubric_table.php → app/database/unusedMigrations/old_migrations/2020_04_22_095649_create_new_criterion_rubric_table.php View File


app/database/old_migrations/2020_04_22_101110_create_new_rubric_activity_table.php → app/database/unusedMigrations/old_migrations/2020_04_22_101110_create_new_rubric_activity_table.php View File


app/database/old_migrations/2020_05_15_123430_create_new_outcomes_table.php → app/database/unusedMigrations/old_migrations/2020_05_15_123430_create_new_outcomes_table.php View File


app/database/old_migrations/2020_05_15_123902_add_mapping_columns_to_outcomes_table.php → app/database/unusedMigrations/old_migrations/2020_05_15_123902_add_mapping_columns_to_outcomes_table.php View File


app/database/old_migrations/2020_10_04_142756_create_new_assessments_table.php → app/database/unusedMigrations/old_migrations/2020_10_04_142756_create_new_assessments_table.php View File


app/database/old_migrations/2020_10_05_124915_create_activity_criterion_table.php → app/database/unusedMigrations/old_migrations/2020_10_05_124915_create_activity_criterion_table.php View File


app/database/old_migrations/2020_10_05_130252_add_max_score_num_scales_new_criteria_table.php → app/database/unusedMigrations/old_migrations/2020_10_05_130252_add_max_score_num_scales_new_criteria_table.php View File


app/database/old_migrations/2020_10_05_142424_create_scales_table.php → app/database/unusedMigrations/old_migrations/2020_10_05_142424_create_scales_table.php View File


app/database/old_migrations/2020_10_05_142912_create_criterion_scale_table.php → app/database/unusedMigrations/old_migrations/2020_10_05_142912_create_criterion_scale_table.php View File


app/database/old_migrations/2020_10_05_232429_add_assessment_comments_to_activity_criterion.php → app/database/unusedMigrations/old_migrations/2020_10_05_232429_add_assessment_comments_to_activity_criterion.php View File


app/database/old_migrations/2020_10_09_131800_add_level_activation_date_to_outcomes.php → app/database/unusedMigrations/old_migrations/2020_10_09_131800_add_level_activation_date_to_outcomes.php View File


app/database/old_migrations/2020_10_16_190923_create_criterion_objective_outcome_table.php → app/database/unusedMigrations/old_migrations/2020_10_16_190923_create_criterion_objective_outcome_table.php View File


app/database/old_migrations/2020_10_18_145108_create_outcome_performance_table.php → app/database/unusedMigrations/old_migrations/2020_10_18_145108_create_outcome_performance_table.php View File


Some files were not shown because too many files changed in this diff