Kaynağa Gözat

Que salieran los criterios en el segundo semestre de anual plan. Que los filtros esten abiertos al load

Carlos J Corrada Bravo 2 yıl önce
ebeveyn
işleme
cf1dee1eb9

+ 7
- 1
app/controllers/TransformativeActionsController.php Dosyayı Görüntüle

@@ -151,8 +151,8 @@ class TransformativeActionsController extends \BaseController
151 151
       ->whereIn('courses.program_id', $program_id)
152 152
       ->select('courses.*')
153 153
       ->groupBy('courses.number', 'courses.code',  'courses.name')
154
-      ->orderBy('courses.name', 'ASC')
155 154
       ->orderBy('courses.code', 'ASC')
155
+      ->orderBy('courses.number', 'ASC')
156 156
       ->get();
157 157
     /*
158 158
     // if user is profesor
@@ -718,6 +718,7 @@ class TransformativeActionsController extends \BaseController
718 718
       ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
719 719
       ->join('objectives', 'objectives.id', '=', 'transformative_objective.objective_id')
720 720
       ->where('transformative_actions.id', $ta_id)
721
+      ->where('objectives.id', '<>',0)
721 722
       ->select('objectives.text as text', 'objectives.id as id')
722 723
       ->orderBy('objectives.text', 'ASC')
723 724
       ->get();
@@ -725,6 +726,7 @@ class TransformativeActionsController extends \BaseController
725 726
       ->join('transformative_objective', 'transformative_objective.ta_id', '=', 'transformative_actions.id')
726 727
       ->join('objectives', 'objectives.id', '=', 'transformative_objective.objective_id')
727 728
       ->where('transformative_actions.id', $ta_id)
729
+      ->where('objectives.id', '<>',0)
728 730
       ->select('objectives.text as text', 'objectives.id as id')
729 731
       ->orderBy('objectives.text', 'ASC')
730 732
       ->lists('objectives.id');
@@ -743,6 +745,7 @@ class TransformativeActionsController extends \BaseController
743 745
       ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
744 746
       ->whereIn('objective_outcome.outcome_id', $outcome_ids)
745 747
       ->whereIn('objective_program.program_id', $program_ids)
748
+      ->where('objective_outcome.objective_id', '<>',0)
746 749
       ->orderBy('objectives.text', 'ASC')
747 750
       ->select('objectives.text as text', 'objectives.id as id')
748 751
       ->distinct()
@@ -830,6 +833,7 @@ class TransformativeActionsController extends \BaseController
830 833
       ->join('objective_program', 'objective_program.objective_id', '=', 'objectives.id')
831 834
       ->join('objective_outcome', 'objective_outcome.objective_id', '=', 'objectives.id')
832 835
       ->where('objective_outcome.outcome_id', $outcome_id)
836
+      ->where('objective_outcome.objective_id','<>',0 )
833 837
       ->whereIn('objective_program.program_id', $program_ids)
834 838
       ->orderBy('objectives.text', 'ASC')
835 839
       ->select('objectives.text as text', 'objectives.id as id')
@@ -1321,6 +1325,8 @@ class TransformativeActionsController extends \BaseController
1321 1325
       ->join('transformative_activity_criterion as tac', 'tac.activity_criterion_id', '=', 'activity_criterion.id')
1322 1326
       ->select('courses.*')
1323 1327
       ->groupBy(array('courses.code', 'courses.name', 'courses.semester_id'))
1328
+      ->orderBy('courses.code')
1329
+      ->orderBy('courses.number')
1324 1330
       ->get();
1325 1331
 
1326 1332
 

+ 2
- 2
app/views/local/managers/admins/criteria.blade.php Dosyayı Görüntüle

@@ -128,7 +128,7 @@
128 128
                 <div class="panel-body">
129 129
                     {{ Form::open(['action' => 'CriteriaController@update', 'id' => 'update_criterion', 'data-form-id' => 'update_criterion']) }}
130 130
                     <button class="btn btn-md btn-secondary filterButton">
131
-                        <span class="glyphicon glyphicon-plus">
131
+                        <span class="glyphicon glyphicon-minus">
132 132
                         </span>
133 133
                         Filters
134 134
                     </button>
@@ -776,7 +776,7 @@
776 776
         }
777 777
 
778 778
 
779
-        $('.filterSection').hide();
779
+        $('.filterSection').show();
780 780
         $('.filterButton').on('click', function() {
781 781
             var span = $(this).find('span');
782 782
             if (span.attr('class') == 'glyphicon glyphicon-plus') {

+ 2
- 2
app/views/local/managers/admins/objectives.blade.php Dosyayı Görüntüle

@@ -82,7 +82,7 @@
82 82
                 </div>
83 83
                 <div class="panel-body">
84 84
                     <button class="btn btn-md btn-secondary filterButton">
85
-                        <span class="glyphicon glyphicon-plus">
85
+                        <span class="glyphicon glyphicon-minus">
86 86
                         </span>
87 87
                         Filters
88 88
                     </button>
@@ -215,7 +215,7 @@
215 215
         </div>
216 216
     </div>
217 217
     <script>
218
-        $('.filterSection').hide();
218
+        $('.filterSection').show();
219 219
         $('.filterButton').on('click', function() {
220 220
             var span = $(this).find('span');
221 221
             if (span.attr('class') == 'glyphicon glyphicon-plus') {

+ 6
- 5
app/views/local/managers/admins/transformativeAction.blade.php Dosyayı Görüntüle

@@ -45,7 +45,7 @@
45 45
                 <div class="form-group col-md-11">
46 46
                   <select name="courseid" class="form-control createCourses selectpicker">
47 47
                     @foreach ($courses_create as $course)
48
-                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->name}}</option>
48
+                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}}{{$course->number}} {{$course->name}}</option>
49 49
                     @endforeach
50 50
                   </select>
51 51
                 </div>
@@ -243,7 +243,7 @@
243 243
 
244 244
               <div class="">
245 245
                 <button class="btn btn-md btn-secondary filterButton">
246
-                  <span class="glyphicon glyphicon-plus">
246
+                  <span class="glyphicon glyphicon-minus">
247 247
                   </span>
248 248
                   Filters
249 249
                 </button>
@@ -266,7 +266,7 @@
266 266
                     <select class="form-control filterCourse selectpicker">
267 267
                       <option value="0">Show All</option>
268 268
                       @foreach ($course_filter_editPanel as $course)
269
-                        <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->name}}</option>
269
+                        <option value="({{$course->code}},{{$course->number}})">{{$course->code}}{{$course->number}} {{$course->name}}</option>
270 270
                       @endforeach
271 271
                     </select>
272 272
                   </div>
@@ -326,7 +326,7 @@
326 326
                 <div class="form-group col-md-11 editCourse">
327 327
                   <select name="courseid" id = "edit_course" class="form-control selectpicker">
328 328
                     @foreach ($courses_create as $course)
329
-                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}} {{$course->name}}</option>
329
+                      <option value="({{$course->code}},{{$course->number}})">{{$course->code}}{{$course->number}} {{$course->name}}</option>
330 330
                     @endforeach
331 331
                   </select>
332 332
                 </div>
@@ -485,7 +485,8 @@ if(($('#approvalSelectTA').val() === "")){
485 485
 }
486 486
 
487 487
 //
488
-$('.filterSection').hide();
488
+//$('.filterSection').hide();
489
+$('.filterSection').show();
489 490
 
490 491
 // --------------------------------------------------------------------------
491 492
 // Functions

+ 2
- 2
app/views/local/managers/pCoords/criteria.blade.php Dosyayı Görüntüle

@@ -125,7 +125,7 @@
125 125
                     {{ Form::open(['action' => 'CriteriaController@update', 'id' => 'update_criterion', 'data-form-id' => 'update_criterion']) }}
126 126
 
127 127
                     <button class="btn btn-md btn-secondary filterButton">
128
-                        <span class="glyphicon glyphicon-plus">
128
+                        <span class="glyphicon glyphicon-minus">
129 129
                         </span>
130 130
                         Filters
131 131
                     </button>
@@ -693,7 +693,7 @@
693 693
 
694 694
         }
695 695
 
696
-        $('.filterSection').hide();
696
+        $('.filterSection').show();
697 697
         $('.filterButton').on('click', function() {
698 698
             var span = $(this).find('span');
699 699
             if (span.attr('class') == 'glyphicon glyphicon-plus') {

+ 2
- 2
app/views/local/managers/pCoords/objectives.blade.php Dosyayı Görüntüle

@@ -94,7 +94,7 @@
94 94
 
95 95
                 <div class="panel-body">
96 96
                     <button class="btn btn-md btn-secondary filterButton">
97
-                        <span class="glyphicon glyphicon-plus">
97
+                        <span class="glyphicon glyphicon-minus">
98 98
                         </span>
99 99
                         Filters
100 100
                     </button>
@@ -246,7 +246,7 @@
246 246
         </div>
247 247
     </div>
248 248
     <script>
249
-        $('.filterSection').hide();
249
+        $('.filterSection').show();
250 250
 
251 251
         $('.filterButton').on('click', function() {
252 252
             var span = $(this).find('span');

+ 3
- 2
app/views/local/managers/sCoords/criteria.blade.php Dosyayı Görüntüle

@@ -123,7 +123,7 @@
123 123
                 <div class="panel-body">
124 124
                     {{ Form::open(['action' => 'CriteriaController@update', 'id' => 'update_criterion', 'data-form-id' => 'update_criterion']) }}
125 125
                     <button class="btn btn-md btn-secondary filterButton">
126
-                        <span class="glyphicon glyphicon-plus">
126
+                        <span class="glyphicon glyphicon-minus">
127 127
                         </span>
128 128
                         Filters
129 129
                     </button>
@@ -779,7 +779,8 @@
779 779
         }
780 780
 
781 781
 
782
-        $('.filterSection').hide();
782
+//        $('.filterSection').hide();
783
+        $('.filterSection').show();
783 784
         $('.filterButton').on('click', function() {
784 785
             var span = $(this).find('span');
785 786
             if (span.attr('class') == 'glyphicon glyphicon-plus') {

+ 2
- 2
app/views/local/managers/sCoords/objectives.blade.php Dosyayı Görüntüle

@@ -82,7 +82,7 @@
82 82
 
83 83
                 <div class="panel-body">
84 84
                     <button class="btn btn-md btn-secondary filterButton">
85
-                        <span class="glyphicon glyphicon-plus">
85
+                        <span class="glyphicon glyphicon-minus">
86 86
                         </span>
87 87
                         Filters
88 88
                     </button>
@@ -214,7 +214,7 @@
214 214
         </div>
215 215
     </div>
216 216
     <script>
217
-        $('.filterSection').hide();
217
+        $('.filterSection').show();
218 218
 
219 219
         $('.filterButton').on('click', function() {
220 220
             var span = $(this).find('span');

+ 25
- 8
app/views/local/managers/shared/view-annual-plans.blade.php Dosyayı Görüntüle

@@ -76,8 +76,22 @@
76 76
        
77 77
     }
78 78
     function changeOutput(show, hide){
79
-      $(show).show();
80
-      $(hide).hide();
79
+//       console.log($(show).selector);#firstSemester
80
+
81
+		if($(show).selector=="#secondSemester")
82
+		{
83
+		  $('#first_semester_button')[0].className="btn btn-secondary";
84
+		  $('#second_semester_button')[0].className="btn btn-primary";
85
+		 }
86
+		 if($(show).selector=="#firstSemester")
87
+		 {
88
+		  $('#first_semester_button')[0].className="btn btn-primary";
89
+		  $('#second_semester_button')[0].className="btn btn-secondary";
90
+	 
91
+		 }
92
+		  $(show).show();
93
+	  
94
+		  $(hide).hide();
81 95
     }
82 96
     function postToTransformativeReport(){
83 97
       program_id = {{$program_id}};
@@ -166,18 +180,21 @@ $('#here2').append($buttonForInform);*/
166 180
 
