Browse Source

Merge branch 'Merge_gabriel_mayo' of https://git.ccom.uprrp.edu/CDCC/OLAS into Merge_gabriel_mayo

parent
commit
c1c2cc0e00

+ 8
- 1
app/controllers/CoursesController.php View File

334
             fputcsv($file, array($activity_name));
334
             fputcsv($file, array($activity_name));
335
 
335
 
336
             // Get assessments
336
             // Get assessments
337
-            $assessments = DB::table('assessments')->join('students', 'assessments.student_id', '=', 'students.id')->where('activity_id', '=', $activity->id)->orderBy('assessments.id', 'asc')->get();
337
+//             $assessments = DB::table('assessments')
338
+//             	->join('students', 'assessments.student_id', '=', 'students.id')
339
+//             	->where('activity_id', '=', $activity->id)->orderBy('assessments.id', 'asc')->get();
340
+
341
+            $assessments = DB::table('assessments')
342
+            	->join('students', 'assessments.student_id', '=', 'students.id')
343
+            	->join('activity_criterion', 'assessments.activity_criterion_id', '=', 'activity_criterion.id')
344
+            	->where('activity_criterion.activity_id', '=', $activity->id)->orderBy('assessments.id', 'asc')->get();
338
 
345
 
339
             // Get rubric contents
346
             // Get rubric contents
340
             $rubric_contents = json_decode($activity->rubric->contents);
347
             $rubric_contents = json_decode($activity->rubric->contents);

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

