Selaa lähdekoodia

search en select, delete all y export from rubrics

Gabriel Santiago Plaza 2 vuotta sitten
vanhempi
commit
7bc25b7f58

+ 101
- 0
app/controllers/AnnualPlansController.php Näytä tiedosto

@@ -246,6 +246,9 @@ class AnnualPlansController extends \BaseController
246 246
     return View::make('local.managers.shared.annual-plans', compact('title', 'annual_plans', 'current_typ', 'program', 'outcomes', 'allSemesterOrder', 'alltyp'));
247 247
   }
248 248
 
249
+
250
+
251
+
249 252
   public function fetchInfo()
250 253
   {
251 254
     //     Log::info(Input::get('id'));
@@ -1405,4 +1408,102 @@ class AnnualPlansController extends \BaseController
1405 1408
 
1406 1409
     return '200';
1407 1410
   }
1411
+
1412
+
1413
+  //feature de import rubric
1414
+
1415
+  function fetchTemplatesForCriteria()
1416
+  {
1417
+    $outcome_id = Input::get("outcome_id");
1418
+    $objective_id = Input::get('objective_id');
1419
+    $program_id = Input::get("program_id");
1420
+    $program = Program::find($program_id);
1421
+
1422
+    $criteria_list = DB::table("program_criterion_objective_outcome as poco")
1423
+      ->join('criterion_objective_outcome as cobo', 'cobo.id', '=', 'poco.cri_obj_out_id')
1424
+      ->where('program_id', $program_id)
1425
+      ->where('objective_id', $objective_id)
1426
+      ->where('outcome_id', $outcome_id)
1427
+      ->lists('criterion_id');
1428
+
1429
+    $templates = Template::join('template_criterion', 'templates.id', '=', 'template_criterion.template_id')
1430
+      //where are available for this program
1431
+      ->where(function ($q) use ($program) {
1432
+
1433
+        //donde sean rubricas de mi programa
1434
+        $q->where(function ($q2) use ($program) {
1435
+          $q2->where('school_id', $program->school->id)
1436
+            ->where('program_id', $program->id);
1437
+        })
1438
+          //o sean exclusivamente de toda la escuela
1439
+          ->orWhere(function ($q2) use ($program) {
1440
+            $q2->where('school_id', $program->school->id)
1441
+              ->whereNull('program_id');
1442
+          })
1443
+          //o de todos
1444
+          ->orWhereNull("school_id");
1445
+      })
1446
+      ->whereIn('template_criterion.criterion_id', $criteria_list)
1447
+      ->groupBy('templates.id')
1448
+      ->select('templates.*')
1449
+      ->get();
1450
+
1451
+    return $templates;
1452
+  }
1453
+
1454
+  public function pairCriteriaFromTemplate()
1455
+  {
1456
+    $typ_objective_id = Input::get('typ_objective_id');
1457
+    $template_id = Input::get("template_id");
1458
+
1459
+    $objective_id = Input::get('objective_id');
1460
+    $program_id = Input::get('program_id');
1461
+    $outcome_id = Input::get("outcome_id");
1462
+    $annual_plan = Input::get('annual_plan');
1463
+
1464
+    $list_criterion = DB::table('template_criterion')
1465
+      ->join('criterion_objective_outcome as cobo', 'cobo.criterion_id', '=', 'template_criterion.criterion_id')
1466
+      ->join('program_criterion_objective_outcome as poco', 'poco.cri_obj_out_id', '=', 'cobo.id')
1467
+      ->where('program_id', $program_id)
1468
+      ->where('cobo.outcome_id', $outcome_id)
1469
+      ->where('cobo.objective_id', $objective_id)
1470
+      ->where('template_id', $template_id)
1471
+      ->groupBy('cobo.criterion_id')
1472
+      ->select('cobo.criterion_id')
1473
+      ->lists('criterion_id');
1474
+
1475
+    Log::info($list_criterion);
1476
+
1477
+    $courses = DB::table('typ_semester_courses')
1478
+      ->where('typ_semester_objective_id', $typ_objective_id)
1479
+      ->lists('id');
1480
+    Log::info($courses);
1481
+
1482
+    //$insertable_array = [];
1483
+
1484
+    foreach ($list_criterion as $index => $criterion_id) {
1485
+      foreach ($courses as $ind => $typ_course_id) {
1486
+
1487
+        $existing = DB::table("annual_plan_objective")
1488
+          ->where('criteria_id', $criterion_id)
1489
+          ->where('annual_plan_id', $annual_plan)
1490
+          ->where('typ_semester_course_id', $typ_course_id)
1491
+          ->first();
1492
+
1493
+        if (isset($existing)) {
1494
+          Log::info('existe');
1495
+          Log::info(array($existing));
1496
+          continue;
1497
+        }
1498
+
1499
+        DB::table('annual_plan_objective')
1500
+          ->insert(array(
1501
+            'criteria_id' => $criterion_id,
1502
+            'annual_plan_id' => $annual_plan,
1503
+            'typ_semester_course_id' => $typ_course_id
1504
+          ));
1505
+      }
1506
+    }
1507
+    return 200;
1508
+  }
1408 1509
 }

+ 39
- 0
app/controllers/Objective2Controller.php Näytä tiedosto

@@ -248,6 +248,42 @@ class Objective2Controller extends \BaseController
248 248
 		return Objective::find(Input::get('id'));
249 249
 	}
250 250
 
251
+	public function postDeleteAll()
252
+	{
253
+		$program_id = Input::get('program_id');
254
+		$objective_id = Input::get('objective_id');
255
+		$outcome_id = Input::get('outcome_id');
256
+
257
+		$all_criteria = DB::table("criterion_objective_outcome as cobo")
258
+			->join('program_criterion_objective_outcome as poco', 'poco.cri_obj_out_id', '=', 'cobo.id')
259
+			->where("objective_id", $objective_id)
260
+			->where('outcome_id', $outcome_id)
261
+
262
+			->where('program_id', $program_id)
263
+			->select('poco.id as poco_id', 'cobo.id as cobo_id', 'criterion_id')
264
+			->get();
265
+		DB::beginTransaction();
266
+		foreach ($all_criteria as $crit) {
267
+			Input::replace([
268
+				'program_id' => $program_id,
269
+				'objective_id' => $objective_id,
270
+				'outcome_id' => $outcome_id,
271
+				'criterion_id' => $crit->criterion_id,
272
+				'pcobo_id' => $crit->poco_id,
273
+				'cobo_id' => $crit->cobo_id
274
+			]);
275
+
276
+			if ($this->deletePCOBO() != 200) {
277
+				return "0";
278
+				DB::rollback();
279
+			}
280
+		}
281
+		DB::commit();
282
+
283
+
284
+		return "200";
285
+	}
286
+
251 287
 	public function fetchProgramCriteria()
252 288
 	{
253 289
 		$outcome_id = Input::get("outcome_id");
@@ -623,6 +659,9 @@ class Objective2Controller extends \BaseController
623 659
 				}
