Browse Source

Push reportes, bugs,

parent
commit
97a992ee7c
28 changed files with 1082 additions and 295 deletions
  1. 9
    5
      app/controllers/AnnualPlansController.php
  2. 9
    1
      app/controllers/CriteriaController.php
  3. 3
    2
      app/controllers/Objective2Controller.php
  4. 9
    7
      app/controllers/OutcomesController.php
  5. 3
    3
      app/controllers/TemplatesController.php
  6. 12
    12
      app/controllers/TransformativeActionsController.php
  7. 143
    0
      app/models/Activity.php
  8. 2
    0
      app/models/Course.php
  9. 9
    2
      app/models/Criterion.php
  10. 9
    0
      app/models/Rubric.php
  11. 4
    4
      app/routes.php
  12. 1
    1
      app/views/global/view-learning-outcomes-criteria.blade.php
  13. 402
    19
      app/views/layouts/master-1.blade.php
  14. 2
    2
      app/views/layouts/master-2.blade.php
  15. 101
    34
      app/views/local/managers/admins/criteria.blade.php
  16. 3
    2
      app/views/local/managers/pCoords/_navigation.blade.php
  17. 22
    23
      app/views/local/managers/pCoords/criteria.blade.php
  18. 4
    2
      app/views/local/managers/sCoords/_navigation.blade.php
  19. 0
    163
      app/views/local/managers/sCoords/annual_plan_js.blade.php
  20. 5
    3
      app/views/local/managers/sCoords/criteria.blade.php
  21. 0
    0
      app/views/local/managers/shared/annual-plans.blade.php
  22. 8
    1
      app/views/local/managers/shared/rubric_list.blade.php
  23. 1
    1
      app/views/local/managers/shared/rubrics.blade.php
  24. 0
    0
      app/views/local/managers/shared/view-annual-plans.blade.php
  25. 6
    6
      app/views/local/managers/shared/view_formative.blade.php
  26. 1
    1
      app/views/local/professors/_navigation.blade.php
  27. 3
    1
      app/views/local/professors/assessment.blade.php
  28. 311
    0
      app/views/local/professors/new_assessment_report.blade.php

+ 9
- 5
app/controllers/AnnualPlansController.php View File

46
     $annual_plans = DB::select("select semester_start, semester_end, program_id, annual_plans.id, academic_year from annual_plans, annual_cycle   where annual_plans.annual_cycle_id = annual_cycle.id and program_id ={$program_id} order by id desc");
46
     $annual_plans = DB::select("select semester_start, semester_end, program_id, annual_plans.id, academic_year from annual_plans, annual_cycle   where annual_plans.annual_cycle_id = annual_cycle.id and program_id ={$program_id} order by id desc");
47
 
47
 
48
 
48
 
49
-    return View::make('local.managers.sCoords.view-annual-plans', compact('title', 'program_id', 'annual_plans'));
49
+    return View::make('local.managers.shared.view-annual-plans', compact('title', 'program_id', 'annual_plans'));
50
   }
50
   }
51
 
51
 
52
   /**
52
   /**
135
     $title = "Annual Plans";
135
     $title = "Annual Plans";
136
     //$typ_parts = DB::select("select * from typ_parts");
136
     //$typ_parts = DB::select("select * from typ_parts");
137
 
137
 
138
-//     $current_typ = DB::select("select * from three_year_plan where year_start <=" . date('Y') . " and year_end >=" . date('Y'))[0];
138
+    //     $current_typ = DB::select("select * from three_year_plan where year_start <=" . date('Y') . " and year_end >=" . date('Y'))[0];
139
     $current_typ_arr = DB::select("select * from three_year_plan where year_start <=" . date('Y') . " and year_end >=" . date('Y'));
139
     $current_typ_arr = DB::select("select * from three_year_plan where year_start <=" . date('Y') . " and year_end >=" . date('Y'));
140
-// 	var_dump($current_typ);exit();
141
-	if(!empty($current_typ_arr))$current_typ=$current_typ_arr[0];else {$current_typ= new stdClass();$current_typ->id=0;}
140
+    // 	var_dump($current_typ);exit();
141
+    if (!empty($current_typ_arr)) $current_typ = $current_typ_arr[0];
142
+    else {
143
+      $current_typ = new stdClass();
144
+      $current_typ->id = 0;
145
+    }
142
 
146
 
143
 
147
 
144
     $program = Program::where('id', '=', $program_id)->first();
148
     $program = Program::where('id', '=', $program_id)->first();
155
     }*/
159
     }*/
156
     $alltyp = DB::select('select * from three_year_plan order by id desc');
160
     $alltyp = DB::select('select * from three_year_plan order by id desc');
157
     $current_typ = $current_typ->id;
161
     $current_typ = $current_typ->id;
158
-    return View::make('local.managers.sCoords.annual-plans', compact('title', 'annual_plans', 'current_typ', 'program', 'outcomes', 'allSemesterOrder', 'alltyp'));
162
+    return View::make('local.managers.shared.annual-plans', compact('title', 'annual_plans', 'current_typ', 'program', 'outcomes', 'allSemesterOrder', 'alltyp'));
159
   }
163
   }
160
 
164
 
161
   public function fetchInfo()
165
   public function fetchInfo()

+ 9
- 1
app/controllers/CriteriaController.php View File

121
 
121
 
122
                 $program_ids = DB::table('program_user')
122
                 $program_ids = DB::table('program_user')
123
                     ->where('user_id', Auth::user()->id)
123
                     ->where('user_id', Auth::user()->id)
124
-                    ->lists('id');
124
+                    ->lists('program_id');
125
 
125
 
126
                 break;
126
                 break;
127
         }
127
         }
128
         $outcome_id = Input::get('outcomeID');
128
         $outcome_id = Input::get('outcomeID');
129
+        Log::info($outcome_id);
129
 
130
 
130
         $json = DB::table('objectives')
131
         $json = DB::table('objectives')
131
             ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
132
             ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
135
             ->select('objectives.*', 'objective_outcome.*')
136
             ->select('objectives.*', 'objective_outcome.*')
136
             ->distinct()
137
             ->distinct()
137
             ->get();
138
             ->get();
139
+        Log::info(DB::table('objectives')
140
+            ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
141
+            ->join('objective_program', 'objective_program.objective_id', '=', 'objectives.id')
142
+            ->where('outcome_id', '=', $outcome_id)
143
+            ->whereIn('program_id', $program_ids)
144
+            ->select('objectives.*', 'objective_outcome.*')
145
+            ->distinct()->toSql());
138
         foreach ($json as $objective) {
146
         foreach ($json as $objective) {
139
             $objective->program_ids = json_encode(DB::table('objective_program')
147
             $objective->program_ids = json_encode(DB::table('objective_program')
140
                 ->where('objective_id', $objective->objective_id)
148
                 ->where('objective_id', $objective->objective_id)

+ 3
- 2
app/controllers/Objective2Controller.php View File

78
 
78
 
79
 		$clean_input['outcome_id'] = Input::get('outcome');
79
 		$clean_input['outcome_id'] = Input::get('outcome');
80
 		$counter = Input::get('counter') + 0;
80
 		$counter = Input::get('counter') + 0;
81
+		Log::info($clean_input);
81
 
82
 
82
-		for ($i = 0; $i < $counter; $i++) {
83
-			$clean_input['outcome_id'][$i] = trim(preg_replace('/\t+/', '', $clean_input['outcome_id'][$i]));
83
+		foreach ($clean_input['outcome_id'] as $index => $outcome_id) {
84
+			$clean_input['outcome_id'][$index] = trim(preg_replace('/\t+/', '', $clean_input['outcome_id'][$index]));
84
 		}
85
 		}
85
 
86
 
86
 		$clean_input['program_id'] = Input::get('program_id');
87
 		$clean_input['program_id'] = Input::get('program_id');

+ 9
- 7
app/controllers/OutcomesController.php View File

987
     }
987
     }
988
 
988
 
989
 
989
 
990
-    // Report for a single professor with a single learning outcome
991
-    public function professorAssessmentReport($outcome_id)
990
+    // Report for a single professor //with a single learning outcome
991
+    public function professorAssessmentReport()
992
     {
992
     {
993
-        $outcome = Outcome::find($outcome_id);
993
+        //$outcome = Outcome::find($outcome_id);
994
 
994
 
995
-        if (!$outcome)
996
-            App::abort('404');
997
-        $title = "My Courses' Assessment Report: " . $outcome->name;
995
+        //if (!$outcome)
996
+        //    App::abort('404');
997
+        $title = "My Courses' Assessment Report";
998
         $activity_criterion = DB::table('assessments')->lists('activity_criterion_id');
998
         $activity_criterion = DB::table('assessments')->lists('activity_criterion_id');
999
         $courses = DB::table("courses")
999
         $courses = DB::table("courses")
1000
             ->join('activities', 'activities.course_id', '=', 'courses.id')
1000
             ->join('activities', 'activities.course_id', '=', 'courses.id')
1022
             ->get();*/
1022
             ->get();*/
1023
 
1023
 
1024
 
1024
 
1025
-        return View::make('local.professors.assessment_report', compact('title', 'outcome', 'courses'));
1025
+
1026
+
1027
+        return View::make('local.professors.new_assessment_report', compact('title', 'courses'));
1026
     }
1028
     }
1027
 }
1029
 }

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

47
 		}
47
 		}
48
 		$templates = Template::orderBy('name')->get();
48
 		$templates = Template::orderBy('name')->get();
49
 
49
 
50
-		return View::make('local.managers.admins.rubric_list', compact('title', 'global_templates', 'schools', 'templates'));
50
+		return View::make('local.managers.shared.rubric_list', compact('title', 'global_templates', 'schools', 'templates', 'role'));
51
 	}
51
 	}
52
 
52
 
53
-	public function schoolCoordinatorIndex()
53
+	/*public function schoolCoordinatorIndex()
54
 	{
54
 	{
55
 		$title = 'Rubric List';
55
 		$title = 'Rubric List';
56
 
56
 
63
 		$templates = Template::orderBy('name')->get();
63
 		$templates = Template::orderBy('name')->get();
64
 
64
 
65
 		return View::make('local.managers.admins.rubric_list', compact('title', 'global_templates', 'schools', 'templates'));
65
 		return View::make('local.managers.admins.rubric_list', compact('title', 'global_templates', 'schools', 'templates'));
66
-	}
66
+	}*/
67
 
