|
@@ -65,7 +65,7 @@ class Outcome extends Eloquent
|
65
|
65
|
// }
|
66
|
66
|
// return $conteo;
|
67
|
67
|
// }
|
68
|
|
- public function active_by_semesters($selected_semesters, $level)
|
|
68
|
+ public static function active_by_semesters($selected_semesters, $level)
|
69
|
69
|
{
|
70
|
70
|
$min_start="9000-01-01 00:00:00";
|
71
|
71
|
$max_end="1000-01-01 00:00:00";
|
|
@@ -105,12 +105,24 @@ class Outcome extends Eloquent
|
105
|
105
|
{
|
106
|
106
|
$semesters_array[]=$semester->id;
|
107
|
107
|
}
|
|
108
|
+// $programs=DB::table('programs')
|
|
109
|
+// ->join('courses', 'programs.id', '=', 'courses.program_id')
|
|
110
|
+// ->join('activities', 'activities.course_id', '=', 'courses.id')
|
|
111
|
+// ->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
|
|
112
|
+// ->join('new_criteria', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
113
|
+// ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
114
|
+// ->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
|
115
|
+// ->whereIn('courses.semester_id',$semesters_array)
|
|
116
|
+// ->distinct()
|
|
117
|
+// ->select('programs.id')
|
|
118
|
+// ->get()
|
|
119
|
+// ;
|
108
|
120
|
$programs=DB::table('programs')
|
109
|
121
|
->join('courses', 'programs.id', '=', 'courses.program_id')
|
110
|
122
|
->join('activities', 'activities.course_id', '=', 'courses.id')
|
111
|
123
|
->join('activity_criterion', 'activity_criterion.activity_id', '=', 'activities.id')
|
112
|
|
- ->join('new_criteria', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
113
|
|
- ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
124
|
+ ->join('criteria', 'activity_criterion.criterion_id', '=', 'criteria.id')
|
|
125
|
+ ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'criteria.id')
|
114
|
126
|
->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
115
|
127
|
->whereIn('courses.semester_id',$semesters_array)
|
116
|
128
|
->distinct()
|
|
@@ -129,16 +141,31 @@ class Outcome extends Eloquent
|
129
|
141
|
{
|
130
|
142
|
$semesters_array[]=$semester->id;
|
131
|
143
|
}
|
132
|
|
- $criteria=DB::table('new_criteria')
|
133
|
|
- ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
144
|
+// $criteria=DB::table('new_criteria')
|
|
145
|
+// ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
146
|
+// ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
|
147
|
+// ->join('courses', 'activities.course_id', '=', 'courses.id')
|
|
148
|
+// ->join('programs', 'programs.id', '=', 'courses.program_id')
|
|
149
|
+// ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
150
|
+// ->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
|
151
|
+// ->where('programs.is_graduate','=',$is_grad)
|
|
152
|
+// ->whereIn('courses.semester_id',$semesters_array)
|
|
153
|
+// ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
154
|
+// ->distinct()
|
|
155
|
+// ->get()
|
|
156
|
+// ;
|
|
157
|
+ $criteria=DB::table('criteria')
|
|
158
|
+ ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criteria.id')
|
134
|
159
|
->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
135
|
160
|
->join('courses', 'activities.course_id', '=', 'courses.id')
|
136
|
161
|
->join('programs', 'programs.id', '=', 'courses.program_id')
|
137
|
|
- ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
162
|
+ ->join('rubric_activity', 'activities.id', '=', 'rubric_activity.activity_id')
|
|
163
|
+ ->join('rubrics', 'rubrics.id', '=', 'rubric_activity.rubric_id')
|
|
164
|
+ ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'criteria.id')
|
138
|
165
|
->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
139
|
166
|
->where('programs.is_graduate','=',$is_grad)
|
140
|
167
|
->whereIn('courses.semester_id',$semesters_array)
|
141
|
|
- ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
168
|
+ ->select('criteria.id','expected_percentage','activity_criterion.activity_id')
|
142
|
169
|
->distinct()
|
143
|
170
|
->get()
|
144
|
171
|
;
|
|
@@ -165,15 +192,29 @@ class Outcome extends Eloquent
|
165
|
192
|
// exit();
|
166
|
193
|
$courses_array[]=$course->id;
|
167
|
194
|
}
|
168
|
|
- $criteria=DB::table('new_criteria')
|
169
|
|
- ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
195
|
+// $criteria=DB::table('new_criteria')
|
|
196
|
+// ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
197
|
+// ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
|
198
|
+// ->join('courses', 'activities.course_id', '=', 'courses.id')
|
|
199
|
+// ->join('programs', 'programs.id', '=', 'courses.program_id')
|
|
200
|
+// ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
201
|
+// ->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
|
202
|
+// ->whereIn('courses.id',$courses_array)
|
|
203
|
+// ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
204
|
+// ->distinct()
|
|
205
|
+// ->get()
|
|
206
|
+// ;
|
|
207
|
+ $criteria=DB::table('criteria')
|
|
208
|
+ ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criteria.id')
|
170
|
209
|
->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
171
|
210
|
->join('courses', 'activities.course_id', '=', 'courses.id')
|
172
|
211
|
->join('programs', 'programs.id', '=', 'courses.program_id')
|
173
|
|
- ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
212
|
+ ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'criteria.id')
|
|
213
|
+ ->join('rubric_activity', 'rubric_activity.activity_id', '=', 'activities.id')
|
|
214
|
+ ->join('rubrics', 'rubric_activity.rubric_id', '=', 'rubrics.id')
|
174
|
215
|
->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
175
|
216
|
->whereIn('courses.id',$courses_array)
|
176
|
|
- ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
217
|
+ ->select('criteria.id','expected_percentage','activity_criterion.activity_id')
|
177
|
218
|
->distinct()
|
178
|
219
|
->get()
|
179
|
220
|
;
|
|
@@ -199,15 +240,29 @@ class Outcome extends Eloquent
|
199
|
240
|
$courses_array[]=$course->id;
|
200
|
241
|
}
|
201
|
242
|
|
202
|
|
- $criteria=DB::table('new_criteria')
|
203
|
|
- ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
243
|
+// $criteria=DB::table('new_criteria')
|
|
244
|
+// ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
245
|
+// ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
|
246
|
+// ->join('courses', 'activities.course_id', '=', 'courses.id')
|
|
247
|
+// ->join('programs', 'programs.id', '=', 'courses.program_id')
|
|
248
|
+// ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
249
|
+// ->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
|
250
|
+// ->whereIn('courses.id',$courses_array)
|
|
251
|
+// ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
252
|
+// ->distinct()
|
|
253
|
+// ->get()
|
|
254
|
+// ;
|
|
255
|
+ $criteria=DB::table('criteria')
|
|
256
|
+ ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criteria.id')
|
204
|
257
|
->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
205
|
258
|
->join('courses', 'activities.course_id', '=', 'courses.id')
|
206
|
259
|
->join('programs', 'programs.id', '=', 'courses.program_id')
|
207
|
|
- ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
260
|
+ ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'criteria.id')
|
|
261
|
+ ->join('rubric_activity', 'rubric_activity.activity_id', '=', 'activities.id')
|
|
262
|
+ ->join('rubrics', 'rubric_activity.rubric_id', '=', 'rubrics.id')
|
208
|
263
|
->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
209
|
264
|
->whereIn('courses.id',$courses_array)
|
210
|
|
- ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
265
|
+ ->select('criteria.id','expected_percentage','activity_criterion.activity_id')
|
211
|
266
|
->distinct()
|
212
|
267
|
->get()
|
213
|
268
|
;
|
|
@@ -244,16 +299,31 @@ class Outcome extends Eloquent
|
244
|
299
|
}
|
245
|
300
|
|
246
|
301
|
// DB::enableQueryLog();
|
247
|
|
- $criteria=DB::table('new_criteria')
|
248
|
|
- ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
302
|
+// $criteria=DB::table('new_criteria')
|
|
303
|
+// ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'new_criteria.id')
|
|
304
|
+// ->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
|
305
|
+// ->join('courses', 'activities.course_id', '=', 'courses.id')
|
|
306
|
+// ->join('programs', 'programs.id', '=', 'courses.program_id')
|
|
307
|
+// ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
308
|
+// ->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
|
309
|
+// ->where('programs.is_graduate','=',$is_grad)
|
|
310
|
+// ->whereIn('courses.semester_id',$semesters_array)
|
|
311
|
+// ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
312
|
+// ->distinct()
|
|
313
|
+// ->get()
|
|
314
|
+// ;
|
|
315
|
+ $criteria=DB::table('criteria')
|
|
316
|
+ ->join('activity_criterion', 'activity_criterion.criterion_id', '=', 'criteria.id')
|
249
|
317
|
->join('activities', 'activity_criterion.activity_id', '=', 'activities.id')
|
250
|
318
|
->join('courses', 'activities.course_id', '=', 'courses.id')
|
251
|
319
|
->join('programs', 'programs.id', '=', 'courses.program_id')
|
252
|
|
- ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'new_criteria.id')
|
|
320
|
+ ->join('criterion_objective_outcome', 'criterion_objective_outcome.criterion_id', '=', 'criteria.id')
|
|
321
|
+ ->join('rubric_activity', 'rubric_activity.activity_id', '=', 'activities.id')
|
|
322
|
+ ->join('rubrics', 'rubric_activity.rubric_id', '=', 'rubrics.id')
|
253
|
323
|
->where('criterion_objective_outcome.outcome_id','=',$this->id)
|
254
|
324
|
->where('programs.is_graduate','=',$is_grad)
|
255
|
325
|
->whereIn('courses.semester_id',$semesters_array)
|
256
|
|
- ->select('new_criteria.id','expected_percentage_students_achieving','activity_criterion.activity_id')
|
|
326
|
+ ->select('criteria.id','expected_percentage','activity_criterion.activity_id')
|
257
|
327
|
->distinct()
|
258
|
328
|
->get()
|
259
|
329
|
;
|
|
@@ -273,7 +343,7 @@ class Outcome extends Eloquent
|
273
|
343
|
{
|
274
|
344
|
$percentage_students_who_achieved=0;
|
275
|
345
|
}
|
276
|
|
- if($percentage_students_who_achieved>=$criterion->expected_percentage_students_achieving)
|
|
346
|
+ if($percentage_students_who_achieved>=$criterion->expected_percentage)
|
277
|
347
|
{
|
278
|
348
|
$conteo++;
|
279
|
349
|
}
|