624 660
 				if ($clean_input['agreement']) {
625 661
 					DB::table('criterion_objective_outcome')
662
+						//QUE PONEMOS CORRADA
663
+						//->join('program_criterion_objective_outcome', 'criterion_objective_outcome.id', "=", 'program_criterion_objective_outcome.cri_obj_out_id')
664
+
626 665
 						->join('program_criterion', 'criterion_objective_outcome.criterion_id', "=", 'program_criterion.criterion_id')
627 666
 						->whereIn('program_id', $clean_input['program_id'])
628 667
 						->whereIn('outcome_id', $clean_input['outcome_id'])

+ 6
- 0
app/routes.php Näytä tiedosto

@@ -182,7 +182,12 @@ Route::group(array('before' => 'auth|has_access'), function () {
182 182
     );
183 183
 
184 184
 
185
+    //Para feature de import rubrics
185 186
 
187
+    Route::post("fetchTemplatesForCriteria", "AnnualPlansController@fetchTemplatesForCriteria");
188
+    Route::post("pairCriteriaFromTemplate", "AnnualPlansController@pairCriteriaFromTemplate");
189
+
190
+    //end feature
186 191
 
187 192
     Route::post('postAnnualReport/{annual_id?}', 'AnnualPlansController@postAnnualReport');
188 193
     Route::get('printAnnualPlan/{annual_plan?}/{submit?}', 'AnnualPlansController@printAnnualPlan');
@@ -377,6 +382,7 @@ Route::group(array('before' => 'auth|has_access'), function () {
377 382
     Route::post('fetchOutcome', array('before' => 'csrf', 'uses' => 'OutcomesController@fetchOutcome'));
378 383
     // Show users all objectives and criteria
379 384
     Route::get('learning-objectives-criteria', 'Objective2Controller@viewObjectives');
385
+    Route::post("postDeleteAllCriteria", 'Objective2Controller@postDeleteAll');
380 386
     Route::post('fetchObjectiveForCriteria', array('before' => 'csrf', 'uses' => 'ObjectivesController@fetchObjectiveForCriteria'));
381 387
 
382 388
     // Show professor overview to users with courses

+ 77
- 5
app/views/global/view-objectives-criteria.blade.php Näytä tiedosto

@@ -103,8 +103,9 @@
103 103
                             
104 104
                         </select>
105 105
                     </div>
106
-                    <hr>
106
+                 
107 107
                     <label>Criteria associated to program</label>
108
+                    
108 109
                     <div id="program_objectives" class ='form-group col-md-12' >
109 110
 
110 111
                     </div>
@@ -116,7 +117,7 @@
116 117
 
117 118
                 </div>
118 119
                 <div class="modal-footer">
119
-                    <hr>
120
+                    
120 121
                     <button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="">Close</button>
121 122
 
122 123
                 </div>
@@ -285,7 +286,9 @@
285 286
                         $(button).parent().parent().remove();
286 287
                         if(program_div.children('.removable_div').length === 0){
287 288
 
288
-                            program_div.prepend(addSelect('#'+ program_div.attr('id'), options));
289
+                            addSelect('#'+ program_div.attr('id'), options);
290
+                            //row.after(addSelect('#'+ program_div.attr('id'), options))
291
+                            //program_div.prepend(addSelect('#'+ program_div.attr('id'), options));
289 292
                             
290 293
                         }
291 294
                     //$('.selected_criteria_to_delete').parent().parent().remove();
@@ -311,6 +314,7 @@
311 314
             })
312 315
             select = $('<select>',{
313 316
                 'class':'selectpicker form-control criteria_select',
317
+                'data-live-search': 'true',
314 318
                 'name':'criteria[]',
315 319
                 'onchange':'saveChanges(this)'
316 320
 
@@ -424,6 +428,68 @@
424 428
 
425 429
         }
426 430
 
431
+        function createDeleteAllButton(program, outcome_id, objective_id){
432
+
433
+            div_row = $("<div>",{
434
+                'class':'row button-delete'
435
+            });
436
+            div_col = $("<div>",{
437
+                'class':'col-md-12'
438
+            });
439
+            div_row.append(div_col);
440
+            div_btn_group = $("<div>",{
441
+                'class':'btn-group pull-right',
442
+                
443
+            });
444
+
445
+            //criteria = program.criteria;
446
+
447
+            //outcome_id = criteria[0];
448
+
449
+            div_btn = $('<button>', {
450
+                'class':'btn btn-md btn-primary pull-right',
451
+                'onclick': 'showDeleteAllProgram('+program.id+', '+objective_id+', '+outcome_id+' )'
452
+            }).html('Delete All');
453
+            div_btn_group.append(div_btn);
454
+            div_col.append(div_btn_group);
455
+            div_row.append('<br><br>');
456
+
457
+            return div_row;
458
+        }
459
+
460
+        function showDeleteAllProgram(program_id, objective_id,outcome_id){
461
+            $(wr+'_title').html("Are you sure you want to remove all criterion paring?")
462
+            $(wr+"_delete").attr('onclick', 'postDeleteAll('+program_id+' ,'+outcome_id+' ,'+objective_id+'); $("'+wr+'").modal("hide") ');
463
+            $(wr+'_body').html("<p>You are about to detach <strong>All criteria from this program and objective</strong> </p>")
464
+            $(wr).modal('show');
465
+        }
466
+
467
+        function postDeleteAll(program_id,outcome_id, objective_id){
468
+            $.post(
469
+                "{{URL::action('Objective2Controller@postDeleteAll')}}",
470
+                {
471
+                    program_id:program_id,
472
+                    outcome_id:outcome_id,
473
+                    objective_id:objective_id
474
+                },
475
+                function(message){
476
+
477
+                    if(message == "200"){
478
+                        options = $("#program-"+program_id).find('select.selectpicker').html();
479
+                        
480
+                        $("#program-"+program_id).children('.removable_div').remove();
481
+                        addSelect("#program-"+program_id, options);
482
+                        //$('#program-'+program_id).children('.button-delete').after(select);
483
+                        //select.find('select').val(0);
484
+                        //$('.selectpicker').selectpicker('refresh');
485
+                        
486
+
487
+                    }
488
+
489
+                }
490
+            )
491
+        }
492
+
427 493
     
428 494
 
429 495
         function fetchCriteria(a){
@@ -465,6 +531,10 @@
465 531
                             "value":program.id
466 532
                         }).html(program.name)
467 533
 
534
+                        prog_div.append(createDeleteAllButton(program, outcome_id, objective_id));
535
+
536
+                        
537
+
468 538
                         program_select.append(program_option);
469 539
                         
470 540
 
@@ -604,7 +674,9 @@
604 674
                 removable_div = $(button).parent().parent().clone();
605 675
                 $(button).parent().parent().remove();
606 676
                 if(program_div.children('.removable_div').length === 0){
607
-                   addSelect('#'+program_div.attr('id'), options);
677
+                //program_div.children('.button-delete').after(createSelectForModal( options));
678
+                          
679
+                 addSelect('#'+program_div.attr('id'), options);
608 680
                 }
609 681
                 
610 682
                 //createSelectForModal(options);
@@ -646,7 +718,7 @@
646 718
             $(program_div_id).children(".removable_div").last().after(createSelectForModal(options));
647 719
             }
648 720
             else{
649
-                $(program_div_id).prepend(createSelectForModal(last_options))
721
+                $(program_div_id).children('.button-delete').after(createSelectForModal(last_options))
650 722
             }
651 723
             options = $(program_div_id).children('.removable_div').first().find('select.criteria_select').html();
652 724
             

+ 6
- 4
app/views/local/managers/admins/assign_other_programs.blade.php Näytä tiedosto

@@ -19,7 +19,7 @@
19 19
                     <!-- Program -->
20 20
                     <div class="form-group">
21 21
                         {{ Form::label('program', 'Select Program to pair other Program Courses\'') }}
22
-                        <select id="program" name="program" class="form-control selectpicker">
22
+                        <select id="program" name="program" class="form-control selectpicker" data-live-search= 'true'>
23 23
                             
24 24
                             @foreach ($programs as $program)
25 25
                                 @if (Input::old('program') != $program->id)
@@ -35,7 +35,7 @@
35 35
 
36 36
                     <div class="form-group" id = "other_program_div">
37 37
                         {{ Form::label('program', 'Choose other program') }}
38
-                        <select id="other_program_0" name="other_program[]" class="form-control selectpicker">
38
+                        <select id="other_program_0" name="other_program[]" class="form-control selectpicker" data-live-search="true">
39 39
                             
40 40
                             @foreach ($programs as $program)
41 41
                                 @if (Input::old('program') != $program->id)
@@ -97,7 +97,7 @@
97 97
                     <div class = "form-group">
98 98
                         {{Form::label('select-program-edit', "Edit Program Courses' Pairing")}}
99 99
                         <select id = "select-program-edit" name = "program" class ='form-control selectpicker'
100
-                        onchange = "fetchProgramPairing('#select-program-edit')">
100
+                        onchange = "fetchProgramPairing('#select-program-edit')" data-live-search="true">
101 101
                         @foreach ($programs as $program)
102 102
                         @if (Input::old('program') != $program->id)
103 103
                             <option value="{{ $program->id }}">{{ $program->name }}
@@ -113,7 +113,7 @@
113 113
 
114 114
                     <div class="form-group" id = "other_program_div_edit">
115 115
                         {{ Form::label('program', 'Choose other program') }}
116
-                        <select id="program-edit" name="other_program[]" class="form-control selectpicker">
116
+                        <select id="program-edit" name="other_program[]" class="form-control selectpicker" data-live-search="true">
117 117
                             <option value="0">Nothing Selected</option>
118 118
                             @foreach ($programs as $program)
119 119
                                 @if (Input::old('program') != $program->id)
@@ -185,7 +185,9 @@
185 185
             })
