Browse Source

Hice un papelon

parent
commit
b60a09732c

+ 4
- 4
app/config/app.php View File

15
 
15
 
16
 	//'debug' => $_ENV['APP_DEBUG'] ?: false,
16
 	//'debug' => $_ENV['APP_DEBUG'] ?: false,
17
 
17
 
18
-	'debug' => false,
18
+	'debug' => true,
19
 	/*
19
 	/*
20
 	|--------------------------------------------------------------------------
20
 	|--------------------------------------------------------------------------
21
 	| Application URL
21
 	| Application URL
80
 	*/
80
 	*/
81
 
81
 
82
 	// 'key' => 'YourSecretKey!!!',
82
 	// 'key' => 'YourSecretKey!!!',
83
-// 	'key' => 'JozBz0yQBrZ5kEcPvgxch3RR3E3INSGs',
84
-// 
85
-// 	'cipher' => MCRYPT_RIJNDAEL_256,
83
+	// 	'key' => 'JozBz0yQBrZ5kEcPvgxch3RR3E3INSGs',
84
+	// 
85
+	// 	'cipher' => MCRYPT_RIJNDAEL_256,
86
 	'key' => '+H!WZJxd5qwb!EHYR8^MLsX@^X6Y?e@+',
86
 	'key' => '+H!WZJxd5qwb!EHYR8^MLsX@^X6Y?e@+',
87
 
87
 
88
 	'cipher' => MCRYPT_RIJNDAEL_128,
88
 	'cipher' => MCRYPT_RIJNDAEL_128,

+ 3
- 3
app/controllers/ActivitiesController.php View File

814
             ->addSelect('activity_criterion.activity_id', 'activity_criterion.weight', 'activity_criterion.id as activity_criterion_id')
814
             ->addSelect('activity_criterion.activity_id', 'activity_criterion.weight', 'activity_criterion.id as activity_criterion_id')
815
             ->addSelect('rubric_criterion.rubric_id', 'rubric_criterion.id as rubric_criterion_id')
815
             ->addSelect('rubric_criterion.rubric_id', 'rubric_criterion.id as rubric_criterion_id')
816
             ->get();
816
             ->get();
817
-        Log::info("EN mi cuarto o o o");
818
-        Log::info($rubric_criterion);
817
+        //Log::info("EN mi cuarto o o o");
818
+        //Log::info($rubric_criterion);
819
 
819
 
820
         foreach ($rubric_criterion as $index => $crit) {
820
         foreach ($rubric_criterion as $index => $crit) {
821
             $crit->scales = DB::table('scales')
821
             $crit->scales = DB::table('scales')
1002
 
1002
 
1003
         return View::make('local.professors.compare_activities', compact('activity_1', 'activity_2', 'activity_criterion_1', 'activity_criterion_2', 'title', 'outcomes', 'outcomes_achieved_1', 'outcomes_attempted_1', 'outcomes_achieved_2', 'outcomes_attempted_2', 'course', 'student_count', 'active_semesters'));
1003
         return View::make('local.professors.compare_activities', compact('activity_1', 'activity_2', 'activity_criterion_1', 'activity_criterion_2', 'title', 'outcomes', 'outcomes_achieved_1', 'outcomes_attempted_1', 'outcomes_achieved_2', 'outcomes_attempted_2', 'course', 'student_count', 'active_semesters'));
1004
     }
1004
     }
1005
-}
1005
+}

+ 4
- 4
app/controllers/AuthController.php View File

28
 
28
 
29
 		if (!$validator->fails()) {
29
 		if (!$validator->fails()) {
30
 			//			TODO: Remove this for production environment
30
 			//			TODO: Remove this for production environment
31
-// 			if (App::environment('local', 'staging')) {
32
-// 				return $this->processLogin();
33
-// 			}
31
+			if (App::environment('local', 'staging')) {
32
+				return $this->processLogin();
33
+			}
34
 			try {
34
 			try {
35
 				// User input
35
 				// User input
36
 				$username = str_replace('@upr.edu', '', Input::get('email'));
36
 				$username = str_replace('@upr.edu', '', Input::get('email'));
172
 		Session::flush();
172
 		Session::flush();
173
 		return Redirect::action('AuthController@showLogin');
173
 		return Redirect::action('AuthController@showLogin');
174
 	}
174
 	}
175
-}
175
+}

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

44
 					->lists('id');
44
 					->lists('id');
45
 				break;
45
 				break;
46
 			case 3:
46
 			case 3:
47
+			case 4:
47
 				$programs = DB::table('program_user')
48
 				$programs = DB::table('program_user')
48
 					->where("user_id", Auth::user()->id)
