Browse Source

Push a mitad

parent
commit
35b3857bbd

+ 3
- 3
app/controllers/AnnualPlansController.php View File

@@ -210,7 +210,7 @@ class AnnualPlansController extends \BaseController
210 210
     $typ_info['transformative_actions'] = DB::select("select * from transformative_actions where by_professor =0 and is_custom=0");
211 211
     foreach ($typ_info['objectives'] as $objective) {
212 212
 
213
-      $typ_info['courses'][$objective->id] = DB::select("select c.id, c.number, 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')));
213
+      $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')));
214 214
 
215 215
       $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')));
216 216
       Log::info($typ_info['criteria'][$objective->id]);
@@ -344,7 +344,7 @@ class AnnualPlansController extends \BaseController
344 344
       Log::info($annual_plan['first']['objectives'][$outcomes->id]);
345 345
       foreach ($annual_plan['first']['objectives'][$outcomes->id] as $objective) {
346 346
         $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];
347
-        $annual_plan['first']['courses'][$objective->id] = DB::select("select typ.id typ_course_id, typ.course_id, c.code, c.number 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");
347
+        $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");
348 348
         foreach ($annual_plan['first']['courses'][$objective->id] as $course) {
349 349
           $annual_plan['first']['criteria'][$objective->id][$course->typ_course_id] = DB::select("select * from criteria where  id in(select criteria_id from annual_plan_objective where annual_plan_id = {$an_id} and typ_semester_course_id = {$course->typ_course_id} )");
350 350
           $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})");
@@ -369,7 +369,7 @@ class AnnualPlansController extends \BaseController
369 369
       foreach ($annual_plan['second']['objectives'][$outcomes->id] as $objective) {
370 370
         $annual_plan['second']['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_end} and typ_program_id in(select id from typ_program where program_id ={$an_semesters->program_id})) ")[0];
371 371
 
372
-        $annual_plan['second']['courses'][$objective->id] = DB::select("select typ.id typ_course_id, typ.course_id, c.code, c.number from (select course_id, id from typ_semester_courses where typ_semester_objective_id = {$annual_plan['second']['typ_objective_id'][$objective->id]->id}) typ, courses c where c.id = typ.course_id");
372
+        $annual_plan['second']['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['second']['typ_objective_id'][$objective->id]->id}) typ, courses c where c.id = typ.course_id");
373 373
         foreach ($annual_plan['second']['courses'][$objective->id] as $course) {
374 374
           $annual_plan['second']['criteria'][$objective->id][$course->course_id] = DB::select("select * from criteria where id in(select criteria_id from annual_plan_objective where annual_plan_id = {$an_id} and typ_semester_course_id ={$course->typ_course_id})");
375 375
           $annual_plan['second']['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})");

+ 1
- 1
app/controllers/Objective2Controller.php View File

@@ -327,7 +327,7 @@ class Objective2Controller extends \BaseController
327 327
 		$userSchool = Auth::user()['school_id'];
328 328
 		Log::info($userSchool);
329 329
 		$title = "Objective";
330
-		$outcomes = Outcome::whereNull("deactivation_date")->orderBy('name', 'ASC')->lists('name', 'id');
330
+		$outcomes = Outcome::whereNull("deactivation_date")->orderBy('name', 'ASC')->get();
331 331
 
332 332
 		$objectives = Objective::withTrashed()->orderBy('text', 'ASC')->get();
333 333
 		$programs = Program::where("school_id", "=", $userSchool)->orderBy('name', 'ASC')->get();

+ 176
- 128
app/controllers/TransformativeActionsController.php View File

@@ -18,11 +18,26 @@ class TransformativeActionsController extends \BaseController
18 18
     $programs = Program::orderBy('name', 'ASC')->get();
19 19
     $user_id = auth::user()->id;
20 20
 
21
-    $program_id = DB::table('program_user')
21
+    switch ($role) {
22
+      case 3:
23
+        $program_id = DB::table('program_user')
24
+          ->where('user_id', $user_id)
25
+          ->select('program_id')
26
+          ->lists('program_id');
27
+
28
+        break;
29
+
30
+      case 2:
31
+        $program_id = DB::table('programs')
32
+          ->where('school_id', Auth::user()->school_id)
33
+          ->lists('id');
34
+        break;
35
+    }
36
+    /*$program_id = DB::table('program_user')
22 37
       ->where('user_id', $user_id)
23 38
       ->select('program_id')
24 39
       ->get();
25
-    $program_id = $program_id[0]->program_id; //program id 15 debido al user 8
40
+    $program_id = $program_id[0]->program_id; */ //program id 15 debido al user 8
26 41
     $outcomes = Outcome::orderBy('name', 'ASC')
27 42
       ->where('deactivation_date', '=', '0000-00-00')
28 43
       ->orWhereNull('deactivation_date')
@@ -34,112 +49,112 @@ class TransformativeActionsController extends \BaseController
34 49
       ->distinct()
35 50
       ->get();
36 51
     // if user is program coordinator
37
-    if ($role == 3) {
38
-      //1 edit panel: load the TA that
39
-      //    are custom ('transformative_actions.by_professor' == 0)
40
-      //    were approved in past ('transformative_actions.is_custom' == 1)
41
-      $ta_edit_panel = DB::table('transformative_actions')
42
-        ->where('transformative_actions.is_custom', 1)
43
-        ->where('transformative_actions.program_id', $program_id)
44
-        ->where('transformative_actions.by_professor', 0)
45
-        ->orderBy('at_text', 'ASC')
46
-        ->get();
47
-      //2 approve panel: load TAs that
48
-      //    can be approved ('transformative_actions.by_professor' == 1)
49
-      $ta_approval_panel = DB::table('transformative_actions')
50
-        ->where('transformative_actions.is_custom', 1)
51
-        ->where('transformative_actions.program_id', $program_id)
52
-        ->where('transformative_actions.by_professor', 1)
53
-        ->orderBy('at_text', 'ASC')
54
-        ->get();
55
-      //2.1 approve panel: load the filter options.
56
-      // the "->where()" should be the same from $ta_approval_panel,
57
-      //  but with aditional joins and different select
58
-      //
59
-      // get the names of the professors
60
-      $professor_filter_approvePanel = DB::table('transformative_actions')
61
-        ->join('users', 'users.id', '=', 'transformative_actions.user_id')
62
-        ->where('transformative_actions.is_custom', 1)
63
-        ->where('transformative_actions.program_id', $program_id)
64
-        ->where('transformative_actions.by_professor', 1)
65
-        ->select('users.*')
66
-        ->groupby('transformative_actions.user_id')
67
-        ->orderBy('users.first_name', 'ASC')
68
-        ->get();
69
-      // get the courses from asociated with a TA
70
-      $course_filter_approvePanel = DB::table('ta_course')
71
-        ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
72
-        ->join('courses', function ($join) {
73
-          $join->on('courses.number', '=', 'ta_course.course_number');
74
-          $join->on('courses.code', '=', 'ta_course.course_code');
75
-        })
76
-        ->where('transformative_actions.is_custom', 1)
77
-        ->where('transformative_actions.program_id', $program_id)
78
-        ->where('transformative_actions.by_professor', 1)
79
-        ->select('courses.*')
80
-        ->groupBy('courses.number', 'courses.code')
81
-        ->orderBy('courses.name', 'ASC')
82
-        ->orderBy('courses.code', 'ASC')
83
-        ->get();
84
-      // get the outcome asociated with a TA
85
-      $outcome_filter_approvePanel = DB::table('transformative_actions')
86
-        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
87
-        ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
88
-        ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
89
-        ->where('transformative_actions.is_custom', 1)
90
-        ->where('transformative_actions.program_id', $program_id)
91
-        ->where('transformative_actions.by_professor', 1)
92
-        ->select('outcomes.*')
93
-        ->groupBy('outcomes.id')
94
-        ->orderBy('outcomes.name', 'ASC')
95
-        ->get();
96
-      //3 edit panel: load the filter options.
97
-      // the "->where()" should be the same from $ta_edit_panel,
98
-      //  but with aditional joins and different select
99
-      //
100
-      $professor_filter_editPanel = DB::table('transformative_actions')
101
-        ->join('users', 'users.id', '=', 'transformative_actions.user_id')
102
-        ->where('transformative_actions.is_custom', 1)
103
-        ->where('transformative_actions.program_id', $program_id)
104
-        ->where('transformative_actions.by_professor', 0)
105
-        ->select('users.*')
106
-        ->groupby('transformative_actions.user_id')
107
-        ->orderBy('users.first_name', 'ASC')
108
-        ->get();
109
-      $course_filter_editPanel =  DB::table('ta_course')
110
-        ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
111
-        ->join('courses', function ($join) {
112
-          $join->on('courses.number', '=', 'ta_course.course_number');
113
-          $join->on('courses.code', '=', 'ta_course.course_code');
114
-        })
115
-        ->where('transformative_actions.is_custom', 1)
116
-        ->where('transformative_actions.program_id', $program_id)
117
-        ->where('transformative_actions.by_professor', 0)
118
-        ->select('courses.*')
119
-        ->groupBy('courses.number', 'courses.code')
120
-        ->orderBy('courses.name', 'ASC')
121
-        ->orderBy('courses.code', 'ASC')
122
-        ->get();
123
-      $outcome_filter_editPanel = DB::table('transformative_actions')
124
-        ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
125
-        ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
126
-        ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
127
-        ->where('transformative_actions.is_custom', 1)
128
-        ->where('transformative_actions.program_id', $program_id)
129
-        ->where('transformative_actions.by_professor', 0)
130
-        ->select('outcomes.*')
131
-        ->groupBy('outcomes.id')
132
-        ->orderBy('outcomes.name', 'ASC')
133
-        ->get();
134
-      // 4 create panel: search all courses
135
-      $courses_create = DB::table('courses')
136
-        ->where('courses.program_id', $program_id)
137
-        ->select('courses.*')
138
-        ->groupBy('courses.number', 'courses.code')
139
-        ->orderBy('courses.name', 'ASC')
140
-        ->orderBy('courses.code', 'ASC')
141
-        ->get();
142
-    }/*
52
+
53
+    //1 edit panel: load the TA that
54
+    //    are custom ('transformative_actions.by_professor' == 0)
55
+    //    were approved in past ('transformative_actions.is_custom' == 1)
56
+    $ta_edit_panel = DB::table('transformative_actions')
57
+      ->where('transformative_actions.is_custom', 1)
58
+      ->whereIn('transformative_actions.program_id', $program_id)
59
+      ->where('transformative_actions.by_professor', 0)
60
+      ->orderBy('at_text', 'ASC')
61
+      ->get();
62
+    //2 approve panel: load TAs that
63
+    //    can be approved ('transformative_actions.by_professor' == 1)
64
+    $ta_approval_panel = DB::table('transformative_actions')
65
+      ->where('transformative_actions.is_custom', 1)
66
+      ->whereIn('transformative_actions.program_id', $program_id)
67
+      ->where('transformative_actions.by_professor', 1)
68
+      ->orderBy('at_text', 'ASC')
69
+      ->get();
70
+    //2.1 approve panel: load the filter options.
71
+    // the "->where()" should be the same from $ta_approval_panel,
72
+    //  but with aditional joins and different select
73
+    //
74
+    // get the names of the professors
75
+    $professor_filter_approvePanel = DB::table('transformative_actions')
76
+      ->join('users', 'users.id', '=', 'transformative_actions.user_id')
77
+      ->where('transformative_actions.is_custom', 1)
78
+      ->whereIn('transformative_actions.program_id', $program_id)
79
+      ->where('transformative_actions.by_professor', 1)
80
+      ->select('users.*')
81
+      ->groupBy('transformative_actions.user_id')
82
+      ->orderBy('users.first_name', 'ASC')
83
+      ->get();
84
+    // get the courses from asociated with a TA
85
+    $course_filter_approvePanel = DB::table('ta_course')
86
+      ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
87
+      ->join('courses', function ($join) {
88
+        $join->on('courses.number', '=', 'ta_course.course_number');
89
+        $join->on('courses.code', '=', 'ta_course.course_code');
90
+      })
91
+      ->where('transformative_actions.is_custom', 1)
92
+      ->whereIn('transformative_actions.program_id', $program_id)
93
+      ->where('transformative_actions.by_professor', 1)
94
+      ->select('courses.*')
95
+      ->groupBy('courses.number', 'courses.code', 'courses.name')
96
+      ->orderBy('courses.name', 'ASC')
97
+      ->orderBy('courses.code', 'ASC')
98
+      ->get();
99
+    // get the outcome asociated with a TA
100
+    $outcome_filter_approvePanel = DB::table('transformative_actions')
101
+      ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
102
+      ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
103
+      ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
104
+      ->where('transformative_actions.is_custom', 1)
105
+      ->whereIn('transformative_actions.program_id', $program_id)
106
+      ->where('transformative_actions.by_professor', 1)
107
+      ->select('outcomes.*')
108
+      ->groupBy('outcomes.id')
109
+      ->orderBy('outcomes.name', 'ASC')
110
+      ->get();
111
+    //3 edit panel: load the filter options.
112
+    // the "->where()" should be the same from $ta_edit_panel,
113
+    //  but with aditional joins and different select
114
+    //
115
+    $professor_filter_editPanel = DB::table('transformative_actions')
116
+      ->join('users', 'users.id', '=', 'transformative_actions.user_id')
117
+      ->where('transformative_actions.is_custom', 1)
118
+      ->whereIn('transformative_actions.program_id', $program_id)
119
+      ->where('transformative_actions.by_professor', 0)
120
+      ->select('users.*')
121
+      ->groupBy('transformative_actions.user_id')
122
+      ->orderBy('users.first_name', 'ASC')
123
+      ->get();
124
+    $course_filter_editPanel =  DB::table('ta_course')
125
+      ->join('transformative_actions', 'transformative_actions.id', '=', 'ta_course.ta_id')
126
+      ->join('courses', function ($join) {
127
+        $join->on('courses.number', '=', 'ta_course.course_number');
128
+        $join->on('courses.code', '=', 'ta_course.course_code');
129
+      })
130
+      ->where('transformative_actions.is_custom', 1)
131
+      ->whereIn('transformative_actions.program_id', $program_id)
132
+      ->where('transformative_actions.by_professor', 0)
133
+      ->select('courses.*')
134
+      ->groupBy('courses.number', 'courses.code', 'courses.name')
135
+      ->orderBy('courses.name', 'ASC')
136
+      ->orderBy('courses.code', 'ASC')
137
+      ->get();
138
+    $outcome_filter_editPanel = DB::table('transformative_actions')
139
+      ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
140
+      ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'transformative_objective.objective_id')
141
+      ->join('outcomes', 'outcomes.id', '=', 'objective_outcome.outcome_id')
142
+      ->where('transformative_actions.is_custom', 1)
143
+      ->whereIn('transformative_actions.program_id', $program_id)
144
+      ->where('transformative_actions.by_professor', 0)
145
+      ->select('outcomes.*')
146
+      ->groupBy('outcomes.id')
147
+      ->orderBy('outcomes.name', 'ASC')
148
+      ->get();
149
+    // 4 create panel: search all courses
150
+    $courses_create = DB::table('courses')
151
+      ->whereIn('courses.program_id', $program_id)
152
+      ->select('courses.*')
153
+      ->groupBy('courses.number', 'courses.code',  'courses.name')
154
+      ->orderBy('courses.name', 'ASC')
155
+      ->orderBy('courses.code', 'ASC')
156
+      ->get();
157
+    /*
143 158
     // if user is profesor
144 159
     elseif ($role == 4) {
145 160
       // 1 the user can only edit TA that need approval and has been submited by the same user
@@ -319,14 +334,16 @@ class TransformativeActionsController extends \BaseController
319 334
     } else {
320 335
 
321 336
       $user_id = Auth::user()->id;
322
-      $program_id = DB::table('program_user')
337
+
338
+
339
+      /*$program_id = DB::table('program_user')
323 340
         ->where('user_id', $user_id)
324 341
         ->select('program_id')
325 342
         ->get();
326
-      $program_id = $program_id[0]->program_id;
343
+      $program_id = $program_id[0]->program_id;*/
327 344
       $role = Auth::user()['role'];
328 345
       $by_professor = 1;
329
-      if ($role == 3) {
346
+      if ($role != 4) {
330 347
         $by_professor = 0;
331 348
       }
332 349
       Log::info($clean_input['courseid']);
@@ -337,6 +354,13 @@ class TransformativeActionsController extends \BaseController
337 354
 
338 355
       $course_code_number = explode(',', $course_code_number);
339 356
 
357
+      $program_id = DB::table('courses')
358
+        ->where('code', $course_code_number[0])
359
+        ->where('number', $course_code_number[1])
360
+        ->select('program_id')
361
+        ->first()->program_id;
362
+
363
+
340 364
       $current_timestamp = date('Y/m/d H:i:s', time());
341 365
       if ($clean_input['new_type']) $type = $clean_input['new_type'];
342 366
       else $type = $clean_input['type'];
@@ -459,13 +483,23 @@ class TransformativeActionsController extends \BaseController
459 483
       $role = Auth::user()['role'];
460 484
       return Redirect::to('transformativeAction')->withInput();
461 485
     } else {
486
+      $parentesis = array('(', ')');
487
+      $course_code_number = str_replace($parentesis, '', $clean_input['courseid']);
488
+
489
+      $course_code_number = explode(',', $course_code_number);
490
+
491
+      $program_id = DB::table('courses')
492
+        ->where('code', $course_code_number[0])
493
+        ->where('number', $course_code_number[1])
494
+        ->select('program_id')
495
+        ->first()->program_id;
462 496
 
463 497
       $user_id = auth::user()->id;
464
-      $program_id = DB::table('program_user')
498
+      /* $program_id = DB::table('program_user')
465 499
         ->where('user_id', $user_id)
466 500
         ->select('program_id')
467 501
         ->get();
468
-      $program_id = $program_id[0]->program_id;
502
+      $program_id = $program_id[0]->program_id;*/
469 503
       $role = Auth::user()['role'];
470 504
       $by_professor = $clean_input['approval'];
471 505
       if ($role == 4) {
@@ -532,10 +566,9 @@ class TransformativeActionsController extends \BaseController
532 566
         }
533 567
       }
534 568
 
535
-      $parentesis = array('(', ')');
536
-      $course_code_number = str_replace($parentesis, '', $clean_input['courseid']);
537 569
 
538
-      $course_code_number = explode(',', $course_code_number);
570
+
571
+
539 572
 
540 573
       DB::update(
541 574
         "UPDATE `ta_course` set `course_number` = '{$course_code_number[1]}', `course_code` = '{$course_code_number[0]}' where ta_id = {$ta_id}"
@@ -739,11 +772,11 @@ class TransformativeActionsController extends \BaseController
739 772
       ->lists('status');
740 773
     $status = $status[0];
741 774
     $plans_count = DB::table('annual_plan_transformative')
742
-      ->where('id', $ta_id)
775
+      ->where('trans_id', $ta_id)
743 776
       ->get();
744 777
     $plans_count = count($plans_count);
745 778
     $can_be_deleted = false;
746
-    if ($plans_count == 0 && $status == 1) {
779
+    if ($plans_count == 0 /*&& $status == 1*/) {
747 780
       $can_be_deleted = true;
748 781
     }
749 782
     return array(
@@ -800,6 +833,7 @@ class TransformativeActionsController extends \BaseController
800 833
       ->whereIn('objective_program.program_id', $program_ids)
801 834
       ->orderBy('objectives.text', 'ASC')
802 835
       ->select('objectives.text as text', 'objectives.id as id')
836
+      ->distinct()
803 837
       ->get();
804 838
 
805 839
     return array(
@@ -816,14 +850,28 @@ class TransformativeActionsController extends \BaseController
816 850
     $course_id = Input::get('course_id');
817 851
     $outcome_id = Input::get('outcome_id');
818 852
     $panel_id = Input::get('panel_id');
819
-    $program_id = DB::table('program_user')
820
-      ->where('user_id', $user_id)
821
-      ->select('program_id')
822
-      ->get();
823
-    $program_id = $program_id[0]->program_id;
853
+
854
+    switch ($role) {
855
+      case 1:
856
+        $program_id = DB::table('programs')->lists('id');
857
+        break;
858
+
859
+      case 2:
860
+        $program_id = DB::table('programs')->where('school_id', Auth::user()->school_id)
861
+          ->lists('id');
862
+        break;
863
+      case 3:
864
+        $program_id = DB::table('program_user')
865
+          ->where('user_id', $user_id)
866
+          ->select('program_id')
867
+          ->get();
868
+        $program_id = $program_id[0]->program_id;
869
+        break;
870
+    }
871
+
824 872
 
825 873
     // if the user is a coordinator filtering the approvePanel
826
-    if ($role == '3' && $panel_id == 'approvePanel') {
874
+    /*if ($role == '3' && $panel_id == 'approvePanel') {
827 875
 
828 876
       // if professor isnt a desired filter, search all professors
829 877
       if ($professor_id == 0) {
@@ -909,9 +957,9 @@ class TransformativeActionsController extends \BaseController
909 957
         ->orderBy('transformative_actions.at_text', 'ASC')
910 958
         ->get();
911 959
       return $filtered_at;
912
-    }
960
+    }*/
913 961
     // if the user is a coordinator filtering the editPanel
914
-    elseif ($role == '3' && $panel_id == 'editPanel') {
962
+    if ($panel_id == 'editPanel') {
915 963
 
916 964
       // if professor isnt a desired filter, search all professors
917 965
       if ($professor_id == 0) {
@@ -998,7 +1046,7 @@ class TransformativeActionsController extends \BaseController
998 1046
       return $filtered_at;
999 1047
     }
1000 1048
     // if the user is a professor filtering the editPanel
1001
-    elseif ($role == '4' && $panel_id == 'editPanel') {
1049
+    /*elseif ($role == '4' && $panel_id == 'editPanel') {
1002 1050
 
1003 1051
       // if course isnt a desired filter, search all courses
1004 1052
       if ($course_id == 0) {
@@ -1067,7 +1115,7 @@ class TransformativeActionsController extends \BaseController
1067 1115
         ->orderBy('transformative_actions.at_text', 'ASC')
1068 1116
         ->get();
1069 1117
       return $filtered_at;
1070
-    }
1118
+    }*/
1071 1119
     return 'ilegal';
1072 1120
   }
1073 1121
 

+ 43
- 42
app/views/local/managers/admins/transformativeAction.blade.php View File

@@ -45,7 +45,7 @@
45 45
                 <div class="form-group col-md-11">
46 46
                   <select name="courseid" class="form-control createCourses selectpicker">
47 47
                     @foreach ($courses_create as $course)
48
-                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->number}}</option>
48
+                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->name}}</option>
49 49
                     @endforeach
50 50
                   </select>
51 51
                 </div>
@@ -104,7 +104,8 @@
104 104
               {{ Form::close() }}
105 105
             </div>
106 106
         </div>
107
-        <div class="panel panel-default panel-button">
107
+
108
+        <!--<div class="panel panel-default panel-button">
108 109
             <div class="panel-heading">
109 110
                 Approve a Recommended TA
110 111
             </div>
@@ -124,9 +125,9 @@
124 125
                     <label>Professor that created the TA</label>
125 126
                     <select class="form-control filterProfessor selectpicker">
126 127
                       <option value="0">Show All</option>
127
-                      @foreach ($professor_filter_approvePanel as $ta)
128
+                     {{-- @foreach ($professor_filter_approvePanel as $ta)
128 129
                         <option value="{{$ta->id}}">Prof. {{$ta->first_name}} {{$ta->surnames}}</option>
129
-                      @endforeach
130
+                      @endforeach--}}
130 131
                     </select>
131 132
                   </div>
132 133
                   <br>
@@ -134,9 +135,9 @@
134 135
                     <label>Course evaluated by an Objective of the TA</label>
135 136
                     <select class="form-control filterCourse selectpicker">
136 137
                       <option value="0">Show All</option>
137
-                      @foreach ($course_filter_approvePanel as $course)
138
+                      {{--@foreach ($course_filter_approvePanel as $course)
138 139
                         <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->number}}</option>
139
-                      @endforeach
140
+                      @endforeach--}}
140 141
                     </select>
141 142
                   </div>
142 143
                   <br>
@@ -144,34 +145,34 @@
144 145
                     <label>Outcome of the TA</label>
145 146
                     <select class="form-control filterOutcome selectpicker">
146 147
                       <option value="0">Show All</option>
147
-                      @foreach ($outcome_filter_approvePanel as $outcome)
148
+                      {{--@foreach ($outcome_filter_approvePanel as $outcome)
148 149
                         <option value="{{$outcome->id}}">{{$outcome->name}}</option>
149
-                      @endforeach
150
+                      @endforeach--}}
150 151
                     </select>
151 152
                   </div>
152 153
                 </div>
153 154
               </div>
154 155
               <hr>
155
-              {{ Form::open(array('action' => 'TransformativeActionsController@approveTA')) }}
156
+              {{-- Form::open(array('action' => 'TransformativeActionsController@approveTA')) --}}
156 157
 
157 158
               <div>
158 159
                 <div class="form-group col-md-11">
159 160
                   <label>Select Transformative Action</label>
160 161
                   <select name="ta" class="form-control SelectTA selectpicker" id='approvalSelectTA'>
161
-                    @if (count($ta_approval_panel) == 0)
162
+                   {{-- @if (count($ta_approval_panel) == 0)
162 163
                       <option value="0">No TAs available</option>
163 164
                     @else
164 165
                     @endif
165 166
                     @foreach ($ta_approval_panel as $ta)
166 167
                       <option value="{{$ta->id}}">{{$ta->at_text}}</option>
167
-                   @endforeach
168
+                   @endforeach--}}
168 169
                   </select>
169 170
                 </div>
170 171
               </div>
171 172
 
172 173
               <div class="form-group">
173
-                {{ Form::label('approvalDescription', 'Description') }}
174
-                {{ Form::textarea('approvalDescription', '', array('class' => 'form-control')) }}
174
+               {{-- {{ Form::label('approvalDescription', 'Description') }}
175
+                {{ Form::textarea('approvalDescription', '', array('class' => 'form-control')) }}--}}
175 176
               </div>
176 177
 
177 178
               <label>Associated Courses</label>
@@ -182,23 +183,23 @@
182 183
                       
183 184
                   </select>
184 185
                 </div>
185
-               <!-- <button type="button" class='btn btn-md btn-primary col-md-1 remove-course'>
186
+                <button type="button" class='btn btn-md btn-primary col-md-1 remove-course'>
186 187
                   X
187
-                </button>-->
188
+                </button>
188 189
               </div>
189
-              <!--<button type="button" class='btn btn-md btn-secondary add-course'>
190
+              <button type="button" class='btn btn-md btn-secondary add-course'>
190 191
                 <span class='glyphicon glyphicon-plus'>
191 192
                 </span>
192 193
                 Add another Course
193
-              </button>-->
194
+              </button>
194 195
 
195 196
               <label>Associated Objectives</label>
196 197
               <div class="approveObjectives">
197 198
                 <div class="form-group col-md-11">
198 199
                   <select name="objectiveid[]" class="form-control">
199
-                    @foreach ($objectives as $id => $text)
200
+                   {{-- @foreach ($objectives as $id => $text)
200 201
                       <option value="{{$id}}">{{$text}}</option>
201
-                    @endforeach
202
+                    @endforeach--}}
202 203
                   </select>
203 204
                 </div>
204 205
                 <button type="button" class='btn btn-md btn-primary col-md-1 remove-objective'>
@@ -215,9 +216,9 @@
215 216
                 <label>Type of Transformative Action</label>
216 217
                 <select name='type_of_ta' class="form-control selectpicker">
217 218
                   <option value ='0'>Select a Type</option>
218
-                  @foreach($types as $type)
219
+                 {{-- @foreach($types as $type)
219 220
                   <option value = '{{$type->type_of_TA}}'>{{$type->type_of_TA}}</option>
220
-                  @endforeach
221
+                  @endforeach--}}
221 222
                   <option value ="new"> New Type of Transformative Action</option>
222 223
 
223 224
                 </select>
@@ -227,10 +228,10 @@
227 228
 
228 229
               <input type='hidden' name='ta_id' class='updateTA'>
229 230
 
230
-              {{ Form::submit('Approve', array('class' => 'btn btn-primary btn-block')) }}
231
-              {{ Form::close() }}
231
+              {{-- Form::submit('Approve', array('class' => 'btn btn-primary btn-block')) }}
232
+              {{ Form::close() --}}
232 233
             </div>
233
-        </div>
234
+        </div> -->
234 235
     </div>
235 236
 
236 237
     <div class="col-md-6">
@@ -265,7 +266,7 @@
265 266
                     <select class="form-control filterCourse selectpicker">
266 267
                       <option value="0">Show All</option>
267 268
                       @foreach ($course_filter_editPanel as $course)
268
-                        <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->number}}</option>
269
+                        <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->name}}</option>
269 270
                       @endforeach
270 271
                     </select>
271 272
                   </div>
@@ -325,7 +326,7 @@
325 326
                 <div class="form-group col-md-11 editCourse">
326 327
                   <select name="courseid" id = "edit_course" class="form-control selectpicker">
327 328
                     @foreach ($courses_create as $course)
328
-                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->number}}</option>
329
+                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->name}}</option>
329 330
                     @endforeach