67
 
68
 	public function show(Template $template)
68
 	public function show(Template $template)
69
 	{
69
 	{

+ 12
- 12
app/controllers/TransformativeActionsController.php View File

1258
     Log::info($semesters);
1258
     Log::info($semesters);
1259
 
1259
 
1260
 
1260
 
1261
-    if (in_array(0, $semesters)) {
1261
+    /* if (in_array(0, $semesters)) {
1262
       $semesters = DB::table('semesters')->where('is_visible', 1)->lists('id');
1262
       $semesters = DB::table('semesters')->where('is_visible', 1)->lists('id');
1263
-    }
1263
+    }*/
1264
 
1264
 
1265
-    if (in_array(0, $programs)) {
1265
+    /*  if (in_array(0, $programs)) {
1266
 
1266
 
1267
       $role = Auth::user()->role;
1267
       $role = Auth::user()->role;
1268
 
1268
 
1277
           $programs = DB::table('program_user')->where('user_id', Auth::user()->id)->lists('program_id');
1277
           $programs = DB::table('program_user')->where('user_id', Auth::user()->id)->lists('program_id');
1278
           break;
1278
           break;
1279
       }
1279
       }
1280
-    }
1280
+    }*/
1281
 
1281
 
1282
     $typ_semester_outcome = DB::table('typ_semester_outcome')
1282
     $typ_semester_outcome = DB::table('typ_semester_outcome')
1283
-      ->whereIn('semester_id', $semesters)
1283
+      ->where('semester_id', $semesters)
1284
       ->where('outcome_id', $outcome_id)
1284
       ->where('outcome_id', $outcome_id)
1285
       ->lists('id');
1285
       ->lists('id');
1286
 
1286
 
1313
 
1313
 
1314
 
1314
 
1315
     $grouped_courses = DB::table('courses')
1315
     $grouped_courses = DB::table('courses')
1316
-      ->whereIn('program_id', $programs)
1317
-      ->whereIn('semester_id', $semesters)
1316
+      ->where('program_id', $programs)
1317
+      ->where('semester_id', $semesters)
1318
       ->join('activities', 'activities.course_id', '=', 'courses.id')
1318
       ->join('activities', 'activities.course_id', '=', 'courses.id')
1319
       ->join('activity_criterion', 'activities.id', '=', 'activity_criterion.activity_id')
1319
       ->join('activity_criterion', 'activities.id', '=', 'activity_criterion.activity_id')
1320
       ->join('transformative_activity_criterion as tac', 'tac.activity_criterion_id', '=', 'activity_criterion.id')
1320
       ->join('transformative_activity_criterion as tac', 'tac.activity_criterion_id', '=', 'activity_criterion.id')
1355
           ->join('criteria','activity_criterion.criterion_id','=','criteria.id')
1355
           ->join('criteria','activity_criterion.criterion_id','=','criteria.id')
1356
           ->where('activity_id', $activity->id)
1356
           ->where('activity_id', $activity->id)
1357
           ->select('criteria')*/
1357
           ->select('criteria')*/
1358
-          Log::info($activity->trans_action_id);
1358
+          //Log::info($activity->trans_action_id);
1359
           $activity->objectives = DB::table('transformative_objective')
1359
           $activity->objectives = DB::table('transformative_objective')
1360
             ->join('objectives', 'transformative_objective.objective_id', '=', 'objectives.id')
1360
             ->join('objectives', 'transformative_objective.objective_id', '=', 'objectives.id')
1361
             ->where('ta_id', $activity->trans_action_id)
1361
             ->where('ta_id', $activity->trans_action_id)
1362
             ->get();
1362
             ->get();
1363
           foreach ($activity->objectives as $objective) {
1363
           foreach ($activity->objectives as $objective) {
1364
-            Log::info($activity->activity_id);
1365
-            Log::info($objective->objective_id);
1366
-            Log::info(DB::table('criterion_objective_outcome')
1364
+            // Log::info($activity->activity_id);
1365
+            // Log::info($objective->objective_id);
1366
+            /* Log::info(DB::table('criterion_objective_outcome')
1367
               ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
1367
               ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
1368
               ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
1368
               ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
1369
               ->where('activity_criterion.activity_id', $activity->activity_id)
1369
               ->where('activity_criterion.activity_id', $activity->activity_id)
1370
               ->where('objective_id', $objective->objective_id)
1370
               ->where('objective_id', $objective->objective_id)
1371
               ->select('criteria.*')
1371
               ->select('criteria.*')
1372
               ->distinct()
1372
               ->distinct()
1373
-              ->toSql());
1373
+              ->toSql());*/
1374
             $objective->criterion = DB::table('criterion_objective_outcome')
1374
             $objective->criterion = DB::table('criterion_objective_outcome')
1375
               ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
1375
               ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
1376
               ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
1376
               ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')

+ 143
- 0
app/models/Activity.php View File

108
     return $criteria_achieved_percentage;
108
     return $criteria_achieved_percentage;
109
   }
109
   }
110
 
110
 
111
+  public function allActivityCriterionInfo()
112
+  {
113
+
114
+    $activity_criterion = DB::table('activity_criterion')
115
+      ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
116
+      ->where('activity_id', $this->id)
117
+      ->get();
118
+
119
+
120
+
121
+
122
+    return $activity_criterion;
123
+  }
124
+
125
+  public function getOutcomeReport()
126
+  {
127
+    $outcomes = DB::table('activity_criterion')
128
+      ->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
129
+      ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
130
+      ->where('activity_criterion.activity_id', $this->id)
131
+      ->select('outcomes.*')
132
+      ->distinct()
133
+      ->get();
134
+    $rubric = $this->rubric[0];
135
+
136
+    /*
137
+
138
+    foreach($outcomes as $outcome){
139
+      $ac_criteria = DB::table('criterion_objective_outcome as cobo')
140
+      ->join('activity_criterion as ac','ac.criterion_id','=','cobo.criterion_id')
141
+      ->where("outcome_id",$outcome->id)
142
+      ->where("activity_id",$this->id)
143
+      ->select('ac.*')
144
+      ->distinct()
145
+      ->get();
146
+      $conteo_de_criterios = 0;
147
+      $students_who_achieved =[];
148
+
149
+      $outcome->students_attempted = DB::table("assessments")
150
+      ->join("activity_criterion as ac", 'ac.id','=','assessments.activity_criterion_id')
151
+      ->join("criterion_objective_outcome as cobo",'cobo.criterion_id','=','ac.criterion_id')
152
+      ->where('outcome_id',$outcome->id)
153
+      ->where('ac.activity_id',$this->id)
154
+      ->count();
155
+      
156
+
157
+      foreach($ac_criteria as $criterion){
158
+        $students_attempted = Criterion::students_attempted($criterion->criterion_id, $this->id);
159
+        $students_achieved = DB::table('assessments')
160
+				->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
161
+				->where('activity_criterion.id', $criterion->id)
162
+				->where('assessments.score', '>=', $rubric->expected_points)
163
+				->lists("student_id");
164
+        if((count($students_achieved)/$students_attempted) * 100 >$rubric->expected_percentage){
165
+          foreach($students_achieved as $stu_id){
166
+            if(!array_key_exists($stu_id, $students_who_achieved)){
167
+              $students_who_achieved[$stu_id] = 1;
168
+            }
169
+          }
170
+          $conteo_de_criterios++;
171
+
172
+        
173
+
174
+
175
+        }
176
+
177
+      }
178
+      $outcome->students_achieved = count($students_who_achieved);
179
+
180
+    }*/
181
+
182
+    $students_attempted =  DB::table('assessments')
183
+      ->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
184
+      ->where('activity_criterion.activity_id', $this->id)
185
+
186
+      ->get();
187
+
188
+    $student_criteria = [];
189
+
190
+    foreach ($outcomes as $outcome) {
191
+      $ac_criteria = DB::table('criterion_objective_outcome as cobo')
192
+        ->join('activity_criterion as ac', 'ac.criterion_id', '=', 'cobo.criterion_id')
193
+        ->where("outcome_id", $outcome->id)
194
+        ->where("activity_id", $this->id)
195
+        ->select('ac.*')
196
+        ->distinct()
197
+        ->lists('id');
198
+
199
+      /*$student_achieved = DB::table('assessments')
200
+        ->whereIn('activity_criterion_id', $ac_criteria)
201
+        ->where('score', '>=', $rubric->expected_points)
202
+        ->groupBy('student_id')
203
+        ->select('student_id', 'count(activity_criterion_id)');
204
+      $students_attempted = DB::table('assessments as a')
205
+        ->whereIn('a.activity_criterion_id', $ac_criteria)
206
+        ->groupBy('a.student_id')
207
+        ->leftJoin('assessments as b', function ($join) use ($ac_criteria, $rubric) {
208
+          $join->on('b.student_id', '=', 'a.student_id')
209
+            ->where('b.activity_criterion_id', '=', 'a.activity_criterion_id')
210
+            ->where('b.score', '>=', $rubric->expected_points);
211
+        })
212
+        ->select('a.student_id', DB::raw('count(`a`.`activity_criterion_id`) attempted'), DB::raw('count(`b`.`activity_criterion_id`) achieved'));
213
+      Log::info($students_attempted->get());*/
214
+      $students_attempted = DB::table('assessments as a')
215
+        ->whereIn('a.activity_criterion_id', $ac_criteria)
216
+        ->groupBy('a.student_id')
217
+        ->select(
218
+          'a.student_id',
219
+          DB::raw('count(`a`.`activity_criterion_id`) attempted'),
220
+          DB::raw("count(case when score >= {$rubric->expected_points} then 1 else null end) as achieved")
221
+        )->get();
222
+
223
+      $outcome->attempted = count($students_attempted);
224
+
225
+      $conteo_outcome_achieved = 0;
226
+
227
+      foreach ($students_attempted as $student) {
228
+        Log::info($student->achieved / $student->attempted * 100);
229
+        if ($student->achieved / $student->attempted * 100 >= $outcome->expected_outcome) {
230
+          $conteo_outcome_achieved++;
231
+        }
232
+      }
233
+      $outcome->achieved = $conteo_outcome_achieved;
234
+      $outcome->percentage = round(($outcome->achieved / $outcome->attempted * 100), 2);
235
+
236
+
237
+
238
+
239
+
240
+      /*foreach ($students_attempted as $student) {
241
+        $student_criteria[$student];
242
+      }
243
+
244
+      $conteo_de_criterios = 0;
245
+      $students_who_achieved = [];
246
+      foreach ($ac_criteria as $ac) {
247
+        $students_attempted = DB::table("assessments")
248
+          ->where('activity_criterion_id', $ac->id)
249
+          ->get();
250
+      }*/
251
+    }
252
+    return $outcomes;
253
+  }
111
   // o_ach_array
254
   // o_ach_array
112
   public function getOAchArrayAttribute($value)
255
   public function getOAchArrayAttribute($value)
113
   {
256
   {

+ 2
- 0
app/models/Course.php View File

20
     return $this->belongsTo('User')->orderBy('surnames', 'asc')->orderBy('first_name', 'asc');
20
     return $this->belongsTo('User')->orderBy('surnames', 'asc')->orderBy('first_name', 'asc');
21
   }
21
   }
22
 
22
 
23
+
24
+
23
   // TODO: Remove
25
   // TODO: Remove
24
   public function activities()
26
   public function activities()
25
   {
27
   {

+ 9
- 2
app/models/Criterion.php View File

10
 	//     protected $table = 'new_criteria';
10
 	//     protected $table = 'new_criteria';
11
 	protected $table = 'criteria';
11
 	protected $table = 'criteria';
12
 
12
 
13
-	public function outcomes()
13
+	public function outcomes($criterion_id)
14
 	{
14
 	{
15
 		//	    return $this->belongs('Objective')->belongs('Outcome');
15
 		//	    return $this->belongs('Objective')->belongs('Outcome');
16
 		//	    TODO: Changes here
16
 		//	    TODO: Changes here
17
 		//		return $this->belongs('Outcome');
17
 		//		return $this->belongs('Outcome');
18
-		return $this->hasManyThrough('Outcome', 'Objective');
18
+		$outcomes = DB::table('criterion_objective_outcome')
19
+			->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
20
+			->where('criterion_id', $criterion_id)
21
+			->select('outcomes.*')
22
+			->distinct()
23
+			->get();
24
+		return $outcomes;
25
+		//$this->hasManyThrough('Outcome', 'Objective');
19
 	}
26
 	}
20
 
27
 
21
 	public function objectives()
28
 	public function objectives()

+ 9
- 0
app/models/Rubric.php View File

13
       'name' => 10,
13
       'name' => 10,
14
     ],
14
     ],
15
   ];
15
   ];
16
+  public function getTitles()
17
+  {
18
+    $titles = DB::table('titles')
19
+      ->join('rubric_title', 'rubric_title.title_id', '=', 'titles.id')
20
+      ->where('rubric_id', $this->id)
21
+      ->orderBy('position', "ASC")
22
+      ->get();
23
+    return $titles;
24
+  }
16
 
25
 
17
   public function professor()
26
   public function professor()
18
   {
27
   {

+ 4
- 4
app/routes.php View File

349
 
349
 
350
         // Route::post('storeTypInfo', 'OutcomesController@storeCycleInfo'); //TODO: where is this route supposed to be placed?
350
         // Route::post('storeTypInfo', 'OutcomesController@storeCycleInfo'); //TODO: where is this route supposed to be placed?
351
         Route::get('programs', 'ProgramsController@index');
351
         Route::get('programs', 'ProgramsController@index');
352
-        Route::get('template-list', 'TemplatesController@schoolCoordinatorIndex');
352
+        Route::get('template-list', 'TemplatesController@index');
353
         Route::post('deleteObjective', 'Objective2Controller@delete');
353
         Route::post('deleteObjective', 'Objective2Controller@delete');
354
         // Print school report
354
         // Print school report
355
         Route::get('print_school/{id}', 'SchoolsController@print_school');
355
         Route::get('print_school/{id}', 'SchoolsController@print_school');
411
         Route::get('printRubric/{id}', 'TemplatesController@printview');
411
         Route::get('printRubric/{id}', 'TemplatesController@printview');
412
         Route::get('rubric/{rubric_id}', 'RubricsController@show_limited');
412
         Route::get('rubric/{rubric_id}', 'RubricsController@show_limited');
413
         Route::get('grouped_course/{code}/{number}/{semester_code}', 'CoursesController@showGrouped');
413
         Route::get('grouped_course/{code}/{number}/{semester_code}', 'CoursesController@showGrouped');
414
-        Route::get('template-list', 'TemplatesController@schoolCoordinatorIndex');
414
+        Route::get('template-list', 'TemplatesController@index');
415
 
415
 
416
         //Criteria and objectives
416
         //Criteria and objectives
417
         Route::get('program-criteria', 'CriteriaController@editProgram');
417
         Route::get('program-criteria', 'CriteriaController@editProgram');
538
         Route::get('export_grades/{id}', 'CoursesController@exportGrades');
538
         Route::get('export_grades/{id}', 'CoursesController@exportGrades');
539
         Route::get('learning-objectives-criteria', 'CriteriaController@objectivesIndex');
539
         Route::get('learning-objectives-criteria', 'CriteriaController@objectivesIndex');
540
         // Assessment reports
540
         // Assessment reports
541
-        Route::get('professor-assessment-report/{outcome_id}', 'OutcomesController@professorAssessmentReport');
542
-        Route::get('professor-assessment-reports', 'OutcomesController@professorAssessmentReports');
541
+        //Route::get('professor-assessment-report/{outcome_id}', 'OutcomesController@professorAssessmentReport');
542
+        Route::get('professor-assessment-reports', 'OutcomesController@professorAssessmentReport');
543
 
543
 
544
         Route::get('general-studies-overview', 'ProfessorsController@generalStudiesOverview');
544
         Route::get('general-studies-overview', 'ProfessorsController@generalStudiesOverview');
545
     });
545
     });

+ 1
- 1
app/views/global/view-learning-outcomes-criteria.blade.php View File

1
-@extends('layouts.master-2')
1
+@extends('layouts.master-1')
2
 
2
 
3
 @section('navigation')
3
 @section('navigation')
4
     @if(Auth::user()->role==1)
4
     @if(Auth::user()->role==1)

+ 402
- 19
app/views/layouts/master-1.blade.php
File diff suppressed because it is too large
View File


+ 2
- 2
app/views/layouts/master-2.blade.php View File

92
         <div class="container-fluid" style="margin: 48px">
92
         <div class="container-fluid" style="margin: 48px">
93
             <div class="row">
93
             <div class="row">
94
                 <div class="col-md-12">
94
                 <div class="col-md-12">
95
-                    <div class="semesterbar">
95
+                  <!--  <div class="semesterbar">
96
                         <p>
96
                         <p>
97
                             <strong>Viewing:</strong>
97
                             <strong>Viewing:</strong>
98
                             @foreach (Session::get('semesters_info') as $semester_info)
98
                             @foreach (Session::get('semesters_info') as $semester_info)
100
                             @endforeach
100
                             @endforeach
101
                             <a href="#" data-toggle="modal" data-target="#changeTermModal"> <strong>Change</strong></a>
101
                             <a href="#" data-toggle="modal" data-target="#changeTermModal"> <strong>Change</strong></a>
102
                         </p>
102
                         </p>
103
-                    </div>
103
+                    </div>--> 
104
                     
104
                     
105
                 </div>
105
                 </div>
106
             </div>
106
             </div>

+ 101
- 34
app/views/local/managers/admins/criteria.blade.php View File

34
                 <div id='objectiveGroupFor0' data-value = '1'>
34
                 <div id='objectiveGroupFor0' data-value = '1'>
35
                     <div class="form-group col-md-11">
35
                     <div class="form-group col-md-11">
36
                         <label>Associated Objectives for Outcome 1</label>
36
                         <label>Associated Objectives for Outcome 1</label>
37
-                        <select id="objective_0_counter_1" name="objective[]" class="form-control selectpicker">
37
+                        <select id="objective_0_counter_1" name="objective[]" class="form-control selectpicker" onchange ="visiblePrograms('allOutcomes')">
38
                         </select>
38
                         </select>
39
 
39
 
40
                     </div>
40
                     </div>
62
                 </button>
62
                 </button>
63
 
63
 
64
                 <!-- Associated Program -->
64
                 <!-- Associated Program -->
65
-                <div class="form-group">
65
+                <div class="form-group" id = 'program-checkboxes'>
66
                     {{ Form::label('program_id', 'Associated Program') }}<br>
66
                     {{ Form::label('program_id', 'Associated Program') }}<br>
67
                     <br>
67
                     <br>
68
 
68
 
69
                     @foreach ($programs as $program)
69
                     @foreach ($programs as $program)
70
 
70
 
71
-                    <input type="checkbox" id="{{ $program->name }}" name="program_id[]" value="{{$program->id}}">
72
-                    <label for="{{ $program->name }}"> {{ $program->name }} [{{ $program->school->name }}]</label><br>
73
-                    @endforeach
71
+                    <input type="checkbox" id="program-{{ $program->id }}" name="program_id[]" value="{{$program->id}}" >
72
+                    <label for="program-{{ $program->id }}"> {{ $program->name }} [{{ $program->school->name }}]</label><br>
73
+                     @endforeach
74
 
74
 
75
                 </div>
75
                 </div>
76
 
76
 
169
     <div id='assoc_objectiveGroupFor0' data-value="1">
169
     <div id='assoc_objectiveGroupFor0' data-value="1">
170
                         <div class="form-group col-md-11">
170
                         <div class="form-group col-md-11">
171
                             <label>Associated Objectives for Outcome 1</label>
171
                             <label>Associated Objectives for Outcome 1</label>
172
-                            <select id="assoc_objective_0_counter_1" name="objective[]" class="form-control selectpicker">
172
+                            <select id="assoc_objective_0_counter_1" name="objective[]" class="form-control selectpicker" onchange ="visiblePrograms('allAssocOutcomes')">
173
                                 <option value="0">No associated objectives</option>
173
                                 <option value="0">No associated objectives</option>
174
                             </select>
174
                             </select>
175
     
175
     
190
                         Add another Outcome
190
                         Add another Outcome
191
                     </button>
191
                     </button>
192
                 <!-- Associated Program -->
192
                 <!-- Associated Program -->
193
-                <div class="form-group">
193
+                <div class="form-group" id = 'assoc-program-checkboxes'>
194
 
194
 
195
                     {{ Form::label('program_id2', 'Associated Program') }}<br><br>
195
                     {{ Form::label('program_id2', 'Associated Program') }}<br><br>
196
                     @foreach ($programs as $program)
196
                     @foreach ($programs as $program)
197
 
197
 
198
-                    <input type="checkbox" id="assoc_program_id_{{ $program->id }}" name="program_id[]" value="{{$program->id}}">
199
-                    <label for="assoc_program_id_{{ $program->id }}"> {{ $program->name }} <sub>[{{ $program->school->name }}]</sub></label><br>
200
-                    @endforeach
198
+                    <input type="checkbox" id="assoc_program-{{ $program->id }}" name="program_id[]" value="{{$program->id}}">
199
+                    <label for="assoc_program-{{ $program->id }}"> {{ $program->name }} <sub>[{{ $program->school->name }}]</sub></label><br>
200
+                     @endforeach
201
                 </div>
201
                 </div>
202
 
202
 
203
 
203
 
292
 })