49
 					->where("user_id", Auth::user()->id)
49
 					->lists('program_id');
50
 					->lists('program_id');
656
 	{
657
 	{
657
 		//
658
 		//
658
 	}
659
 	}
659
-}
660
+}

+ 12
- 7
app/controllers/OutcomesController.php View File

647
             ->get();
647
             ->get();
648
         $outcome = $outcome_info[0];
648
         $outcome = $outcome_info[0];
649
 
649
 
650
-        $diferent_levels = DB::table('criterion_objective_outcome')
651
-            ->join('criteria', 'criteria.id', '=', 'criterion_objective_outcome.criterion_id')
652
-            ->where('criterion_objective_outcome.outcome_id', $id)
653
-            ->distinct('criteria.num_scales')
654
-            ->select('criteria.num_scales as levels')
655
-            ->orderBy('criteria.num_scales', 'asc')
656
-            ->get();
650
+
657
 
651
 
658
         $criteria_array = array();
652
         $criteria_array = array();
659
 
653
 
678
                 break;
672
                 break;
679
         }
673
         }
680
 
674
 
675
+        $diferent_levels = DB::table('criterion_objective_outcome')
676
+            ->join('criteria', 'criteria.id', '=', 'criterion_objective_outcome.criterion_id')
677
+            // GASP, añadí programa, para que solo muestre niveles de criterios del programa
678
+            ->join('program_criterion', 'criteria.id', '=', 'program_criterion.criterion_id')
679
+            ->whereIn('program_id', $program_ids)
680
+            ->where('criterion_objective_outcome.outcome_id', $id)
681
+            ->distinct('criteria.num_scales')
682
+            ->select('criteria.num_scales as levels')
683
+            ->orderBy('criteria.num_scales', 'asc')
684
+            ->get();
685
+
681
         $outcome->criteria = array();
686
         $outcome->criteria = array();