330 331
                   </select>
331 332
                 </div>
@@ -431,10 +432,10 @@ dummyApproval.find('option').remove();
431 432
 
432 433
 
433 434
 var role = {{Auth::user()['role']}};
434
-if (role == 3){
435
+if (role != 4){
435 436
   dummyApproval.find('select').append('<option value="0">To be implemented</option>');
436 437
   $('#approvePanel .add-course').hide();
437
-} else if (role == 4){
438
+} /* else if (role == 4){
438 439
   dummyApproval.find('select').append('<option value="1">Recommended</option>');
439 440
   $('#approvePanel').parent().hide();
440 441
 
@@ -446,7 +447,7 @@ if (role == 3){
446 447
   // in edit panel, hide the professor filter
447 448
   $('.filterProfessor').parent().hide();
448 449
   $('.filterProfessor').parent().next().hide(); // hide <br>
449
-}
450
+}*/
450 451
 
451 452
 $('.createObjectives').prop('disabled', 'disabled');
452 453
 $('#createPanel .add-objective').prop('disabled', 'disabled');
@@ -477,9 +478,9 @@ if(($('#approvalSelectTA').val() === "")){
477 478
   $('#approvalDescription').prop('disabled', 'disabled');
478 479
 }else{
479 480
   var ta_id = $('#approvalSelectTA').val();
480
-  if(ta_id != 0){
481
-    load_ta_info_for_approval(ta_id);
482
-  }
481
+  //if(ta_id != 0){
482
+  //  load_ta_info_for_approval(ta_id);
483
+  //}
483 484
 
484 485
 }
485 486
 
@@ -664,7 +665,7 @@ function load_ta_info_for_edit(ta_id) {
664 665
   );
665 666
 }