292
 })
293
 
293
 
294
 
294
 
295
+visibleProgram = {};
296
+visibleProgram["allAssocOutcomes"]= {}
297
+visibleProgram["allOutcomes"]={}
298
+function visiblePrograms(allOutcomesDiv){
299
+    $('#'+allOutcomesDiv).parent().find('input:checkbox').each(function(index){
300
+
301
+        id = $(this).attr('id');
302
+        $(this).prop( "checked", false );
303
+        program_id = $(this).val();
304
+        if(!(program_id in visibleProgram[allOutcomesDiv])){
305
+            visibleProgram[allOutcomesDiv][program_id] ={};
306
+        }
307
+        visibleProgram[allOutcomesDiv][program_id]["checkbox"] =$(this).detach();
308
+        $("label[for='"+id+"']").next('br').remove();
309
+        visibleProgram[allOutcomesDiv][program_id]["label"] =$("label[for='"+id+"']").detach();
310
+
311
+    })
312
+    if(allOutcomesDiv =="allOutcomes"){
313
+    $('#'+allOutcomesDiv).parent().find("select[name='objective[]']").each(function(index){
314
+        var the_programs = $(this).find(':selected').data('program-ids');
315
+        if(!the_programs) return;
316
+        
317
+        
318
+        for(index in the_programs){
319
+            program_id = the_programs[index];
320
+            
321
+            if(program_id in visibleProgram[allOutcomesDiv] && 
322
+            !($('#program-checkboxes').find('#'+visibleProgram[allOutcomesDiv][program_id]['checkbox'].attr('id')).val())){
323
+                visibleProgram[allOutcomesDiv][program_id]['checkbox'].appendTo('#program-checkboxes');
324
+                visibleProgram[allOutcomesDiv][program_id]['label'].appendTo("#program-checkboxes");
325
+                $('#program-checkboxes').append('<br>');
326
+
327
+                
328
+
329
+            }
330
+        }
331
+        
332
+    })
333
+    }
334
+    else{
335
+        $('#'+allOutcomesDiv).find("select[name='objective[]']").each(function(index){
336
+        var the_programs = $(this).find(':selected').data('program-ids');
337
+        if(!the_programs) return;
338
+        
339
+        
340
+        for(index in the_programs){
341
+            program_id = the_programs[index];
342
+            if(program_id in visibleProgram[allOutcomesDiv] && 
343
+            !($('#assoc-program-checkboxes').find('#'+visibleProgram[allOutcomesDiv][program_id]['checkbox'].attr('id')).val())){
344
+                visibleProgram[allOutcomesDiv][program_id]['checkbox'].appendTo('#assoc-program-checkboxes');
345
+                visibleProgram[allOutcomesDiv][program_id]['label'].appendTo("#assoc-program-checkboxes");
346
+                $('#assoc-program-checkboxes').append('<br>');
347
+
348
+                
349
+
350
+            }
351
+        }
352
+        
353
+    })
354
+    }
355
+
356
+}
295
     function addOptions(select, max, scaleDiv) {
357
     function addOptions(select, max, scaleDiv) {
296
 
358
 
297
         
359
         
477
         'class': "selectpicker form-control",
539
         'class': "selectpicker form-control",
478
         'name': "objective[]",
540
         'name': "objective[]",
479
         'data-live-search': 'true',
541
         'data-live-search': 'true',
480
-        'id': 'objective_'+counter +'_counter_1'  
481
-    });
542
+        'id': 'objective_'+counter +'_counter_1' ,
543
+        'onchange': "visiblePrograms('allOutcomes')"
544
+        });
482
 