186 186
             select = $("<select>", {
187 187
                 'name': "other_program[]",
188
+                'data-live-search': 'true',
188 189
                 'class':'form-control selectpicker ' 
190
+                
189 191
             }).html(options);
190 192
 
191 193
             select.appendTo(div_select)

+ 6
- 6
app/views/local/managers/admins/overview2.blade.php Näytä tiedosto

@@ -179,7 +179,7 @@
179 179
                         <div class="category">
180 180
                             <label for="is_graduate">Level</label>
181 181
                             <div class="select">
182
-                                <select class="selectpicker" name="is_graduate" id="is_graduate">
182
+                                <select class="selectpicker" data-live-search='true' name="is_graduate" id="is_graduate">
183 183
                                     <option value="0" selected="selected">Undergradute</option>
184 184
                                     <option value="1">Graduate</option>
185 185
                                 </select>
@@ -190,7 +190,7 @@
190 190
                         <div class="category">
191 191
                             <label for="school">School</label>
192 192
                             <div class="select">
193
-                                <select multiple class="selectpicker" name="school" id="school">
193
+                                <select multiple class="selectpicker" data-live-search="true" name="school" id="school">
194 194
                                     <option value="0" selected="selected">All</option>
195 195
                                     @foreach ($filters['school'] as $school)
196 196
                                         <option value="{{ $school->id }}">{{ $school->name }}</option>
@@ -201,7 +201,7 @@
201 201
                         <div class="category">
202 202
                             <label for="program">Academic Program</label>
203 203
                             <div class="select">
204
-                                <select multiple class="selectpicker" name="program" id="program">
204
+                                <select multiple class="selectpicker" data-live-search="true" name="program" id="program">
205 205
                                     <option value="0" selected="selected">All</option>
206 206
                                     @foreach ($filters['program'] as $program)
207 207
                                         <option value="{{ $program->id }}">{{ $program->name }}</option>
@@ -214,7 +214,7 @@
214 214
                         <div class="category">
215 215
                             <label for="semester">Semester</label>
216 216
                             <div class="select">
217
-                                <select multiple class="selectpicker" name="semester" id="semester">
217
+                                <select multiple class="selectpicker" data-live-search="true" name="semester" id="semester">
218 218
                                     <option value="0" selected="selected">All</option>
219 219
                                     @foreach ($filters['semester'] as $semester)
220 220
                                         <option value="{{ $semester->id }}">{{ $semester->name }}</option>
@@ -225,7 +225,7 @@
225 225
                         <div class="category">
226 226
                             <label for="year">Academic Year</label>
227 227
                             <div class="select">
228
-                                <select multiple class="selectpicker" name="year" id="year">
228
+                                <select multiple class="selectpicker" data-live-search = 'true'name="year" id="year">
229 229
                                     <option value="0" selected="selected">All</option>
230 230
                                     @foreach ($filters['year'] as $year)
231 231
                                         <option value="{{ $year->id }}">{{ $year->start }}</option>
@@ -236,7 +236,7 @@
236 236
                         <div class="category">
237 237
                             <label for="outcome">Learning Outcomes</label>
238 238
                             <div class="select">
239
-                                <select multiple class="selectpicker" name="outcome" id="outcome">
239
+                                <select multiple class="selectpicker" data-live-search="true" name="outcome" id="outcome">
240 240
                                     <option value="0" selected="selected">All</option>
241 241
                                     @foreach ($filters['outcome'] as $outcome)
242 242
                                         <option value="{{ $outcome->id }}">{{ $outcome->name }}</option>

+ 1
- 1
app/views/local/managers/admins/show-typ-program.blade.php Näytä tiedosto

@@ -18,7 +18,7 @@
18 18
         </div>
19 19
 
20 20
         <div class='col-md-12'>
21
-            <select id ='typ' class="form-control selectpicker" onchange="fetchSubmit('#typ')">
21
+            <select id ='typ' class="form-control selectpicker" data-live-search = 'true' onchange="fetchSubmit('#typ')">
22 22
                 @foreach($typ as $t)
23 23
                 <option value = {{$t->id}}> Cycle {{$t->year_start}}-{{$t->year_end}}  </option>
24 24
                 @endforeach

+ 10
- 10
app/views/local/managers/admins/transformativeAction.blade.php Näytä tiedosto

@@ -43,7 +43,7 @@
43 43
                     <label>Courses being Transformed by the Action</label>
44 44
                     <div class="" id="">
45 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" data-live-search = 'true'>
47 47
                                 @foreach ($courses_create as $course)
48 48
                                     <option value="({{ $course->code }},{{ $course->number }})">
49 49
                                         {{ $course->code }}{{ $course->number }} {{ $course->name }}</option>
@@ -63,7 +63,7 @@
63 63
 
64 64
                     <div class="form-group" id='createOutcome'>
65 65
                         <label>Outcome </label>
66
-                        <select name="outcome" class="form-control selectpicker">
66
+                        <select name="outcome" class="form-control selectpicker" data-live-search="true">
67 67
                             @foreach ($outcomes as $outcome)
68 68
                                 <option value="{{ $outcome->id }}">{{ $outcome->name }}</option>
69 69
                             @endforeach
@@ -90,7 +90,7 @@
90 90
                     <br>
91 91
                     <div class="form-group">
92 92
                         <label>Type of Transformative Action</label>
93
-                        <select name='type_of_ta' class="form-control selectpicker">
93
+                        <select name='type_of_ta' class="form-control selectpicker" data-live-search="true">
94 94
                             @foreach ($types as $type)
95 95
                                 <option value='{{ $type->type_of_TA }}'>{{ $type->type_of_TA }}</option>
96 96
                             @endforeach
@@ -254,7 +254,7 @@
254 254
                         <div class="">
255 255
                             <div class="">
256 256
                                 <label>Professor that created the TA</label>
257
-                                <select class="form-control filterProfessor selectpicker">
257
+                                <select class="form-control filterProfessor selectpicker" data-live-search="true">
258 258
                                     <option value="0">Show All</option>
259 259
                                     @foreach ($professor_filter_editPanel as $user)
260 260
                                         <option value="{{ $user->id }}">Prof. {{ $user->first_name }}
@@ -265,7 +265,7 @@
265 265
                             <br>
266 266
                             <div class="">
267 267
                                 <label>Course evaluated by an Objective of the TA</label>
268
-                                <select class="form-control filterCourse selectpicker">
268
+                                <select class="form-control filterCourse selectpicker" data-live-search="true">
269 269
                                     <option value="0">Show All</option>
270 270
                                     @foreach ($course_filter_editPanel as $course)
271 271
                                         <option value="({{ $course->code }},{{ $course->number }})">
@@ -276,7 +276,7 @@
276 276
                             <br>
277 277
                             <div class="">
278 278
                                 <label>Outcome of the TA</label>
279
-                                <select class="form-control filterOutcome selectpicker">
279
+                                <select class="form-control filterOutcome selectpicker" data-live-search="true">
280 280
                                     <option value="0">Show All</option>