682
         foreach ($diferent_levels as $level) {
687
         foreach ($diferent_levels as $level) {
683
             $level = $level->levels;
688
             $level = $level->levels;

+ 1
- 1
app/views/global/view-learning-outcomes-criteria.blade.php View File

57
         @endforeach
57
         @endforeach
58
       </div>
58
       </div>
59
     </div>
59
     </div>
60
-
60
+ 
61
     <div class="col-md-9">
61
     <div class="col-md-9">
62
       <div id="outcome-display" class="panel panel-default">
62
       <div id="outcome-display" class="panel panel-default">
63
         <div class="panel-heading">
63
         <div class="panel-heading">

+ 2
- 2
app/views/local/managers/pCoords/overview.blade.php View File

32
                     <div class="col-md-12 graph" id="graph{{ $index }}"></div>
32
                     <div class="col-md-12 graph" id="graph{{ $index }}"></div>
33
                 </div>
33
                 </div>
34
 
34
 
35
-                <!-- =================== sub tabs =================== -->
35
+                <!-- ===== sub tabs ===== -->
36
                 <div>
36
                 <div>
37
                     <!-- Sub nav tabs -->
37
                     <!-- Sub nav tabs -->
38
                     <ul id="programSubTabs{{ $index }}" class="nav nav-tabs" role="tablist">
38
                     <ul id="programSubTabs{{ $index }}" class="nav nav-tabs" role="tablist">
231
                         </div>
231
                         </div>
232
                     </div>
232
                     </div>
233
                 </div>
233
                 </div>
234
-                <!-- =================== end sub tabs =================== -->
234
+                <!-- ===== end sub tabs ===== -->
235
             </div>
235
             </div>
236
         @endforeach
236
         @endforeach
237
     </div>
237
     </div>

+ 3
- 3
app/views/local/managers/shared/school_student_result.blade.php View File

169
 </div>
169
 </div>
170
 	</div>
170
 	</div>
171
 </div>
171
 </div>
172
- <!-- =================== tabs =================== -->
172
+ <!-- ===== tabs ===== -->
173
 <div class="row">
173
 <div class="row">
174
     <!-- Nav tabs -->
174
     <!-- Nav tabs -->
175
    <!-- Tab panes -->
175
    <!-- Tab panes -->
291
         </div>
291
         </div>
292
     </div>
292
     </div>
293
 </div>
293
 </div>
294
-<!-- =================== end tabs =================== -->
294
+<!-- ===== end tabs ===== -->
295
 
295
 
296
 @stop
296
 @stop
297
 
297
 
444
 $('#graph2').highcharts({
444
 $('#graph2').highcharts({
445
     chart: {
445
     chart: {
446
         type: 'bar'
446
         type: 'bar'
447
-    },
447
+    }, 
448
     title: {
448
     title: {
449
         text: 'Performance of {{ $school->name }} Students by Combined Learning Outcome'
449
         text: 'Performance of {{ $school->name }} Students by Combined Learning Outcome'
450
     },
450
     },

+ 7
- 4
app/views/local/professors/_navigation.blade.php View File

10
             {{-- <li>{{ HTML::linkAction('CriteriaController@index', 'Learning Outcomes and Criteria') }}</li> --}}
10
             {{-- <li>{{ HTML::linkAction('CriteriaController@index', 'Learning Outcomes and Criteria') }}</li> --}}
11
             {{-- <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li> --}}
11
             {{-- <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li> --}}
12
             <li class="dropdown">
12
             <li class="dropdown">
13
-                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Learning
13
+                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
14
+                    aria-expanded="false">Learning
14
                     and Criterias<span class="caret"></span></a>
15
                     and Criterias<span class="caret"></span></a>
15
                 <ul class="dropdown-menu" role="menu">
16
                 <ul class="dropdown-menu" role="menu">
16
                     <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
17
                     <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
30
                     </ul>
31
                     </ul>
31
                 </li>
32
                 </li>
32
             @endif
33
             @endif
33
-            <li> {{ HTML::linkAction('ProfessorsController@program', 'Program') }}</li>
34
+            @if (count(Auth::user()->programs))
35
+                <li> {{ HTML::linkAction('ProfessorsController@program', 'Program') }}</li>
36
+            @endif
34
             <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReport', 'Results') }}</li>
37
             <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReport', 'Results') }}</li>
35
             <li>{{ HTML::linkAction('TemplatesController@ProfIndex', 'Rubric List') }}</li>
38
             <li>{{ HTML::linkAction('TemplatesController@ProfIndex', 'Rubric List') }}</li>
36
             <li class="dropdown">
39
             <li class="dropdown">
37
-                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Help<span
38
-                        class="caret"></span></a>
40
+                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
41
+                    aria-expanded="false">Help<span class="caret"></span></a>
39
                 <ul class="dropdown-menu" role="menu">
42
                 <ul class="dropdown-menu" role="menu">
40
                     <li>{{ HTML::linkAction('FeedbackController@create', 'Feedback') }}</li>
43
                     <li>{{ HTML::linkAction('FeedbackController@create', 'Feedback') }}</li>
41
                     <!-- <li><a href="{{ asset('files/OLAS-intro.pdf') }}">Introduction to OLAS</a></li> -->
44
                     <!-- <li><a href="{{ asset('files/OLAS-intro.pdf') }}">Introduction to OLAS</a></li> -->

+ 50
- 19
app/views/local/professors/activity.blade.php View File

430
     },
430
     },
431
 
431
 
432
     tooltip: {
432
     tooltip: {
433
-    headerFormat: '<span style="font-size:10px">{point.key}</span>
434
-    <table>',
435
-        pointFormat: '<tr>
436
-            <td style="color:{series.color};padding:0">{series.name}: </td>' +
437
-            '<td style="padding:0"><b>{point.y:.2f}%</b></td>
438
-        </tr>'+
433
+
434
+    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
435
+    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
436
+            '<td style="padding:0"><b>{point.y:.2f}%</b></td></tr>'+
439
         '{point.outcomes}',
437
         '{point.outcomes}',
440
-        //'<tr>
441
-            <td style="color:{series.color};padding:0">Learning Outcomes:</td>'+
438
+        //'<tr><td style="color:{series.color};padding:0">Learning Outcomes:</td>'+
439
+
440
+            // '<td style="padding:0">{point.outcomes}, <br>Outcome2</td></tr>',
441
+
442
             // '<td style="padding:0">{point.outcomes}, <br>Outcome2</td>
442
             // '<td style="padding:0">{point.outcomes}, <br>Outcome2</td>
443
-        </tr>',
443
+        //'</tr>',
444
+
444
         footerFormat: '</table>',
445
         footerFormat: '</table>',
445
     shared: true,
446
     shared: true,
446
     useHTML: true
447
     useHTML: true
490
     });
491
     });
491
 
492
 
492
     $('#graph').highcharts({
493
     $('#graph').highcharts({
494
+
493
     chart: {
495
     chart: {
494
     type: 'bar',
496
     type: 'bar',
495
     },
497
     },
499
     xAxis: {
501
     xAxis: {
500
     categories: [
502
     categories: [
501
     @foreach ($outcomes as $outcome)
503
     @foreach ($outcomes as $outcome)
502
-        "{{ $outcome->name }}",
504
+        @if(is_array($outcomes_attempted) &&
505
+        array_key_exists($outcome->id, $outcomes_attempted) &&
506
+        $outcomes_attempted[$outcome->id] != 0)
507
+            <?php
508
+            $attempted = $outcomes_attempted[$outcome->id];
509
+            $achieved = $outcomes_achieved[$outcome->id];
510
+            ?>
511
+
512
+        @else
513
+            <?php
514
+            $attempted = 0;
515
+            $achieved = 0;
516
+            ?>
517
+        @endif
518
+        "{{ $outcome->name }}<br> (N = {{$attempted}} , {{$achieved}})",
519
+
503
     @endforeach
520
     @endforeach
504
     ],
521
     ],
505
     labels: {
522
     labels: {
518
     max: 100,
535
     max: 100,
519
     title: {
536
     title: {
520
     text: 'Percentage'
537
     text: 'Percentage'
521
-    }
538
+    }, 
539
+    
540
+			plotLines:[{
541
+		value:66.67,
542
+		color: '#000',
543
+		width:3,
544
+		zIndex:4,
545
+		label:{
546
+			text: 'Goal (66.67%)',
547
+			style: {
548
+				color: '#000',
549
+				fontSize: '14px',
550
+			}
551
+
552
+		}
553
+	}]
522
     },
554
     },
523
     tooltip: {
555
     tooltip: {
524
-    headerFormat: '<span style="font-size:10px">{point.key}</span>
525
-    <table>',
526
-        pointFormat: '<tr>
527
-            <td style="color:{series.color};padding:0">{series.name}: </td>' +
528
-            '<td style="padding:0"><b>{point.y:.2f}</b></td>
529
-        </tr>',
556
+    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
557
+        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
558
+            '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
530
         footerFormat: '</table>',
559
         footerFormat: '</table>',
531
     shared: true,
560
     shared: true,
532
     useHTML: true
561
     useHTML: true
566
     @endforeach
595
     @endforeach
567
     ],
596
     ],
568
     pointPadding: 0,
597
     pointPadding: 0,
569
-    }, {
598
+    } {{--, {
570
     name: 'Expected Value',
599
     name: 'Expected Value',
571
     color: '#555555',
600
     color: '#555555',
572
     dataLabels: {
601
     dataLabels: {
590
     @endforeach
619
     @endforeach
591
     ],
620
     ],
592
     pointPadding: 0,
621
     pointPadding: 0,
593
-    }]
622
+    } --}}]
594
     });
623
     });