545
 
483
     var empty_div = $('<div/>',{
546
     var empty_div = $('<div/>',{
484
         'class': 'col-md-1'
547
         'class': 'col-md-1'
544
 
607
 
545
     }
608
     }
546
     //Delete Objective
609
     //Delete Objective
547
-    function deleteObjective(objectiveForm, closeObj, objectiveGroup) {
610
+    function deleteObjective(objectiveForm, closeObj, objectiveGroup, allOutcomes) {
548
         $div = document.getElementById(objectiveForm);
611
         $div = document.getElementById(objectiveForm);
549
         $div.remove();
612
         $div.remove();
550
         $div = document.getElementById(closeObj);
613
         $div = document.getElementById(closeObj);
551
         $div.remove();
614
         $div.remove();
552
         counter = parseInt($('#'+objectiveGroup).data("value"));
615
         counter = parseInt($('#'+objectiveGroup).data("value"));
553
         $('#'+objectiveGroup).data("value", counter-1);
616
         $('#'+objectiveGroup).data("value", counter-1);
617
+        visiblePrograms(allOutcomes);
554
 
618
 
555
 
619
 
556
     }
620
     }
567
             'name': "objective[]",
631
             'name': "objective[]",
568
             'data-live-search': 'true',
632
             'data-live-search': 'true',
569
             'id': originalObjective+'_counter_' + (assocObjectiveCounter+1).toString(),
633
             'id': originalObjective+'_counter_' + (assocObjectiveCounter+1).toString(),
570
-
634
+            'onchange': "visiblePrograms('allAssocOutcomes')"
571
 
635
 
572
         });
636
         });
573
         var $div = $('<div/>', {
637
         var $div = $('<div/>', {
582
         var $button = $('<button/>', {
646
         var $button = $('<button/>', {
583
             'type': 'button',
647
             'type': 'button',
584
             'class': 'btn btn-primary',
648
             'class': 'btn btn-primary',
585
-            'onclick': 'deleteObjective("assoc_objectiveForm_'+objForGroup+'_' + assocObjectiveCounter.toString() + '", "assoc_closeObj_' +objForGroup+'_' + assocObjectiveCounter.toString() + '", "'+objForGroup+'")'
649
+            'onclick': 'deleteObjective("assoc_objectiveForm_'+objForGroup+'_' + assocObjectiveCounter.toString() + '", "assoc_closeObj_' +objForGroup+'_' + assocObjectiveCounter.toString() + '", "'+objForGroup+'", "allAssocOutcomes")'
586
         });
650
         });
587
 
651
 
588
         $button.append('X');
652
         $button.append('X');
611
             'class': "selectpicker form-control",
675
             'class': "selectpicker form-control",
612
             'name': "objective[]",
676
             'name': "objective[]",
613
             'data-live-search': 'true',
677
             'data-live-search': 'true',
614
-            'id': originalObjective +'_counter_' + (counter+1).toString()
615
-        });
678
+            'id': originalObjective +'_counter_' + (counter+1).toString(),
679
+            'onchange': "visiblePrograms('allOutcomes')"
680
+                });
616
         var $div = $('<div/>', {
681
         var $div = $('<div/>', {
617
             'id': 'objectiveForm_'+objForGroup + '_' + counter.toString(),
682
             'id': 'objectiveForm_'+objForGroup + '_' + counter.toString(),
618
             'class': 'form-group col-md-10'
683
             'class': 'form-group col-md-10'
625
         var $button = $('<button/>', {
690
         var $button = $('<button/>', {
626
             'type': 'button',
691
             'type': 'button',
627
             'class': 'btn btn-primary',
692
             'class': 'btn btn-primary',
628
-            'onclick': 'deleteObjective("objectiveForm_' +objForGroup +'_' + counter.toString() + '", "closeObj_'+objForGroup+'_' + counter.toString() + '", "'+objForGroup+'")'
629
-        });
693
+            'onclick': 'deleteObjective("objectiveForm_' +objForGroup +'_' + counter.toString() + '", "closeObj_'+objForGroup+'_' + counter.toString() + '", "'+objForGroup+'", "allOutcomes")'
694
+    });
630
 
695
 
631
         $button.append('X');
696
         $button.append('X');
632
         $divForButton.append($button);
697
         $divForButton.append($button);
670
             'type': 'button',
735
             'type': 'button',
671
             'class': 'btn btn-primary',
736
             'class': 'btn btn-primary',
672
             'id': 'assoc_close_button'+assocOutcomeCounter,
737
             'id': 'assoc_close_button'+assocOutcomeCounter,
673
-            'onclick': '$(this).parent().parent().remove()'
674
-         });
738
+            'onclick': '$(this).parent().parent().remove(); visiblePrograms("allAssocOutcomes")'
739
+        });
675
 
740
 
676
         var divForGroup = $('<div/>', {
741
         var divForGroup = $('<div/>', {
677
             'id' : 'assocOutcomeGroup'+assocOutcomeCounter.toString(),
742
             'id' : 'assocOutcomeGroup'+assocOutcomeCounter.toString(),
689
             'class': "selectpicker form-control",
754
             'class': "selectpicker form-control",
690
             'name': "objective[]",
755
             'name': "objective[]",
691
             'data-live-search': 'true',
756
             'data-live-search': 'true',
692
-            'id': 'assoc_objective_'+assocOutcomeCounter +'_counter_1'  
693
-        });
757
+            'id': 'assoc_objective_'+assocOutcomeCounter +'_counter_1',
758
+            'onchange': "visiblePrograms('allAssocOutcomes')" 
759
+            });
694
 
760
 