281 281
                                     @foreach ($outcome_filter_editPanel as $outcome)
282 282
                                         <option value="{{ $outcome->id }}">{{ $outcome->name }}</option>
@@ -292,7 +292,7 @@
292 292
                     <div>
293 293
                         <div class="form-group col-md-12">
294 294
                             <label>Select Transformative Action</label>
295
-                            <select name="ta" class="form-control SelectTA selectpicker" id='editSelectTA'>
295
+                            <select name="ta" class="form-control SelectTA selectpicker" data-live-search="true" id='editSelectTA'>
296 296
                                 @if (count($ta_edit_panel) == 0)
297 297
                                     <option value="0">No TAs available</option>
298 298
                                 @else
@@ -318,7 +318,7 @@
318 318
                     <div class="form-group"> </div>
319 319
                     <div class="form-group" id='editApproval'>
320 320
                         <label>Availability</label>
321
-                        <select name="approval" class="form-control selectpicker">
321
+                        <select name="approval" class="form-control selectpicker" data-live-search="true">
322 322
                             <option value="1">Recommended</option>
323 323
                             <option value="0">To be implemented</option>
324 324
                         </select>
@@ -327,7 +327,7 @@
327 327
                     <label>Associated Courses</label>
328 328
                     <div class="editCourses">
329 329
                         <div class="form-group col-md-11 editCourse">
330
-                            <select name="courseid" id="edit_course" class="form-control selectpicker">
330
+                            <select name="courseid" id="edit_course" class="form-control selectpicker" data-live-search="true">
331 331
                                 @foreach ($courses_create as $course)
332 332
                                     <option value="({{ $course->code }},{{ $course->number }})">
333 333
                                         {{ $course->code }}{{ $course->number }} {{ $course->name }}</option>
@@ -367,7 +367,7 @@
367 367
                     <br><br>
368 368
                     <div class="form-group">
369 369
                         <label>Type of Transformative Action</label>
370
-                        <select name='type_of_ta' class="form-control selectpicker">
370
+                        <select name='type_of_ta' class="form-control selectpicker" data-live-search="true">
371 371
                             @foreach ($types as $type)
372 372
                                 <option value='{{ $type->type_of_TA }}'>{{ $type->type_of_TA }}</option>
373 373
                             @endforeach

+ 101
- 1
app/views/local/managers/shared/annual-plans.blade.php Näytä tiedosto

@@ -193,7 +193,102 @@
193 193
         </div><!-- /.modal-dialog -->
194 194
     </div><!-- /.modal -->
195 195
 
196
+
197
+    <div class="modal fade" id="modal-template-criteria">
198
+        <div class="modal-dialog modal-lg">
199
+            <div class="modal-content">
200
+                <div class="modal-header">
201
+                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
202
+                            aria-hidden="true">&times;</span></button>
203
+                    <h3 class="modal-title">Select Rubric/Template to export it's criteria</h3>
204
+                </div>
205
+                <div class="modal-body" id = 'modal-template-criteria-body'>
206
+
207
+
208
+
209
+                </div>
210
+                <div class="modal-footer">
211
+                    <button type="button" id ='exportButton' class="btn btn-primary" onclick='exportCriteriaFromTemplate()'>Export Criteria</button>
212
+                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
213
+
214
+
215
+                </div>
216
+            </div><!-- /.modal-content -->
217
+        </div><!-- /.modal-dialog -->
218
+    </div><!-- /.modal -->
219
+
220
+
221
+
222
+
196 223
     <script>
224
+        //Export functionality begin///////////////////////////////////////////////////////////
225
+        
226
+        function selectRubricForCriteria(objective_id,outcome_id,program_id, typ_objective_id){
227
+            $.post(
228
+                "{{URL::action('AnnualPlansController@fetchTemplatesForCriteria')}}",
229
+                {
230
+                    objective_id:objective_id,
231
+                    outcome_id:outcome_id,
232
+                    program_id:program_id
233
+                },
234
+                function(templates){
235
+                    modal = '#modal-template-criteria';
236
+                    $(modal+'-body').html(' ');
237
+                    select = $('<select>', {
238
+                        'class':'selectpicker form-control',
239
+                        'data-live-search':'true',
240
+                        'id':'templateToExport'
241
+                    });
242
+
243
+                    options = "<option value ='0'>Nothing selected</option>";
244
+                    $.each(templates, function(ind, tem){
245
+                        options+= '<option value = "'+tem.id+'">'+tem.name+'</option>';
246
+                    });
247
+
248
+                    select.html(options);
249
+                    label = $("<label>", {
250
+                        'for':'templateToExport'
251
+                    }).html("Select a Rubric or Template");
252
+
253
+                    $(modal+'-body').append(label);
254
+                    $(modal+'-body').append(select);
255
+                    $(".selectpicker").selectpicker('refresh');
256
+                    $('#exportButton').attr('onclick', 'exportCriteriaFromTemplate('+typ_objective_id+', '+objective_id+', '+outcome_id+', '+program_id+')')
257
+                    $(modal).modal('show');
258
+                    
259
+
260
+                    
261
+                }
262
+            )
263
+        } 
264
+
265
+        function exportCriteriaFromTemplate(typ_objective_id, objective_id, outcome_id, program_id){
266
+
267
+            template_id = $('#templateToExport').val();
268
+            $.post(
269
+                "{{URL::action('AnnualPlansController@pairCriteriaFromTemplate')}}",
270
+                {
271
+                    typ_objective_id: typ_objective_id,
272
+                    template_id:template_id,
273
+                    outcome_id:outcome_id,
274
+                    program_id:program_id,
275
+                    objective_id:objective_id,
276
+                    annual_plan: $("#annual_plan").val()
277
+                },
278
+                function(result){
279
+                    if(result == 200){
280
+                        $('#modal-template-criteria').modal('hide');
281
+                        $('#allOutcomes').find('li.selected').trigger('click');
282
+                    }
283
+                }
284
+            )
285
+
286
+        }
287
+
288
+        //export function END
289
+        //
290
+        /////////////////////////////////////////////////////////////////////////////////////////////
291
+
197 292
         function nextChar(c) {
198 293
             return String.fromCharCode(c.charCodeAt(0) + 1);
199 294
         }
@@ -465,13 +560,17 @@
465 560
 
466 561
         }
467 562
 
563
+
468 564
         function fetchEverything(li) {
565
+            $('#allOutcomes').find('li').removeClass('selected');
469 566
             $('#close_button').click();
470 567
             var id = $(li).data('outcome-id');
471 568
             var name = $(li).data('outcome-name');
472 569
             var semester = $(li).data('semester-id');
473 570
             var annual_plan = $(li).data('annual-plan');
474 571
             var typ_semester_outcome_id = $(li).data('typ-semester-outcome-id');
572
+            var outcome_id = $(li).data('outcome-id');
573
+            $(li).addClass('selected');
475 574
             $('#expected-outcome').data('semester-id', semester);
476 575
             $('#typ_semester_outcome_id').val(typ_semester_outcome_id);
477 576
 
@@ -546,7 +645,7 @@
546 645
                             var criteriaHTML = '';
547 646
                             objectivesHTML += '<strong>' + nextLetter + '.    ' + objectives[objective]
548 647
                                 .text +
549
-                                '</strong></div>';
648
+                                '</strong></div><br><a onclick="selectRubricForCriteria('+objectives[objective].id+', '+outcome_id+','+{{ $program->id }}+', '+typ_objective_id+')">Select criteria from rubric</a>';
550 649
                             // courseshtml += "<strong>Objective "+nextLetter+"</strong>";
551 650
                             // courseshtml += '<ul>';
552 651
                             criteriaHTML += "<strong>Objective " + nextLetter + "</strong>";
@@ -930,6 +1029,7 @@
930 1029
                 'name': 'type_of_ta',
931 1030
                 'id': 'type_of_ta',
932 1031
                 'class': 'form-control selectpicker',
1032
+                'data-live-search':'true',
933 1033
                 'onchange': 'checkIfNew(this)'
934 1034
             }).html(GlobalTransCategories);