666 667
 
667
-function load_ta_info_for_approval(ta_id) {
668
+/*function load_ta_info_for_approval(ta_id) {
668 669
   $.post(
669 670
     "{{ URL::action('TransformativeActionsController@selectTA') }}",
670 671
     {
@@ -711,7 +712,7 @@ function load_ta_info_for_approval(ta_id) {
711 712
       $('.approvalText').val(name);
712 713
       $('#approvePanel .updateTA').val(ta_id);
713 714
 
714
-/*
715
+
715 716
       //locate de "add course" button on approve panel
716 717
       var add_course_button = $('#approvePanel .add-course')
717 718
 
@@ -737,7 +738,7 @@ function load_ta_info_for_approval(ta_id) {
737 738
         prev_select = add_course_button.prev();
738 739
       });
739 740
       prev_select.remove();
740
-      */
741
+      
741 742
       course = selected_course[0];
742 743
       var new_option = $('<option/>',{
743 744
         'value': '('+course.code+','+course.number+')',
@@ -753,7 +754,7 @@ function load_ta_info_for_approval(ta_id) {
753 754
 
754 755
     }
755 756
   );
756
-}
757
+}*/
757 758
 
758 759
 function add_objective_select(element) {
759 760
   var prev_select = $(element).prev();
@@ -879,9 +880,9 @@ $('#editSelectTA').parent().on('change', function()
879 880
 $('#approvalSelectTA').parent().on('change', function()
880 881
 {
881 882
   var ta_id = $(this).find('select').val();
882
-  if(ta_id != 0){
883
-    load_ta_info_for_approval(ta_id);
884
-    }
883
+  //if(ta_id != 0){
884
+  //  load_ta_info_for_approval(ta_id);
885
+  //  }
885 886
 });
886 887
 
887 888
 
@@ -959,9 +960,9 @@ $('.filterSection').on('change', function()
959 960
         if(panel_id=='editPanel'){
960 961
           load_ta_info_for_edit(ta_id);
961 962
         }
962
-        if(panel_id=='approvePanel'){
963
-          load_ta_info_for_approval(ta_id);
964
-        }
963
+       // if(panel_id=='approvePanel'){
964
+       //   load_ta_info_for_approval(ta_id);
965
+       // }
965 966
       }
966 967
     }
967 968
   );