695
         var empty_div = $('<div/>',{
761
         var empty_div = $('<div/>',{
696
             'class': 'col-md-1'
762
             'class': 'col-md-1'
740
 
806
 
741
     var assocObjectiveCounter = 1;
807
     var assocObjectiveCounter = 1;
742
 
808
 
743
-    function fetchAssocObjective(outcomeDiv, objectiveGroup) {
809
+    /*function fetchAssocObjective(outcomeDiv, objectiveGroup) {
744
         var count = $('#'+outcomeDiv).data('value');
810
         var count = $('#'+outcomeDiv).data('value');
745
         var allOutcomes =[];
811
         var allOutcomes =[];
746
 
812
 
791
                 for (var i = allObjectives.length - 1; i > 0; i--) {
857
                 for (var i = allObjectives.length - 1; i > 0; i--) {
792
                     deleteObjective('assoc_objectiveForm_' + objectiveGroup +'_'+i, 'assoc_closeObj_'+objectiveGroup+'_' + i.toString(), objectiveGroup);
858
                     deleteObjective('assoc_objectiveForm_' + objectiveGroup +'_'+i, 'assoc_closeObj_'+objectiveGroup+'_' + i.toString(), objectiveGroup);
793
                }
859
                }
794
-               /* for(var i=1; i<allObjectives.length; i++){
860
+                for(var i=1; i<allObjectives.length; i++){
795
                     addAssocObjective();
861
                     addAssocObjective();
796
                     $('#assoc_objective_'+i.toString()).selectpicker('refresh');
862
                     $('#assoc_objective_'+i.toString()).selectpicker('refresh');
797
                     if($("#assoc_objective_"+i.toString()+" option[value='"+allObjectives[i].value+"']").length>0){
863
                     if($("#assoc_objective_"+i.toString()+" option[value='"+allObjectives[i].value+"']").length>0){
798
                     $("#assoc_objective_"+i.toString()).val(allObjectives[i].value);
864
                     $("#assoc_objective_"+i.toString()).val(allObjectives[i].value);
799
                     $("#assoc_objective_"+i.toString()).selectpicker("refresh");
865
                     $("#assoc_objective_"+i.toString()).selectpicker("refresh");
800
                     }
866
                     }
801
-                }*/
867
+                }
802
 
868
 
803
 
869
 
804
 
870
 
805
             },
871
             },
806
             'json'
872
             'json'
807
         );
873
         );
808
-    }
874
+    }*/
809
 
875
 
810
     //Fetch objective at creating criteria
876
     //Fetch objective at creating criteria
811
     counterForPost = 0;
877
     counterForPost = 0;
830
                 optionName = '<option value ="0">Nothing Selected</option>';
896
                 optionName = '<option value ="0">Nothing Selected</option>';
831
                 for(index in varArray){
897
                 for(index in varArray){
832
                     objectiveObject = varArray[index];
898
                     objectiveObject = varArray[index];
833
-                    optionName += '<option value ="('+objectiveObject.outcome_id+','+objectiveObject.objective_id+')">'+
899
+                    optionName += '<option data-program-ids = "'+objectiveObject.program_ids+'" value ="('+objectiveObject.outcome_id+','+objectiveObject.objective_id+')">'+
834
                         objectiveObject.text+'</option>';
900
                         objectiveObject.text+'</option>';
835
 
901
 
836
                 }
902
                 }
1037
                     options = "<option value ='0'>Nothing Selected</option>";
1103
                     options = "<option value ='0'>Nothing Selected</option>";
1038
                     $(first_outcome.assoc_objectives).each(function(index, objective){
1104
                     $(first_outcome.assoc_objectives).each(function(index, objective){
1039
 
1105
 
1040
-options += '<option value ="('+first_outcome.id+','+objective.objective_id+')">'+
1041
-    objective.text+'</option>';
1106
+                        options += '<option data-program-ids = "'+objective.program_ids+'" value ="('+first_outcome.id+','+objective.objective_id+')">'+
1107
+                            objective.text+'</option>';
1042
 
1108
 
1043
 })
1109
 })
1044
                     /*for(objective_index  in json.objectives_assoc[first_outcome_id]){
1110
                     /*for(objective_index  in json.objectives_assoc[first_outcome_id]){
1123
                     }
1189
                     }
1124
 
1190
 
1125
                 }
1191
                 }
1192
+                visiblePrograms('allAssocOutcomes');
1126
 
1193
 
1127
 
1194
 
1128
                 //counterObj =$('#assoc_objectiveGroup').data('value');
1195
                 //counterObj =$('#assoc_objectiveGroup').data('value');
1173
                         $('#assoc_objective_0').val(0);
1240
                         $('#assoc_objective_0').val(0);
1174
                         $('#assoc_objective_0').selectpicker('refresh');
1241
                         $('#assoc_objective_0').selectpicker('refresh');
1175
                     }
1242
                     }
1176
-                 
1243
+                
1177
                 }
1244
                 }
1178
 
1245
 
1179
                 for (var i = 1; i < json.objectives.length; i++) {
1246
                 for (var i = 1; i < json.objectives.length; i++) {
1193
                 $('input[type=checkbox]').prop('checked', false);
1260
                 $('input[type=checkbox]').prop('checked', false);
1194
 
1261
 
1195
                 for (var i = 0; i < program_length; i++) {
1262
                 for (var i = 0; i < program_length; i++) {
1196
-                    $('#assoc_program_id_' + criterion.program[i].program_id).prop("checked", true);
1263
+                    $('#assoc_program-' + criterion.program[i].program_id).prop("checked", true);
1197
                 }
1264
                 }
1198
 
1265
 
1266
+
1199
                 // Select status
1267
                 // Select status
1200
 
1268
 
1201
 
1269
 
1203
 
1271
 
1204
 
1272
 
1205
             }
1273
             }
1206
-            
1207
         );
1274
         );
1208
     }
1275
     }
1209
 </script>@stop
1276
 </script>@stop
1223
 fetchObjectiveForSelect('outcome0', 'objectiveGroupFor0');
1290
 fetchObjectiveForSelect('outcome0', 'objectiveGroupFor0');
1224
 // setCriterionStatus();
1291
 // setCriterionStatus();
1225
 fetchAllCriterion("select-program", "assoc_outcomes_fetch");
1292
 fetchAllCriterion("select-program", "assoc_outcomes_fetch");
1226
-
1293
+visiblePrograms('allOutcomes');
1227
 // --------------------------------------------------------------------------
1294
 // --------------------------------------------------------------------------
1228
 // Functions
1295
 // Functions
1229
 // --------------------------------------------------------------------------
1296
 // --------------------------------------------------------------------------

+ 3
- 2
app/views/local/managers/pCoords/_navigation.blade.php View File

28
         <ul class="dropdown-menu" role="menu">
28
         <ul class="dropdown-menu" role="menu">
29
           <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
29
           <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
30
           <li>{{ HTML::linkAction('CriteriaController@objectivesIndex', 'Objectives and Criteria') }}</li>
30
           <li>{{ HTML::linkAction('CriteriaController@objectivesIndex', 'Objectives and Criteria') }}</li>
31
-          <li>{{ HTML::linkAction('TransformativeActionsController@viewFormativeActions', 'Tranformative and Formative Actions')}}
32
-        </ul>
31
+                 </ul>
33
       </li>
32
       </li>
34
       @if(count(Auth::user()->courses))
33
       @if(count(Auth::user()->courses))
35
       <li> {{ HTML::linkAction('ProfessorsController@overview', 'My Courses', NULL) }}</li>
34
       <li> {{ HTML::linkAction('ProfessorsController@overview', 'My Courses', NULL) }}</li>
50
           @if(count(Auth::user()->courses))
49
           @if(count(Auth::user()->courses))
51
           <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReports', 'My Courses\' Reports') }}</li>
50
           <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReports', 'My Courses\' Reports') }}</li>
52
           @endif
51
           @endif
52
+          <li>{{ HTML::linkAction('TransformativeActionsController@viewFormativeActions', 'Tranformative and Formative Actions')}}
53
+    
53
         </ul>
54
         </ul>
54
       </li>
55
       </li>
55
 
56
 

+ 22
- 23
app/views/local/managers/pCoords/criteria.blade.php View File

729
 
729
 
730
 
730
 
731
 
731
 
732
-
733
     }
732
     }
734
     //Fetch associated objective for editing
733
     //Fetch associated objective for editing
735
 
734
 
736
 
735
 
737
     var assocObjectiveCounter = 1;
736
     var assocObjectiveCounter = 1;
738
 
737
 
739
-    function fetchAssocObjective(outcomeDiv, objectiveGroup) {
738
+  /*  function fetchAssocObjective(outcomeDiv, objectiveGroup) {
740
         var count = $('#' + outcomeDiv).data('value');
739
         var count = $('#' + outcomeDiv).data('value');
741
         var allOutcomes = [];
740
         var allOutcomes = [];
742
 
741
 
794
                         $("#assoc_objective_" + i.toString()).val(allObjectives[i].value);
793
                         $("#assoc_objective_" + i.toString()).val(allObjectives[i].value);
795
                         $("#assoc_objective_" + i.toString()).selectpicker("refresh");
794
                         $("#assoc_objective_" + i.toString()).selectpicker("refresh");
796
                     }
795
                     }
797
-                }*/
796
+                }
798
 
797
 
799
 
798
 
800
 
799
 
801
             },
800
             },
802
             'json'
801
             'json'
803
         );
802
         );
804
-    }
803
+    }*/
805
 
804
 
806
     //Fetch objective at creating criteria
805
     //Fetch objective at creating criteria
807
     counterForPost = 0;
806
     counterForPost = 0;
828
                 optionName = '<option value ="0">Nothing Selected</option>';
827
                 optionName = '<option value ="0">Nothing Selected</option>';
829
                 for (index in varArray) {
828
                 for (index in varArray) {
830
                     objectiveObject = varArray[index];
829
                     objectiveObject = varArray[index];
831
-                    optionName += '<option value ="(' + objectiveObject.outcome_id + ',' + objectiveObject.objective_id + ')">' +
832
-                        objectiveObject.text + '</option>';
830
+                    optionName += '<option data-program-ids = "'+objectiveObject.program_ids+'" value ="('+objectiveObject.outcome_id+','+objectiveObject.objective_id+')">'+
831
+                        objectiveObject.text+'</option>';
833
 
832
 
834
                 }
833
                 }