595
 
624
 
625
+
626
+
596
     var chart = $('#graph').highcharts();
627
     var chart = $('#graph').highcharts();
597
     var titletext = $('#graph').highcharts().options.title.text;
628
     var titletext = $('#graph').highcharts().options.title.text;
598
     var newtitletext = titletext.replace("&#039;", "\'");
629
     var newtitletext = titletext.replace("&#039;", "\'");

+ 45
- 29
app/views/local/professors/course.blade.php View File

259
         xAxis: {
259
         xAxis: {
260
             categories: [
260
             categories: [
261
                 @foreach($outcomes as $outcome)
261
                 @foreach($outcomes as $outcome)
262
-                    "{{{ $outcome->name }}}",
262
+
263
+                @if(
264
+                        is_array($outcomes_attempted)
265
+                        && array_key_exists($outcome->id, $outcomes_attempted)
266
+                        && $outcomes_attempted[$outcome->id]!=0)
267
+                    <?php
268
+                        $attempted = $outcomes_attempted[$outcome->id];
269
+                        
270
+                        if( isset($outcomes_achieved[$outcome->id]))
271
+                            $achieved =$outcomes_achieved[$outcome->id];
272
+
273
+                        else $achieved = 0;
274
+                    ?>
275
+                @else 
276
+
277
+                    <?php 
278
+                    
279
+                        $attempted =0;
280
+                        $achieved = 0;
281
+                        
282
+                    ?>
283
+
284
+                @endif
285
+            "{{{ $outcome->name }}} <br> (N = {{$attempted}} , {{$achieved}} ) ",
286
+
287
+                
288
+
289
+                    
290
+
263
                 @endforeach
291
                 @endforeach
264
             ],
292
             ],
265
             labels: {
293
             labels: {
278
             max: 100,
306
             max: 100,
279
             title: {
307
             title: {
280
                 text: 'Percentage'
308
                 text: 'Percentage'
281
-            }
309
+            },
310
+            plotLines:[{
311
+                value:66.67,
312
+                color: '#000',
313
+                width:3,
314
+                zIndex:4,
315
+                label:{
316
+                    text: 'Goal (66.67%)',
317
+                    style: {
318
+                        color: '#000',
319
+                        fontSize: '14px',
320
+                    }
321
+        
322
+                }
323
+            }]
282
         },
324
         },
283
         tooltip: {
325
         tooltip: {
284
             headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
326
             headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
328
 
370
 
329
             ],
371
             ],
330
             pointPadding: 0,
372
             pointPadding: 0,
331
-        }, {
332
-            name: 'Expected Value',
333
-            color: '#555555',
334
-            dataLabels: {
335
-                enabled: true,
336
-                fontSize: 8,
337
-                color: '#fff',
338
-                align: 'right',
339
-                format: '{y:.1f}%',
340
-                style: {
341
-                    //fontWeight: 'bold'
342
-                },
343
-                y:-1
344
-            },
345
-            data: [
346
-                @foreach($outcomes as $index => $outcome)
347
-                    @if(
348
-                        is_array($outcomes_attempted)
349
-                        && array_key_exists($outcome->id, $outcomes_attempted)
350
-                        && $outcomes_attempted[$outcome->id]!=0)
351
-                        {{{ $outcome->expected_outcome }}},
352
-                    @else
353
-                        0,
354
-                    @endif
355
-                @endforeach
356
-            ],
357
-            pointPadding: 0,
358
 
373
 
359
         }]