935 1035
 

+ 6
- 3
app/views/local/managers/shared/annual_report.blade.php Näytä tiedosto

@@ -21,7 +21,7 @@
21 21
 
22 22
     <div class="row">
23 23
         <div class="col-md-3">
24
-            <select class="form-control selectpicker" id="annual_plan" onchange="fetchInfo('annual_plan')">
24
+            <select class="form-control selectpicker" data-live-search="true" id="annual_plan" onchange="fetchInfo('annual_plan')">
25 25
                 <option value='0'> Nothing Selected</option>
26 26
                 @foreach ($annual_plans as $an_plan)
27 27
                     <option value={{ $an_plan->annual_id }}>Plan {{ $an_plan->academic_year }}</option>
@@ -571,6 +571,7 @@
571 571
                 'name': 'type_of_ta',
572 572
                 'id': 'type_of_ta_of_' + typ_semester_course_id,
573 573
                 'class': 'form-control selectpicker',
574
+                'data-live-search':'true',
574 575
                 'onchange': 'checkIfNew(this)'
575 576
             }).html(GlobalTransCategories);
576 577
 
@@ -599,7 +600,8 @@
599 600
             selectpicker_for_semesters = $('<select>', {
600 601
                 'name': 'selected_semesters_for_' + typ_semester_course_id + '_[]',
601 602
                 'id': 'selected_semester_first_for_' + typ_semester_course_id,
602
-                'class': 'form-control selectpicker'
603
+                'class': 'form-control selectpicker',
604
+                'data-live-search':'true',
603 605
             });
604 606
             options_for_semesters = '<option value = "0">Nothing Selected</option>';
605 607
 
@@ -902,7 +904,8 @@
902 904
             newselect = $('<select>', {
903 905
                 'name': 'selected_semesters_for_' + typ_semester_course_id + '_[]',
904 906
                 //'id':'selected_semester_first_for_'+typ_semester_course_id,
905
-                'class': 'form-control selectpicker'
907
+                'class': 'form-control selectpicker',
908
+                'data-live-search':'true',
906 909
             }).html(first_select_options);
907 910
 
