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,7 +334,14 @@ CoursesController extends \BaseController
334 334
             fputcsv($file, array($activity_name));
335 335
 
336 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 346
             // Get rubric contents
340 347
             $rubric_contents = json_decode($activity->rubric->contents);

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

@@ -269,7 +269,7 @@ class Objective2Controller extends \BaseController
269 269
 			else {
270 270
 				Session::flash('status', 'danger');
271 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 273
 				/*$role = Auth::user()['role'];
274 274
 				switch ($role) {
275 275
 					case 1:

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

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

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

@@ -25,7 +25,198 @@ class SchoolCoordinatorsController extends \BaseController
25 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 221
         ini_set('memory_limit', '256M');
31 222
         DB::connection()->disableQueryLog();

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

@@ -203,12 +203,15 @@ class TemplatesController extends \BaseController
203 203
 			$templates = Template::orderBy('name', 'ASC')->get();
204 204
 			$programs = Program::orderBy('name', 'ASC')->get();
205 205
 			$criteria = Criterion::orderBy('name', 'ASC')->get();
206
+			$school_id_user=NULL;
206 207
 		} else {
207 208
 			if ($role == 2) {
208 209
 				$programs = Auth::user()->school->programs;
210
+				$school_id_user=Auth::user()->school_id;
209 211
 			}
210 212
 			if ($role == 3) {
211 213
 				$programs = Auth::user()->programs()->get();
214
+				$school_id_user=Auth::user()->programs[0]->school->id;
212 215
 			}
213 216
 			$program_ids = array();
214 217
 			foreach ($programs as $program) {
@@ -220,7 +223,8 @@ class TemplatesController extends \BaseController
220 223
 					$q->whereIn('program_id', $program_ids);
221 224
 				}
222 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 228
 				->orderBy('name', 'ASC')->get();
225 229
 			$criteria_ids = array();
226 230
 			foreach ($criteria as $criterion) {
@@ -234,12 +238,15 @@ class TemplatesController extends \BaseController
234 238
 			foreach ($templates_fuera as $tf) {
235 239
 				$templates_fuera_ids[] = $tf->id;
236 240
 			}
241
+// 			Log::info(json_encode($templates_fuera_ids));
242
+// exit();
237 243
 			$templates_dentro = Template::whereNotIn('id', $templates_fuera_ids)
238 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 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,6 +410,7 @@ Route::group(array('before' => 'auth|has_access'), function () {
410 410
      * School Coordinator Routes
411 411
      */
412 412
     Route::group(array('before' => 'scoord'), function () {
413
+        Route::get('school-coordinator-test', 'SchoolCoordinatorsController@overview_test');
413 414
         Route::get('school-coordinator', 'SchoolCoordinatorsController@overview');
414 415
         Route::get('school/{id}', 'SchoolsController@show');
415 416
         Route::get('program/{id}', 'ProgramsController@show');

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

@@ -130,13 +130,13 @@
130 130
                                     <br>
131 131
                                     <h4>Performance of Students by Learning Outcome Criteria</h4>
132 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 134
                                             more</i>
135 135
                                     </p>
136 136
                                     <br>
137 137
                                     <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
138 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 140
                                     </p>
141 141
 
142 142
                                     <br>
@@ -206,33 +206,41 @@
206 206
 
207 207
                                     </table>
208 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 211
                                     <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
211 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 216
                                             <u>{{ $formative_actions[0]->at_text }}:
214 217
                                             </u>
218
+                                    @endif
215 219
 
216 220
                                             <i>{{ $formative_actions[0]->description }}
217 221
                                             </i>
218 222
                                         </p>
219 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 227
                                             Criteria: </h5>
222
-                                        <ul style="margin:30px;">
228
+                                        <ul>
223 229
                                             @foreach ($formative_actions as $criteria)
224 230
                                                 <li> <i>{{ $criteria->name }} </i></li>
225 231
                                             @endforeach
226 232
                                         </ul>
227 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 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 240
                                     @endif
233
-                                    <br>
241
+<!--                                     <br> -->
234 242
                                     <hr>
235
-                                    <br>
243
+<!--                                     <br> -->
236 244
 
237 245
                                     <h4>Performance of Students by Learning Outcome</h4>
238 246
                                     <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5>
@@ -242,12 +250,12 @@
242 250
                                     <br>
243 251
                                     <br>
244 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 254
                                     </p>
247 255
                                     <br>
248 256
                                     <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
249 257
                                         target by learning outcome: </h5>
250
-                                    <p style="display: inline;"> <i>
258
+                                    <p style="display: inline; margin:-30px;"> <i>
251 259
                                             <?php
252 260
                                             $expected = DB::table('target_outcomes_program')
253 261
                                                 ->where('program_id', $course->program_id)

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

@@ -623,7 +623,7 @@ function addCriterion()
623 623
             }
624 624
             objectives = JSON.stringify(objectives);
625 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 627
             var subcriteria = '';
628 628
             if(data.criterion.subcriteria){
629 629
 
@@ -657,6 +657,7 @@ function addCriterion()
657 657
         
658 658
 
659 659
             str +='<th><span class="glyphicon glyphicon-remove icon-btn" aria-hidden="true"></span></th></tr>';
660
+	console.log(str);
660 661
 
661 662
             $('table tbody').append(str);
662 663
 
@@ -890,9 +891,12 @@ function loadTemplate()
890 891
             //Set the name of the rubric
891 892
             $('#rubric-name').val(data.template.name);
892 893
 
894
+console.log(data.template.school_id);
895
+console.log($('#select-school'));
893 896
             // Set school id to 0, then to the saved value if it exists
894 897
             $('#select-school option[data-school-id="0"]').prop('selected', true);
895 898
             $('#select-school option[data-school-id="'+data.template.school_id+'"]').prop('selected', true);
899
+console.log($('#select-school'));
896 900
 
897 901
             // Fetch programs associated to that school
898 902
             fetchPrograms($('#select-school'));
@@ -1069,12 +1073,14 @@ function loadTemplate()
1069 1073
             var programs = {{ json_encode(Auth::user()->programs->lists('id')) }};
1070 1074
         
1071 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 1079
         if(
1074 1080
             {{ Auth::user()->role }}==1
1075 1081
             || ({{ Auth::user()->role }}==2 && selected.data('admin')!=1)
1076 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 1085
                 && selected.data('admin')!=1
1080 1086
             )
@@ -1130,6 +1136,7 @@ function toggleProgramSelect(school)
1130 1136
     }
1131 1137
     else
1132 1138
     {
1139
+    	console.log(school);
1133 1140
         fetchPrograms(school);
1134 1141
         $('#select-program').prop('disabled', false);
1135 1142
     }
@@ -1417,8 +1424,25 @@ $('.save').on('click', function(e)
1417 1424
         {
1418 1425
             htmlString = '';
1419 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 1446
             if(!program_ids.includes(program_id) ){
1423 1447
                 title = "<h6>The following criteria and objectives will be matched with this program</h6>"
1424 1448
                 htmlString += "<ol style='list-style-position: inside'>"

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

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

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

@@ -132,12 +132,12 @@
132 132
                                 <br>
133 133
                                 <h4>Performance of Students by Learning Outcome Criteria</h4>
134 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 136
                                 </p>
137 137
                                 <br>
138 138
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the target
139 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 141
                                 </p>
142 142
 
143 143
                                 <br>
@@ -213,19 +213,24 @@
213 213
 
214 214
                                 </table>
215 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 218
                                 <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
218 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 222
                                         </u>
221 223
 
222 224
                                         <i>{{ $formative_actions[0]->description }}
223 225
                                         </i>
224 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 231
                                         Criteria: </h5>
228
-                                    <ul style="margin:30px;">
232
+<!--                                     <ul style="margin:30px;"> -->
233
+                                    <ul>
229 234
                                         @foreach ($formative_actions as $criteria)
230 235
                                             <li> <i>{{ $criteria->name }} </i></li>
231 236
                                         @endforeach
@@ -233,29 +238,35 @@
233 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 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 248
                                 @endif
240
-                                <br>
249
+<!--                                 <br> -->
241 250
                                 <hr>
242
-                                <br>
251
+<!--                                 <br> -->
243 252
 
244 253
                                 <h4>Performance of Students by Learning Outcome</h4>
245 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 257
                                     <strong>({{ $activity->date }})</strong>
248
-                                </p>
258
+<!--                                 </p> -->
249 259
                                 <br>
250 260
                                 <br>
251 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 263
                                 </p>
254 264
                                 <br>
255 265
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
256 266
                                     target
257 267
                                     by learning outcome: </h5>
258
-                                <p style="display: inline;"> <i>
268
+ 								<p style="display: inline; margin:-30px;"> 
269
+                                 <i>
259 270
                                         <?php
260 271
                                         $expected = DB::table('target_outcomes_program')
261 272
                                             ->where('program_id', $course->program_id)
@@ -441,7 +452,8 @@
441 452
 
442 453
                                 </table>
443 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 457
                                 <?php $formative_actions = $activity->formativeActionsWithCriteria(); ?>
446 458
                                 @if ($formative_actions)
447 459
                                     <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
@@ -453,7 +465,8 @@
453 465
                                     <br>
454 466
                                     <h5 style="display: inline; margin:30px;">Formative Action's Associated
455 467
                                         Criteria: </h5>
456
-                                    <ul style="margin:30px;">
468
+<!--                                     <ul style="margin:30px;"> -->
469
+                                    <ul>
457 470
                                         @foreach ($formative_actions as $criteria)
458 471
                                             <li> <i>{{ $criteria->name }} </i></li>
459 472
                                         @endforeach
@@ -461,13 +474,14 @@
461 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 479
                                 @if ($activity->assessment_comments != null)
466 480
                                     <p style="display: inline;">{{ $activity->assessment_comments }}</p>
467 481
                                 @endif
468
-                                <br>
482
+<!--                                 <br> -->
469 483
                                 <hr>
470
-                                <br>
484
+<!--                                 <br> -->
471 485
 
472 486
                                 <h4>Performance of Students by Learning Outcome</h4>
473 487
                                 <h5 style="display: inline;">Activity {{ $index4 + 1 }}: </h5><br>
@@ -475,9 +489,11 @@
475 489
                                     <strong>({{ $activity->date }})</strong>
476 490
                                 </p>
477 491
                                 <br><br>
492
+<!--                                 <h5 style="display: inline; margin:30px;">Target by learning outcome: </h5> -->
478 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 497
                                 <br>
482 498
                                 <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
483 499
                                     target

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

@@ -0,0 +1,3 @@
1
+"CCOM40300U1 (C11)"
2
+" "
3
+"Trabajo en Equipo"

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

@@ -0,0 +1,3 @@
1
+"CCOM40300U1 (C11)"
2
+" "
3
+"Trabajo en Equipo"

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

@@ -0,0 +1,3 @@
1
+"CCOM40300U1 (C11)"
2
+" "
3
+"Trabajo en Equipo"