374
         }]
375
+
360
     });
376
     });
361
 
377
 
362
     // Include dummy graph for outcomes
378
     // Include dummy graph for outcomes

+ 57
- 4
app/views/local/professors/overview.blade.php View File

118
                 categories: [
118
                 categories: [
119
                     @foreach($outcomes as $outcome)
119
                     @foreach($outcomes as $outcome)
120
                     	@if($outcome->level==3 || ($grouped_course->program->is_graduate==0 && $outcome->level==1))
120
                     	@if($outcome->level==3 || ($grouped_course->program->is_graduate==0 && $outcome->level==1))
121
-                        "{{{ $outcome->name }}}",
121
+
122
+                            @if(
123
+                                is_array($grouped_outcomes_attempted_results[$index])
124
+                                && array_key_exists($outcome->id, $grouped_outcomes_attempted_results[$index])
125
+                                && $grouped_outcomes_attempted_results[$index][$outcome->id]!=0)
126
+                                <?php
127
+                                    $attempted = $grouped_outcomes_attempted_results[$index][$outcome->id];
128
+                                    
129
+                                    if( isset($grouped_outcomes_achieved_results[$index][$outcome->id]))
130
+                                        $achieved =$grouped_outcomes_achieved_results[$index][$outcome->id];
131
+
132
+                                    else $achieved = 0;
133
+                                ?>
134
+                            @else 
135
+
136
+                                <?php 
137
+                                
138
+                                    $attempted =0;
139
+                                    $achieved = 0;
140
+                                    
141
+                                ?>
142
+
143
+                            @endif
144
+                        "{{{ $outcome->name }}} <br> (N = {{$attempted}} , {{$achieved}} ) ",
145
+
146
+                        
147
+
148
+                        
149
+
122
                         @endif
150
                         @endif
123
                     @endforeach
151
                     @endforeach
124
                 ],
152
                 ],
138
                 max: 100,
166
                 max: 100,
139
                 title: {
167
                 title: {
140
                     text: 'Percentage'
168
                     text: 'Percentage'
141
-                }
169
+                },
170
+
171
+                
172
+			plotLines:[{
173
+		value:66.67,
174
+		color: '#000',
175
+		width:3,
176
+		zIndex:4,
177
+		label:{
178
+			text: 'Goal (66.67%)',
179
+			style: {
180
+				color: '#000',
181
+				fontSize: '14px',
182
+			}
183
+
184
+		}
185
+	}]
186
+
142
             },
187
             },
143
             tooltip: {
188
             tooltip: {
144
                 headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
189
                 headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
200
                     @endforeach
245
                     @endforeach
201
                 ],
246
                 ],
202
                 pointPadding: 0,
247
                 pointPadding: 0,
203
-            }, {
248
+
249
+            } {{-- , {
250
+
251
+            } {{--, {
252
+>>>>>>> Stashed changes
204
                 name: 'Expected',
253
                 name: 'Expected',
205
                 color: '#555555',
254
                 color: '#555555',
206
                     dataLabels: {
255
                     dataLabels: {
230
                 ],
279
                 ],
231
                 pointPadding: 0,
280
                 pointPadding: 0,
232
 
281
 
233
-            }]
282
+
283
+            
284
+
285
+            } --}}]
286
+
234
         });
287
         });
235
     @endforeach  
288
     @endforeach  
236
 }
289
 }