Browse Source

Hice un papelon

parent
commit
b60a09732c

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

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

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

@@ -814,8 +814,8 @@ class ActivitiesController extends \BaseController
814 814
             ->addSelect('activity_criterion.activity_id', 'activity_criterion.weight', 'activity_criterion.id as activity_criterion_id')
815 815
             ->addSelect('rubric_criterion.rubric_id', 'rubric_criterion.id as rubric_criterion_id')
816 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 820
         foreach ($rubric_criterion as $index => $crit) {
821 821
             $crit->scales = DB::table('scales')
@@ -1002,4 +1002,4 @@ class ActivitiesController extends \BaseController
1002 1002
 
1003 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,9 +28,9 @@ class AuthController extends \BaseController
28 28
 
29 29
 		if (!$validator->fails()) {
30 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 34
 			try {
35 35
 				// User input
36 36
 				$username = str_replace('@upr.edu', '', Input::get('email'));
@@ -172,4 +172,4 @@ class AuthController extends \BaseController
172 172
 		Session::flush();
173 173
 		return Redirect::action('AuthController@showLogin');
174 174
 	}
175
-}
175
+}

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

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

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

@@ -647,13 +647,7 @@ class OutcomesController extends \BaseController
647 647
             ->get();
648 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 652
         $criteria_array = array();
659 653
 
@@ -678,6 +672,17 @@ class OutcomesController extends \BaseController
678 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 686
         $outcome->criteria = array();
682 687
         foreach ($diferent_levels as $level) {
683 688
             $level = $level->levels;

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

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

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

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

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

@@ -169,7 +169,7 @@
169 169
 </div>
170 170
 	</div>
171 171
 </div>
172
- <!-- =================== tabs =================== -->
172
+ <!-- ===== tabs ===== -->
173 173
 <div class="row">
174 174
     <!-- Nav tabs -->
175 175
    <!-- Tab panes -->
@@ -291,7 +291,7 @@
291 291
         </div>
292 292
     </div>
293 293
 </div>
294
-<!-- =================== end tabs =================== -->
294
+<!-- ===== end tabs ===== -->
295 295
 
296 296
 @stop
297 297
 
@@ -444,7 +444,7 @@ $('#graph').highcharts({
444 444
 $('#graph2').highcharts({
445 445
     chart: {
446 446
         type: 'bar'
447
-    },
447
+    }, 
448 448
     title: {
449 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,7 +10,8 @@
10 10
             {{-- <li>{{ HTML::linkAction('CriteriaController@index', 'Learning Outcomes and Criteria') }}</li> --}}
11 11
             {{-- <li>{{ HTML::linkAction('TransformativeActionsController@editTA', 'Transformative Actions') }}</li> --}}
12 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 15
                     and Criterias<span class="caret"></span></a>
15 16
                 <ul class="dropdown-menu" role="menu">
16 17
                     <li>{{ HTML::linkAction('CriteriaController@index', 'Outcomes and Criteria') }}</li>
@@ -30,12 +31,14 @@
30 31
                     </ul>
31 32
                 </li>
32 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 37
             <li>{{ HTML::linkAction('OutcomesController@professorAssessmentReport', 'Results') }}</li>
35 38
             <li>{{ HTML::linkAction('TemplatesController@ProfIndex', 'Rubric List') }}</li>
36 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 42
                 <ul class="dropdown-menu" role="menu">
40 43
                     <li>{{ HTML::linkAction('FeedbackController@create', 'Feedback') }}</li>
41 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,17 +430,18 @@
430 430
     },
431 431
 
432 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 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 442
             // '<td style="padding:0">{point.outcomes}, <br>Outcome2</td>
443
-        </tr>',
443
+        //'</tr>',
444
+
444 445
         footerFormat: '</table>',
445 446
     shared: true,
446 447
     useHTML: true
@@ -490,6 +491,7 @@
490 491
     });
491 492
 
492 493
     $('#graph').highcharts({
494
+
493 495
     chart: {
494 496
     type: 'bar',
495 497
     },
@@ -499,7 +501,22 @@
499 501
     xAxis: {
500 502
     categories: [
501 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 520
     @endforeach
504 521
     ],
505 522
     labels: {
@@ -518,15 +535,27 @@
518 535
     max: 100,
519 536
     title: {
520 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 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 559
         footerFormat: '</table>',
531 560
     shared: true,
532 561
     useHTML: true
@@ -566,7 +595,7 @@
566 595
     @endforeach
567 596
     ],
568 597
     pointPadding: 0,
569
-    }, {
598
+    } {{--, {
570 599
     name: 'Expected Value',
571 600
     color: '#555555',
572 601
     dataLabels: {
@@ -590,9 +619,11 @@
590 619
     @endforeach
591 620
     ],
592 621
     pointPadding: 0,
593
-    }]
622
+    } --}}]
594 623
     });
595 624
 
625
+
626
+
596 627
     var chart = $('#graph').highcharts();
597 628
     var titletext = $('#graph').highcharts().options.title.text;
598 629
     var newtitletext = titletext.replace("&#039;", "\'");

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

@@ -259,7 +259,35 @@ $(function () {
259 259
         xAxis: {
260 260
             categories: [
261 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 291
                 @endforeach
264 292
             ],
265 293
             labels: {
@@ -278,7 +306,21 @@ $(function () {
278 306
             max: 100,
279 307
             title: {
280 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 325
         tooltip: {
284 326
             headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
@@ -328,35 +370,9 @@ $(function () {
328 370
 
329 371
             ],
330 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 378
     // Include dummy graph for outcomes

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

@@ -118,7 +118,35 @@ function loadGraphs() {
118 118
                 categories: [
119 119
                     @foreach($outcomes as $outcome)
120 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 150
                         @endif
123 151
                     @endforeach
124 152
                 ],
@@ -138,7 +166,24 @@ function loadGraphs() {
138 166
                 max: 100,
139 167
                 title: {
140 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 188
             tooltip: {
144 189
                 headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
@@ -200,7 +245,11 @@ function loadGraphs() {
200 245
                     @endforeach
201 246
                 ],
202 247
                 pointPadding: 0,
203
-            }, {
248
+
249
+            } {{-- , {
250
+
251
+            } {{--, {
252
+>>>>>>> Stashed changes
204 253
                 name: 'Expected',
205 254
                 color: '#555555',
206 255
                     dataLabels: {
@@ -230,7 +279,11 @@ function loadGraphs() {
230 279
                 ],
231 280
                 pointPadding: 0,
232 281
 
233
-            }]
282
+
283
+            
284
+
285
+            } --}}]
286
+
234 287
         });
235 288
     @endforeach  
236 289
 }