+ 12
- 4
app/views/local/managers/sCoords/_navigation.blade.php View File

@@ -5,17 +5,25 @@
5 5
     </div>-->
6 6
     <ul class="nav navbar-nav navbar-right">
7 7
       <li>{{ HTML::linkAction('SchoolCoordinatorsController@overview', 'Overview') }}</li>
8
-      <li>{{ HTML::linkAction('TemplatesController@newTemplate', 'Rubrics') }}</li>
9
-      <li class="dropdown">
8
+           <li class="dropdown">
10 9
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Learning and Criterias<span class="caret"></span></a>
11 10
         <ul class="dropdown-menu" role="menu">
12 11
           <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
13 12
           <li>{{ HTML::linkAction('CriteriaController@objectivesIndex', 'Objectives and Criteria') }}</li>
14 13
         </ul>
15 14
       </li>
16
-      <li>{{ HTML::linkAction('Objective2Controller@editSchool', 'Objectives')}}</li>
15
+      <li class="dropdown">
16
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Management<span class="caret"></span></a>
17
+        <ul class="dropdown-menu" role="menu">
18
+<li>{{ HTML::linkAction('Objective2Controller@editSchool', 'Objectives')}}</li>
17 19
       <li>{{ HTML::linkAction('CriteriaController@editSchool', 'Criteria') }}</li>
