|
@@ -16,13 +16,13 @@ class SchoolsController extends \BaseController
|
16
|
16
|
->whereIn('semester_id', Session::get('semesters_ids'))
|
17
|
17
|
->lists('id');
|
18
|
18
|
|
19
|
|
-// return DB::table('programs')
|
20
|
|
-// ->join('courses', 'courses.program_id', '=', 'programs.id')
|
21
|
|
-// ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
|
22
|
|
-// ->addSelect('courses.semester_id')
|
23
|
|
-// ->where('school_id', $school->id)
|
24
|
|
-// ->whereIn('semester_id', Session::get('semesters_ids'))
|
25
|
|
-// ->lists('id');
|
|
19
|
+ // return DB::table('programs')
|
|
20
|
+ // ->join('courses', 'courses.program_id', '=', 'programs.id')
|
|
21
|
+ // ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
|
|
22
|
+ // ->addSelect('courses.semester_id')
|
|
23
|
+ // ->where('school_id', $school->id)
|
|
24
|
+ // ->whereIn('semester_id', Session::get('semesters_ids'))
|
|
25
|
+ // ->lists('id');
|
26
|
26
|
}
|
27
|
27
|
|
28
|
28
|
public function show($id)
|
|
@@ -33,7 +33,7 @@ class SchoolsController extends \BaseController
|
33
|
33
|
$title = $school->name;
|
34
|
34
|
$schools = School::all();
|
35
|
35
|
|
36
|
|
- $semesters = Semester::whereIn('id',Session::get('semesters_ids'))->get();
|
|
36
|
+ $semesters = Semester::whereIn('id', Session::get('semesters_ids'))->get();
|
37
|
37
|
|
38
|
38
|
$outcomes_grad = Outcome::active_by_semesters($semesters, 1);
|
39
|
39
|
$outcomes_undergrad = Outcome::active_by_semesters($semesters, 0);
|
|
@@ -88,32 +88,26 @@ class SchoolsController extends \BaseController
|
88
|
88
|
->orderBy('courses.number')
|
89
|
89
|
->orderBy('courses.semester_id')
|
90
|
90
|
->get();
|
91
|
|
-
|
92
|
|
- foreach($undergrad_grouped_courses as $key=>$courses)
|
93
|
|
- {
|
94
|
|
- $undergrad_grouped_courses[$key]->outcomes_attempted=NULL;
|
95
|
|
- $coursesT=Course::where('courses.code',$courses->code)->where('courses.number',$courses->number)->where('courses.semester_id',$courses->semester_id)->get();
|
96
|
|
- foreach($coursesT as $course)
|
97
|
|
- {
|
98
|
|
- if($course->isAssessed())
|
99
|
|
- {
|
100
|
|
- $undergrad_grouped_courses[$key]->outcomes_attempted=true;
|
101
|
|
- }
|
102
|
|
- }
|
103
|
|
- }
|
104
|
|
-
|
105
|
|
- foreach($grad_grouped_courses as $key=>$courses)
|
106
|
|
- {
|
107
|
|
- $grad_grouped_courses[$key]->outcomes_attempted=NULL;
|
108
|
|
- $coursesT=Course::where('courses.code',$courses->code)->where('courses.number',$courses->number)->where('courses.semester_id',$courses->semester_id)->get();
|
109
|
|
- foreach($coursesT as $course)
|
110
|
|
- {
|
111
|
|
- if($course->isAssessed())
|
112
|
|
- {
|
113
|
|
- $grad_grouped_courses[$key]->outcomes_attempted=true;
|
114
|
|
- }
|
115
|
|
- }
|
116
|
|
- }
|
|
91
|
+
|
|
92
|
+ foreach ($undergrad_grouped_courses as $key => $courses) {
|
|
93
|
+ $undergrad_grouped_courses[$key]->outcomes_attempted = NULL;
|
|
94
|
+ $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
|
|
95
|
+ foreach ($coursesT as $course) {
|
|
96
|
+ if ($course->isAssessed()) {
|
|
97
|
+ $undergrad_grouped_courses[$key]->outcomes_attempted = true;
|
|
98
|
+ }
|
|
99
|
+ }
|
|
100
|
+ }
|
|
101
|
+
|
|
102
|
+ foreach ($grad_grouped_courses as $key => $courses) {
|
|
103
|
+ $grad_grouped_courses[$key]->outcomes_attempted = NULL;
|
|
104
|
+ $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
|
|
105
|
+ foreach ($coursesT as $course) {
|
|
106
|
+ if ($course->isAssessed()) {
|
|
107
|
+ $grad_grouped_courses[$key]->outcomes_attempted = true;
|
|
108
|
+ }
|
|
109
|
+ }
|
|
110
|
+ }
|
117
|
111
|
|
118
|
112
|
// Fetch programs with participation
|
119
|
113
|
$participating_programs = $this->participatingPrograms($school);
|
|
@@ -131,14 +125,13 @@ class SchoolsController extends \BaseController
|
131
|
125
|
foreach ($school->programs as $program) {
|
132
|
126
|
foreach ($program->courses as $course) {
|
133
|
127
|
|
134
|
|
- if (!$course->program->is_graduate){
|
135
|
|
- $undergrad_school_sections_count += 1;
|
136
|
|
- if($course->isAssessed())$undergrad_assessed_sections_count += 1;
|
137
|
|
- }
|
138
|
|
- else {
|
139
|
|
- $grad_school_sections_count += 1;
|
140
|
|
- if($course->isAssessed())$grad_assessed_sections_count += 1;
|
141
|
|
- }
|
|
128
|
+ if (!$course->program->is_graduate) {
|
|
129
|
+ $undergrad_school_sections_count += 1;
|
|
130
|
+ if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
|
|
131
|
+ } else {
|
|
132
|
+ $grad_school_sections_count += 1;
|
|
133
|
+ if ($course->isAssessed()) $grad_assessed_sections_count += 1;
|
|
134
|
+ }
|
142
|
135
|
}
|
143
|
136
|
}
|
144
|
137
|
|
|
@@ -148,37 +141,33 @@ class SchoolsController extends \BaseController
|
148
|
141
|
|
149
|
142
|
// For each outcome
|
150
|
143
|
foreach ($outcomes_undergrad as $outcome) {
|
151
|
|
-// $attempted_outcomes_per_undergrad_program[$outcome->id]=0;
|
152
|
|
-// $achieved_outcomes_per_undergrad_program[$outcome->id]=0;
|
153
|
|
- $attemptedUndergradProgramsPerOutcome[$outcome->id]=0;
|
154
|
|
- $achievedUndergradProgramsPerOutcome[$outcome->id]=0;
|
155
|
|
- $programs_attempted_in_school[$outcome->id]=$outcome->programs_attempted_in_school($semesters, $school->id);
|
156
|
|
-// var_dump($programs_attempted_in_school);exit();
|
157
|
|
- foreach($programs_attempted_in_school[$outcome->id] as $program_id)
|
158
|
|
- {
|
159
|
|
-// var_dump($program_id->id);exit();
|
160
|
|
- $program = DB::table('programs')->where('id', '=', $program_id->id)->first();
|
161
|
|
-
|
162
|
|
- if(!$program->is_graduate)
|
163
|
|
- {
|
164
|
|
- $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
|
165
|
|
- $programC=Program::where('id', '=', $program_id->id)->first();
|
166
|
|
-// var_dump($programC);exit();
|
167
|
|
- if($programC->achieved_outcome($outcome->id,$semesters))
|
168
|
|
- {
|
169
|
|
- $achievedUndergradProgramsPerOutcome[$outcome->id]++;
|
170
|
|
- }
|
171
|
|
- }
|
172
|
|
- }
|
173
|
|
- $undergrad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,0);
|
174
|
|
- $undergrad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,0);
|
175
|
|
-
|
|
144
|
+ // $attempted_outcomes_per_undergrad_program[$outcome->id]=0;
|
|
145
|
+ // $achieved_outcomes_per_undergrad_program[$outcome->id]=0;
|
|
146
|
+ $attemptedUndergradProgramsPerOutcome[$outcome->id] = 0;
|
|
147
|
+ $achievedUndergradProgramsPerOutcome[$outcome->id] = 0;
|
|
148
|
+ $programs_attempted_in_school[$outcome->id] = $outcome->programs_attempted_in_school($semesters, $school->id);
|
|
149
|
+ // var_dump($programs_attempted_in_school);exit();
|
|
150
|
+ foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
|
|
151
|
+ // var_dump($program_id->id);exit();
|
|
152
|
+ $program = DB::table('programs')->where('id', '=', $program_id->id)->first();
|
|
153
|
+
|
|
154
|
+ if (!$program->is_graduate) {
|
|
155
|
+ $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
|
|
156
|
+ $programC = Program::where('id', '=', $program_id->id)->first();
|
|
157
|
+ // var_dump($programC);exit();
|
|
158
|
+ if ($programC->achieved_outcome($outcome->id, $semesters)) {
|
|
159
|
+ $achievedUndergradProgramsPerOutcome[$outcome->id]++;
|
|
160
|
+ }
|
|
161
|
+ }
|
|
162
|
+ }
|
|
163
|
+ $undergrad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 0);
|
|
164
|
+ $undergrad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 0);
|
|
165
|
+
|
176
|
166
|
// For each program with courses that do assessment
|
177
|
167
|
$programs_with_courses = Program::with(array('courses' => function ($query) {
|
178
|
168
|
// $query->whereNotNull('outcomes_attempted');
|
179
|
169
|
$query->whereIn('semester_id', Session::get('semesters_ids'));
|
180
|
170
|
}))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
|
181
|
|
-
|
182
|
171
|
}
|
183
|
172
|
|
184
|
173
|
/**
|
|
@@ -187,43 +176,39 @@ class SchoolsController extends \BaseController
|
187
|
176
|
|
188
|
177
|
// For each outcome
|
189
|
178
|
foreach ($outcomes_grad as $outcome) {
|
190
|
|
-// $attempted_outcomes_per_grad_program[$outcome->id]=0;
|
191
|
|
- $achieved_outcomes_per_grad_program[$outcome->id]=0;
|
192
|
|
- $attemptedGradProgramsPerOutcome[$outcome->id]=0;
|
193
|
|
- $achievedGradProgramsPerOutcome[$outcome->id]=0;
|
194
|
|
- $grad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,1);
|
195
|
|
- $grad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,1);
|
196
|
|
- // For each program with courses that do assessment
|
197
|
|
- foreach($programs_attempted_in_school[$outcome->id] as $program_id)
|
198
|
|
- {
|
199
|
|
-// var_dump($program_id->id);exit();
|
200
|
|
- $program = DB::table('programs')
|
201
|
|
- ->where('id', '=', $program_id->id)
|
202
|
|
- ->first();
|
203
|
|
-// $program=Program::where('id', $program_id->id);
|
204
|
|
-// var_dump($program);exit();
|
205
|
|
- if($program->is_graduate)
|
206
|
|
- {
|
207
|
|
- $attemptedGradProgramsPerOutcome[$outcome->id]++;
|
208
|
|
- $programC=Program::where('id', '=', $program_id->id)->first();
|
209
|
|
-// var_dump($programC);exit();
|
210
|
|
- if($programC->achieved_outcome($outcome->id,$semesters))
|
211
|
|
- {
|
212
|
|
- $achievedGradProgramsPerOutcome[$outcome->id]++;
|
213
|
|
- }
|
214
|
|
- }
|
215
|
|
- }
|
|
179
|
+ // $attempted_outcomes_per_grad_program[$outcome->id]=0;
|
|
180
|
+ $achieved_outcomes_per_grad_program[$outcome->id] = 0;
|
|
181
|
+ $attemptedGradProgramsPerOutcome[$outcome->id] = 0;
|
|
182
|
+ $achievedGradProgramsPerOutcome[$outcome->id] = 0;
|
|
183
|
+ $grad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 1);
|
|
184
|
+ $grad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 1);
|
|
185
|
+ // For each program with courses that do assessment
|
|
186
|
+ foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
|
|
187
|
+ // var_dump($program_id->id);exit();
|
|
188
|
+ $program = DB::table('programs')
|
|
189
|
+ ->where('id', '=', $program_id->id)
|
|
190
|
+ ->first();
|
|
191
|
+ // $program=Program::where('id', $program_id->id);
|
|
192
|
+ // var_dump($program);exit();
|
|
193
|
+ if ($program->is_graduate) {
|
|
194
|
+ $attemptedGradProgramsPerOutcome[$outcome->id]++;
|
|
195
|
+ $programC = Program::where('id', '=', $program_id->id)->first();
|
|
196
|
+ // var_dump($programC);exit();
|
|
197
|
+ if ($programC->achieved_outcome($outcome->id, $semesters)) {
|
|
198
|
+ $achievedGradProgramsPerOutcome[$outcome->id]++;
|
|
199
|
+ }
|
|
200
|
+ }
|
|
201
|
+ }
|
216
|
202
|
$programs_with_courses = Program::with(array('courses' => function ($query) {
|
217
|
203
|
// $query->whereNotNull('outcomes_attempted');
|
218
|
204
|
$query->whereIn('semester_id', Session::get('semesters_ids'));
|
219
|
205
|
}))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
|
220
|
|
-
|
221
|
206
|
}
|
222
|
207
|
if ($school->id == 13) {
|
223
|
|
-// return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
|
208
|
+ // return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
224
|
209
|
return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
|
225
|
210
|
} else {
|
226
|
|
-// return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
|
211
|
+ // return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
227
|
212
|
return View::make('local.managers.shared.school', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
|
228
|
213
|
}
|
229
|
214
|
}
|
|
@@ -236,11 +221,11 @@ class SchoolsController extends \BaseController
|
236
|
221
|
$title = $school->name;
|
237
|
222
|
$schools = School::all();
|
238
|
223
|
|
239
|
|
-// $outcomes = Outcome::orderBy('name', 'asc')->get();
|
240
|
|
-// $outcomeCount = Outcome::all()->count();
|
241
|
|
- $semesters = Semester::whereIn('id',Session::get('semesters_ids'))->get();
|
242
|
|
-// var_dump($semesters);
|
243
|
|
-// exit();
|
|
224
|
+ // $outcomes = Outcome::orderBy('name', 'asc')->get();
|
|
225
|
+ // $outcomeCount = Outcome::all()->count();
|
|
226
|
+ $semesters = Semester::whereIn('id', Session::get('semesters_ids'))->get();
|
|
227
|
+ // var_dump($semesters);
|
|
228
|
+ // exit();
|
244
|
229
|
$outcomes_grad = Outcome::active_by_semesters($semesters, 1);
|
245
|
230
|
$outcomes_undergrad = Outcome::active_by_semesters($semesters, 0);
|
246
|
231
|
|
|
@@ -304,57 +289,56 @@ class SchoolsController extends \BaseController
|
304
|
289
|
* Calculate how many sections are doing assessment
|
305
|
290
|
*/
|
306
|
291
|
|
307
|
|
-// $undergrad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
|
308
|
|
-// $undergrad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
|
|
292
|
+ // $undergrad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
|
|
293
|
+ // $undergrad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
|
309
|
294
|
$undergrad_assessed_sections_count = 0;
|
310
|
295
|
$undergrad_school_sections_count = 0;
|
311
|
296
|
|
312
|
|
-// $grad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
|
313
|
|
-// $grad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
|
|
297
|
+ // $grad_outcomes_achieved = array_fill(1, $outcomeCount, 0);
|
|
298
|
+ // $grad_outcomes_attempted = array_fill(1, $outcomeCount, 0);
|
314
|
299
|
$grad_assessed_sections_count = 0;
|
315
|
300
|
$grad_school_sections_count = 0;
|
316
|
301
|
|
317
|
302
|
foreach ($school->programs as $program) {
|
318
|
303
|
foreach ($program->courses as $course) {
|
319
|
|
-// Log::info("aqui".$course);
|
|
304
|
+ // //Log::info("aqui".$course);
|
320
|
305
|
|
321
|
|
- if (!$course->program->is_graduate){
|
322
|
|
- $undergrad_school_sections_count += 1;
|
323
|
|
- if($course->isAssessed())$undergrad_assessed_sections_count += 1;
|
324
|
|
-// Log::info("aqui".$course);
|
|
306
|
+ if (!$course->program->is_graduate) {
|
|
307
|
+ $undergrad_school_sections_count += 1;
|
|
308
|
+ if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
|
|
309
|
+ // //Log::info("aqui".$course);
|
325
|
310
|
|
326
|
|
- }
|
327
|
|
- else {
|
328
|
|
- $grad_school_sections_count += 1;
|
329
|
|
- if($course->isAssessed())$grad_assessed_sections_count += 1;
|
330
|
|
-// Log::info("aqui".$course);
|
|
311
|
+ } else {
|
|
312
|
+ $grad_school_sections_count += 1;
|
|
313
|
+ if ($course->isAssessed()) $grad_assessed_sections_count += 1;
|
|
314
|
+ // //Log::info("aqui".$course);
|
331
|
315
|
|
332
|
|
- }
|
|
316
|
+ }
|
|
317
|
+
|
|
318
|
+ // if (!$course->program->is_graduate) {
|
|
319
|
+ // if ($course->outcomes_achieved != NULL) {
|
|
320
|
+ // $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
|
|
321
|
+ // $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
|
|
322
|
+ // for ($i = 1; $i <= count($undergrad_outcomes_attempted); $i++) {
|
|
323
|
+ // $undergrad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
|
|
324
|
+ // $undergrad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
|
|
325
|
+ // }
|
|
326
|
+ // $undergrad_assessed_sections_count += 1;
|
|
327
|
+ // }
|
|
328
|
+ // $undergrad_school_sections_count += 1;
|
|
329
|
+ // } else {
|
|
330
|
+ // if ($course->outcomes_achieved != NULL) {
|
|
331
|
+ // $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
|
|
332
|
+ // $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
|
|
333
|
+ // for ($i = 1; $i <= count($grad_outcomes_attempted); $i++) {
|
|
334
|
+ // $grad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
|
|
335
|
+ // $grad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
|
|
336
|
+ // }
|
|
337
|
+ // $grad_assessed_sections_count += 1;
|
|
338
|
+ // }
|
|
339
|
+ // $grad_school_sections_count += 1;
|
|
340
|
+ // }
|
333
|
341
|
|
334
|
|
-// if (!$course->program->is_graduate) {
|
335
|
|
-// if ($course->outcomes_achieved != NULL) {
|
336
|
|
-// $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
|
337
|
|
-// $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
|
338
|
|
-// for ($i = 1; $i <= count($undergrad_outcomes_attempted); $i++) {
|
339
|
|
-// $undergrad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
|
340
|
|
-// $undergrad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
|
341
|
|
-// }
|
342
|
|
-// $undergrad_assessed_sections_count += 1;
|
343
|
|
-// }
|
344
|
|
-// $undergrad_school_sections_count += 1;
|
345
|
|
-// } else {
|
346
|
|
-// if ($course->outcomes_achieved != NULL) {
|
347
|
|
-// $course_outcomes_achieved = json_decode($course->outcomes_achieved, true);
|
348
|
|
-// $course_outcomes_attempted = json_decode($course->outcomes_attempted, true);
|
349
|
|
-// for ($i = 1; $i <= count($grad_outcomes_attempted); $i++) {
|
350
|
|
-// $grad_outcomes_achieved[$i] += $course_outcomes_achieved[$i];
|
351
|
|
-// $grad_outcomes_attempted[$i] += $course_outcomes_attempted[$i];
|
352
|
|
-// }
|
353
|
|
-// $grad_assessed_sections_count += 1;
|
354
|
|
-// }
|
355
|
|
-// $grad_school_sections_count += 1;
|
356
|
|
-// }
|
357
|
|
-
|
358
|
342
|
}
|
359
|
343
|
}
|
360
|
344
|
|
|
@@ -363,50 +347,47 @@ class SchoolsController extends \BaseController
|
363
|
347
|
*/
|
364
|
348
|
|
365
|
349
|
// Number of programs that achieved a particular learning outcome
|
366
|
|
-// $achievedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
|
350
|
+ // $achievedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
367
|
351
|
|
368
|
352
|
// Number of programs that attempted a particular learning outcome
|
369
|
|
-// $attemptedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
|
353
|
+ // $attemptedUndergradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
370
|
354
|
|
371
|
355
|
// Fetch programs with participation for the school
|
372
|
|
-// $participating_undergrad_programs = DB::table('programs')
|
373
|
|
-// ->join('courses', 'courses.program_id', '=', 'programs.id')
|
374
|
|
-// ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
|
375
|
|
-// ->addSelect('courses.semester_id')
|
376
|
|
-// ->whereIn('semester_id', Session::get('semesters_ids'))
|
377
|
|
-// ->where('is_graduate', 0)
|
378
|
|
-// ->where('school_id', $school->id)
|
379
|
|
-// ->groupBy('id')
|
380
|
|
-// ->get();
|
|
356
|
+ // $participating_undergrad_programs = DB::table('programs')
|
|
357
|
+ // ->join('courses', 'courses.program_id', '=', 'programs.id')
|
|
358
|
+ // ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
|
|
359
|
+ // ->addSelect('courses.semester_id')
|
|
360
|
+ // ->whereIn('semester_id', Session::get('semesters_ids'))
|
|
361
|
+ // ->where('is_graduate', 0)
|
|
362
|
+ // ->where('school_id', $school->id)
|
|
363
|
+ // ->groupBy('id')
|
|
364
|
+ // ->get();
|
381
|
365
|
|
382
|
366
|
$output = array();
|
383
|
367
|
|
384
|
368
|
|
385
|
369
|
// For each outcome
|
386
|
370
|
foreach ($outcomes_undergrad as $outcome) {
|
387
|
|
-// $attempted_outcomes_per_undergrad_program[$outcome->id]=0;
|
388
|
|
- $achieved_outcomes_per_undergrad_program[$outcome->id]=0;
|
389
|
|
- $attemptedUndergradProgramsPerOutcome[$outcome->id]=0;
|
390
|
|
- $achievedUndergradProgramsPerOutcome[$outcome->id]=0;
|
391
|
|
- $programs_attempted_in_school[$outcome->id]=$outcome->programs_attempted_in_school($semesters, $school->id);
|
392
|
|
-// var_dump($programs_attempted_in_school);exit();
|
393
|
|
- foreach($programs_attempted_in_school[$outcome->id] as $program_id)
|
394
|
|
- {
|
395
|
|
-// var_dump($program_id->id);exit();
|
396
|
|
- $program = DB::table('programs')
|
397
|
|
- ->where('id', '=', $program_id->id)
|
398
|
|
- ->first();
|
399
|
|
-// $program=Program::where('id', $program_id->id);
|
400
|
|
-// var_dump($program);exit();
|
401
|
|
- if(!$program->is_graduate)
|
402
|
|
- {
|
403
|
|
- $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
|
404
|
|
-
|
405
|
|
- }
|
406
|
|
- }
|
407
|
|
- $undergrad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,0);
|
408
|
|
- $undergrad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,0);
|
409
|
|
-
|
|
371
|
+ // $attempted_outcomes_per_undergrad_program[$outcome->id]=0;
|
|
372
|
+ $achieved_outcomes_per_undergrad_program[$outcome->id] = 0;
|
|
373
|
+ $attemptedUndergradProgramsPerOutcome[$outcome->id] = 0;
|
|
374
|
+ $achievedUndergradProgramsPerOutcome[$outcome->id] = 0;
|
|
375
|
+ $programs_attempted_in_school[$outcome->id] = $outcome->programs_attempted_in_school($semesters, $school->id);
|
|
376
|
+ // var_dump($programs_attempted_in_school);exit();
|
|
377
|
+ foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
|
|
378
|
+ // var_dump($program_id->id);exit();
|
|
379
|
+ $program = DB::table('programs')
|
|
380
|
+ ->where('id', '=', $program_id->id)
|
|
381
|
+ ->first();
|
|
382
|
+ // $program=Program::where('id', $program_id->id);
|
|
383
|
+ // var_dump($program);exit();
|
|
384
|
+ if (!$program->is_graduate) {
|
|
385
|
+ $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
|
|
386
|
+ }
|
|
387
|
+ }
|
|
388
|
+ $undergrad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 0);
|
|
389
|
+ $undergrad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 0);
|
|
390
|
+
|
410
|
391
|
// For each program with courses that do assessment
|
411
|
392
|
$programs_with_courses = Program::with(array('courses' => function ($query) {
|
412
|
393
|
// $query->whereNotNull('outcomes_attempted');
|
|
@@ -414,46 +395,46 @@ class SchoolsController extends \BaseController
|
414
|
395
|
}))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
|
415
|
396
|
|
416
|
397
|
foreach ($programs_with_courses as $program) {
|
417
|
|
- if(in_array($program->id,$participating_programs)){
|
418
|
|
- // To acummulate all criteria for one program
|
419
|
|
-// $achieved_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
|
420
|
|
-// $attempted_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
|
421
|
|
-
|
422
|
|
- //Flag for counting programs
|
423
|
|
- $flag = false;
|
424
|
|
-
|
425
|
|
- // For each course in the program
|
426
|
|
- // foreach ($program->courses as $course) {
|
427
|
|
-// if($course->isAssessed()){
|
428
|
|
-// // If the outcome in question is being evaluated
|
429
|
|
-// $course_outcomes_attempted2 = $course->outcomes_att();
|
430
|
|
-// // $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
|
431
|
|
-// // $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
|
432
|
|
-// $course_outcomes_achieved2 = $course->outcomes_ach();
|
433
|
|
-// if (
|
434
|
|
-// array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
|
435
|
|
-// && $course_outcomes_attempted2[$outcome->id] > 0
|
436
|
|
-// ) {
|
437
|
|
-// $achieved_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
|
438
|
|
-// // $attempted_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
|
439
|
|
-//
|
440
|
|
-// // Add one to the programs assessing, if it wasn't added before
|
441
|
|
-// if (!$flag) {
|
442
|
|
-// $attemptedUndergradProgramsPerOutcome[$outcome->id] += 1;
|
443
|
|
-// $flag = true;
|
444
|
|
-// }
|
445
|
|
-// }
|
446
|
|
-//
|
447
|
|
-// // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_undergrad_program);
|
448
|
|
-// // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
|
449
|
|
-// }
|
450
|
|
-// }
|
451
|
|
- //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
|
452
|
|
-// if ($attempted_outcomes_per_undergrad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_undergrad_program[$outcome->id] / $attempted_outcomes_per_undergrad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
|
453
|
|
-// $achievedUndergradProgramsPerOutcome[$outcome->id] += 1;
|
454
|
|
-// // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
|
455
|
|
-// }
|
456
|
|
- }
|
|
398
|
+ if (in_array($program->id, $participating_programs)) {
|
|
399
|
+ // To acummulate all criteria for one program
|
|
400
|
+ // $achieved_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
|
|
401
|
+ // $attempted_outcomes_per_undergrad_program = array_fill(1, $outcomeCount, 0);
|
|
402
|
+
|
|
403
|
+ //Flag for counting programs
|
|
404
|
+ $flag = false;
|
|
405
|
+
|
|
406
|
+ // For each course in the program
|
|
407
|
+ // foreach ($program->courses as $course) {
|
|
408
|
+ // if($course->isAssessed()){
|
|
409
|
+ // // If the outcome in question is being evaluated
|
|
410
|
+ // $course_outcomes_attempted2 = $course->outcomes_att();
|
|
411
|
+ // // $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
|
|
412
|
+ // // $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
|
|
413
|
+ // $course_outcomes_achieved2 = $course->outcomes_ach();
|
|
414
|
+ // if (
|
|
415
|
+ // array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
|
|
416
|
+ // && $course_outcomes_attempted2[$outcome->id] > 0
|
|
417
|
+ // ) {
|
|
418
|
+ // $achieved_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
|
|
419
|
+ // // $attempted_outcomes_per_undergrad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
|
|
420
|
+ //
|
|
421
|
+ // // Add one to the programs assessing, if it wasn't added before
|
|
422
|
+ // if (!$flag) {
|
|
423
|
+ // $attemptedUndergradProgramsPerOutcome[$outcome->id] += 1;
|
|
424
|
+ // $flag = true;
|
|
425
|
+ // }
|
|
426
|
+ // }
|
|
427
|
+ //
|
|
428
|
+ // // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_undergrad_program);
|
|
429
|
+ // // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
|
|
430
|
+ // }
|
|
431
|
+ // }
|
|
432
|
+ //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
|
|
433
|
+ // if ($attempted_outcomes_per_undergrad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_undergrad_program[$outcome->id] / $attempted_outcomes_per_undergrad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
|
|
434
|
+ // $achievedUndergradProgramsPerOutcome[$outcome->id] += 1;
|
|
435
|
+ // // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
|
|
436
|
+ // }
|
|
437
|
+ }
|
457
|
438
|
}
|
458
|
439
|
}
|
459
|
440
|
|
|
@@ -462,101 +443,98 @@ class SchoolsController extends \BaseController
|
462
|
443
|
*/
|
463
|
444
|
|
464
|
445
|
// Number of programs that achieved a particular learning outcome
|
465
|
|
-// $achievedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
|
446
|
+ // $achievedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
466
|
447
|
|
467
|
448
|
// Number of programs that attempted a particular learning outcome
|
468
|
|
-// $attemptedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
469
|
|
-//
|
|
449
|
+ // $attemptedGradProgramsPerOutcome = array_fill(1, $outcomeCount, 0);
|
|
450
|
+ //
|
470
|
451
|
// Fetch programs with participation for the school
|
471
|
|
-// $participating_grad_programs = DB::table('programs')
|
472
|
|
-// ->join('courses', 'courses.program_id', '=', 'programs.id')
|
473
|
|
-// ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
|
474
|
|
-// ->addSelect('courses.semester_id')
|
475
|
|
-// ->whereIn('semester_id', Session::get('semesters_ids'))
|
476
|
|
-// ->where('is_graduate', 1)
|
477
|
|
-// ->where('school_id', $school->id)
|
478
|
|
-// ->groupBy('id')
|
479
|
|
-// ->get();
|
|
452
|
+ // $participating_grad_programs = DB::table('programs')
|
|
453
|
+ // ->join('courses', 'courses.program_id', '=', 'programs.id')
|
|
454
|
+ // ->select('programs.id', 'programs.name', 'programs.is_graduate', 'programs.school_id')
|
|
455
|
+ // ->addSelect('courses.semester_id')
|
|
456
|
+ // ->whereIn('semester_id', Session::get('semesters_ids'))
|
|
457
|
+ // ->where('is_graduate', 1)
|
|
458
|
+ // ->where('school_id', $school->id)
|
|
459
|
+ // ->groupBy('id')
|
|
460
|
+ // ->get();
|
480
|
461
|
|
481
|
462
|
$output = array();
|
482
|
463
|
|
483
|
464
|
|
484
|
465
|
// For each outcome
|
485
|
466
|
foreach ($outcomes_grad as $outcome) {
|
486
|
|
-// $attempted_outcomes_per_grad_program[$outcome->id]=0;
|
487
|
|
- $achieved_outcomes_per_grad_program[$outcome->id]=0;
|
488
|
|
- $attemptedGradProgramsPerOutcome[$outcome->id]=0;
|
489
|
|
- $achievedGradProgramsPerOutcome[$outcome->id]=0;
|
490
|
|
- $grad_outcomes_attempted[$outcome->id]=$outcome->attempted_by_school($semesters, $school->id,1);
|
491
|
|
- $grad_outcomes_achieved[$outcome->id]=$outcome->achieved_by_school($semesters, $school->id,1);
|
492
|
|
- // For each program with courses that do assessment
|
493
|
|
- foreach($programs_attempted_in_school[$outcome->id] as $program_id)
|
494
|
|
- {
|
495
|
|
-// var_dump($program_id->id);exit();
|
496
|
|
- $program = DB::table('programs')
|
497
|
|
- ->where('id', '=', $program_id->id)
|
498
|
|
- ->first();
|
499
|
|
-// $program=Program::where('id', $program_id->id);
|
500
|
|
-// var_dump($program);exit();
|
501
|
|
- if($program->is_graduate)
|
502
|
|
- {
|
503
|
|
- $attemptedGradProgramsPerOutcome[$outcome->id]++;
|
504
|
|
-
|
505
|
|
- }
|
506
|
|
- }
|
|
467
|
+ // $attempted_outcomes_per_grad_program[$outcome->id]=0;
|
|
468
|
+ $achieved_outcomes_per_grad_program[$outcome->id] = 0;
|
|
469
|
+ $attemptedGradProgramsPerOutcome[$outcome->id] = 0;
|
|
470
|
+ $achievedGradProgramsPerOutcome[$outcome->id] = 0;
|
|
471
|
+ $grad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 1);
|
|
472
|
+ $grad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 1);
|
|
473
|
+ // For each program with courses that do assessment
|
|
474
|
+ foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
|
|
475
|
+ // var_dump($program_id->id);exit();
|
|
476
|
+ $program = DB::table('programs')
|
|
477
|
+ ->where('id', '=', $program_id->id)
|
|
478
|
+ ->first();
|
|
479
|
+ // $program=Program::where('id', $program_id->id);
|
|
480
|
+ // var_dump($program);exit();
|
|
481
|
+ if ($program->is_graduate) {
|
|
482
|
+ $attemptedGradProgramsPerOutcome[$outcome->id]++;
|
|
483
|
+ }
|
|
484
|
+ }
|
507
|
485
|
$programs_with_courses = Program::with(array('courses' => function ($query) {
|
508
|
486
|
// $query->whereNotNull('outcomes_attempted');
|
509
|
487
|
$query->whereIn('semester_id', Session::get('semesters_ids'));
|
510
|
488
|
}))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
|
511
|
489
|
|
512
|
490
|
foreach ($programs_with_courses as $program) {
|
513
|
|
- if(in_array($program->id,$participating_programs)){
|
514
|
|
- // To acummulate all criteria for one program
|
515
|
|
-// $achieved_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
|
516
|
|
-// $attempted_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
|
517
|
|
-
|
518
|
|
- //Flag for counting programs
|
519
|
|
- $flag = false;
|
520
|
|
-
|
521
|
|
- // For each course in the program
|
522
|
|
- foreach ($program->courses as $course) {
|
523
|
|
- if($course->isAssessed()){
|
524
|
|
- // If the outcome in question is being evaluated
|
525
|
|
- // $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
|
526
|
|
- $course_outcomes_attempted2 = ($course->outcomes_att());
|
527
|
|
- $course_outcomes_achieved2 = ($course->outcomes_ach());
|
528
|
|
- // $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
|
529
|
|
- if (
|
530
|
|
- array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
|
531
|
|
- && $course_outcomes_attempted2[$outcome->id] > 0
|
532
|
|
- ) {
|
533
|
|
- $achieved_outcomes_per_grad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
|
534
|
|
- $attempted_outcomes_per_grad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
|
535
|
|
-
|
536
|
|
- // Add one to the programs assessing, if it wasn't added before
|
537
|
|
- if (!$flag) {
|
538
|
|
- $attemptedGradProgramsPerOutcome[$outcome->id] += 1;
|
539
|
|
- $flag = true;
|
|
491
|
+ if (in_array($program->id, $participating_programs)) {
|
|
492
|
+ // To acummulate all criteria for one program
|
|
493
|
+ // $achieved_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
|
|
494
|
+ // $attempted_outcomes_per_grad_program = array_fill(1, $outcomeCount, 0);
|
|
495
|
+
|
|
496
|
+ //Flag for counting programs
|
|
497
|
+ $flag = false;
|
|
498
|
+
|
|
499
|
+ // For each course in the program
|
|
500
|
+ foreach ($program->courses as $course) {
|
|
501
|
+ if ($course->isAssessed()) {
|
|
502
|
+ // If the outcome in question is being evaluated
|
|
503
|
+ // $course_outcomes_attempted2 = json_decode($course->outcomes_attempted, true);
|
|
504
|
+ $course_outcomes_attempted2 = ($course->outcomes_att());
|
|
505
|
+ $course_outcomes_achieved2 = ($course->outcomes_ach());
|
|
506
|
+ // $course_outcomes_achieved2 = json_decode($course->outcomes_achieved, true);
|
|
507
|
+ if (
|
|
508
|
+ array_key_exists($outcome->id, $course_outcomes_attempted2) && array_key_exists($outcome->id, $course_outcomes_achieved2)
|
|
509
|
+ && $course_outcomes_attempted2[$outcome->id] > 0
|
|
510
|
+ ) {
|
|
511
|
+ $achieved_outcomes_per_grad_program[$outcome->id] += $course_outcomes_achieved2[$outcome->id];
|
|
512
|
+ $attempted_outcomes_per_grad_program[$outcome->id] += $course_outcomes_attempted2[$outcome->id];
|
|
513
|
+
|
|
514
|
+ // Add one to the programs assessing, if it wasn't added before
|
|
515
|
+ if (!$flag) {
|
|
516
|
+ $attemptedGradProgramsPerOutcome[$outcome->id] += 1;
|
|
517
|
+ $flag = true;
|
|
518
|
+ }
|
|
519
|
+ }
|
|
520
|
+
|
|
521
|
+ // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_grad_program);
|
|
522
|
+ // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
|
540
|
523
|
}
|
541
|
524
|
}
|
542
|
|
-
|
543
|
|
- // $output[] = 'ACHIEVED: '.$program->name.'-'.json_encode($achieved_outcomes_per_grad_program);
|
544
|
|
- // $output[] = 'ATTEMPTED: '.$program->name.'-'.json_encode($attempted_outcomes_per_program);
|
545
|
|
- }
|
546
|
|
- }
|
547
|
|
- //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
|
548
|
|
- if ($attempted_outcomes_per_grad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_grad_program[$outcome->id] / $attempted_outcomes_per_grad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
|
549
|
|
- $achievedGradProgramsPerOutcome[$outcome->id] += 1;
|
550
|
|
- // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
|
|
525
|
+ //If the accumulated achieved criteria for a specific outcome in a program divided by the accumulated attempted criteria for a specific outcome in a program is greated than the expected outcome
|
|
526
|
+ if ($attempted_outcomes_per_grad_program[$outcome->id] != 0 && (float)$achieved_outcomes_per_grad_program[$outcome->id] / $attempted_outcomes_per_grad_program[$outcome->id] * 100 >= $outcome->expected_outcome) {
|
|
527
|
+ $achievedGradProgramsPerOutcome[$outcome->id] += 1;
|
|
528
|
+ // $output[]= 'END OF PROGRAM: '.$program->name.'-'.json_encode($achievedProgramsPerOutcome);
|
|
529
|
+ }
|
551
|
530
|
}
|
552
|
|
- }
|
553
|
531
|
}
|
554
|
532
|
}
|
555
|
533
|
if ($school->id == 13) {
|
556
|
|
-// return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
|
534
|
+ // return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
557
|
535
|
return View::make('local.managers.shared.school-uhs', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
|
558
|
536
|
} else {
|
559
|
|
-// return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
|
537
|
+ // return View::make('local.managers.shared.school', compact('title', 'outcomes', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs', 'participating_undergrad_programs', 'participating_grad_programs'));
|
560
|
538
|
return View::make('local.managers.shared.school', compact('title', 'outcomes_grad', 'outcomes_undergrad', 'undergrad_programs', 'grad_programs', 'undergrad_outcomes_attempted', 'grad_outcomes_attempted', 'undergrad_outcomes_achieved', 'grad_outcomes_achieved', 'schools', 'school', 'undergrad_assessed_sections_count', 'grad_assessed_sections_count', 'undergrad_school_sections_count', 'grad_school_sections_count', 'achievedUndergradProgramsPerOutcome', 'achievedGradProgramsPerOutcome', 'attemptedUndergradProgramsPerOutcome', 'attemptedGradProgramsPerOutcome', 'grad_grouped_courses', 'undergrad_grouped_courses', 'participating_programs'));
|
561
|
539
|
}
|
562
|
540
|
}
|