835
                 /*
834
                 /*
1032
                 if (criterion.outcomes.length) 
1031
                 if (criterion.outcomes.length) 
1033
                     {
1032
                     {
1034
                     $('#assoc_outcome_0').val(criterion.outcomes[0].id);
1033
                     $('#assoc_outcome_0').val(criterion.outcomes[0].id);
1035
-                                    $('#assoc_outcome_0').selectpicker('refresh');
1034
+                    $('#assoc_outcome_0').selectpicker('refresh');
1036
 
1035
 
1037
-                                    var first_outcome = criterion.outcomes[0];
1038
-                   options = "<option value ='0'>Nothing Selected</option>";
1039
-                   $(first_outcome.assoc_objectives).each(function(index, objective){
1036
+                    var first_outcome = criterion.outcomes[0];
1037
+                    options = "<option value ='0'>Nothing Selected</option>";
1038
+                    $(first_outcome.assoc_objectives).each(function(index, objective){
1040
 
1039
 
1041
-options += '<option value ="('+first_outcome.id+','+objective.objective_id+')">'+
1042
-    objective.text+'</option>';
1040
+                        options += '<option data-program-ids = "'+objective.program_ids+'" value ="('+first_outcome.id+','+objective.objective_id+')">'+
1041
+                        objective.text+'</option>';
1043
 
1042
 
1044
-})
1043
+                    })
1045
                     /*for (objective_index in json.objectives_assoc[first_outcome_id]) {
1044
                     /*for (objective_index in json.objectives_assoc[first_outcome_id]) {
1046
                         objective = json.objectives_assoc[first_outcome_id][objective_index]
1045
                         objective = json.objectives_assoc[first_outcome_id][objective_index]
1047
                         options += '<option value ="(' + first_outcome_id + ',' + objective.objective_id + ')">' +
1046
                         options += '<option value ="(' + first_outcome_id + ',' + objective.objective_id + ')">' +
1052
 
1051
 
1053
                     if(first_outcome.objectives_criteria.length){
1052
                     if(first_outcome.objectives_criteria.length){
1054
                         objective_id = first_outcome.objectives_criteria[0].objective_id;
1053
                         objective_id = first_outcome.objectives_criteria[0].objective_id;
1055
-                    value = '('+first_outcome.id+','+objective_id+')';
1056
-                  $('#assoc_objective_0_counter_1').val(value);
1054
+                        value = '('+first_outcome.id+','+objective_id+')';
1055
+                        $('#assoc_objective_0_counter_1').val(value);
1057
                         $('#assoc_objective_0_counter_1').selectpicker('refresh');
1056
                         $('#assoc_objective_0_counter_1').selectpicker('refresh');
1058
 
1057
 
1059
                     }
1058
                     }
1085
 
1084
 
1086
 
1085
 
1087
                 for (var i = 1; i < criterion.outcomes.length; i++) {
1086
                 for (var i = 1; i < criterion.outcomes.length; i++) {
1088
-                                   addAssocOutcome(true);
1087
+                    addAssocOutcome(true);
1089
 
1088
 
1090
 
1089
 
1091
-                                   $('#assoc_outcome_' + i.toString()).val(criterion.outcomes[i].id);
1092
-                   $('#assoc_outcome_' + i.toString()).selectpicker('refresh');
1090
+                    $('#assoc_outcome_' + i.toString()).val(criterion.outcomes[i].id);
1091
+                    $('#assoc_outcome_' + i.toString()).selectpicker('refresh');
1093
 
1092
 
1094
                     var outcome = criterion.outcomes[i];
1093
                     var outcome = criterion.outcomes[i];
1095
                     options = "<option value ='0'>Nothing Selected</option>";
1094
                     options = "<option value ='0'>Nothing Selected</option>";
1097
                    
1096
                    
1098
                     $(outcome.assoc_objectives).each(function(index, objective){
1097
                     $(outcome.assoc_objectives).each(function(index, objective){
1099
 
1098
 
1100
-options += '<option value ="('+outcome.id+','+objective.objective_id+')">'+
1101
-    objective.text+'</option>';
1099
+                    options += '<option value ="('+outcome.id+','+objective.objective_id+')">'+
1100
+                        objective.text+'</option>';
1102
 
1101
 
1103
-})
1102
+                    })
1104
                     /*for (objective_index in json.objectives_assoc[outcome_id]) {
1103
                     /*for (objective_index in json.objectives_assoc[outcome_id]) {
1105
                         objective = json.objectives_assoc[outcome_id][objective_index]
1104
                         objective = json.objectives_assoc[outcome_id][objective_index]
1106
                         options += '<option value ="(' + outcome_id + ',' + objective.objective_id + ')">' +
1105
                         options += '<option value ="(' + outcome_id + ',' + objective.objective_id + ')">' +
1114
                     $('#assoc_objective_'+i+'_counter_1').val(value);
1113
                     $('#assoc_objective_'+i+'_counter_1').val(value);
1115
                     $('#assoc_objective_'+i+'_counter_1').selectpicker('refresh')
1114
                     $('#assoc_objective_'+i+'_counter_1').selectpicker('refresh')
1116
                     }
1115
                     }
1117
-                                        }
1116
+                                        
1118
 
1117
 
1119
 
1118
 
1120
-                                        for(var j =1; j<outcome.objectives_criteria.length; j++ ){
1119
+                    for(var j =1; j<outcome.objectives_criteria.length; j++ ){
1121
                         addAssocObjective("assoc_objectiveGroupFor"+i, "assoc_objective_"+i);
1120
                         addAssocObjective("assoc_objectiveGroupFor"+i, "assoc_objective_"+i);
1122
                         objective_id =outcome.objectives_criteria[j].objective_id;
1121
                         objective_id =outcome.objectives_criteria[j].objective_id;
1123
                         value = "("+outcome.id+","+objective_id+")";
1122
                         value = "("+outcome.id+","+objective_id+")";

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

10
         <ul class="dropdown-menu" role="menu">
10
         <ul class="dropdown-menu" role="menu">
11
           <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
11
           <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
12
           <li>{{ HTML::linkAction('CriteriaController@objectivesIndex', 'Objectives and Criteria') }}</li>
12
           <li>{{ HTML::linkAction('CriteriaController@objectivesIndex', 'Objectives and Criteria') }}</li>
13
-          <li>{{ HTML::linkAction('TransformativeActionsController@viewFormativeActions', 'Tranformative and Formative Actions')}}
14
-        </ul>
13
+          </ul>
15
       </li>
14
       </li>
16
       <li class="dropdown">
15
       <li class="dropdown">
17
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Management<span class="caret"></span></a>
16
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Management<span class="caret"></span></a>
44
           <li>{{ HTML::linkAction('OutcomesController@managerAssessmentReports', 'School Reports') }}</li>
43
           <li>{{ HTML::linkAction('OutcomesController@managerAssessmentReports', 'School Reports') }}</li>
45
           @if(count(Auth::user()->courses))
44
           @if(count(Auth::user()->courses))
46
           <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReports', 'My Courses\' Reports') }}</li>
45
           <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReports', 'My Courses\' Reports') }}</li>
46
+          
47
           @endif
47
           @endif
48
+          <li>{{ HTML::linkAction('TransformativeActionsController@viewFormativeActions', 'Tranformative and Formative Actions')}}
49
+    
48
         </ul>
50
         </ul>
49
       </li>
51
       </li>
50
       <li class='dropdown'>
52
       <li class='dropdown'>

+ 0
- 163
app/views/local/managers/sCoords/annual_plan_js.blade.php View File

1
-<script>
2
-
3
-$(document).ready(function()
4
-{
5
-  // --------------------------------------------------------------------------
6
-  // Page load
7
-  // --------------------------------------------------------------------------
8
-
9
-  // Hide accordion panel contents by default
10
-  $('.panel-group .panel-body').hide();
11
-
12
-  $('#outcome-display').parent().hide();
13
-
14
-  // --------------------------------------------------------------------------
15
-  // Functions
16
-  // --------------------------------------------------------------------------
17
-
18
-  // --------------------------------------------------------------------------
19
-  // Events
20
-  // --------------------------------------------------------------------------
21
-
22
-  // When list item is clicked, load corresponding info
23
-  $('.list-group-item').on('click', function()
24
-  {
25
-    var id = $(this).data('outcome-id');
26
-    var name = $(this).data('outcome-name');
27
-    var semester = $(this).data('semester-id');
28
-    $.post(
29
-    "../annual-plan-fetchTYP/{{$program->id}}",
30
-    { id: id,
31
-    semester: semester
32
-  },
33
-    function(json)
34
-    {
35
-        // Retrieve datatable instance
36
-        var table = $('.datatable').DataTable();
37
-        alert(json);
38
-        
39
-        var objectives = json.unique_objective;
40
-        var courses = json.courses;
41
-        var courseHTML = '<ol>';
42
-        var objectiveHTML = '';
43
-        var criteria = json.criteria
44
-        nextLetter ="@";
45
-        counter = 1;
46
-        for(course in courses){
47
-          courseHTML+='<li>'+courses[course].code+' '+courses[course].number+'</li>';
48
-        }
49
-        courseHTML += "</ol>"
50
-        courses = json.courses_objective;
51
-        for(objective in objectives){
52
-          for(course in courses[objectives[objective].id]){
53
-            objectiveHTML += "<strong>"+courses[objectives[objective].id][course].code+" "+courses[objectives[objective].id][course].number +", </strong>";
54
-          }
55
-          
56
-          objectiveHTML += "<ol type ='A' start='"+counter.toString()+"'>";
57
-          objectiveHTML += "<li>"+objectives[objective].text+"</li>";
58
-          objectiveHTML += "</ol>";
59
-          counter++;
60
-        }
61
-    
62
-        for(objective in objectives){
63
-          $divForEach =$('<div/>',{
64
-            'id':'objective #'+objectives[objective]
65
-          });
66
-
67
-          $objective = "<h4>"+objectives[objective].text+"</h4>";
68
-          
69
-
70
-          $divForEach.append($objective)
71
-          $select = $('<select/>',{
72
-            'class': "selectpicker form-control",
73
-            'name' : "criteriaFor["+objectives[objective].id+"]",
74
-            'data-live-search':'true',
75
-            'id': 'criteriaFor'+objectives[objective].id+'_0'
76
-
77
-          })
78
-          options = ''
79
-          for (criterion in criteria[objectives[objective].id]){
80
-            options += "<option value='"+criteria[objectives[objective].id][criterion].id+"'>"+criteria[objectives[objective].id][criterion].name+"</option>";
81
-          }
82
-          $select.append(options);
83
-          $divForEach.append($select);
84
-          $divForEach.appendTo('#theChange');
85
-          $select.selectpicker('refresh');
86
-          
87
-        }
88
-        
89
-        $('#outcome-display').parent().show();
90
-        $('.no-outcome').parent().hide();
91
-
92
-        //Display title and definition
93
-        $('#outcome-display .panel-title').html(name);
94
-     
95
-
96
-        //Empty table
97
-        table.clear();
98
-
99
-        // Add new criteria
100
-        if(courses)
101
-        {
102
-          $('table').show();
103
-          
104
-          
105
-              table.row.add([
106
-                courseHTML,
107
-                objectiveHTML
108
-              ]);
109
-        
110
-        }
111
-        else
112
-        {
113
-          $('table').hide();
114
-        }
115
-
116
-        // Update display
117
-        table.draw();
118
-    },
119
-    'json'
120
-    );
121
-
122
-  })
123
-});
124
-
125
-function addObjectiveTest() {
126
-  selectObj = document.getElementById('objective_0').innerHTML;
127
-  var $select = $('<select/>', {
128
-      'class': "selectpicker form-control",
129
-      'name': "objective[]",
130
-      'data-live-search': 'true',
131
-      'id': 'objective_' + counterObj.toString()
132
-
133
-  });
134
-  var $div = $('<div/>', {
135
-      'id': 'objectiveForm' + counterObj.toString(),
136
-      'class': 'form-group col-md-11'
137
-  });
138
-  var $divForButton = $('<div/>', {
139
-      'class': 'col-md-1',
140
-      'id': 'closeObj' + counterObj.toString()
141
-
142
-  });
143
-  var $button = $('<button/>', {
144
-      'type': 'button',
145
-      'class': 'btn btn-primary',
146
-      'onclick': 'deleteObjective("objectiveForm' + counterObj.toString() + '", "closeObj' + counterObj.toString() + '")'
147
-  });
148
-
149
-  $button.append('X');
150
-  $divForButton.append($button);
151
-
152
-  $div.appendTo('#objectiveGroup')
153
-  $select.append(selectObj);
154
-
155
-  $select.appendTo('#objectiveForm' + counterObj.toString()).selectpicker('refresh');
156
-  counterObj += 1;
157
-
158
-  $divForButton.appendTo('#objectiveGroup');
159
-  $('#counterObjective').val(counterObj)
160
-}
161
-
162
-</script>
163
-

+ 5
- 3
app/views/local/managers/sCoords/criteria.blade.php View File

43
                     Add another Objective
43
                     Add another Objective
44
                 </button>
44
                 </button>
45
                 
45
                 
46
-                <br></div><hr>
46
+                <br>
47
+            </div>
48
+            <hr>
47
                 </div>
49
                 </div>
48
                 
50
                 
49
                 <input type='hidden' name='counterOutcome' id='counterOutcome' value=1>
51
                 <input type='hidden' name='counterOutcome' id='counterOutcome' value=1>
853
                 for (var i = allObjectives.length - 1; i > 0; i--) {
855
                 for (var i = allObjectives.length - 1; i > 0; i--) {
854
                     deleteObjective('assoc_objectiveForm_' + objectiveGroup +'_'+i, 'assoc_closeObj_'+objectiveGroup+'_' + i.toString(), objectiveGroup);
856
                     deleteObjective('assoc_objectiveForm_' + objectiveGroup +'_'+i, 'assoc_closeObj_'+objectiveGroup+'_' + i.toString(), objectiveGroup);
855
                 }
857
                 }
856
- /*               for(var i=1; i<allObjectives.length; i++){
858
+             for(var i=1; i<allObjectives.length; i++){
857
                     addAssocObjective();
859
                     addAssocObjective();
858
                     $('#assoc_objective_'+i.toString()).selectpicker('refresh');
860
                     $('#assoc_objective_'+i.toString()).selectpicker('refresh');
859
                     if($("#assoc_objective_"+i.toString()+" option[value='"+allObjectives[i].value+"']").length>0){
861
                     if($("#assoc_objective_"+i.toString()+" option[value='"+allObjectives[i].value+"']").length>0){
1239
                         $('#assoc_objective_0').val(0);
1241
                         $('#assoc_objective_0').val(0);
1240
                         $('#assoc_objective_0').selectpicker('refresh');
1242
                         $('#assoc_objective_0').selectpicker('refresh');
1241
                     }
1243
                     }
1242
-                 
1244
+                
1243
                 }
1245
                 }
1244
 
1246
 
1245
                 for (var i = 1; i < json.objectives.length; i++) {
1247
                 for (var i = 1; i < json.objectives.length; i++) {

app/views/local/managers/sCoords/annual-plans.blade.php → app/views/local/managers/shared/annual-plans.blade.php View File


app/views/local/managers/admins/rubric_list.blade.php → app/views/local/managers/shared/rubric_list.blade.php View File

1
 @extends('layouts.master')
1
 @extends('layouts.master')
2
 
2
 
3
 @section('navigation')
3
 @section('navigation')
4
-    @include('local.managers.admins._navigation')
4
+@if($role==1)
5
+@include('local.managers.admins._navigation')
6
+@elseif($role==2)
7
+@include('local.managers.sCoords._navigation')
8
+@elseif($role==3)
9
+@include('local.managers.pCoords._navigation')
10
+@endif
11
+   
5
 @stop
12
 @stop
6
 
13
 
7
 @section('main')
14
 @section('main')

+ 1
- 1
app/views/local/managers/shared/rubrics.blade.php View File

1383
                 htmlString += "<ol style='list-style-position: inside'>"
1383
                 htmlString += "<ol style='list-style-position: inside'>"
1384
         
1384
         
1385
                 objectives = $(this).data('assoc-objectives');
1385
                 objectives = $(this).data('assoc-objectives');
1386
-            objectives = objectives.split(',');
1386
+            //objectives = objectives.split(',');
1387
             htmlString += "<li>" +$(this).data('criterion-name');
1387
             htmlString += "<li>" +$(this).data('criterion-name');
1388
             htmlString += "<br><h6>This criterion is associated with these objectives</h6>"
1388
             htmlString += "<br><h6>This criterion is associated with these objectives</h6>"
1389
             htmlString +="<ul style='padding-left: 5%; list-style-position: inside'>"
1389
             htmlString +="<ul style='padding-left: 5%; list-style-position: inside'>"

app/views/local/managers/sCoords/view-annual-plans.blade.php → app/views/local/managers/shared/view-annual-plans.blade.php View File


+ 6
- 6
app/views/local/managers/shared/view_formative.blade.php View File

43
         <div class="category" >
43
         <div class="category" >
44
           <label for="school">School</label>
44
           <label for="school">School</label>
45
           <div class="select">
45
           <div class="select">
46
-            <select multiple class="selectpicker" name="school" id="school">
47
-              <option value="0" selected="selected">All</option>
46
+            <select  class="selectpicker" name="school" id="school">
47
+              
48
               @foreach ($schools as $school)
48
               @foreach ($schools as $school)
49
                 <option value="{{$school->id}}">{{$school->name}}</option>
49
                 <option value="{{$school->id}}">{{$school->name}}</option>
50
               @endforeach
50
               @endforeach
54
         <div class="category" >
54
         <div class="category" >
55
           <label for="program" >Academic Program</label>
55
           <label for="program" >Academic Program</label>
56
           <div class="select">
56
           <div class="select">
57
-            <select multiple class="selectpicker" name="program" id="program">
58
-              <option value="0" selected="selected">All</option>
57
+            <select class="selectpicker" name="program" id="program">
58
+              
59
               @foreach ($programs as $program)
59
               @foreach ($programs as $program)
60
                 <option value="{{$program->id}}">{{$program->name}}</option>
60
                 <option value="{{$program->id}}">{{$program->name}}</option>
61
               @endforeach
61
               @endforeach
65
         <div class="category" >
65
         <div class="category" >
66
             <label for="semesters">Semester</label>
66
             <label for="semesters">Semester</label>
67
             <div class="select">
67
             <div class="select">
68
-              <select multiple class="selectpicker" name="semesters" id="semesters">
69
-                <option value="0" selected="selected">All</option>
68
+              <select class="selectpicker" name="semesters" id="semesters">
69
+                
70
                 @foreach ($semesters as $semester)
70
                 @foreach ($semesters as $semester)
71
                   <option value="{{$semester->id}}">{{$semester->name}}</option>
71
                   <option value="{{$semester->id}}">{{$semester->name}}</option>
72
                 @endforeach
72
                 @endforeach

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

27
       </li>
27
       </li>
28
       @endif
28
       @endif
29
       <li> {{ HTML::linkAction('ProfessorsController@program', 'Program') }}</li>
29
       <li> {{ HTML::linkAction('ProfessorsController@program', 'Program') }}</li>
30
-      <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReports', 'Reports') }}</li>
30
+      <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReport', 'Reports') }}</li>
31
       <li class="dropdown">
31
       <li class="dropdown">
32
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Help<span class="caret"></span></a>
32
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Help<span class="caret"></span></a>
33
         <ul class="dropdown-menu" role="menu">
33
         <ul class="dropdown-menu" role="menu">

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

249
 
249
 
250
     $('input[name="weight[]"]').each(function (index){
250
     $('input[name="weight[]"]').each(function (index){
251
         activity_criterion_id = $(this).data('activity-criterion-id');
251
         activity_criterion_id = $(this).data('activity-criterion-id');
252
-        weights[activity_criterion_id] = $(this).val();
252
+        weight = $(this).val();
253
+        
254
+        weights[activity_criterion_id] = weight;
253
     });
255
     });
254
 
256
 
255
     // Iterate through all students
257
     // Iterate through all students

+ 311
- 0
app/views/local/professors/new_assessment_report.blade.php View File

1
+@extends('layouts.master')
2
+
3
+@section('navigation')
4
+    @if(Auth::user()->role==1)
5
+        @include('local.managers.admins._navigation')
6
+    @elseif(Auth::user()->role==2)
7
+        @include('local.managers.sCoords._navigation')
8
+    @elseif(Auth::user()->role==3)
9
+        @include('local.managers.pCoords._navigation')
10
+    @else
11
+    @include('local.professors._navigation')
12
+    @endif
13
+@stop
14
+
15
+@section('main')
16
+    <div class="row">
17
+        <div class="col-md-12">
18
+            <p>This report contains performance information for all your Program's assessed courses during the following semester(s):</p>
19
+            <ul>
20
+                @foreach (Session::get('semesters_info') as $semester_info)
21
+                    <li>{{ $semester_info }}</li>
22
+                @endforeach
23
+            </ul>
24
+
25
+          
26
+
27
+                
28
+                
29
+                       
30
+                                <!-- For each grouped course -->
31
+                                <ul id = "levelTabs" class="nav nav-tabs" role="tablist">
32
+                                        
33
+                                   
34
+                                @foreach($courses as $index2=>$course)
35
+                                <?php
36
+
37
+                                /*$sections_evaluating = Course::has('activities')
38
+                                ->whereNotNull('outcomes_attempted')
39
+                                ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
40
+                                ->with(array('activities'=>function($query) use(&$outcome){
41
+                                    $query->whereNotNull('outcomes_attempted');
42
+                                    $query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');} ))
43
+                                ->where('code', $course->code)->where('number',$course->number)
44
+                                ->whereIn('semester_id', Session::get('semesters_ids'))
45
+                                ->get();*/
46
+
47
+
48
+                                $sections_evaluating = Course::has('activities')
49
+                    
50
+                    //->whereNotNull('outcomes_attempted')
51
+                    //->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
52
+                    ->with(array('activities'=>function($query) use(&$course){
53
+                        $activities = DB::table('activities')
54
+                        ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
55
+                        ->join('assessments', 'assessments.activity_criterion_id', '=','activity_criterion.id')
56
+                        //->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
57
+                        ->where('course_id', $course->id)
58
+                        //->where('criterion_objective_outcome.outcome_id', $outcome->id)
59
+                        ->select('activity_id')
60
+                        ->lists('activity_id');
61
+
62
+                        //$query->whereNotNull('outcomes_attempted');
63
+                        //$query->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'');
64
+                    $query->whereIn('id', $activities);
65
+                } ))
66
+                        
67
+
68
+                    ->where('code', $course->code)->where('number',$course->number)
69
+                    ->whereIn('semester_id', Session::get('semesters_ids'))
70
+                    ->get();
71
+                    
72
+                    
73
+                            ?>
74
+                            @if($sections_evaluating)
75
+                                   <li role= "presentation">
76
+                                        <a onclick = "$(this).tab('show')" data-toggle = "tab" href ="#{{ $course->code}}-{{ $course->number }}"
77
+                                            role ="tab">{{ $course->code}}-{{ $course->number }}</a>
78
+                                        </li>
79
+
80
+                            @section('lists')
81
+                            <div role = "tabpanel" class = 'tab-pane' id = "{{$course->code}}-{{$course->number}}">
82
+                                @foreach($sections_evaluating as $index3 => $section)
83
+                                <h3 style="text-align: center"> Course: {{$course->code}} {{$course->number}}-{{$section->section}}</h3> 
84
+                                <?php
85
+                                Log::info($section->publishedActivities);
86
+                                ?>
87
+                                @foreach($section->publishedActivities as $index4 => $activity)
88
+
89
+                                <h5 style="display: inline;">Activity {{$index4+1}}: </h4>
90
+                                <p style="display: inline;">{{$activity->name}} <strong>({{$activity->date}})</strong></p>
91
+                                <br>
92
+                                <br>
93
+                                <h5 style="display: inline;">Performance Indicators: </h4>
94
+                                    <?php
95
+                                    Log::info($activity->rubric[0]);
96
+                                    ?>
97
+                                <p style="display: inline;"><i>{{$activity->rubric[0]->num_scales}} (
98
+                                <?php
99
+                                    $titles = $activity->rubric[0]->getTitles();
100
+                                    ?>
101
+                                @if(sizeof($titles) != 1)
102
+                                    @foreach ($titles as $index5=>$rubric_title)
103
+                                        @if($index5!= ($activity->rubric[0]->num_scales)-1 )
104
+                                            {{$rubric_title->text}},
105
+                                        @else
106
+                                            and {{$rubric_title->text}}
107
+                                        @endif
108
+                                            
109
+                                    @endforeach
110
+                                )
111
+                                @else
112
+                                    {{$titles[0]->text}} )
113
+                                @endif
114
+                                </i></p>
115
+                                <br>
116
+                                <h5 style="display: inline;">Scale: </h4>
117
+                                @if($activity->rubric[0]->max_score == 1)
118
+
119
+                               <p style="display: inline;">1 point scale</p>
120
+                                @else
121
+                                <p style="display: inline;">1-{{$activity->rubric[0]->max_score}} point scale</p>
122
+
123
+                                @endif
124
+                                <br>
125
+                                <br>
126
+                                <h4>Perfomance by Learning Outcome Criteria</h4>
127
+                                <h5 style = "display: inline; margin:30px;">Target by criterion: </h5>
128
+                                <p  style = "display: inline;"> <i>{{$activity->rubric[0]->expected_points}} or more</i>
129
+                                </p>
130
+                                <br>
131
+                                <h5 style = "display: inline; margin:30px;">Expected percent of students achieving the target by criterion: </h5>
132
+                                <p  style = "display: inline;"> <i>{{$activity->rubric[0]->expected_percentage}} %</i>
133
+                                </p>
134
+                                <br>
135
+
136
+                                <table class='table table-striped table-condensed datatable'>
137
+                                <thead>
138
+                                    <tr>
139
+                                        <th>
140
+                                            Criterion
141
+                                        </th>
142
+                                        <th>
143
+                                            Number of Students Assessed
144
+                                        </th>
145
+                                        <th>
146
+                                            Number of students that achieved the target
147
+                                        </th>
148
+                                        <th>
149
+                                            %
150
+                                        </th>
151
+                                        <th>
152
+                                            Outcomes
153
+                                        </th>
154
+                                    </tr>
155
+                                </thead>
156
+                                <tbody>
157
+                                    @foreach($activity->allActivityCriterionInfo() as $index5=>$ac_criterion)
158
+                                    <tr>
159
+                                        <td> {{$ac_criterion->name}}</td>
160
+                                        <td>{{Criterion::students_attempted($ac_criterion->criterion_id, $activity->id)}}
161
+                                        </td>
162
+                                        <td>
163
+                                        {{Criterion::students_achieved($ac_criterion->criterion_id, $activity->id)}}
164
+
165
+                                        </td>
166
+                                        <?php
167
+
168
+                                        $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity->id);
169
+                                        $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity->id);
170
+                                        
171
+                                        $percentage = "N/A";
172
+                                        $activity->getOutcomeReport();
173
+                                        
174
+
175
+                                        ?>
176
+                                        
177
+                                            @if($out_att==0)
178
+                                            <td class="col-md-1 danger">{{ $percentage }}</td>
179
+
180
+                                            @else
181
+                                            <?php
182
+                                            $percentage = round(($out_ach/$out_att)*100, 2)
183
+                                            ?>
184
+                                                @if ($percentage>=$activity->rubric[0]->expected_percentage)
185
+                                                <td class="col-md-1 success">{{ $percentage }}%</td>
186
+                                                                 
187
+                                                @else
188
+                                                <td class="col-md-1 danger">{{ $percentage }}%</td>
189
+                                                      
190
+                                                @endif
191
+
192
+
193
+
194
+                                           @endif
195
+
196
+
197
+                                        
198
+                                        <td>
199
+                                            
200
+                                            
201
+                                            @foreach(Criterion::outcomes($ac_criterion->criterion_id) as $index6=>$outcome)
202
+                                            
203
+                                             {{$index6 + 1}}.   {{$outcome->name}}
204
+                                             <br>
205
+                                            
206
+
207
+                                            @endforeach
208
+                                            
209
+                                            
210
+                                        </td>
211
+                                    </tr>
212
+                                    @endforeach
213
+                                </tbody>
214
+                            
215
+                                </table>
216
+                                <hr>
217
+                                <br>
218
+
219
+                                <h4>Perfomance by Learning Outcome Student</h4>
220
+                                <h5 style = "display: inline; margin:30px;">Target by outcome: </h5>
221
+                                <p  style = "display: inline;"> <i>>= 66.67% of the attempts</i>
222
+                                </p>
223
+                                <br>
224
+                                <h5 style = "display: inline; margin:30px;">Expected percent of students achieving the target by outcome: </h5>
225
+                                <p  style = "display: inline;"> <i>TODO 75.00 %</i>
226
+                                </p>
227
+                                <br>
228
+                                <table class='table table-striped table-condensed datatable'>
229
+                                    <thead>
230
+                                        <tr>
231
+                                            <th>
232
+                                                Outcome
233
+                                            </th>
234
+                                            <th>
235
+                                                Number of Students Assessed
236
+                                            </th>
237
+                                            <th>
238
+                                                Number of students that achieved the target
239
+                                            </th>
240
+                                            <th>
241
+                                                %
242
+                                            </th>
243
+                                            
244
+                                        </tr>
245
+                                    </thead>
246
+                                    <tbody>
247
+                                        @foreach($activity->getOutcomeReport() as $outcome)
248
+                                        <tr>
249
+                                            <td>
250
+                                                {{$outcome->name}}
251
+                                            </td>
252
+                                            <td>
253
+                                                {{$outcome->attempted}}
254
+                                            </td>
255
+                                            <td>
256
+                                                {{$outcome->achieved}}
257
+                                            </td>
258
+                                            @if($outcome->percentage>= 75)
259
+                                                <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
260
+                                                                 
261
+                                                @else
262
+                                                <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
263
+                                                      
264
+                                                @endif
265
+
266
+
267
+
268
+                                           
269
+
270
+                                        </tr>
271
+
272
+                                        @endforeach
273
+                                    </tbody>
274
+                                </table>
275
+
276
+                                <br>
277
+                                <hr>
278
+
279
+
280
+
281
+
282
+
283
+                                
284
+                                @endforeach
285
+                                @endforeach
286
+                            @stop
287
+
288
+                            @else
289
+                                <h4>There is no assessment for this course.</h4>
290
+
291
+                            @endif
292
+
293
+                                        @endforeach
294
+                                        <ul>
295
+                                    <div id="allLists" class="tab-content">
296
+                                    @yield('lists')
297
+                                    </div>
298
+
299
+            
300
+
301
+
302
+                                        
303
+        </div>
304
+    </div>
305
+@stop
306
+
307
+@section('javascript')
308
+
309
+
310
+
311
+@stop