167 181
 
168 182
         $button = $('<button/>',{
169
-          'class': 'btn btn-secondary',
183
+          'id' : 'first_semester_button',
184
+          'class': 'btn btn-primary',
170 185
           'type': 'button',
171 186
           'style': 'width: 50%',
172 187
           'onclick': 'changeOutput("#firstSemester","#secondSemester")'
173 188
 
174 189
         }).html('First Semester');
175 190
         $button2 = $('<button/>',{
191
+          'id' : 'second_semester_button',
176 192
           'class': 'btn btn-secondary',
177 193
           'type': 'button',
178 194
           'style': 'float:right; width:50%',
179 195
           'onclick': 'changeOutput("#secondSemester","#firstSemester")'
180 196
         }).html('Second Semester');
197
+        
181 198
         $button.appendTo('#allTables');
182 199
         $button2.appendTo('#allTables');
183 200
         
@@ -299,11 +316,11 @@ $('#here2').append($buttonForInform);*/
299 316
                 var theCourse = json.first.courses[theObj.id][course];
300 317
                 courseHTML+= '&#8226; '+theCourse.code + " "+ theCourse.number +'\n\n\n<br>';
301 318
                 courseTAhtml += '&#8226; '+theCourse.code + " "+ theCourse.number +'\n\n\n<br>';
302
-
303
-//                 for(criterion in json.first.criteria[theObj.id][theCourse.typ_course_id]){
304
-                for(criterion in json.first.criteria[theObj.id][theCourse.course_id]){
305
-//                   theCrit = json.first.criteria[theObj.id][theCourse.typ_course_id][criterion];
306
-                  theCrit = json.first.criteria[theObj.id][theCourse.course_id][criterion];
319
+// console.log(json.first.criteria[theObj.id][theCourse.course_id]);
320
+                for(criterion in json.first.criteria[theObj.id][theCourse.typ_course_id]){
321
+//                 for(criterion in json.first.criteria[theObj.id][theCourse.course_id]){
322
+                  theCrit = json.first.criteria[theObj.id][theCourse.typ_course_id][criterion];
323
+//                   theCrit = json.first.criteria[theObj.id][theCourse.course_id][criterion];
307 324
                   courseHTML += '\t&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n\n<br>';
308 325
                   
309 326
                 }