908 911
             span_group = $("<span>", {

+ 11
- 11
app/views/local/managers/shared/course_edit.blade.php Näytä tiedosto

@@ -36,7 +36,7 @@
36 36
                     <!-- Program -->
37 37
                     <div class="form-group">
38 38
                         {{ Form::label('program', 'Program') }}
39
-                        <select id="program" name="program" class="form-control selectpicker">
39
+                        <select id="program" name="program" class="form-control selectpicker" data-live-search = 'true'>
40 40
                             
41 41
                             @foreach ($programs as $program)
42 42
                                 @if (Input::old('program') != $program->id)
@@ -52,7 +52,7 @@
52 52
 
53 53
                     <div class="form-group">
54 54
                         {{ Form::label('user_id', 'Professor') }}
55
-                        <select id="professor_id" name="professor_id" class="form-control selectpicker">
55
+                        <select id="professor_id" name="professor_id" class="form-control selectpicker" data-live-search = 'true'>
56 56
                              @foreach ($professors as $professor)
57 57
                                  @if (Input::old('professor_id') != $professor->id )
58 58
                                     <option value="{{$professor->id}}">{{ $professor->surnames }}, {{$professor->first_name}}
@@ -71,7 +71,7 @@
71 71
                     <div class ="form-group">
72 72
                         {{ Form::label("semester_id",'Semester')}}
73 73
 
74
-                        <select id ="semester_id" name="semester_id" class="form-control selectpicker">
74
+                        <select id ="semester_id" name="semester_id" class="form-control selectpicker" data-live-search = 'true'>
75 75
                             @foreach ($semesters as $semester)
76 76
                                 @if (Input::old('semester_id') != $semester->id)
77 77
                                     <option value="{{ $semester->id }}">{{ $semester->name }}</option>
@@ -86,7 +86,7 @@
86 86
                     <div class = "form-group">
87 87
                         {{Form::label('modality','Course Modality')}}
88 88
 
89
-                        <select id="modality" name = "modality" class= "form-control selectpicker">
89
+                        <select id="modality" name = "modality" class= "form-control selectpicker" data-live-search = 'true'>
90 90
                             @foreach($modalities as $modality)
91 91
                                 @if (Input::old('modality') != $modality)
92 92
                                     <option value="{{ $modality }}">{{ $modality }}</option>
@@ -152,7 +152,7 @@
152 152
                         <br>
153 153
                         <div class="form-group">
154 154
                             {{ Form::label('program_id2', 'Associated Program') }}
155
-                            <select id='select-program' class="form-control selectpicker"
155
+                            <select id='select-program' class="form-control selectpicker" data-live-search = 'true'
156 156
                             onchange='fetchCourses("#select-program", "#select-semester")'>
157 157
 
158 158
                                 @foreach ($programs as $program)
@@ -165,7 +165,7 @@
165 165
                         
166 166
                         <div class="form-group">
167 167
                             {{ Form::label('semester_assoc', 'Course Semester') }}
168
-                            <select id='select-semester' class="form-control selectpicker"
168
+                            <select id='select-semester' class="form-control selectpicker" data-live-search = 'true'
169 169
                                 onchange='fetchCourses("#select-program", "#select-semester")'>
170 170
 
171 171
                                 @foreach ($semesters as $semester)
@@ -180,7 +180,7 @@
180 180
                     <hr>
181 181
                     <div class = "form-group">
182 182
                         {{Form::label('select_course', "Course")}}
183
-                        <select id = "select-course" name = "select-course" class ='form-control selectpicker'
183
+                        <select id = "select-course" name = "select-course" class ='form-control selectpicker' data-live-search = 'true'
184 184
                         onchange = "fetchCourseInfo('#select-course')">
185 185
                             
186 186
 
@@ -210,7 +210,7 @@
210 210
                     <!-- Program -->
211 211
                     <div class="form-group">
212 212
                         {{ Form::label('program', 'Program') }}
213
-                        <select id="edit_program" name="program" class="form-control selectpicker">
213
+                        <select id="edit_program" name="program" class="form-control selectpicker" data-live-search = 'true'>
214 214
                             
215 215
                             @foreach ($programs as $program)
216 216
                                 @if (Input::old('program') != $program->id)
@@ -226,7 +226,7 @@
226 226
 
227 227
                     <div class="form-group">
228 228
                         {{ Form::label('user_id', 'Professor') }}
229
-                        <select id="edit_professor_id" name="professor_id" class="form-control selectpicker">
229
+                        <select id="edit_professor_id" name="professor_id" class="form-control selectpicker" data-live-search = 'true'>
230 230
                              @foreach ($professors as $professor)
231 231
                                  @if (Input::old('professor_id') != $professor->id )
232 232
                                     <option value="{{$professor->id}}">{{ $professor->surnames }}, {{$professor->first_name}}
@@ -245,7 +245,7 @@
245 245
                     <div class ="form-group">
246 246
                         {{ Form::label("semester_id",'Semester')}}
247 247
 
248
-                        <select id ="edit_semester_id" name="semester_id" class="form-control selectpicker">
248
+                        <select id ="edit_semester_id" name="semester_id" class="form-control selectpicker" data-live-search = 'true'>
249 249
                             @foreach ($semesters as $semester)
250 250
                                 @if (Input::old('semester_prof') != $semester->id)
251 251
                                     <option value="{{ $semester->id }}">{{ $semester->name }}</option>
@@ -259,7 +259,7 @@
259 259
                     <div class = "form-group">
260 260
                         {{Form::label('modality','Course Modality')}}
261 261
 
262
-                        <select id="edit_modality" name = "modality" class= "form-control selectpicker">
262
+                        <select id="edit_modality" name = "modality" class= "form-control selectpicker" data-live-search = 'true'>
263 263
                             @foreach($modalities as $modality)
264 264
                                 @if (Input::old('modality') != $modality)
265 265
                                     <option value="{{ $modality }}">{{ $modality }}</option>

+ 9
- 9
app/views/local/managers/shared/criteria.blade.php Näytä tiedosto

@@ -26,13 +26,13 @@
26 26
                             <div class="form-group col-md-12 selectOutcome">
27 27
                                 <label>Outcome 1</label>
28 28
 
29
-                                {{ Form::select('outcome[]', $outcomes, reset($outcomes), ['class' => 'form-control selectpicker', 'id' => 'outcome0', 'onchange' => 'fetchObjectiveForSelect("outcome0", "objectiveGroupFor0")']) }}
29
+                                {{ Form::select('outcome[]', $outcomes, reset($outcomes), ['class' => 'form-control selectpicker', 'id' => 'outcome0', 'onchange' => 'fetchObjectiveForSelect("outcome0", "objectiveGroupFor0")', 'data-live-search'=>'true']) }}
30 30
                             </div>
31 31
 
32 32
                             <div id='objectiveGroupFor0' class='createObjective' data-value='1'>
33 33
                                 <div class="form-group col-md-11 selectObjective">
34 34
                                     <label>Associated Objectives for Outcome 1</label>
35
-                                    <select id="objective_0_counter_1" name="objective[]" class="form-control selectpicker"
35
+                                    <select id="objective_0_counter_1" name="objective[]" class="form-control selectpicker" data-live-search = 'true'
36 36
                                         onchange="visiblePrograms('allOutcomes')">
37 37
                                     </select>
38 38
 
@@ -102,7 +102,7 @@
102 102
                     </div>
103 103
                     <div class="form-group form_validation number_of_scales">
104 104
                         {{ Form::label('scales', 'Number of Scales') }}
105
-                        <select id="Num_scale" name="scales" class="form-control selectpicker"
105
+                        <select id="Num_scale" name="scales" class="form-control selectpicker" data-live-search="true"
106 106
                             onchange='numberOfScales("Num_scale", "Scales")'>
107 107
 
108 108
                         </select>
@@ -144,7 +144,7 @@
144 144
                     <div class="filterSection">
145 145
                         <div class="form-group">
146 146
                             {{ Form::label('program_id2', 'Associated Program') }}
147
-                            <select id='select-program' class="form-control selectpicker"
147
+                            <select id='select-program' class="form-control selectpicker" data-live-search="true"
148 148
                                 onchange='fetchAllCriterion("select-program", "assoc_outcomes_fetch")'>
149 149
 
150 150
                                 @foreach ($programs as $program)
@@ -156,7 +156,7 @@
156 156
                         </div>
157 157
                         <div class="form-group">
158 158
                             <label>Associated Outcome</label>
159
-                            {{ Form::select('assoc_outcome_fetch', $outcomes, null, ['class' => 'form-control selectpicker', 'id' => 'assoc_outcomes_fetch', 'onchange' => 'fetchAllCriterion("select-program", "assoc_outcomes_fetch")']) }}
159
+                            {{ Form::select('assoc_outcome_fetch', $outcomes, null, ['class' => 'form-control selectpicker','data-live-search'=>'true', 'id' => 'assoc_outcomes_fetch', 'onchange' => 'fetchAllCriterion("select-program", "assoc_outcomes_fetch")']) }}
160 160
 
161 161
                         </div>
162 162
                     </div>
@@ -164,7 +164,7 @@
164 164
 
165 165
                     <div class="form-group">
166 166
                         {{ Form::label('criterion_id', 'Criterion') }}
167
-                        <select id="select-criterion" name="id" class="form-control selectpicker"
167
+                        <select id="select-criterion" name="id" class="form-control selectpicker" data-live-search="true"
168 168
                             onchange='fetchCriterionForEditing()'>
169 169
 
170 170
                         </select>
@@ -174,14 +174,14 @@
174 174
                         <div id='assocOutcomeGroup0' class='createOutcome' data-value="1">
175 175
                             <div class="form-group col-md-12 selectOutcome">
176 176
                                 <label>Outcome 1</label>
177
-                                {{ Form::select('outcome[]', $outcomes, null, ['class' => 'form-control selectpicker', 'id' => 'assoc_outcome_0', 'onchange' => 'fetchObjectiveForSelect("assoc_outcome_0", "assoc_objectiveGroupFor0")']) }}
177
+                                {{ Form::select('outcome[]', $outcomes, null, ['class' => 'form-control selectpicker', 'data-live-search'=>'true', 'id' => 'assoc_outcome_0', 'onchange' => 'fetchObjectiveForSelect("assoc_outcome_0", "assoc_objectiveGroupFor0")']) }}
178 178
 
179 179
                             </div>
180 180
                             <div id='assoc_objectiveGroupFor0' class='createObjective' data-value="1">
181 181
                                 <div class="form-group col-md-11 selectObjective">
182 182
                                     <label>Associated Objectives for Outcome 1</label>
183 183
                                     <select id="assoc_objective_0_counter_1" name="objective[]"
184
-                                        class="form-control selectpicker" onchange="visiblePrograms('allAssocOutcomes')">
184
+                                        class="form-control selectpicker" data-live-search="true" onchange="visiblePrograms('allAssocOutcomes')">
185 185
                                         <option value="0">No associated objectives</option>
186 186
                                     </select>
187 187
 
@@ -271,7 +271,7 @@
271 271
 
272 272
                     <div class="form-group form_validation number_of_scales">
273 273
                         {{ Form::label('scales', 'Number of Scales') }}
274
-                        <select id="Num_assoc_scale" class="form-control selectpicker"
274
+                        <select id="Num_assoc_scale" class="form-control selectpicker" data-live-search="true"
275 275
                             onchange='numberOfAssoc("Num_assoc_scale", "Assoc_Scales")'>
276 276
 
277 277
                         </select>

+ 6
- 5
app/views/local/managers/shared/objectives.blade.php Näytä tiedosto

@@ -29,7 +29,7 @@
29 29
                         <div class="form-group col-md-11" id='outcomeForm'>
30 30
 
31 31
 
32
-                            <select id="outcome[0]" name="outcome[0]" class="form-control selectpicker createOutcome">
32
+                            <select id="outcome[0]" name="outcome[0]" data-live-search = 'true' class="form-control selectpicker createOutcome">
33 33
 
34 34
                                 @foreach ($outcomes as $outcome)
35 35
                                     <option value="{{ $outcome->id }}">
@@ -119,7 +119,7 @@
119 119
 
120 120
                         <div class="form-group">
121 121
                             {{ Form::label('program_id2', 'Associated Program') }}
122
-                            <select id='select-program' class="form-control selectpicker"
122
+                            <select id='select-program' class="form-control selectpicker" data-live-search="true"
123 123
                                 onchange='fetchAllObjectives("select-program", "assoc_outcomes_fetch")'>
124 124
                                 @foreach ($programs as $program)
125 125
                                     <option value='{{ $program->id }}' data-subtext="{{ $program->code }}">
@@ -130,7 +130,7 @@
130 130
                         <div class="form-group">
131 131
                             <label>Associated Learning Outcome</label>
132 132
                             {{-- Form::select('assoc_outcome_fetch', $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcomes_fetch', 'onchange'=>'fetchAllObjectives("select-program", "assoc_outcomes_fetch")']) --}}
133
-                            <select id="assoc_outcomes_fetch" name="assoc_outcome_fetch" class="form-control selectpicker"
133
+                            <select id="assoc_outcomes_fetch" name="assoc_outcome_fetch" class="form-control selectpicker" data-live-search="true"
134 134
                                 onchange="fetchAllObjectives('select-program', 'assoc_outcomes_fetch')">
135 135
                                 @foreach ($outcomes as $outcome)
136 136
                                     <option value="{{ $outcome->id }}">
@@ -148,7 +148,7 @@
148 148
 
149 149
                     <div class="form-group">
150 150
                         {{ Form::label('objective_id', 'Objectives') }}
151
-                        <select id="select-objective" name='id' class="form-control selectpicker">
151
+                        <select id="select-objective" name='id' class="form-control selectpicker" data-live-search="true">
152 152
                             @foreach ($objectives as $objective)
153 153
                                 <option value="{{ $objective->id }}"
154 154
                                     data-subtext="
@@ -173,7 +173,7 @@
173 173
 
174 174
                             <div id="message_to_disconnect"></div>
175 175
 
176
-                            <select id="assoc_outcome0" name="assoc_outcome[]" class="form-control selectpicker">
176
+                            <select id="assoc_outcome0" name="assoc_outcome[]" class="form-control selectpicker" data-live-search="true">
177 177
 
178 178
                                 @foreach ($outcomes as $outcome)
179 179
                                     <option value="{{ $outcome->id }}">
@@ -365,6 +365,7 @@
365 365
         function addOutcomeTest() {
366 366
             var $select = $('<select/>', {
367 367
                 'class': "selectpicker form-control createOutcome",
368
+                
368 369
                 'name': "outcome[" + counter.toString() + "]",
369 370
                 'data-live-search': 'true'
370 371
 

+ 10
- 10
app/views/local/managers/shared/rubrics.blade.php Näytä tiedosto

@@ -71,7 +71,7 @@
71 71
                 <form>
72 72
                     <div class="form-group">
73 73
                         <label>Select a template, or create your own rubric</label>
74
-                        <select id="select-template" class="form-control selectpicker">
74
+                        <select id="select-template" class="form-control selectpicker" data-live-search='true'>
75 75
                             <option data-template-id="0">Custom</option>
76 76
                             @foreach ($templates as $template)
77 77
                                 @if($template->school_id==NULL &&  $template->program_id==NULL)
@@ -99,7 +99,7 @@
99 99
                     @if(Auth::user()->role==1)
100 100
                     <div class="form-group">
101 101
                         <label>Select the School this rubric will be visible from</label>
102
-                        <select id="select-school" class="form-control selectpicker">
102
+                        <select id="select-school" class="form-control selectpicker" data-live-search='true'>
103 103
                             <option data-school-id="0">All</option>
104 104
                             @foreach ($schools as $school)
105 105
                             <option data-school-id="{{ $school->id }}">
@@ -114,7 +114,7 @@
114 114
                     @if(Auth::user()->role==1 || Auth::user()->role==2 || Auth::user()->role ==3)
115 115
                     <div class="form-group">
116 116
                         <label>Select the Program this rubric belongs to</label>
117
-                        <select id="select-program" class="form-control selectpicker">
117
+                        <select id="select-program" class="form-control selectpicker" data-live-search='true'>
118 118
                             <option data-program-id="0">All</option>
119 119
                             @foreach ($programs as $program)
120 120
                                 <option
@@ -137,7 +137,7 @@
137 137
                     <div class="form-group">
138 138
                         <!-- Select percentage. If there is a rubric, select the saved value -->
139 139
 
140
-                        <select id="expected_percentage" class="form-control selectpicker">
140
+                        <select id="expected_percentage" class="form-control selectpicker" data-live-search='true'>
141 141
                             @for($i = 50; $i <= 100; $i++)
142 142
                                 @if($i==70)
143 143
                                     <option selected="selected" value="{{ $i }}">{{ $i }}</option>
@@ -152,7 +152,7 @@
152 152
 
153 153
                         
154 154
                         <!-- Select points. If there is a rubric, select the saved value -->
155
-                        <select id="expected_points" class="form-control selectpicker">
155
+                        <select id="expected_points" class="form-control selectpicker" data-live-search='true'>
156 156
                             @for($i = 0; $i <= 8; $i++)
157 157
                                 @if($i==5)
158 158
                                     <option selected="selected" value="{{ $i }}">{{ $i }}</option>
@@ -195,7 +195,7 @@
195 195
             <form>
196 196
                 <div class="form-group">
197 197
                     <label>Select a Learning Outcome</label>
198
-                    <select id="select-outcome" class="form-control selectpicker" >
198
+                    <select id="select-outcome" class="form-control selectpicker" data-live-search='true' >
199 199
                         @foreach ($outcomes as $outcome)
200 200
                         <option data-outcome-id="{{ $outcome->id }}">{{ $outcome->name }}</option>
201 201
                         @endforeach
@@ -203,14 +203,14 @@
203 203
                 </div>
204 204
                 <div class="form-group">
205 205
                     <label>Select an Objective</label>
206
-                    <select id="select-objective" class="form-control selectpicker" >
206
+                    <select id="select-objective" class="form-control selectpicker" data-live-search='true' >
207 207
                         
208 208
                     </select>
209 209
                 </div>
210 210
 
211 211
                     <div class="form-group">
212 212
                         <label>Select the Maximum Score</label>
213
-                    <select id="max_score" class="form-control selectpicker">
213
+                    <select id="max_score" class="form-control selectpicker" data-live-search='true'>
214 214
                         @for($i = 1; $i <= 100; $i++)
215 215
                             @if($i==8)
216 216
                                 <option selected="selected" value="{{ $i }}">{{ $i }}</option>
@@ -224,7 +224,7 @@
224 224
                 </div>
225 225
                 <div class="form-group">
226 226
                     <label>Select the Type of Rubric</label>
227
-                <select id="number_of_scales" class="form-control selectpicker" >
227
+                <select id="number_of_scales" class="form-control selectpicker" data-live-search='true' >
228 228
                     @for($i = 1; $i <= 20; $i++)
229 229
                     @if(8%$i == 0)
230 230
                     @if($i==1)
@@ -261,7 +261,7 @@
261 261
 
262 262
                 <div class="form-group">
263 263
                     <label>Select a Criterion</label><span id="updated-text" class="text-success small">  updated</span>
264
-                    <select id="select-criterion" class="form-control selectpicker">
264
+                    <select id="select-criterion" class="form-control selectpicker" data-live-search='true'>
265 265
                     </select>
266 266
                 </div>
267 267
 

+ 10
- 10
app/views/local/managers/shared/rubrics_new.blade.php Näytä tiedosto

@@ -73,7 +73,7 @@
73 73
                 <form>
74 74
                     <div class="form-group">
75 75
                         <label>Select a template, or create your own rubric</label>
76
-                        <select id="select-template" class="form-control selectpicker">
76
+                        <select id="select-template" class="form-control selectpicker" data-live-search='true' data-live-search='true'>
77 77
                             <option data-template-id="0">Custom</option>
78 78
                             @foreach ($templates_dentro as $template)
79 79
                                 @if($template->school_id==NULL &&  $template->program_id==NULL)
@@ -127,7 +127,7 @@
127 127
                     @if(Auth::user()->role==1)
128 128
                     <div class="form-group">
129 129
                         <label>Select the School this rubric will be visible from</label>
130
-                        <select id="select-school" class="form-control selectpicker">
130
+                        <select id="select-school" class="form-control selectpicker" data-live-search='true' data-live-search="true">
131 131
                             <option data-school-id="0">All</option>
132 132
                             @foreach ($schools as $school)
133 133
                             <option data-school-id="{{ $school->id }}">
@@ -142,7 +142,7 @@
142 142
                     @if(Auth::user()->role==1 || Auth::user()->role==2 || Auth::user()->role==3)
143 143
                     <div class="form-group">
144 144
                         <label>Select the Program this rubric belongs to</label>
145
-                        <select id="select-program" class="form-control selectpicker">
145
+                        <select id="select-program" class="form-control selectpicker" data-live-search='true'>
146 146
                             @if(Auth::user()->role != 3)
147 147
                             <option data-program-id="0">All</option>
148 148
                             @endif
@@ -167,7 +167,7 @@
167 167
                     <div class="form-group">
168 168
                         <!-- Select percentage. If there is a rubric, select the saved value -->
169 169
 
170
-                        <select id="expected_percentage" class="form-control selectpicker">
170
+                        <select id="expected_percentage" class="form-control selectpicker" data-live-search='true'>
171 171
                             @for($i = 50; $i <= 100; $i++)
172 172
                                 @if($i==70)
173 173
                                     <option selected="selected" value="{{ $i }}">{{ $i }}</option>
@@ -182,7 +182,7 @@
182 182
 
183 183
                         
184 184
                         <!-- Select points. If there is a rubric, select the saved value -->
185
-                        <select id="expected_points" class="form-control selectpicker">
185
+                        <select id="expected_points" class="form-control selectpicker" data-live-search='true'>
186 186
                             @for($i = 0; $i <= 8; $i++)
187 187
                                 @if($i==5)
188 188
                                     <option selected="selected" value="{{ $i }}">{{ $i }}</option>
@@ -225,7 +225,7 @@
225 225
             <form>
226 226
                 <div class="form-group">
227 227
                     <label>Select a Learning Outcome</label>
228
-                    <select id="select-outcome" class="form-control selectpicker" >
228
+                    <select id="select-outcome" class="form-control selectpicker" data-live-search='true' >
229 229
                         @foreach ($outcomes as $outcome)
230 230
                         <option data-outcome-id="{{ $outcome->id }}">{{ $outcome->name }}</option>
231 231
                         @endforeach
@@ -233,14 +233,14 @@
233 233
                 </div>
234 234
                 <div class="form-group">
235 235
                     <label>Select an Objective</label>
236
-                    <select id="select-objective" class="form-control selectpicker" >
236
+                    <select id="select-objective" class="form-control selectpicker" data-live-search='true' >
237 237
                         
238 238
                     </select>
239 239
                 </div>
240 240
 
241 241
                     <div class="form-group">
242 242
                         <label>Select the Maximum Score</label>
243
-                    <select id="max_score" class="form-control selectpicker">
243
+                    <select id="max_score" class="form-control selectpicker" data-live-search='true'>
244 244
                         @for($i = 1; $i <= 100; $i++)
245 245
                             @if($i==8)
246 246
                                 <option selected="selected" value="{{ $i }}">{{ $i }}</option>
@@ -254,7 +254,7 @@
254 254
                 </div>
255 255
                 <div class="form-group">
256 256
                     <label>Select the Type of Rubric</label>
257
-                <select id="number_of_scales" class="form-control selectpicker" >
257
+                <select id="number_of_scales" class="form-control selectpicker" data-live-search='true' >
258 258
                     @for($i = 1; $i <= 20; $i++)
259 259
                     @if(8%$i == 0)
260 260
                     @if($i==1)
@@ -291,7 +291,7 @@
291 291
 
292 292
                 <div class="form-group">
293 293
                     <label>Select a Criterion</label><span id="updated-text" class="text-success small">  updated</span>
294
-                    <select id="select-criterion" class="form-control selectpicker">
294
+                    <select id="select-criterion" class="form-control selectpicker" data-live-search='true'>
295 295
                     </select>
296 296
                 </div>
297 297
 

+ 1
- 1
app/views/local/managers/shared/view-annual-plans.blade.php Näytä tiedosto

@@ -23,7 +23,7 @@
23 23
         <div class="col-md-3" id="here">
24 24
 
25 25
 
26
-            <select class="form-control selectpicker" id="annual_plan" onchange="createAllTables('annual_plan')">
26
+            <select class="form-control selectpicker" data-live-search='true' id="annual_plan" onchange="createAllTables('annual_plan')">
27 27
                 <option value='0'> Nothing Selected</option>
28 28
                 @foreach ($annual_plans as $an_plan)
29 29
                     <option value={{ $an_plan->id }}>Plan {{ $an_plan->academic_year }}</option>

+ 3
- 3
app/views/local/managers/shared/view_formative.blade.php Näytä tiedosto

@@ -43,7 +43,7 @@
43 43
         <div class="category">
44 44
             <label for="school">School</label>
45 45
             <div class="select">
46
-                <select class="selectpicker" name="school" id="school">
46
+                <select class="selectpicker" data-live-search='true' name="school" id="school">
47 47
 
48 48
                     @foreach ($schools as $school)
49 49
                         <option value="{{ $school->id }}">{{ $school->name }}</option>
@@ -54,7 +54,7 @@
54 54
         <div class="category">
55 55
             <label for="program">Academic Program</label>
56 56
             <div class="select">
57
-                <select class="selectpicker" name="program" id="program">
57
+                <select class="selectpicker" data-live-search='true' name="program" id="program">
58 58
 
59 59
                     @foreach ($programs as $program)
60 60
                         <option value="{{ $program->id }}">{{ $program->name }}</option>
@@ -65,7 +65,7 @@
65 65
         <div class="category">
66 66
             <label for="semesters">Semester</label>
67 67
             <div class="select">
68
-                <select class="selectpicker" name="semesters" id="semesters">
68
+                <select class="selectpicker" data-live-search='true' name="semesters" id="semesters">
69 69
 
70 70
                     @foreach ($semesters as $semester)
71 71
                         <option value="{{ $semester->id }}">{{ $semester->name }}</option>

+ 2
- 1
app/views/local/professors/activity.blade.php Näytä tiedosto

@@ -79,7 +79,7 @@
79 79
                         {{ Form::label('select-activity-criterion', 'Criteria') }}
80 80
 
81 81
                         <select id='select-activity-criterion' name="trans_act[]" data-count="1"
82
-                            class="form-control selectpicker">
82
+                            class="form-control selectpicker" data-live-search='true'>
83 83
                             @foreach ($activity_criterion as $ac)
84 84
                                 <option value='{{ $ac->id }}' selected>{{ $ac->name }}</option>
85 85
                             @endforeach
@@ -293,6 +293,7 @@
293 293
             });
294 294
             var select = $('<select/>', {
295 295
                 'class': 'selectpicker',
296
+                'data-live-search':'true',
296 297
                 'name': 'trans_act[]',
297 298
 
298 299
             })

+ 2
- 2
app/views/local/professors/course.blade.php Näytä tiedosto

@@ -151,7 +151,7 @@
151 151
           
152 152
                              <label>Activity 1</label>
153 153
                               
154
-                              <select id='select-activity-1' data-count = "1" class="form-control selectpicker" >
154
+                              <select id='select-activity-1' data-count = "1" class="form-control selectpicker" data-live-search='true' >
155 155
                                   @foreach ($activities as $activity)
156 156
                                  @if($activity->is_assessed())
157 157
                                   <option value='{{$activity->id}}' >{{$activity->name}}</option>
@@ -161,7 +161,7 @@
161 161
                               <hr>
162 162
                               <label>Activity 2</label>
163 163
 
164
-                              <select id='select-activity-2' data-count = "1" class="form-control selectpicker" >
164
+                              <select id='select-activity-2' data-count = "1" class="form-control selectpicker" data-live-search='true' >
165 165
                                 @foreach ($activities as $activity)
166 166
                                 @if($activity->is_assessed())
167 167
                                 <option value='{{$activity->id}}' >{{$activity->name}}</option>

+ 2
- 2
app/views/local/professors/rubrics.blade.php Näytä tiedosto

@@ -50,10 +50,10 @@
50 50
       <div class="form-group">
51 51
         @if($activity->draft)
52 52
         <label>Select a Rubric:</label>
53
-        <select id="select-template" class="form-control selectpicker">
53
+        <select id="select-template" class="form-control selectpicker" data-live-search='true'>
54 54
         @else
55 55
         <label>Rubric (Assessment was published):</label>
56
-        <select id="select-template" class="form-control selectpicker" disabled>
56
+        <select id="select-template" class="form-control selectpicker" data-live-search='true' disabled>
57 57
         @endif
58 58
           @foreach ($templates as $template)
59 59
             @if(count($activity->rubric)!=0 && $template->name == Rubric::find($activity->rubric[0]->id)->name)