Gabriel Santiago Plaza 3 vuotta sitten
vanhempi
commit
c92a70bec3

+ 5
- 0
app/controllers/OutcomesController.php Näytä tiedosto

@@ -892,6 +892,11 @@ class OutcomesController extends \BaseController
892 892
                             ->has('activities')
893 893
                             //                             ->whereNotNull('outcomes_attempted')
894 894
                             // ->where('outcomes_attempted', 'NOT LIKE', '%"'.$outcome_id.'":0%')
895
+                            ->join('activities', 'activities.course_id', '=', 'courses.id')
896
+                            ->join('activity_criterion as ac', 'ac.activity_id', '=', 'activities.id')
897
+                            ->join('assessments', 'assessments.activity_criterion_id', '=', 'ac.id')
898
+                            ->where('activities.draft', 0)
899
+                            ->select('courses.*')->distinct()
895 900
                             ->whereIn('semester_id', Session::get('semesters_ids'))
896 901
                             ->groupBy(array('code', 'number'));
897 902
                     }));

+ 47
- 10
app/controllers/ProgramsController.php Näytä tiedosto

@@ -73,18 +73,26 @@ class ProgramsController extends \BaseController
73 73
      * List of grouped courses (grouped sections)
74 74
      */
75 75
 
76
-//     $grouped_courses = Course::select(DB::raw('name, code, number, max(outcomes_attempted) as outcomes_attempted, semester_id, program_id'))
77
-    $grouped_courses = Course::select(DB::raw('name, code, number, semester_id, program_id'))
76
+    //     $grouped_courses = Course::select(DB::raw('name, code, number, max(outcomes_attempted) as outcomes_attempted, semester_id, program_id'))
77
+    $grouped_courses = Course::select(DB::raw('courses.name, code, number, semester_id, program_id, activities.id as activity_assessed'))
78
+      ->leftJoin('activities', function ($query) {
79
+        $query->on('activities.course_id', '=', 'courses.id');
80
+        $query->on('activities.draft', '=', DB::raw('0'));
81
+      })
78 82
       ->with('semester')
79 83
       ->with('program')
80 84
       ->where('program_id', $program->id)
85
+
81 86
       ->whereIn('semester_id', Session::get('semesters_ids'))
87
+
82 88
       ->groupBy(array('code', 'number', 'semester_id'))
83 89
       ->orderBy('code')
84 90
       ->orderBy('number')
85 91
       ->orderBy('semester_id')
86 92
       ->get();
87 93
 
94
+
95
+
88 96
     // Program contact information
89 97
     $users = User::select('users.*')
90 98
       ->leftJoin('program_user', 'users.id', '=', 'program_user.user_id')
@@ -166,6 +174,18 @@ class ProgramsController extends \BaseController
166 174
     //OUTCOMES Join criteria join program