269
 			else {
269
 			else {
270
 				Session::flash('status', 'danger');
270
 				Session::flash('status', 'danger');
271
 				Session::flash('message', '<p>Error creating objective. Please try again later.</p>');
271
 				Session::flash('message', '<p>Error creating objective. Please try again later.</p>');
272
-				return Redirect::to('objective')->withInput();
272
+				return Redirect::to('objectives')->withInput();
273
 				/*$role = Auth::user()['role'];
273
 				/*$role = Auth::user()['role'];
274
 				switch ($role) {
274
 				switch ($role) {
275
 					case 1:
275
 					case 1:

+ 1
- 0
app/controllers/ProgramsController.php View File

12
 
12
 
13
     $program = Program::find($id);
13
     $program = Program::find($id);
14
     Log::info(debug_backtrace()[1]['function']);
14
     Log::info(debug_backtrace()[1]['function']);
15
+    Log::info($program);
15
     $title = $program->school->name . ': ' . $program->name;
16
     $title = $program->school->name . ': ' . $program->name;
16
     $program_courses = $program->courses;
17
     $program_courses = $program->courses;
17
     //     $outcomes = Outcome::orderBy('name', 'asc')->get();
18
     //     $outcomes = Outcome::orderBy('name', 'asc')->get();

+ 192
- 1
app/controllers/SchoolCoordinatorsController.php View File

25
         //             ->lists('id');
25
         //             ->lists('id');
26
     }
26
     }
27
 
27
 
28
-    public function overview()
28
+    public function overview_test()
29
+    {
30
+        ini_set('memory_limit', '256M');
31
+        DB::connection()->disableQueryLog();
32
+        //         $school = School::find($id);
33
+        $school = Auth::user()->school;
34
+        $id = $school->id;
35
+
36
+        $title = $school->name;
37
+        $schools = School::all();
38
+
39
+        $semesters = Semester::whereIn('id', Session::get('semesters_ids'))->get();
40
+
41
+        $outcomes_grad = Outcome::active_by_semesters($semesters, 1);
42
+        $outcomes_undergrad = Outcome::active_by_semesters($semesters, 0);
43
+
44
+        /**
45
+         * List of grouped courses (grouped sections)
46
+         */
47
+
48
+        $program_ids = $school->programs->lists('id');
49
+
50
+        $undergrad_programs = DB::table('programs')
51
+            ->select('id', 'name', 'school_id', 'is_graduate')
52
+            ->where('is_graduate', '=', 0)
53
+            ->where('school_id', '=', $id)
54
+            ->orderBy('name', 'ASC')
55
+            ->get();
56
+
57
+        $grad_programs = DB::table('programs')
58
+            ->select('id', 'name', 'school_id', 'is_graduate')
59
+            ->where('is_graduate', '=', 1)
60
+            ->where('school_id', '=', $id)
61
+            ->orderBy('name', 'ASC')
62
+            ->get();
63
+
64
+
65
+        $grad_grouped_courses = Course::
66
+            //             select(DB::raw('courses.name, courses.code, courses.number, max(courses.outcomes_attempted) as outcomes_attempted, courses.semester_id, courses.program_id'))
67
+            select(DB::raw('courses.name, courses.code, courses.number, courses.semester_id, courses.program_id'))
68
+            ->with('semester')
69
+            ->with('program')
70
+            ->whereIn('courses.program_id', $program_ids)
71
+            ->whereIn('courses.semester_id', Session::get('semesters_ids'))
72
+            ->leftJoin('programs', 'courses.program_id', '=', 'programs.id')
73
+            ->where('programs.is_graduate', '=', 1)
74
+            ->groupBy(array('courses.code', 'courses.number', 'courses.semester_id'))
75
+            ->orderBy('courses.code')
76
+            ->orderBy('courses.number')
77
+            ->orderBy('courses.semester_id')
78
+            ->get();
79
+
80
+        $undergrad_grouped_courses = Course::
81
+            //             select(DB::raw('courses.name, courses.code, courses.number, max(courses.outcomes_attempted) as outcomes_attempted, courses.semester_id, courses.program_id'))
82
+            select(DB::raw('courses.name, courses.code, courses.number, courses.semester_id, courses.program_id'))
83
+            ->with('semester')
84
+            ->with('program')
85
+            ->whereIn('courses.program_id', $program_ids)
86
+            ->whereIn('courses.semester_id', Session::get('semesters_ids'))
87
+            ->leftJoin('programs', 'courses.program_id', '=', 'programs.id')
88
+            ->where('programs.is_graduate', '=', 0)
89
+            ->groupBy(array('courses.code', 'courses.number', 'courses.semester_id'))
90
+            ->orderBy('courses.code')
91
+            ->orderBy('courses.number')
92
+            ->orderBy('courses.semester_id')
93
+            ->get();
94
+
95
+        foreach ($undergrad_grouped_courses as $key => $courses) {
96
+            $undergrad_grouped_courses[$key]->outcomes_attempted = NULL;
97
+            $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
98
+            foreach ($coursesT as $course) {
99
+                if ($course->isAssessed()) {
100
+                    $undergrad_grouped_courses[$key]->outcomes_attempted = true;
101
+                }
102
+            }
103
+        }
104
+
105
+        foreach ($grad_grouped_courses as $key => $courses) {
106
+            $grad_grouped_courses[$key]->outcomes_attempted = NULL;
107
+            $coursesT = Course::where('courses.code', $courses->code)->where('courses.number', $courses->number)->where('courses.semester_id', $courses->semester_id)->get();
108
+            foreach ($coursesT as $course) {
109
+                if ($course->isAssessed()) {
110
+                    $grad_grouped_courses[$key]->outcomes_attempted = true;
111
+                }
112
+            }
113
+        }
114
+
115
+        // Fetch programs with participation
116
+        $participating_programs = $this->participatingPrograms($school);
117
+
118
+
119
+        /**
120
+         * Calculate how many sections are doing assessment
121
+         */
122
+
123
+        $undergrad_assessed_sections_count = 0;
124
+        $undergrad_school_sections_count = 0;
125
+
126
+        $grad_assessed_sections_count = 0;
127
+        $grad_school_sections_count = 0;
128
+
129
+        foreach ($school->programs as $program) {
130
+            foreach ($program->courses as $course) {
131
+
132
+                if (!$course->program->is_graduate) {
133
+                    $undergrad_school_sections_count += 1;
134
+                    if ($course->isAssessed()) $undergrad_assessed_sections_count += 1;
135
+                } else {
136
+                    $grad_school_sections_count += 1;
137
+                    if ($course->isAssessed()) $grad_assessed_sections_count += 1;
138
+                }
139
+            }
140
+        }
141
+
142
+        /**
143
+         * Calculate how many programs achieved and attempted each outcome in this school
144
+         */
145
+
146
+        // For each outcome 
147
+        foreach ($outcomes_undergrad as $outcome) {
148
+            //         	$attempted_outcomes_per_undergrad_program[$outcome->id]=0;
149
+            //         	$achieved_outcomes_per_undergrad_program[$outcome->id]=0;
150
+            $attemptedUndergradProgramsPerOutcome[$outcome->id] = 0;
151
+            $achievedUndergradProgramsPerOutcome[$outcome->id] = 0;
152
+            $programs_attempted_in_school[$outcome->id] = $outcome->programs_attempted_in_school($semesters, $school->id);
153
+            //         	var_dump($programs_attempted_in_school);exit();
154
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
155
+                //         		var_dump($program_id->id);exit();
156
+                $program = DB::table('programs')->where('id', '=', $program_id->id)->first();
157
+
158
+                if (!$program->is_graduate) {
159
+                    $attemptedUndergradProgramsPerOutcome[$outcome->id]++;
160
+                    $programC = Program::where('id', '=', $program_id->id)->first();
161
+                    //         			var_dump($programC);exit();
162
+                    if ($programC->achieved_outcome($outcome->id, $semesters)) {
163
+                        $achievedUndergradProgramsPerOutcome[$outcome->id]++;
164
+                    }
165
+                }
166
+            }
167
+            $undergrad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 0);
168
+            $undergrad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 0);
169
+
170
+            // For each program with courses that do assessment
171
+            $programs_with_courses = Program::with(array('courses' => function ($query) {
172
+                //                 $query->whereNotNull('outcomes_attempted');
173
+                $query->whereIn('semester_id', Session::get('semesters_ids'));
174
+            }))->where('is_graduate', 0)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
175
+        }
176
+
177
+        /**
178
+         * Calculate how many programs achieved and attempted each outcome in this school
179
+         */
180
+
181
+        // For each outcome 
182
+        foreach ($outcomes_grad as $outcome) {
183
+            //         	$attempted_outcomes_per_grad_program[$outcome->id]=0;
184
+            $achieved_outcomes_per_grad_program[$outcome->id] = 0;
185
+            $attemptedGradProgramsPerOutcome[$outcome->id] = 0;
186
+            $achievedGradProgramsPerOutcome[$outcome->id] = 0;
187
+            $grad_outcomes_attempted[$outcome->id] = $outcome->attempted_by_school($semesters, $school->id, 1);
188
+            $grad_outcomes_achieved[$outcome->id] = $outcome->achieved_by_school($semesters, $school->id, 1);
189
+            // For each program with courses that do assessment
190
+            foreach ($programs_attempted_in_school[$outcome->id] as $program_id) {
191
+                //         		var_dump($program_id->id);exit();
192
+                $program = DB::table('programs')
193
+                    ->where('id', '=', $program_id->id)
194
+                    ->first();
195
+                //         		$program=Program::where('id', $program_id->id);
196
+                //         		var_dump($program);exit();
197
+                if ($program->is_graduate) {
198
+                    $attemptedGradProgramsPerOutcome[$outcome->id]++;
199
+                    $programC = Program::where('id', '=', $program_id->id)->first();
200
+                    //         			var_dump($programC);exit();
201
+                    if ($programC->achieved_outcome($outcome->id, $semesters)) {
202
+                        $achievedGradProgramsPerOutcome[$outcome->id]++;
203
+                    }
204
+                }
205
+            }
206
+            $programs_with_courses = Program::with(array('courses' => function ($query) {
207
+                //                 $query->whereNotNull('outcomes_attempted');
208
+                $query->whereIn('semester_id', Session::get('semesters_ids'));
209
+            }))->where('is_graduate', 1)->where('school_id', $school->id)->orderBy('name', 'asc')->get();
210
+        }
211
+        if ($school->id == 13) {
212
+            //             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'));
213
+            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'));
214
+        } else {
215
+            //             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'));
216
+            return View::make('local.managers.shared.schoolTest', 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'));
217
+        }
218
+    }
219
+     public function overview()
29
     {
220
     {
30
         ini_set('memory_limit', '256M');
221
         ini_set('memory_limit', '256M');
31
         DB::connection()->disableQueryLog();
222
         DB::connection()->disableQueryLog();

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

203
 			$templates = Template::orderBy('name', 'ASC')->get();
203
 			$templates = Template::orderBy('name', 'ASC')->get();
204
 			$programs = Program::orderBy('name', 'ASC')->get();
204
 			$programs = Program::orderBy('name', 'ASC')->get();
205
 			$criteria = Criterion::orderBy('name', 'ASC')->get();
205
 			$criteria = Criterion::orderBy('name', 'ASC')->get();
206
+			$school_id_user=NULL;
206
 		} else {
207
 		} else {
207
 			if ($role == 2) {
208
 			if ($role == 2) {
208
 				$programs = Auth::user()->school->programs;
209
 				$programs = Auth::user()->school->programs;
210
+				$school_id_user=Auth::user()->school_id;
209
 			}
211
 			}
210
 			if ($role == 3) {
212
 			if ($role == 3) {
211
 				$programs = Auth::user()->programs()->get();
213
 				$programs = Auth::user()->programs()->get();
214
+				$school_id_user=Auth::user()->programs[0]->school->id;
212
 			}
215
 			}
213
 			$program_ids = array();
216
 			$program_ids = array();
214
 			foreach ($programs as $program) {
217
 			foreach ($programs as $program) {
220
 					$q->whereIn('program_id', $program_ids);
223
 					$q->whereIn('program_id', $program_ids);
221
 				}
224
 				}
222
 			)->orderBy('name', 'ASC')->get();
225
 			)->orderBy('name', 'ASC')->get();
