|
@@ -65,7 +65,7 @@
|
65
|
65
|
<tr>
|
66
|
66
|
<th>Objectives for courses</th>
|
67
|
67
|
<th>Criteria per Course</th>
|
68
|
|
- <th>Transformative Actions</th>
|
|
68
|
+ <th>Transformative Actions to be Implemented</th>
|
69
|
69
|
</tr>
|
70
|
70
|
</thead>
|
71
|
71
|
<tbody>
|
|
@@ -74,6 +74,18 @@
|
74
|
74
|
</table>
|
75
|
75
|
|
76
|
76
|
</div>
|
|
77
|
+ <hr>
|
|
78
|
+ <div id='transformative_actions_to_outcome'>
|
|
79
|
+
|
|
80
|
+ </div>
|
|
81
|
+ <hr>
|
|
82
|
+ <button class='btn btn-md btn-secondary button-add-objective'
|
|
83
|
+ onclick='addTransToPlan()'>
|
|
84
|
+ <span class='glyphicon glyphicon-plus'>
|
|
85
|
+
|
|
86
|
+ </span>
|
|
87
|
+ Add another Transformative Action
|
|
88
|
+ </button>
|
77
|
89
|
|
78
|
90
|
</div>
|
79
|
91
|
</div>
|
|
@@ -208,6 +220,7 @@
|
208
|
220
|
var name = $(li).data('outcome-name');
|
209
|
221
|
var semester = $(li).data('semester-id');
|
210
|
222
|
var annual_plan = $(li).data('annual-plan');
|
|
223
|
+ var typ_semester_outcome_id = $(li).data('typ-semester-outcome-id');
|
211
|
224
|
$('#expected-outcome').data('semester-id', semester);
|
212
|
225
|
|
213
|
226
|
|
|
@@ -216,7 +229,8 @@
|
216
|
229
|
$.post(
|
217
|
230
|
"../annual-plan-fetchTYP/{{ $program->id }}", {
|
218
|
231
|
id: id,
|
219
|
|
- semester: semester
|
|
232
|
+ semester: semester,
|
|
233
|
+ typ_semester_outcome_id: typ_semester_outcome_id,
|
220
|
234
|
},
|
221
|
235
|
|
222
|
236
|
function(json) {
|
|
@@ -505,12 +519,67 @@
|
505
|
519
|
}
|
506
|
520
|
table.draw();
|
507
|
521
|
|
|
522
|
+
|
|
523
|
+ //transformative actions in outcome
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
508
|
528
|
|
509
|
529
|
} else {
|
510
|
530
|
$('table').hide();
|
511
|
531
|
}
|
|
532
|
+ //transformative actions in outcome
|
|
533
|
+ if(!json.transformative_actions_for_outcome.length){
|
|
534
|
+ div_for_name = $('<div>',{
|
|
535
|
+ 'class':'form-group',
|
|
536
|
+
|
|
537
|
+ });
|
|
538
|
+ input_name = $('<input>', {
|
|
539
|
+ 'class':'form-control',
|
|
540
|
+
|
|
541
|
+ 'name':'at_text[]'
|
|
542
|
+ });
|
|
543
|
+ div_for_name.html("<label> Name</label>");
|
|
544
|
+ div_for_name.append(input_name);
|
|
545
|
+ $('#transformative_actions_to_outcome').append(div_for_name);
|
|
546
|
+
|
|
547
|
+ div_for_category=$('<div>',{
|
|
548
|
+ 'class':'form-group'
|
|
549
|
+ }).html('<label>Type of Transformative Action</label>');
|
|
550
|
+
|
|
551
|
+ select_for_category = $('<select>',{
|
|
552
|
+ 'name':'type_of_ta[]',
|
|
553
|
+ 'class':'form-control selectpicker',
|
|
554
|
+ 'onchange':'checkIfNew(this)'
|
|
555
|
+ }).html(json.categories);
|
|
556
|
+GlobalTransCategories = json.categories;
|
|
557
|
+ div_for_category.append(select_for_category);
|
|
558
|
+ $('#transformative_actions_to_outcome').append(div_for_category);
|
|
559
|
+ select_for_category.selectpicker('refresh');
|
|
560
|
+
|
512
|
561
|
|
513
|
562
|
|
|
563
|
+ div_description = $('<div>',{
|
|
564
|
+ 'class':'form-group',
|
|
565
|
+
|
|
566
|
+ }).html('<label> Description</label>');
|
|
567
|
+
|
|
568
|
+ textarea = $('<textarea>', {
|
|
569
|
+ 'class':'form-control',
|
|
570
|
+ 'name':'description[]',
|
|
571
|
+ 'rows':'10'
|
|
572
|
+ });
|
|
573
|
+
|
|
574
|
+ div_description.append(textarea);
|
|
575
|
+
|
|
576
|
+ $('#transformative_actions_to_outcome').append(div_description);
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+ }
|
|
582
|
+
|
514
|
583
|
|
515
|
584
|
|
516
|
585
|
|
|
@@ -524,6 +593,82 @@
|
524
|
593
|
|
525
|
594
|
}
|
526
|
595
|
|
|
596
|
+ GlobalTransCategories = '';
|
|
597
|
+
|
|
598
|
+function addTransToPlan(){
|
|
599
|
+ div_for_name = $('<div>',{
|
|
600
|
+ 'class':'form-group',
|
|
601
|
+
|
|
602
|
+ });
|
|
603
|
+ input_name = $('<input>', {
|
|
604
|
+ 'class':'form-control',
|
|
605
|
+
|
|
606
|
+ 'name':'at_text[]'
|
|
607
|
+ });
|
|
608
|
+ div_for_name.html("<label> Name</label>");
|
|
609
|
+ div_for_name.append(input_name);
|
|
610
|
+ $('#transformative_actions_to_outcome').append(div_for_name);
|
|
611
|
+
|
|
612
|
+ div_for_category=$('<div>',{
|
|
613
|
+ 'class':'form-group'
|
|
614
|
+ }).html('<label>Type of Transformative Action</label>');
|
|
615
|
+
|
|
616
|
+ select_for_category = $('<select>',{
|
|
617
|
+ 'name':'type_of_ta[]',
|
|
618
|
+ 'class':'form-control selectpicker',
|
|
619
|
+ 'onchange':'checkIfNew(this)'
|
|
620
|
+ }).html(GlobalTransCategories);
|
|
621
|
+
|
|
622
|
+ div_for_category.append(select_for_category);
|
|
623
|
+ $('#transformative_actions_to_outcome').append(div_for_category);
|
|
624
|
+ select_for_category.selectpicker('refresh');
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+ div_description = $('<div>',{
|
|
629
|
+ 'class':'form-group',
|
|
630
|
+
|
|
631
|
+ }).html('<label> Description</label>');
|
|
632
|
+
|
|
633
|
+ textarea = $('<textarea>', {
|
|
634
|
+ 'class':'form-control',
|
|
635
|
+ 'name':'description[]',
|
|
636
|
+ 'rows':'10'
|
|
637
|
+ });
|
|
638
|
+
|
|
639
|
+ div_description.append(textarea);
|
|
640
|
+
|
|
641
|
+ $('#transformative_actions_to_outcome').append(div_description);
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+ }
|
|
647
|
+
|
|
648
|
+ function checkIfNew(select){
|
|
649
|
+
|
|
650
|
+ if($(select).val()=="new"){
|
|
651
|
+ var new_div = $('<div/>',{
|
|
652
|
+ 'class':'form-group new_type'
|
|
653
|
+ }).html("<label>New Type </label>");
|
|
654
|
+
|
|
655
|
+ var input = $("<input/>", {
|
|
656
|
+ 'type': 'text',
|
|
657
|
+ 'name':"new_type",
|
|
658
|
+ 'class':'form-control'
|
|
659
|
+ });
|
|
660
|
+ new_div.append(input);
|
|
661
|
+
|
|
662
|
+ $(select).parent().parent().after(new_div)
|
|
663
|
+
|
|
664
|
+ }
|
|
665
|
+ else{
|
|
666
|
+ $(select).parent().parent().next('.new_type').remove();
|
|
667
|
+ }
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+}
|
|
671
|
+
|
527
|
672
|
function posttoTransAnnual(annual_id, selectTransId, typ_course_id) {
|
528
|
673
|
ta = $("#" + selectTransId).val();
|
529
|
674
|
old_ta = $("#" + selectTransId).data('old-TA');
|
|
@@ -697,6 +842,7 @@
|
697
|
842
|
'class': 'list-group',
|
698
|
843
|
'id': 'list'
|
699
|
844
|
});
|
|
845
|
+ if(json.outcomes.first){
|
700
|
846
|
header5 = $('<h5/>', {
|
701
|
847
|
'style': "padding-left: 10px"
|
702
|
848
|
}).html("First Semester");
|
|
@@ -705,13 +851,15 @@
|
705
|
851
|
for (outcome in json.outcomes.first) {
|
706
|
852
|
list +=
|
707
|
853
|
"<li style='padding-left: 25px' onclick = 'fetchEverything(this)' data-annual-plan = '" +
|
708
|
|
- json.annual_plans.id + "' data-semester-id = '" + json.allSemesterOrder.first.id +
|
|
854
|
+ json.annual_plans.id + "' data-typ-semester-outcome-id ='"+json.outcomes.first[outcome].typ_semester_outcome_id+"' data-semester-id = '" + json.allSemesterOrder.first.id +
|
709
|
855
|
"' data-outcome-id='" + json.outcomes.first[outcome].id + "' data-outcome-name ='" + json
|
710
|
856
|
.outcomes.first[outcome].name + "' class='list-group-item' >" + json.outcomes.first[outcome]
|
711
|
857
|
.name + " </li>";
|
712
|
858
|
|
713
|
859
|
}
|
714
|
860
|
div.append(list);
|
|
861
|
+ }
|
|
862
|
+ if(json.outcomes.second){
|
715
|
863
|
header4 = $('<h5/>', {
|
716
|
864
|
'style': "padding-left: 10px"
|
717
|
865
|
}).html("Second Semester");
|
|
@@ -720,13 +868,14 @@
|
720
|
868
|
for (outcome in json.outcomes.second) {
|
721
|
869
|
list +=
|
722
|
870
|
"<li style='padding-left: 25px' onclick = 'fetchEverything(this)' data-annual-plan = '" +
|
723
|
|
- json.annual_plans.id + "' data-semester-id = '" + json.allSemesterOrder.second.id +
|
|
871
|
+ json.annual_plans.id + "' data-typ-semester-outcome-id ='"+json.outcomes.second[outcome].typ_semester_outcome_id+"'data-semester-id = '" + json.allSemesterOrder.second.id +
|
724
|
872
|
"' data-outcome-id='" + json.outcomes.second[outcome].id + "' data-outcome-name ='" + json
|
725
|
873
|
.outcomes.second[outcome].name + "' class='list-group-item' >" + json.outcomes.second[
|
726
|
874
|
outcome].name + " </li>";
|
727
|
875
|
|
728
|
876
|
}
|
729
|
877
|
div.append(list);
|
|
878
|
+ }
|
730
|
879
|
html = div[0].innerHTML;
|
731
|
880
|
|
732
|
881
|
$("#allOutcomes").html(div[0].innerHTML);
|