167 175
     foreach ($programs as $program) {
168 176
       $info_by_id = Program::find($program->id);
177
+      $domains = DB::table('outcomes')
178
+        ->join('criterion_objective_outcome as cobo', 'cobo.outcome_id', '=', 'outcomes.id')
179
+        ->join('criteria', 'criteria.id', '=', 'cobo.criterion_id')
180
+        ->join('program_criterion', 'criteria.id', '=', 'program_criterion.criterion_id')
181
+        ->join('courses', 'courses.program_id', '=', 'program_criterion.program_id')
182
+        ->where('program_criterion.program_id', $program->id)
183
+        ->select('outcomes.name', 'outcomes.activation_date')
184
+        ->distinct()
185
+        ->orderBy('outcomes.name', 'asc')
186
+        ->get();
187
+
188
+      /*
169 189
 
170 190
       $domains = DB::table('outcomes')
171 191
         ->join('criteria', 'criteria.outcome_id', '=', 'outcomes.id')
@@ -176,7 +196,20 @@ class ProgramsController extends \BaseController
176 196
         ->distinct()
177 197
         ->orderBy('outcomes.name', 'asc')
178 198
         ->get();
199
+        */
200
+
201
+      $courses_used =  DB::table('outcomes')
202
+        ->join('criterion_objective_outcome as cobo', 'cobo.outcome_id', '=', 'outcomes.id')
203
+        ->join('criteria', 'criteria.id', '=', 'cobo.criterion_id')
204
+        ->join('program_criterion', 'criteria.id', '=', 'program_criterion.criterion_id')
205
+        ->join('courses', 'courses.program_id', '=', 'program_criterion.program_id')
206
+        ->where('program_criterion.program_id', $program->id)
207
+        ->select('courses.number', 'outcomes.name as domain_name', 'courses.code')
208
+        ->distinct()
209
+        ->orderBy('courses.name', 'asc')
210
+        ->get();
179 211
 
212
+      /*
180 213
       $courses_used = DB::table('outcomes')
181 214
         ->join('criteria', 'criteria.outcome_id', '=', 'outcomes.id')
182 215
         ->join('programs', 'programs.id', '=', 'criteria.program_id')
@@ -185,18 +218,22 @@ class ProgramsController extends \BaseController
185 218
         ->select('courses.number', 'outcomes.name as domain_name', 'courses.code')
186 219
         ->distinct()
187 220
         ->orderBy('courses.name', 'asc')
188
-        ->get();
221
+        ->get(); */
189 222
 
190 223
       $transformative_actions = DB::table('outcomes')
191
-        ->join('criteria', 'criteria.outcome_id', '=', 'outcomes.id')
192
-        ->join('programs', 'programs.id', '=', 'criteria.program_id')
193
-        ->join('courses', 'courses.program_id', '=', 'programs.id')
224
+        ->join('criterion_objective_outcome as cobo', 'cobo.outcome_id', '=', 'outcomes.id')
225
+        ->join('criteria', 'criteria.id', '=', 'cobo.criterion_id')
226
+        ->join('program_criterion', 'criteria.id', '=', 'program_criterion.criterion_id')
227
+        ->join('courses', 'courses.program_id', '=', 'program_criterion.program_id')
228
+
194 229
         ->join('activities', 'activities.course_id', '=', 'courses.id')
195 230
         ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
196
-        ->where('programs.id', $program->id)
197
-        ->select('activity_criterion.transformative_actions', 'outcomes.name as domain_name')
231
+        ->join('transformative_activity_criterion as taa', 'taa.activity_criterion_id', '=', 'activity_criterion.id')
232
+        ->join('transformative_actions', 'transformative_actions.id', '=', 'taa.trans_action_id')
233
+        ->where('program_criterion.program_id', $program->id)
234
+        ->select('transformative_actions.description', 'outcomes.name as domain_name')
198 235
         ->distinct()
199
-        ->orderBy('activity_criterion.transformative_actions', 'asc')
236
+        ->orderBy('transformative_actions.description', 'asc')
200 237
         ->get();
201 238
       $info = array($info_by_id, $domains, $courses_used, $transformative_actions);
202 239
       array_push($programs_info, $info);
@@ -365,7 +402,7 @@ class ProgramsController extends \BaseController
365 402
       $program_array['assessed_courses_count'] = 0;
366 403
       foreach ($program_array['program_courses'] as $course) {
367 404
         if (!$program_array['course_outcomes_achieved'] = $course->outcomes_ach()) {
368
-//           $program_array['course_outcomes_achieved'] = $course->outcomes_ach();
405
+          //           $program_array['course_outcomes_achieved'] = $course->outcomes_ach();
369 406
           $program_array['course_outcomes_attempted'] = $course->outcomes_att();
370 407
           Log::info($program_array['course_outcomes_achieved']);
371 408
           foreach ($program_array['course_outcomes_achieved'] as $i => $score) {

+ 1
- 0
app/controllers/RubricsController.php Näytä tiedosto

@@ -460,6 +460,7 @@ class RubricsController extends \BaseController
460 460
                 ->join('criterion_objective_outcome', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
461 461
                 ->where('criterion_objective_outcome.criterion_id', '=', $single_cr->criterion_id)->lists('name'));
462 462
         }
463
+
463 464
         $title = $activity->name . ': ' . $rubric->name;
464 465
         return View::make('local.professors.printrubric', compact('rubric', 'rubric_criterion', 'activity', 'title', 'course'));
465 466
     }

+ 55
- 0
app/controllers/TemplatesController.php Näytä tiedosto

@@ -15,7 +15,36 @@ class TemplatesController extends \BaseController
15 15
 		$schools = School::with('programs.templates')
16 16
 			->orderBy('name')
17 17
 			->get();
18
+		$role = Auth::user()->role;
19
+		switch ($role) {
20
+			case 1:
21
+				$templates = Template::orderBy('name')->get();
22
+				break;
23
+
24
+			case 2:
25
+
26
+				$templates = Template::orderBy('name')
27
+					->whereNull("school_id")
28
+					->orWhere('school_id', Auth::user()->school_id)
29
+					->get();
30
+				break;
31
+			case 3:
32
+				$program_id = DB::table("program_user")
33
+					->where('user_id', Auth::user()->id)
34
+					->lists('program_id')[0];
35
+				$school_id = DB::table('programs')
36
+					->where('id', $program_id)
37
+					->lists('school_id')[0];
38
+
18 39
 
40
+				$templates = Template::orderBy('name')
41
+					->whereNull("school_id")
42
+					->orWhere('school_id', $school_id)
43
+					->orWhere('program_id', $program_id)
44
+
45
+					->get();
46
+				break;
47
+		}
19 48
 		$templates = Template::orderBy('name')->get();
20 49
 
21 50
 		return View::make('local.managers.admins.rubric_list', compact('title', 'global_templates', 'schools', 'templates'));
@@ -40,6 +69,32 @@ class TemplatesController extends \BaseController
40 69
 	{
41 70
 		$title = $template->name;
42 71
 
72
+		$template->titles = DB::table('titles')
73
+			->join('template_title', 'template_title.title_id', '=', "titles.id")
74
+			->where('template_id', $template->id)
75
+			->orderBy('position', 'ASC')
76
+			->lists('text');
77
+
78
+		$template->criteria = DB::table('criteria')
79
+			->join('template_criterion', 'template_criterion.criterion_id', '=', 'criteria.id')
80
+			->where('template_id', $template->id)
81
+			->orderBy('position')
82
+			->get();
83
+
84
+		foreach ($template->criteria as $criterion) {
85
+			$criterion->scales = DB::table('criterion_scale')
86
+				->join('scales', 'scales.id', '=', 'criterion_scale.scale_id')
87
+				->where('criterion_id', $criterion->criterion_id)
88
+				->orderBy('position')
89
+				->lists('description');
90
+			$criterion->outcomes = DB::table('criterion_objective_outcome as cobo')
91
+				->join('outcomes', 'outcomes.id', '=', 'cobo.outcome_id')
92
+				->where('cobo.criterion_id', $criterion->criterion_id)
93
+				->select('outcomes.*')
94
+				->distinct()
95
+				->get();
96
+		}
97
+
43 98
 		return View::make('local.managers.admins.view_template', compact('template', 'title'));
44 99
 	}
45 100
 

+ 1
- 1
app/controllers/TransformativeActionsController.php Näytä tiedosto

@@ -393,7 +393,7 @@ class TransformativeActionsController extends \BaseController
393 393
 
394 394
       //
395 395
       // // insert the multiple TA_course
396
-      DB::table('TA_course')->insert(
396
+      DB::table('ta_course')->insert(
397 397
         array(
398 398
           'ta_id' => $ta_id,
399 399
           'course_number' => $course_code_number[1],

+ 3
- 14
app/models/Activity.php Näytä tiedosto

@@ -38,8 +38,6 @@ class Activity extends Eloquent
38 38
     $activity_criterion = DB::table('activity_criterion')
39 39
       ->where('activity_id', '=', $this->id)
40 40
       ->get();
41
-    Log::info('activity_criterion');
42
-    Log::info($activity_criterion);
43 41
 
44 42
     $criteria_achieved = [];
45 43
     foreach ($activity_criterion as $index => $single_ac) {
@@ -83,38 +81,29 @@ class Activity extends Eloquent
83 81
       )
84 82
       ->addSelect('criteria.name', 'criteria.subcriteria')
85 83
       ->get();
86
-    Log::info($criterias);
87
-    Log::info($this->rubric);
88
-    Log::info("this is rubric");
84
+
89 85
     foreach ($criterias as $index => $single_crit) {
90 86
 
91 87
 
92 88
       $single_crit->outcome_id = json_encode(DB::table('criterion_objective_outcome')
93 89
         ->where('criterion_id', '=', $single_crit->criterion_id)
94 90
         ->lists('outcome_id'));
95
-      Log::info(json_decode($single_crit->outcome_id));
96 91
       $amount_of_students = count(DB::table('assessments')
97 92
         ->where("activity_criterion_id", '=', $single_crit->id)
98 93
         ->lists('student_id'));
99
-      Log::info($amount_of_students);
100
-      Log::info($single_crit->id);
101
-      Log::info('lmaoOOOO');
94
+
102 95
 
103 96
       $student_pass = DB::table('assessments')
104 97
         ->where("activity_criterion_id", '=', $single_crit->id)
105 98
         ->where('score', '>=', $this->rubric[0]->expected_points)
106 99
         ->lists('student_id');
107
-      Log::info($student_pass);
108 100
       $amount_of_students_passed = count(DB::table('assessments')
109 101
         ->where("activity_criterion_id", '=', $single_crit->id)
110 102
         ->where('score', '>=', $this->rubric[0]->expected_points)
111 103
         ->lists('student_id'));
112
-      Log::info($amount_of_students_passed);
113
-      Log::info('es aqui');
114 104
 
115 105
       $single_crit->score_percentage = ($amount_of_students_passed / $amount_of_students) * 100;
116 106
       $criteria_achieved_percentage[$single_crit->criterion_id] = $single_crit;
117
-      Log::info("?");
118 107
     }
119 108
     return $criteria_achieved_percentage;
120 109
   }
@@ -209,7 +198,7 @@ class Activity extends Eloquent
209 198
       ->whereIn('activity_criterion_id', $all_criterion)
210 199
       ->lists('id');
211 200
 
212
-//     return boolval(count($assessments));
201
+    //     return boolval(count($assessments));
213 202
     return (bool)(count($assessments));
214 203
   }
215 204
 

+ 11
- 0
app/models/Program.php Näytä tiedosto

@@ -157,6 +157,17 @@ class Program extends Eloquent
157 157
 			->where('programs.id', '=', $this->id)
158 158
 			->whereIn('courses.semester_id', $semesters_array)
159 159
 			->count(DB::raw('DISTINCT criterion_objective_outcome.outcome_id'));
160
+
161
+
162
+		Log::info(DB::table('activity_criterion')
163
+			->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
164
+			->join('courses', 'activities.course_id', '=', 'courses.id')
165
+			->join('programs', 'programs.id', '=', 'courses.program_id')
166
+			->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'activity_criterion.criterion_id')
167
+			->where('criterion_objective_outcome.outcome_id', '=', $outcome_id)
168
+			->where('programs.id', '=', $this->id)
169
+			->whereIn('courses.semester_id', $semesters_array)
170
+			->toSql());
160 171
 		return $conteo;
161 172
 	}
162 173
 

+ 5
- 0
app/routes.php Näytä tiedosto

@@ -345,6 +345,8 @@ Route::group(array('before' => 'auth|has_access'), function () {
345 345
         Route::get('school/{id}', 'SchoolsController@show');
346 346
         Route::get('program/{id}', 'ProgramsController@show');
347 347
         Route::post('programs/report', 'ProgramsController@showReport');
348
+        Route::get('template/{template}', 'TemplatesController@show');
349
+
348 350
         // Route::post('storeTypInfo', 'OutcomesController@storeCycleInfo'); //TODO: where is this route supposed to be placed?
349 351
         Route::get('programs', 'ProgramsController@index');
350 352
         Route::get('template-list', 'TemplatesController@schoolCoordinatorIndex');
@@ -397,6 +399,8 @@ Route::group(array('before' => 'auth|has_access'), function () {
397 399
         Route::get('program-coordinator', 'ProgramCoordinatorsController@overview');
398 400
         Route::post('deleteObjective', 'Objective2Controller@delete');
399 401
         Route::get('rubrics', 'TemplatesController@newTemplate');
402
+        Route::get('template/{template}', 'TemplatesController@show');
403
+
400 404
         Route::post('saveTemplate', array('before' => 'csrf', 'uses' => 'TemplatesController@create'));
401 405
         Route::post('updateTemplate', array('before' => 'csrf', 'uses' => 'TemplatesController@update'));
402 406
         Route::post('deleteTemplate', array('before' => 'csrf', 'uses' => 'TemplatesController@destroy'));
@@ -407,6 +411,7 @@ Route::group(array('before' => 'auth|has_access'), function () {
407 411
         Route::get('printRubric/{id}', 'TemplatesController@printview');
408 412
         Route::get('rubric/{rubric_id}', 'RubricsController@show_limited');
409 413
         Route::get('grouped_course/{code}/{number}/{semester_code}', 'CoursesController@showGrouped');
414
+        Route::get('template-list', 'TemplatesController@schoolCoordinatorIndex');
410 415
 
411 416
         //Criteria and objectives
412 417
         Route::get('program-criteria', 'CriteriaController@editProgram');

+ 50
- 30
app/views/local/managers/admins/assessment_report.blade.php Näytä tiedosto

@@ -58,7 +58,7 @@
58 58
 
59 59
                                         <?php
60 60
 
61
-                                            $sections_evaluating_outcome = Course::has('activities')
61
+                                           /* $sections_evaluating_outcome = Course::has('activities')
62 62
 //                                             ->whereNotNull('outcomes_attempted')
63 63
 //                                             ->whereRaw('outcomes_attempted not like \'%"'.$outcome->id.'":0%\'')
64 64
                                             ->with(array('activities'=>function($query) use(&$outcome){
@@ -68,7 +68,29 @@
68 68
                                                 } ))
69 69
                                             ->where('code', $course->code)->where('number',$course->number)
70 70
                                             ->whereIn('semester_id', Session::get('semesters_ids'))
71
-                                            ->get();
71
+                                            ->get();*/
72
+
73
+                                            $sections_evaluating_outcome = Course::has('activities')
74
+                            
75
+                          ->with(array('activities'=>function($query) use(&$outcome, &$course){
76
+                                $activities = DB::table('activities')
77
+                                ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
78
+                                ->join('assessments', 'assessments.activity_criterion_id', '=','activity_criterion.id')
79
+                                ->join('criterion_objective_outcome', 'activity_criterion.criterion_id', '=', 'criterion_objective_outcome.criterion_id')
80
+                                ->join('courses','courses.id','=','activities.course_id')
81
+                                ->where('courses.code', $course->code)
82
+                                ->where('courses.number',$course->number)
83
+                                ->where('criterion_objective_outcome.outcome_id', $outcome->id)
84
+                                ->select('activity_id')
85
+                                ->lists('activity_id');
86
+
87
+                               $query->whereIn('id', $activities);
88
+                        } ))
89
+                                
90
+
91
+                            ->where('code', $course->code)->where('number',$course->number)
92
+                            ->whereIn('semester_id', Session::get('semesters_ids'))
93
+                            ->get();
72 94
 
73 95
                                             
74 96
                                         ?>
@@ -82,9 +104,17 @@
82 104
 
83 105
                                                 <!-- For each activity in the section -->
84 106
                                                 @foreach($section->activities as $activity_index => $activity)
107
+                                                        <?php
85 108
 
109
+Log::info($activity->o_att_array);
110
+Log::info(array_key_exists($outcome->id, $activity->o_att_array));
111
+Log::info($activity->o_att_array[$outcome->id] >=1);
112
+Log::info(isset($section)); 
113
+Log::info($activity->rubric[0]);
114
+
115
+?>
86 116
                                                     <!-- If activity has a rubric and the rubric has the outcome being evaluated -->
87
-                                                    @if(array_key_exists($outcome->id, (array)$activity->o_att_array) && $activity->o_att_array[$outcome->id] >=1 && isset($section)&& isset($activity->rubric))
117
+                                                    @if($activity->draft == 0 && array_key_exists($outcome->id, $activity->o_att_array) && $activity->o_att_array[$outcome->id] >=1 && isset($section)&& isset($activity->rubric[0]))
88 118
                                                         <h5>Measure {{ $activity_index + 1 }}</h5>
89 119
                                                         <?php
90 120
                                                         /*
@@ -104,49 +134,39 @@
104 134
 
105 135
                                                         <p>A rubric was used in the {{ $section->code }}-{{ $section->number }} ({{ $section->name }}) course ({{ date('M Y', strtotime($activity->date))}}) to assess students’ <u>{{ strtolower($outcome->name) }}</u> in the activity: "<strong>{{ $activity->name }}</strong>". N= {{ count($section->students) }}. </p>
106 136
                                                         
107
-                                                        <p>The expected performance level was that <strong>{{ $activity->rubric->expected_percentage }}%</strong> of students participating in the activity would score <strong>{{ $activity->rubric->expected_points }} points</strong> or more in the 1-8 point scale used.</p>
137
+                                                        <p>The expected performance level was that <strong>{{ $activity->rubric[0]->expected_percentage }}%</strong> of students participating in the activity would score <strong>{{ $activity->rubric[0]->expected_points }} points</strong> or more in the 1-{{$activity->rubric[0]->max_score}} point scale used.</p>
108 138
                                                         
109 139
                                                         <p>The results for each criterion were as follows:</p>
110 140
 
111 141
                                                         <?php
112 142
 
113
-                                                            $rubric_contents = json_decode($activity->rubric->contents);
143
+                                                            //$rubric_contents = json_decode($activity->rubric->contents);
114 144
                                                         ?>
115 145
 
116 146
                                                         <table class="table table-condensed table-bordered">
117 147
                                                             <tbody>
118
-                                                                @foreach((array)$activity->cap_array as $criterion_id => $criteria_achieved_percentage)
148
+                                                                @foreach((array)$activity->cap_array as $criterion_id => $criterion)
149
+                                                                @if(in_array($outcome->id, json_decode($criterion->outcome_id))  /*== $outcome->id*/ && $criterion->score_percentage >= $activity->rubric[0]->expected_percentage )
150
+                                                                    <tr>
151
+                                                                        <td>{{ $criterion->name }}</td>
152
+                                                                        <td class="col-md-1 success">{{ $criterion->score_percentage }}%</td>
153
+                                                                    </tr>
154
+                                                                @elseif(in_array($outcome->id, json_decode($criterion->outcome_id)) && $criterion->score_percentage < $activity->rubric[0]->expected_percentage )
119 155
                                                                     <tr>
120
-                                                                    <?php
121
-                                                                        $rubric_criterion_outcome_id = NULL;
122
-                                                                        foreach ($rubric_contents as $rubric_criterion) {
123
-                                                                            if($rubric_criterion->id == $criterion_id) {
124
-                                                                                $rubric_criterion_outcome_id = $rubric_criterion->outcome_id;
125
-                                                                                break;
126
-                                                                            }
127
-
128
-                                                                        }
129
-                                                                        $criterion = Criterion::find($criterion_id);
130
-
131
-                                                                    ?>
132
-                                                                    @if($rubric_criterion_outcome_id == $outcome->id && $criteria_achieved_percentage >= $activity->rubric->expected_percentage )
133
-                                                                        <td>{{ $criterion['name'] }}</td>
134
-                                                                        <td class="col-md-1 success">{{ $criteria_achieved_percentage }}%</td>
135
-                                                                    @elseif($rubric_criterion_outcome_id == $outcome->id && $criteria_achieved_percentage < $activity->rubric->expected_percentage )
136
-                                                                        <td>{{ $criterion['name'] }}</td>
137
-                                                                        <td class="col-md-1 danger">{{ $criteria_achieved_percentage }}%</td>
138
-                                                                    @endif
156
+                                                                        <td>{{ $criterion->name }}</td>
157
+                                                                        <td class="col-md-1 danger">{{ $criterion->score_percentage }}%</td>
139 158
                                                                     </tr>
140
-                                                                @endforeach
159
+                                                                @endif  
160
+                                                            @endforeach
141 161
                                                             </tbody>
142 162
                                                         </table>
143 163
 
144 164
                                                         <p>
145 165
                                                             <?php
146
-                                                                $o_att_array = $activity->o_att_array;
147
-                                                                $o_ach_array = $activity->o_ach_array;
148
-                                                                $percentage = ($o_ach_array[$outcome->id]/$o_att_array[$outcome->id])*100;
149
-                                                            ?>
166
+                                                                  $o_att_array = $activity->o_att_array;
167
+                                                            $o_ach_array = $activity->o_ach_array;
168
+                                                            $percentage = ($o_ach_array[$outcome->id]/$o_att_array[$outcome->id])*100;
169
+                                                        ?>
150 170
                                                             @if($percentage >= 100)
151 171
                                                                 The expected goal was reached in <strong>all</strong> (100%) of the criteria assessed. Therefore, the goal for this outcome ({{ $outcome->expected_outcome }}%) was <strong>met</strong>.
152 172
                                                             @elseif ($percentage < 1)

+ 32
- 4
app/views/local/managers/admins/view_template.blade.php Näytä tiedosto

@@ -24,7 +24,7 @@
24 24
             
25 25
             <th>Criterion</th>
26 26
             @for($i = 0; $i <$template->num_scales; $i++)
27
-              <th>Scale {{$i+1}} ({{1+($i*($template->max_score/$template->num_scales))}} - {{(1+$i)*($template->max_score/$template->num_scales)}})</th>
27
+              <th>{{$template->titles[$i]}}  ({{1+($i*($template->max_score/$template->num_scales))}} - {{(1+$i)*($template->max_score/$template->num_scales)}})</th>
28 28
               
29 29
                            
30 30
             @endfor
@@ -33,6 +33,33 @@
33 33
           </tr>
34 34
         </thead>
35 35
       <tbody id ="bodyRubric">
36
+        @foreach($template->criteria as $index=> $criterion)
37
+      <tr data-criterion-copyright="{{$criterion->copyright}}" data-criterion-notes="{{$criterion->notes}}">
38
+        <td>{{$index+1}}.</td>
39
+
40
+        @if($criterion->notes)
41
+            
42
+          <td><span><em data-toggle="tooltip" data-placement="top" title="{{$criterion->notes}}">{{$criterion->name}}</em></span><sup></sup></td>
43
+          
44
+
45
+        
46
+        @else
47
+          
48
+          <td><span>{{$criterion->name}}</span><sup></sup></td>
49
+
50
+        
51
+@endif
52
+
53
+@foreach ($criterion->scales as $scale)
54
+<td>{{$scale}}</td>
55
+    
56
+@endforeach
57
+<td><ol>
58
+@foreach ($criterion->outcomes as $outcome)
59
+    <li>{{$outcome->name}}</li>
60
+@endforeach
61
+</ol></td>
62
+        @endforeach
36 63
 
37 64
       </tbody>
38 65
     </table>
@@ -56,7 +83,8 @@
56 83
   </div>
57 84
 </div>
58 85
 
59
-<script>
86
+<script> 
87
+/*
60 88
   function createTable(){
61 89
     $.post("{{URL::action('TemplatesController@onLoadFetch')}}",
62 90
         {id :{{$template->id}}},
@@ -96,7 +124,7 @@
96 124
         
97 125
         }, 'json'
98 126
         );
99
-  }
127
+  }**/
100 128
   </script>
101 129
 @stop
102 130
 
@@ -109,7 +137,7 @@
109 137
 // --------------------------------------------------------------------------
110 138
 // Page load
111 139
 // --------------------------------------------------------------------------
112
-createTable();
140
+
113 141
 buildCopyrightList();
114 142
 
115 143
 // --------------------------------------------------------------------------

+ 5
- 2
app/views/local/managers/pCoords/_navigation.blade.php Näytä tiedosto

@@ -9,8 +9,11 @@
9 9
         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Management<span class="caret"></span></a>
10 10
         <ul class="dropdown-menu" role="menu">
11 11
           <li>{{ HTML::linkAction('TemplatesController@newTemplate', 'Rubrics') }}</li>
12
-        <li>{{ HTML::linkAction('Objective2Controller@editProgram', 'Objectives')}}</li>
13
-      <li>{{ HTML::linkAction('CriteriaController@editProgram', 'Criteria') }}</li>
12
+          <li>{{ HTML::linkAction('TemplatesController@index', 'Rubric List') }}</li>
13
+      
14
+          <li>{{ HTML::linkAction('Objective2Controller@editProgram', 'Objectives')}}</li>
15
+      
16
+        <li>{{ HTML::linkAction('CriteriaController@editProgram', 'Criteria') }}</li>
14 17
       <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li>
15 18
 
16 19
     

+ 2
- 0
app/views/local/managers/sCoords/_navigation.blade.php Näytä tiedosto

@@ -18,6 +18,8 @@
18 18
 <li>{{ HTML::linkAction('Objective2Controller@editSchool', 'Objectives')}}</li>
19 19
       <li>{{ HTML::linkAction('CriteriaController@editSchool', 'Criteria') }}</li>
20 20
  <li>{{ HTML::linkAction('TemplatesController@newTemplate', 'Rubrics') }}</li>
21
+ <li>{{ HTML::linkAction('TemplatesController@index', 'Rubric List') }}</li>
22
+         
21 23
  <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li>
22 24
 
23 25
 

+ 1
- 1
app/views/local/managers/shared/print_rubric.blade.php Näytä tiedosto

@@ -136,7 +136,7 @@ echo
136 136
       <td>
137 137
         {{{ $criterion->name }}}
138 138
 
139
-        @if(property_exists($criterion, 'subcriteria'))
139
+        @if($criterion->subcriteria)
140 140
           <ul class="list-unstyled">
141 141
             @foreach(json_decode($criterion->subcriteria) as $subcriterion)
142 142
                 <li>{{ $subcriterion }}</li>

+ 2
- 2
app/views/local/managers/shared/program.blade.php Näytä tiedosto

@@ -62,7 +62,7 @@
62 62
                                 <td class="col-md-4">{{{ $grouped_course->name}}}</td>
63 63
                                 <td class="col-md-3">{{{ $grouped_course->program->name }}}</td>
64 64
                                 <td class="col-md-1">
65
-                                    @if($grouped_course->outcomes_attempted!=NULL)
65
+                                    @if($grouped_course->activity_assessed!=NULL)
66 66
                                     Yes
67 67
                                     @else
68 68
                                     No
@@ -111,7 +111,7 @@
111 111
                                 <td>{{{ $course->name}}}</td>
112 112
                                 <td>{{{ $course->user->surnames }}}, {{{ $course->user->first_name }}}</td>
113 113
                                 <td>
114
-                                    @if($course->outcomes_attempted!=NULL)
114
+                                    @if($course->outcomes_att())
115 115
                                     Yes
116 116
                                     @else
117 117
                                     No