18
-      @if(count(Auth::user()->courses))
20
+ <li>{{ HTML::linkAction('TemplatesController@newTemplate', 'Rubrics') }}</li>
21
+ <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li>
22
+
23
+
24
+      </ul>
25
+      </li>
26
+            @if(count(Auth::user()->courses))
19 27
       <li> {{ HTML::linkAction('ProfessorsController@overview', 'My Courses', NULL) }}</li>
20 28
       <li class="dropdown">
21 29
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Sections<span class="caret"></span></a>

+ 14
- 7
app/views/local/managers/sCoords/annual-plans.blade.php View File

@@ -120,6 +120,8 @@ $(document).ready(function()
120 120
         var table = $('.datatable').DataTable();
121 121
         
122 122
         table.clear();
123
+
124
+        var optionsForTADict ={};
123 125
         
124 126
 
125 127
 
@@ -161,8 +163,8 @@ $(document).ready(function()
161 163
           nextLetter= nextChar(nextLetter);
162 164
           for(course in courses[objectives[objective].id]){
163 165
             
164
-            courseshtml += ' &#8226; '+courses[objectives[objective].id][course].code+' '+courses[objectives[objective].id][course].number+'<br>'
165
-            courseTAhtml += ' &#8226; '+courses[objectives[objective].id][course].code+' '+courses[objectives[objective].id][course].number+'<br>'
166
+            courseshtml += ' &#8226; '+courses[objectives[objective].id][course].code+' '+courses[objectives[objective].id][course].name+'<br>'
167
+            courseTAhtml += ' &#8226; '+courses[objectives[objective].id][course].code+' '+courses[objectives[objective].id][course].name+'<br>'
166 168
       
167 169
             $divForEach =$('<div/>',{
168 170
             'id':'objective-'+objectives[objective].id
@@ -214,15 +216,17 @@ $(document).ready(function()
214 216
             
215 217
           }
216 218
           }
219
+          typ_course_id = courses[objectives[objective].id][course].typ_course_id
217 220
           var $buttonTA = $('<button/>', {
218 221
            'type': 'button',
219 222
            'class': 'btn btn-secondary',
220
-            'onclick': 'addTAselect("'+optionsForTa+'", "forTA-objective-'+objectives[objective].id+'-course-'+courses[objectives[objective].id][course].typ_course_id+'", '+annual_plan+', '+objectives[objective].id+', '+typ_objective_id+', 0)'
223
+
224
+            'onclick': 'addTAselect("'+optionsForTa+'", "forTA-objective-'+objectives[objective].id+'-course-'+courses[objectives[objective].id][course].typ_course_id+'", '+annual_plan+', '+objectives[objective].id+', '+typ_course_id+', 0)'
221 225
   });
222 226
            
223 227
           $buttonTA.append("+ Add TA");
224
-
225
-
228
+          typ_course_id = courses[objectives[objective].id][course].typ_course_id
229
+          optionsForTADict[typ_course_id] = optionsForTa;
226 230
           
227 231
           
228 232
 
@@ -236,6 +240,8 @@ $(document).ready(function()
236 240
             
237 241
             courseshtml += $divForEach[0].innerHTML +"<br><br>";
238 242
             courseTAhtml += $divForTA[0].innerHTML +"<br><br>";
243
+
244
+          
239 245
           }
240 246
 
241 247
 
@@ -308,12 +314,13 @@ $(document).ready(function()
308 314
        if(json.annual_plans_transformative[objectives[objective].id][typ_course_id].length){
309 315
             for(i=0; i<json.annual_plans_transformative[objectives[objective].id][typ_course_id].length; i++){
310 316
               selected_ta = json.annual_plans_transformative[objectives[objective].id][typ_course_id][i].trans_id;
311
-              addTAselect(optionsForTa, "forTA-objective-"+objectives[objective].id+'-course-'+typ_course_id, annual_plan, objectives[objective].id, typ_course_id, selected_ta);
317
+              addTAselect(optionsForTADict[typ_course_id], "forTA-objective-"+objectives[objective].id+'-course-'+typ_course_id, annual_plan, objectives[objective].id, typ_course_id, selected_ta);
312 318
               
313 319
             }
314 320
           }
315 321
             else{
316
-              addTAselect(optionsForTa, "forTA-objective-"+objectives[objective].id+'-course-'+typ_course_id, annual_plan, objectives[objective].id, typ_course_id, 0);
322
+              $('#')
323
+              addTAselect(optionsForTADict[typ_course_id], "forTA-objective-"+objectives[objective].id+'-course-'+typ_course_id, annual_plan, objectives[objective].id, typ_course_id, 0);
317 324
             }
318 325
         if(json.selected_criteria[objectives[objective].id][typ_course_id].length){
319 326
          

+ 22
- 5
app/views/local/managers/sCoords/objectives.blade.php View File

@@ -17,10 +17,18 @@
17 17
                 <div id='outcomeGroup'>
18 18
                     <label> Associated Outcome</label>
19 19
                     <div class="form-group col-md-11" id='outcomeForm'>
20
+                        <select id="outcome[0]" name="outcome[0]" class="form-control selectpicker">
21
+                            @foreach ($outcomes as $outcome)
22
+                            <option value="{{ $outcome->id }}">
23
+                                {{ $outcome->name }}
24
+    
25
+    
26
+    
27
+                            </option>
28
+                            @endforeach
29
+                        </select>
20 30
 
21
-
22
-                        {{ Form::select('outcome[0]', $outcomes, null, ['class'=>'form-control selectpicker', 'id' =>'outcome[0]']) }}
23
-
31
+                      
24 32
                     </div>
25 33
 
26 34
                 </div>
@@ -115,8 +123,17 @@
115 123
                 <div class="form-group">
116 124
                     <div id='assocOutcomeGroup'>
117 125
                         <label>Associated Outcome</label>
118
-
119
-                        {{ Form::select('assoc_outcome[]', $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcome0']) }}
126
+                        <select id="assoc_outcome0" name="assoc_outcome[]" class="form-control selectpicker">
127
+                            @foreach ($outcomes as $outcome)
128
+                            <option value="{{ $outcome->id }}">
129
+                                {{ $outcome->name }}
130
+    
131
+    
132
+    
133
+                            </option>
134
+                            @endforeach
135
+                        </select>
136
+                   
120 137
 
121 138
                     </div>
122 139
                 </div>

+ 10
- 10
app/views/local/managers/sCoords/view-annual-plans.blade.php View File

@@ -207,7 +207,7 @@ $('#here2').append($buttonForInform);*/
207 207
                "style": "table-layout: fixed",
208 208
                "id": 'allReportToExport',
209 209
               "data-title": plan});
210
-        $thead = $('<thead/>').html("<tr><th>Objectives for courses</th><th>Criteria per Courses</th><th>Transformative Actions</th><th>Expected Outcome</th></tr>");
210
+        $thead = $('<thead/>').html("<tr><th>Objectives for courses</th><th>Criteria per Courses</th><th>Transformative Actions</th></tr>");
211 211
         $tbody = $('<tbody/>');
212 212
         $tableForAll.append($thead);
213 213
         $tableForAll.append($tbody);
@@ -275,7 +275,7 @@ $('#here2').append($buttonForInform);*/
275 275
                "id": json.first.outcomes[outcome].id +'first',
276 276
                "data-title": json.first.outcomes[outcome].name
277 277
              })
278
-             $thead = $('<thead/>').html("<tr><th>Objectives for courses</th><th>Criteria per Course</th><th>Transformative Actions</th><th>Expected Outcome</th></tr>")
278
+             $thead = $('<thead/>').html("<tr><th>Objectives for courses</th><th>Criteria per Course</th><th>Transformative Actions</th></tr>")
279 279
              $table.append($thead);
280 280
              $table.append($('<tbody/>')); 
281 281
              $divTable.append($table);
@@ -302,12 +302,12 @@ $('#here2').append($buttonForInform);*/
302 302
 
303 303
                 for(criterion in json.first.criteria[theObj.id][theCourse.typ_course_id]){
304 304
                   theCrit = json.first.criteria[theObj.id][theCourse.typ_course_id][criterion];
305
-                  courseHTML += '\t&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n<br>';
305
+                  courseHTML += '\t&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n\n<br>';
306 306
                   
307 307
                 }
308 308
                 for(trans in json.first.trans_actions[theObj.id][theCourse.typ_course_id]){
309 309
                   theTA = json.first.trans_actions[theObj.id][theCourse.typ_course_id][trans]
310
-                  courseTAhtml +='\t&nbsp;&nbsp; '+(parseInt(trans)+1)+". "+theTA.at_text+'\n<br>'; 
310
+                  courseTAhtml +='\t&nbsp;&nbsp; '+(parseInt(trans)+1)+". "+theTA.description+'\n\n<br>'; 
311 311
                 }
312 312
               }
313 313
               //courseHTML += '</ul>';
@@ -417,7 +417,7 @@ $('#here2').append($buttonForInform);*/
417 417
                "id": json.second.outcomes[outcome].id +'second',
418 418
                "data-title": json.second.outcomes[outcome].name
419 419
              })
420
-             $thead = $('<thead/>').html("<tr><th>Objectives for courses</th><th>Criteria per Course</th><th>Transformative Actions</th><th>Expected Outcome</tr>")
420
+             $thead = $('<thead/>').html("<tr><th>Objectives for courses</th><th>Criteria per Course</th><th>Transformative Actions</th></tr>")
421 421
              $table.append($thead);
422 422
              $table.append($('<tbody/>')); 
423 423
              $divTable.append($table);
@@ -443,14 +443,14 @@ $('#here2').append($buttonForInform);*/
443 443
                 courseTAhtml += '&#8226; '+theCourse.code + " "+ theCourse.number +'\n\n\n<br>';
444 444
                 for(criterion in json.second.criteria[theObj.id][theCourse.typ_course_id]){
445 445
                   theCrit = json.second.criteria[theObj.id][theCourse.typ_course_id][criterion];
446
-                  courseHTML += '&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n<br>';
446
+                  courseHTML += '&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n\n<br>';
447 447
 
448 448
 
449 449
                 }
450 450
 
451 451
                 for(trans in json.second.trans_actions[theObj.id][theCourse.typ_course_id]){
452 452
                   theTA = json.second.trans_actions[theObj.id][theCourse.typ_course_id][trans]
453
-                  courseTAhtml +='\t&nbsp;&nbsp; '+(parseInt(trans)+1)+". "+theTA.at_text+'\n<br>'; 
453
+                  courseTAhtml +='\t&nbsp;&nbsp; '+(parseInt(trans)+1)+". "+theTA.description+'\n\n<br>'; 
454 454
                 }
455 455
               }
456 456
               //courseHTML += '</ul>';
@@ -585,7 +585,7 @@ function createDataTable(table1){
585 585
                                     tableCopy = doc.content[1];
586 586
                                     doc.content[1] = { text: dt.exportOptions.text, style:'title', margin : [0,0,0,12]};
587 587
                                     doc.content[2] =tableCopy;
588
-                                    doc.content[2].table.widths =['20%', '20%', '20%', '20%', '20%']
588
+                                    doc.content[2].table.widths =['33%', '33%', '34%']
589 589
                                     doc.pageSize = 'LEGAL';
590 590
                                     doc.pageOrientation ='landscape';
591 591
                                     doc.defaultStyle.fontSize = 10;
@@ -755,7 +755,7 @@ function createTheExportAll(table1){
755 755
                                       
756 756
 
757 757
                                       doc.content.push({text:title,style:"title", margin:[0,0,0,12],  });
758
-                                      doc.content.push({table: {body:body1, headerRows:1, widths:['20%', '20%', '20%', '20%', '20%']},layout:"noBorders", pageBreak:'after'});
758
+                                      doc.content.push({table: {body:body1, headerRows:1, widths:['33%', '33%', '34%']},layout:"noBorders", pageBreak:'after'});
759 759
 
760 760
 
761 761
                                       
@@ -1166,7 +1166,7 @@ function createTheTrans(table1){
1166 1166
                                         suggested = json_to_use.suggested[trans][0];
1167 1167
                                       }
1168 1168
                                       else suggested =0;
1169
-                                      title_trans = this_is_the_json[trans].at_text;
1169
+                                      title_trans = this_is_the_json[trans].description;
1170 1170
                                       json_outcomes = json_to_use.outcomes[trans];
1171 1171
                                       if(suggested){
1172 1172
                                       doc.content.push({text:'\n\n'+title_trans+'['+suggested.surnames + ', '+suggested.first_name+']' ,style:"title", margin:[0,0,0,12],  });

+ 1
- 1
app/views/local/professors/_navigation.blade.php View File

@@ -8,7 +8,7 @@
8 8
       <li>{{ HTML::linkAction('ProfessorsController@overview', 'My Courses') }}</li>
9 9
       {{-- la linea siguiente comentada es lo que habia originalmente. tanto la linea como este comentario se pueden borrar --}}
10 10
       {{-- <li>{{ HTML::linkAction('CriteriaController@index', 'Learning Outcomes and Criteria') }}</li> --}}
11
-      <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li>
11
+      {{--<li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li>--}}
12 12
       <li class="dropdown">
13 13
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Learning and Criterias<span class="caret"></span></a>
14 14
         <ul class="dropdown-menu" role="menu">