Browse Source

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

parent
commit
cf1dee1eb9

+ 7
- 1
app/controllers/TransformativeActionsController.php View File

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

+ 2
- 2
app/views/local/managers/admins/criteria.blade.php View File

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

+ 2
- 2
app/views/local/managers/admins/objectives.blade.php View File

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

+ 6
- 5
app/views/local/managers/admins/transformativeAction.blade.php View File

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

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

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

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

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

+ 3
- 2
app/views/local/managers/sCoords/criteria.blade.php View File

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

+ 2
- 2
app/views/local/managers/sCoords/objectives.blade.php View File

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

+ 25
- 8
app/views/local/managers/shared/view-annual-plans.blade.php View File

76
        
76
        
77
     }
77
     }
78
     function changeOutput(show, hide){
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
     function postToTransformativeReport(){
96
     function postToTransformativeReport(){
83
       program_id = {{$program_id}};
97
       program_id = {{$program_id}};
166
 
180
 
167
 
181
 
168
         $button = $('<button/>',{
182
         $button = $('<button/>',{
169
-          'class': 'btn btn-secondary',
183
+          'id' : 'first_semester_button',
184
+          'class': 'btn btn-primary',
170
           'type': 'button',
185
           'type': 'button',
171
           'style': 'width: 50%',
186
           'style': 'width: 50%',
172
           'onclick': 'changeOutput("#firstSemester","#secondSemester")'
187
           'onclick': 'changeOutput("#firstSemester","#secondSemester")'
173
 
188
 
174
         }).html('First Semester');
189
         }).html('First Semester');
175
         $button2 = $('<button/>',{
190
         $button2 = $('<button/>',{
191
+          'id' : 'second_semester_button',
176
           'class': 'btn btn-secondary',
192
           'class': 'btn btn-secondary',
177
           'type': 'button',
193
           'type': 'button',
178
           'style': 'float:right; width:50%',
194
           'style': 'float:right; width:50%',
179
           'onclick': 'changeOutput("#secondSemester","#firstSemester")'
195
           'onclick': 'changeOutput("#secondSemester","#firstSemester")'
180
         }).html('Second Semester');
196
         }).html('Second Semester');
197
+        
181
         $button.appendTo('#allTables');
198
         $button.appendTo('#allTables');
182
         $button2.appendTo('#allTables');
199
         $button2.appendTo('#allTables');
183
         
200
         
299
                 var theCourse = json.first.courses[theObj.id][course];
316
                 var theCourse = json.first.courses[theObj.id][course];
300
                 courseHTML+= '&#8226; '+theCourse.code + " "+ theCourse.number +'\n\n\n<br>';
317
                 courseHTML+= '&#8226; '+theCourse.code + " "+ theCourse.number +'\n\n\n<br>';
301
                 courseTAhtml += '&#8226; '+theCourse.code + " "+ theCourse.number +'\n\n\n<br>';
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
                   courseHTML += '\t&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n\n<br>';
324
                   courseHTML += '\t&nbsp;&nbsp; '+(parseInt(criterion)+1)+". "+theCrit.name+'\n\n<br>';
308
                   
325
                   
309
                 }
326
                 }