223
-			$templates = Template::where('school_id', '=', Auth::user()->programs[0]->school->id)->orWhere('school_id', '=', NULL)
226
+			}
227
+			$templates = Template::where('school_id', '=', $school_id_user)->orWhere('school_id', '=', NULL)
224
 				->orderBy('name', 'ASC')->get();
228
 				->orderBy('name', 'ASC')->get();
225
 			$criteria_ids = array();
229
 			$criteria_ids = array();
226
 			foreach ($criteria as $criterion) {
230
 			foreach ($criteria as $criterion) {
234
 			foreach ($templates_fuera as $tf) {
238
 			foreach ($templates_fuera as $tf) {
235
 				$templates_fuera_ids[] = $tf->id;
239
 				$templates_fuera_ids[] = $tf->id;
236
 			}
240
 			}
241
+// 			Log::info(json_encode($templates_fuera_ids));
242
+// exit();
237
 			$templates_dentro = Template::whereNotIn('id', $templates_fuera_ids)
243
 			$templates_dentro = Template::whereNotIn('id', $templates_fuera_ids)
238
 				->orderBy('name', 'ASC')->get();
244
 				->orderBy('name', 'ASC')->get();
239
 
245
 
240
-			// 			var_dump(json_encode($templates_dentro));
241
-		}
246
+// 			if(!isset($templates_dentro))$templates_dentro=
242
 
247
 
248
+			// 			var_dump(json_encode($templates_dentro));
249
+// 		}
243
 
250
 
244
 
251
 
245
 		return View::make('local.managers.shared.rubrics_new', compact('title', 'templates_dentro', 'templates_fuera', 'outcomes', 'criteria', 'schools', 'programs', 'criteria_ids'));
252
 		return View::make('local.managers.shared.rubrics_new', compact('title', 'templates_dentro', 'templates_fuera', 'outcomes', 'criteria', 'schools', 'programs', 'criteria_ids'));

+ 1
- 0
app/routes.php View File

410
      * School Coordinator Routes
410
      * School Coordinator Routes
411
      */
411
      */
412
     Route::group(array('before' => 'scoord'), function () {
412
     Route::group(array('before' => 'scoord'), function () {
413
+        Route::get('school-coordinator-test', 'SchoolCoordinatorsController@overview_test');
413
         Route::get('school-coordinator', 'SchoolCoordinatorsController@overview');
414
         Route::get('school-coordinator', 'SchoolCoordinatorsController@overview');
414
         Route::get('school/{id}', 'SchoolsController@show');
415
         Route::get('school/{id}', 'SchoolsController@show');
415
         Route::get('program/{id}', 'ProgramsController@show');
416
         Route::get('program/{id}', 'ProgramsController@show');

+ 20
- 12
app/views/local/managers/pCoords/new_assessment_report.blade.php View File

130
                                     <br>
130
                                     <br>
131
                                     <h4>Performance of Students by Learning Outcome Criteria</h4>
131
                                     <h4>Performance of Students by Learning Outcome Criteria</h4>
132
                                     <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
132
                                     <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
133
-                                    <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or
133
+                                    <p style="display: inline; margin:-30px"> <i>{{ $activity->rubric[0]->expected_points }} or
134
                                             more</i>
134
                                             more</i>
135
                                     </p>
135
                                     </p>
136
                                     <br>
136
                                     <br>
137
                                     <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
137
                                     <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
138
                                         target by criterion: </h5>
138
                                         target by criterion: </h5>
139
-                                    <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
139
+                                    <p style="display: inline; margin:-30px"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
140
                                     </p>
140
                                     </p>
141
 
141
 
142
                                     <br>
142
                                     <br>
206
 
206
 
207
                                     </table>
207
                                     </table>
208
                                     <br>
208
                                     <br>
209
-                                    <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
209
+<!--                                     <h5 style="display: inline; margin:30px;">Formative Actions: </h5> -->
210
+                                    <h5>Formative Actions: </h5>
210
                                     <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
211
                                     <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
211
                                     @if ($formative_actions)
212
                                     @if ($formative_actions)
212
-                                        <p style="display: inline;">
213
+                                        <p style="display: inline; margin:30px;">
214
+										@if ($formative_actions[0]->at_text!=$formative_actions[0]->description)
215
+
213
                                             <u>{{ $formative_actions[0]->at_text }}:
216
                                             <u>{{ $formative_actions[0]->at_text }}:
214
                                             </u>
217
                                             </u>
218
+                                    @endif
215
 
219
 
216
                                             <i>{{ $formative_actions[0]->description }}
220
                                             <i>{{ $formative_actions[0]->description }}
217
                                             </i>
221
                                             </i>
218
                                         </p>
222
                                         </p>
219
                                         <br>
223
                                         <br>
220
-                                        <h5 style="display: inline; margin:30px;">Formative Action's Associated
224
+<!--                                         <h5 style="display: inline; margin:30px;"> -->
225
+                                        <h5>
226
+                                        Formative Action's Associated
221
                                             Criteria: </h5>
227
                                             Criteria: </h5>
222
-                                        <ul style="margin:30px;">
228
+                                        <ul>
223
                                             @foreach ($formative_actions as $criteria)
229
                                             @foreach ($formative_actions as $criteria)
224
                                                 <li> <i>{{ $criteria->name }} </i></li>
230
                                                 <li> <i>{{ $criteria->name }} </i></li>
225
                                             @endforeach
231
                                             @endforeach
226
                                         </ul>
232
                                         </ul>
227
                                     @endif
233
                                     @endif
228
 
234
 
229
-                                    <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
235
+<!--                                     <h5 style="display: inline; margin:30px;"> -->
236
+                                    <h5>
237
+                                    Assessment Comments: </h5>
230
                                     @if ($activity->assessment_comments != null)
238
                                     @if ($activity->assessment_comments != null)
231
-                                        <p style="display: inline;">{{ $activity->assessment_comments }}</p>
239
+                                        <p style="display: inline; margin:30px;">{{ $activity->assessment_comments }}</p>
232
                                     @endif
240
                                     @endif
233
-                                    <br>
241
+<!--                                     <br> -->
234
                                     <hr>
242
                                     <hr>
235
-                                    <br>
243
+<!--                                     <br> -->
236
 
244
 
237
                                     <h4>Performance of Students by Learning Outcome</h4>
245
                                     <h4>Performance of Students by Learning Outcome</h4>
238
                                     <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
246
                                     <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
242
                                     <br>
250
                                     <br>
243
                                     <br>
251
                                     <br>
244
                                     <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
252
                                     <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
245
-                                    <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
253
+                                    <p style="display: inline; margin:-30px;"> <i>>= 66.67% of the attempts</i>
246
                                     </p>
254
                                     </p>
247
                                     <br>
255
                                     <br>
248
                                     <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
256
                                     <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
249
                                         target by learning outcome: </h5>
257
                                         target by learning outcome: </h5>
250
-                                    <p style="display: inline;"> <i>
258
+                                    <p style="display: inline; margin:-30px;"> <i>
251
                                             <?php
259
                                             <?php
252
                                             $expected = DB::table('target_outcomes_program')
260
                                             $expected = DB::table('target_outcomes_program')
253
                                                 ->where('program_id', $course->program_id)
261
                                                 ->where('program_id', $course->program_id)

+ 28
- 4
app/views/local/managers/shared/rubrics_new.blade.php View File

623
             }
623
             }
624
             objectives = JSON.stringify(objectives);
624
             objectives = JSON.stringify(objectives);
625
             var str ='<tr data-criterion-name ="'+data.criterion.name+'" data-program-ids = "['+program_ids+']" data-assoc-objectives = '+"'"+objectives+"'"+' data-criterion-id="'+data.criterion.id+'" data-criterion-copyright="'+copyright+'" data-criterion-notes="'+notes+'" data-outcomes = "'+data.outcomes+'"><th><span class="glyphicon glyphicon-move"></span></th><td>';
625
             var str ='<tr data-criterion-name ="'+data.criterion.name+'" data-program-ids = "['+program_ids+']" data-assoc-objectives = '+"'"+objectives+"'"+' data-criterion-id="'+data.criterion.id+'" data-criterion-copyright="'+copyright+'" data-criterion-notes="'+notes+'" data-outcomes = "'+data.outcomes+'"><th><span class="glyphicon glyphicon-move"></span></th><td>';
626
-
626
+//	console.log(str);
627
             var subcriteria = '';
627
             var subcriteria = '';
628
             if(data.criterion.subcriteria){
628
             if(data.criterion.subcriteria){
629
 
629
 
657
         
657
         
658
 
658
 
659
             str +='<th><span class="glyphicon glyphicon-remove icon-btn" aria-hidden="true"></span></th></tr>';
659
             str +='<th><span class="glyphicon glyphicon-remove icon-btn" aria-hidden="true"></span></th></tr>';
660
+	console.log(str);
660
 
661
 
661
             $('table tbody').append(str);
662
             $('table tbody').append(str);
662
 
663
 
890
             //Set the name of the rubric
891
             //Set the name of the rubric
891
             $('#rubric-name').val(data.template.name);
892
             $('#rubric-name').val(data.template.name);
892
 
893
 
894
+console.log(data.template.school_id);
895
+console.log($('#select-school'));
893
             // Set school id to 0, then to the saved value if it exists
896
             // Set school id to 0, then to the saved value if it exists
894
             $('#select-school option[data-school-id="0"]').prop('selected', true);
897
             $('#select-school option[data-school-id="0"]').prop('selected', true);
895
             $('#select-school option[data-school-id="'+data.template.school_id+'"]').prop('selected', true);
898
             $('#select-school option[data-school-id="'+data.template.school_id+'"]').prop('selected', true);
899
+console.log($('#select-school'));
896
 
900
 
897
             // Fetch programs associated to that school
901
             // Fetch programs associated to that school
898
             fetchPrograms($('#select-school'));
902
             fetchPrograms($('#select-school'));
1069
             var programs = {{ json_encode(Auth::user()->programs->lists('id')) }};
1073
             var programs = {{ json_encode(Auth::user()->programs->lists('id')) }};
1070
         
1074
         
1071
             var template_program = selected.data('template-program-id');
1075
             var template_program = selected.data('template-program-id');
1076
+         //   console.log(selected.data('template-program-id'));
1077
+          //  console.log(programs.includes(selected.data('template-program-id').toString()));
1072
         
1078
         
1073
         if(
1079
         if(
1074
             {{ Auth::user()->role }}==1
1080
             {{ Auth::user()->role }}==1
1075
             || ({{ Auth::user()->role }}==2 && selected.data('admin')!=1)
1081
             || ({{ Auth::user()->role }}==2 && selected.data('admin')!=1)
1076
             || ({{ Auth::user()->role }}==3
1082
             || ({{ Auth::user()->role }}==3
1077
-                && programs.includes(selected.data('template-program-id'))
1083
+                && programs.includes(selected.data('template-program-id').toString())
1078
 
1084
 
1079
                 && selected.data('admin')!=1
1085
                 && selected.data('admin')!=1
1080
             )
1086
             )
1130
     }
1136
     }
1131
     else
1137
     else
1132
     {
1138
     {
1139
+    	console.log(school);
1133
         fetchPrograms(school);
1140
         fetchPrograms(school);
1134
         $('#select-program').prop('disabled', false);
1141
         $('#select-program').prop('disabled', false);
1135
     }
1142
     }
1417
         {
1424
         {
1418
             htmlString = '';
1425
             htmlString = '';
1419
             console.log($(this));
1426
             console.log($(this));
1420
-
1421
-            program_ids = $(this).data('program_ids')
1427
+			if(typeof $(this).data('program_ids')!== 'undefined')
1428
+			{
1429
+				program_ids = $(this).data('program_ids');
1430
+            console.log("ids"+program_ids);
1431
+            console.log("ids"+$(this).data('program_ids'));
1432
+			}
1433
+			else if(typeof $(this).data('program-ids')!== 'undefined')
1434
+			{
1435
+				program_ids = $(this).data('program-ids')
1436
+            console.log("Ids"+program_ids);
1437
+			}
1438
+			else
1439
+			{
1440
+				program_ids = [];
1441
+            console.log(" "+program_ids);
1442
+			}
1443
+            console.log(program_ids);
1444
+			
1445
+           // program_ids = $(this).data('program_ids')
1422
             if(!program_ids.includes(program_id) ){
1446
             if(!program_ids.includes(program_id) ){
1423
                 title = "<h6>The following criteria and objectives will be matched with this program</h6>"
1447
                 title = "<h6>The following criteria and objectives will be matched with this program</h6>"
1424
                 htmlString += "<ol style='list-style-position: inside'>"
1448
                 htmlString += "<ol style='list-style-position: inside'>"

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

199
             @if($course->outcomes_attempted!=NULL)
199
             @if($course->outcomes_attempted!=NULL)
200
                 {{ HTML::linkAction('CoursesController@exportGrades', 'Export grades to CSV file', array('id'=>$course->id), array('class'=>'btn btn-default btn-sm pull-right')) }}
200
                 {{ HTML::linkAction('CoursesController@exportGrades', 'Export grades to CSV file', array('id'=>$course->id), array('class'=>'btn btn-default btn-sm pull-right')) }}
201
             @endif
201
             @endif
202
+                {{ HTML::linkAction('CoursesController@exportGrades', 'Export grades to CSV file', array('id'=>$course->id), array('class'=>'btn btn-default btn-sm pull-right')) }}
202
 
203
 
203
 
204
 
204
             <table class="table table-striped table-condensed">
205
             <table class="table table-striped table-condensed">

+ 37
- 21
app/views/local/professors/new_assessment_report.blade.php View File

132
                                 <br>
132
                                 <br>
133
                                 <h4>Performance of Students by Learning Outcome Criteria</h4>
133
                                 <h4>Performance of Students by Learning Outcome Criteria</h4>
134
                                 <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
134
                                 <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
135
-                                <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
135
+                                <p style="display: inline; margin:-30px;"> <i>{{ $activity->rubric[0]->expected_points }} or more</i>
136
                                 </p>
136
                                 </p>
137
                                 <br>
137
                                 <br>
138
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
138
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
139
                                     by criterion: </h5>
139
                                     by criterion: </h5>
140
-                                <p style="display: inline;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
140
+                                <p style="display: inline; margin:-30px;"> <i>{{ $activity->rubric[0]->expected_percentage }} %</i>
141
                                 </p>
141
                                 </p>
142
 
142
 
143
                                 <br>
143
                                 <br>
213
 
213
 
214
                                 </table>
214
                                 </table>
215
                                 <br>
215
                                 <br>
216
-                                <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
216
+<!--                                 <h5 style="display: inline; margin:30px;">Formative Actions: </h5> -->
217
+                                <h5>Formative Actions: </h5>
217
                                 <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
218
                                 <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
218
                                 @if ($formative_actions)
219
                                 @if ($formative_actions)
219
-                                    <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
220
+                                    <p style="display: inline; margin:30px;">
221
+                                     <u>{{ $formative_actions[0]->at_text }}:
220
                                         </u>
222
                                         </u>
221
 
223
 
222
                                         <i>{{ $formative_actions[0]->description }}
224
                                         <i>{{ $formative_actions[0]->description }}
223
                                         </i>
225
                                         </i>
224
                                     </p>
226
                                     </p>
225
 
227
 
226
-                                    <h5 style="display: inline; margin:30px;">Formative Action's Associated
228
+<!--                                     <h5 style="display: inline; margin:30px;"> -->
229
+                                    <h5>
230
+                                    Formative Action's Associated
227
                                         Criteria: </h5>
231
                                         Criteria: </h5>
228
-                                    <ul style="margin:30px;">
232
+<!--                                     <ul style="margin:30px;"> -->
233
+                                    <ul>
229
                                         @foreach ($formative_actions as $criteria)
234
                                         @foreach ($formative_actions as $criteria)
230
                                             <li> <i>{{ $criteria->name }} </i></li>
235
                                             <li> <i>{{ $criteria->name }} </i></li>
231
                                         @endforeach
236
                                         @endforeach
233
                                 @endif
238
                                 @endif
234
 
239
 
235
 
240
 
236
-                                <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
241
+<!--                                 <h5 style="display: inline; margin:30px;"> -->
242
+                                <h5>
243
+                                Assessment Comments: </h5>
237
                                 @if ($activity->assessment_comments != null)
244
                                 @if ($activity->assessment_comments != null)
238
-                                    <p style="display: inline;">{{ $activity->assessment_comments }}</p>
245
+                                    <p style="display: inline; margin:30px;">
246
+                                    {{ $activity->assessment_comments }}
247
+                                    </p>
239
                                 @endif
248
                                 @endif
240
-                                <br>
249
+<!--                                 <br> -->
241
                                 <hr>
250
                                 <hr>
242
-                                <br>
251
+<!--                                 <br> -->
243
 
252
 
244
                                 <h4>Performance of Students by Learning Outcome</h4>
253
                                 <h4>Performance of Students by Learning Outcome</h4>
245
                                 <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
254
                                 <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
246
-                                <p style="display: inline;">{{ $activity->name }}
255
+<!--                                 <p style="display: inline;"> -->
256
+                                {{ $activity->name }}
247
                                     <strong>({{ $activity->date }})</strong>
257
                                     <strong>({{ $activity->date }})</strong>
248
-                                </p>
258
+<!--                                 </p> -->
249
                                 <br>
259
                                 <br>
250
                                 <br>
260
                                 <br>
251
                                 <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
261
                                 <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
252
-                                <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
262
+                                <p style="display: inline; margin:-30px;"> <i>>= 66.67% of the attempts</i>
253
                                 </p>
263
                                 </p>
254
                                 <br>
264
                                 <br>
255
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
265
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
256
                                     target
266
                                     target
257
                                     by learning outcome: </h5>
267
                                     by learning outcome: </h5>
258
-                                <p style="display: inline;"> <i>
268
+ 								<p style="display: inline; margin:-30px;"> 
269
+                                 <i>
259
                                         <?php
270
                                         <?php
260
                                         $expected = DB::table('target_outcomes_program')
271
                                         $expected = DB::table('target_outcomes_program')
261
                                             ->where('program_id', $course->program_id)
272
                                             ->where('program_id', $course->program_id)
441
 
452
 
442
                                 </table>
453
                                 </table>
443
                                 <br>
454
                                 <br>
444
-                                <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
455
+<!--                                 <h5 style="display: inline; margin:30px;">Formative Actions: </h5> -->
456
+                                <h5>Formative Actions: </h5>
445
                                 <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
457
                                 <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
446
                                 @if ($formative_actions)
458
                                 @if ($formative_actions)
447
                                     <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
459
                                     <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
453
                                     <br>
465
                                     <br>
454
                                     <h5 style="display: inline; margin:30px;">Formative Action's Associated
466
                                     <h5 style="display: inline; margin:30px;">Formative Action's Associated
455
                                         Criteria: </h5>
467
                                         Criteria: </h5>
456
-                                    <ul style="margin:30px;">
468
+<!--                                     <ul style="margin:30px;"> -->
469
+                                    <ul>
457
                                         @foreach ($formative_actions as $criteria)
470
                                         @foreach ($formative_actions as $criteria)
458
                                             <li> <i>{{ $criteria->name }} </i></li>
471
                                             <li> <i>{{ $criteria->name }} </i></li>
459
                                         @endforeach
472
                                         @endforeach
461
                                 @endif
474
                                 @endif
462
 
475
 
463
 
476
 
464
-                                <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
477
+<!--                                 <h5 style="display: inline; margin:30px;">Assessment Comments: </h5> -->
478
+                                <h5>Assessment Comments: </h5>
465
                                 @if ($activity->assessment_comments != null)
479
                                 @if ($activity->assessment_comments != null)
466
                                     <p style="display: inline;">{{ $activity->assessment_comments }}</p>
480
                                     <p style="display: inline;">{{ $activity->assessment_comments }}</p>
467
                                 @endif
481
                                 @endif
468
-                                <br>
482
+<!--                                 <br> -->
469
                                 <hr>
483
                                 <hr>
470
-                                <br>
484
+<!--                                 <br> -->
471
 
485
 
472
                                 <h4>Performance of Students by Learning Outcome</h4>
486
                                 <h4>Performance of Students by Learning Outcome</h4>
473
                                 <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
487
                                 <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
475
                                     <strong>({{ $activity->date }})</strong>
489
                                     <strong>({{ $activity->date }})</strong>
476
                                 </p>
490
                                 </p>
477
                                 <br><br>
491
                                 <br><br>
492
+<!--                                 <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5> -->
478
                                 <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
493
                                 <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5>
479
-                                <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
480
-                                </p>
494
+<!--                                 <p style="display: inline;">  -->
495
+                                <i>>= 66.67% of the attempts</i>
496
+<!--                                 </p> -->
481
                                 <br>
497
                                 <br>
482
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
498
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
483
                                     target
499
                                     target

+ 3
- 0
public/exports/olas_student_grades_CCOM40300U1C11_1648825808.csv View File

1
+"CCOM40300U1 (C11)"
2
+" "
3
+"Trabajo en Equipo"

+ 3
- 0
public/exports/olas_student_grades_CCOM40300U1C11_1648826163.csv View File

1
+"CCOM40300U1 (C11)"
2
+" "
3
+"Trabajo en Equipo"

+ 3
- 0
public/exports/olas_student_grades_CCOM40300U1C11_1648826166.csv View File

1
+"CCOM40300U1 (C11)"
2
+" "
3
+"Trabajo en Equipo"