|
@@ -52,11 +52,18 @@
|
52
|
52
|
</div>
|
53
|
53
|
|
54
|
54
|
<ul id="levelTabs" class="nav nav-tabs" role="tablist">
|
55
|
|
-
|
|
55
|
+ <li role = "presentation" id = 'transformative_for_outcome'>
|
|
56
|
+ <a data-toggle="tab" id="a_for_ta_outcome" href="#transformative_actions" role="tab" aria-expanded="true">Transformative Actions</a>
|
|
57
|
+ </li>
|
56
|
58
|
</ul>
|
57
|
59
|
<div id="allLists" class="tab-content">
|
|
60
|
+ <div role="tabpanel" class="tab-pane active" id="transformative_actions">
|
58
|
61
|
|
|
62
|
+ </div>
|
59
|
63
|
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
60
|
67
|
<!-- <div class="table-responsive">
|
61
|
68
|
<table class="table table-striped table-condensed datatable" style="table-layout: fixed ; width : 100%">
|
62
|
69
|
<thead><tr><th>Objectives for courses</th><th>Criteria per Course</th><th>Transformative Actions</th></tr></thead>
|
|
@@ -79,6 +86,44 @@
|
79
|
86
|
</div>
|
80
|
87
|
|
81
|
88
|
</div>
|
|
89
|
+ <div class="modal fade" id="modal-status-trans">
|
|
90
|
+ <div class="modal-dialog modal-lg">
|
|
91
|
+ <div class="modal-content">
|
|
92
|
+ <div class="modal-header">
|
|
93
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
94
|
+ aria-hidden="true">×</span></button>
|
|
95
|
+ <h3 class="modal-title"></h3>
|
|
96
|
+ </div>
|
|
97
|
+ <div class="modal-body">
|
|
98
|
+ <h5 id="was_it_implemented"> </h5>
|
|
99
|
+ <label class="radio-inline">
|
|
100
|
+ <input type="radio" name="implemented" value = "1">Yes</label>
|
|
101
|
+ <label class="radio-inline">
|
|
102
|
+ <input type="radio" name="implemented" value = "0">No</label>
|
|
103
|
+ <br>
|
|
104
|
+ <div id='useful_radio_div'>
|
|
105
|
+ <h5>Was this transformative action helpful to achieve the learning expectation?</h5>
|
|
106
|
+ <label class="radio-inline">
|
|
107
|
+ <input type="radio" name="useful" value = "1">Yes</label>
|
|
108
|
+ <label class="radio-inline">
|
|
109
|
+ <input type="radio" name="useful" value = "0">No</label>
|
|
110
|
+ </div>
|
|
111
|
+ <br>
|
|
112
|
+ <div id='comment_div'>
|
|
113
|
+ <label id="implement_textarea" for='comments'></label>
|
|
114
|
+ <textarea class="form-control" id='comments'>
|
|
115
|
+ </textarea>
|
|
116
|
+ </div>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+ </div>
|
|
121
|
+ <div class='modal-footer'>
|
|
122
|
+ <button type="button" class="btn btn-secondary" data-dismiss="modal" >Cancel</button>
|
|
123
|
+ <button type="button" class="btn btn-primary" id ="save_transformative_info" onclick ='saveTransReport()'>Save</button>
|
|
124
|
+ </div><!-- /.modal-content -->
|
|
125
|
+ </div><!-- /.modal-dialog -->
|
|
126
|
+ </div><!-- /.modal -->
|
82
|
127
|
<script>
|
83
|
128
|
function nextChar(c) {
|
84
|
129
|
return String.fromCharCode(c.charCodeAt(0) + 1);
|
|
@@ -89,7 +134,22 @@
|
89
|
134
|
// --------------------------------------------------------------------------
|
90
|
135
|
// Page load
|
91
|
136
|
// --------------------------------------------------------------------------
|
92
|
|
-
|
|
137
|
+ $('#comment_div').hide();
|
|
138
|
+ $('input[name="implemented"]').change(function(){
|
|
139
|
+ //was implemented
|
|
140
|
+ if(!parseInt($(this).val())){
|
|
141
|
+ $('#useful_radio_div').hide();
|
|
142
|
+ $('#comment_div').show();
|
|
143
|
+ $('#comments').val(' ');
|
|
144
|
+ $('#implement_textarea').html("Explain briefly why this transformative action was not implemented");
|
|
145
|
+ }
|
|
146
|
+ else{
|
|
147
|
+ $('#useful_radio_div').show();
|
|
148
|
+ $('#comment_div').show();
|
|
149
|
+ $('#implement_textarea').html("Explain briefly details about the implementation of this transformative action");
|
|
150
|
+
|
|
151
|
+ }
|
|
152
|
+ })
|
93
|
153
|
// Hide accordion panel contents by default
|
94
|
154
|
$('.panel-group .panel-body').hide();
|
95
|
155
|
|
|
@@ -109,6 +169,67 @@
|
109
|
169
|
|
110
|
170
|
// Create everything
|
111
|
171
|
|
|
172
|
+ function draw_transformative_actions(transforming_actions, semester_id){
|
|
173
|
+ if(!transforming_actions.length){
|
|
174
|
+ $("#transformative_for_outcome").hide();
|
|
175
|
+ }
|
|
176
|
+ else{
|
|
177
|
+ $('#levelTabs').prepend('<li role = "presentation" id = "transformative_for_outcome">'+
|
|
178
|
+ '<a data-toggle="tab" id="a_for_ta_outcome" href="#transformative_actions" role="tab" >Transformative Actions</a>'+
|
|
179
|
+ '</li>');
|
|
180
|
+ $('#allLists').prepend('<div role="tabpanel" class="tab-pane" id="transformative_actions"></div>');
|
|
181
|
+
|
|
182
|
+ $('#transformative_actions').html('<h3>Tranformative actions for Learning Outcome')
|
|
183
|
+ $.each(transforming_actions, function(index, trans_action){
|
|
184
|
+ div = $("<div>", {
|
|
185
|
+ 'id':'div_trans_id_'+trans_action.trans_id
|
|
186
|
+ }).html('<p><strong>'+(index+1)+'. '+trans_action.at_text+': </strong>'+trans_action.description+'</p>'+
|
|
187
|
+ '<p><strong>Category: </strong> '+trans_action.type_of_TA+'</p>');
|
|
188
|
+ div.append('<label>Results: </label>')
|
|
189
|
+ input_results = $("<textarea>", {
|
|
190
|
+ 'class':'form-control',
|
|
191
|
+ 'id':'results_for_'+trans_action.trans_id
|
|
192
|
+ });
|
|
193
|
+ div.append(input_results)
|
|
194
|
+
|
|
195
|
+ div.append('<h5>Was this transformative action helpful to achieve the learning expectation?</h5>'+
|
|
196
|
+ '<label class="radio-inline">'+
|
|
197
|
+ '<input type="radio" name="useful_for_'+trans_action.trans_id+'" value = "1">Yes</label>'+
|
|
198
|
+ '<label class="radio-inline">'+
|
|
199
|
+ '<input type="radio" name="useful_for_'+trans_action.trans_id+'" value = "0">No</label>');
|
|
200
|
+ comments = $('<textarea>',{
|
|
201
|
+ 'id':'comments_for_'+trans_action.trans_id,
|
|
202
|
+ 'class':'form-control'
|
|
203
|
+ });
|
|
204
|
+ div.append('<br><label>Explain briefly details about the implementation</label>');
|
|
205
|
+ div.append(comments);
|
|
206
|
+
|
|
207
|
+ button = $('<button>',{
|
|
208
|
+ "type":"button",
|
|
209
|
+ "class":"btn btn-primary",
|
|
210
|
+ "onclick":'saveTransReport('+trans_action.trans_id+', '+semester_id+')',
|
|
211
|
+ 'style':'float: right'
|
|
212
|
+
|
|
213
|
+ }).html('Save');
|
|
214
|
+ div.append('<br>');
|
|
215
|
+ div.append(button);
|
|
216
|
+ div.append('<br>');
|
|
217
|
+ div.append('<hr>');
|
|
218
|
+
|
|
219
|
+ $('#transformative_actions').append(div);
|
|
220
|
+
|
|
221
|
+ $('#results_for_'+trans_action.trans_id).val(trans_action.results);
|
|
222
|
+ $('#comments_for_'+trans_action.trans_id).val(trans_action.comments);
|
|
223
|
+ $('input[name="useful_for_'+trans_action.trans_id+'"][value="'+trans_action.it_was_useful + '"]').prop('checked', true);
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+ })
|
|
230
|
+ }
|
|
231
|
+ }
|
|
232
|
+
|
112
|
233
|
function fetchEverything(li) {
|
113
|
234
|
var outcome_id = $(li).data('outcome-id');
|
114
|
235
|
var name = $(li).data('outcome-name');
|
|
@@ -164,13 +285,16 @@
|
164
|
285
|
'<th>Percentage</th>' +
|
165
|
286
|
'<th>Outcome Achieved</th>' +
|
166
|
287
|
'</tr></thead><tbody></tbody>');
|
|
288
|
+ first_objective_id = outcome.objectives[0].id;
|
167
|
289
|
$.each(outcome.objectives, function(index, objective) {
|
168
|
290
|
|
169
|
291
|
li = $('<li/>', {
|
170
|
|
- 'role': 'presentation'
|
|
292
|
+ 'role': 'presentation',
|
|
293
|
+ 'id':'li_for_'+objective.id
|
171
|
294
|
});
|
172
|
295
|
a = $('<a/>', {
|
173
|
296
|
'data-toggle': 'tab',
|
|
297
|
+ 'id': 'a_for_'+objective.id,
|
174
|
298
|
'href': '#' + objective.id,
|
175
|
299
|
'role': 'tab'
|
176
|
300
|
}).html('Objective ' + (index + 1));
|
|
@@ -188,6 +312,12 @@
|
188
|
312
|
|
189
|
313
|
div.appendTo($('#allLists'))
|
190
|
314
|
|
|
315
|
+ div.append(
|
|
316
|
+ '<p>The following results are from the courses in the selected semester with the focused criteria in the selected annual plan</p>'
|
|
317
|
+ );
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
191
|
321
|
|
192
|
322
|
if (objective.courses) {
|
193
|
323
|
$.each(objective.courses, function(index, course_code) {
|
|
@@ -212,9 +342,9 @@
|
212
|
342
|
.criteria_achieved;
|
213
|
343
|
|
214
|
344
|
});
|
215
|
|
- div.append(
|
|
345
|
+ /*div.append(
|
216
|
346
|
'<p>The following results are from the courses in the selected semester with the focused criteria in the selected annual plan</p>'
|
217
|
|
- );
|
|
347
|
+ );*/
|
218
|
348
|
table = $('<table/>', {
|
219
|
349
|
'class': 'table table-striped table-condensed datatable'
|
220
|
350
|
}).html('<thead><th>Criterion</th><th>' +
|
|
@@ -234,27 +364,50 @@
|
234
|
364
|
tbody.append(tr);
|
235
|
365
|
});
|
236
|
366
|
table.append(tbody);
|
237
|
|
- Course_and_transformative = '<h3>' + course_code.code + ' ' +
|
|
367
|
+ Course_section = '<h3>' + course_code.code + ' ' +
|
238
|
368
|
course_code.number + '</h3><hr>';
|
|
369
|
+
|
|
370
|
+ div.append(Course_section)
|
|
371
|
+ div.append('<h4> Criteria Assessed in '+course_code.code+' '+course_code.number+'</h4>')
|
|
372
|
+ div.append(table);
|
239
|
373
|
if (course_code.transforming_actions.length) {
|
240
|
|
- Course_and_transformative +=
|
241
|
|
- '<h5> This course was tied to the following transformative actions</h5>';
|
242
|
|
- Course_and_transformative += '<ol>';
|
|
374
|
+ table_for_transformative_actions = $('<table>',{
|
|
375
|
+ 'class': 'table table-striped table-condensed datatable'
|
|
376
|
+ }).html('<thead><th>Transformative Actions Proposed in Annual Plan</th>' +
|
|
377
|
+ '<th>Follow up </th>' +
|
|
378
|
+ '</thead>'
|
|
379
|
+ );
|
|
380
|
+ tbody_for_transformative_actions = $('<tbody>');
|
|
381
|
+
|
243
|
382
|
$.each(course_code.transforming_actions, function(index,
|
244
|
383
|
transformative_action) {
|
245
|
|
- Course_and_transformative += '<li><p><strong>' +
|
246
|
|
- transformative_action.at_text +
|
247
|
|
- '</strong>: ' + transformative_action
|
248
|
|
- .description + '</p></li>'
|
|
384
|
+
|
|
385
|
+ button_for_followup = $('<button>',{
|
|
386
|
+ 'class':'btn btn-secondary',
|
|
387
|
+ 'onclick':'give_follow_up_questions('+transformative_action.id+', "'+outcome.semester_info.code+'", '+outcome.semester_info.id+')'
|
|
388
|
+ }).html('Follow Up Questions');
|
|
389
|
+ table_row = "<tr>"+
|
|
390
|
+ '<td><p><strong>'+transformative_action.at_text +': </strong>'+
|
|
391
|
+ transformative_action.description+'</p></td>'+
|
|
392
|
+ '<td>'+button_for_followup.prop('outerHTML')+'</td></tr>';
|
|
393
|
+
|
|
394
|
+ tbody_for_transformative_actions.append(table_row)
|
|
395
|
+
|
|
396
|
+
|
249
|
397
|
})
|
|
398
|
+ table_for_transformative_actions.append(tbody_for_transformative_actions);
|
|
399
|
+ div.append('<hr><h4>Transformative actions for '+course_code.code+' '+course_code.number+'</h4>')
|
|
400
|
+ div.append(table_for_transformative_actions);
|
|
401
|
+ //table_for_transformative_actions.DataTable();
|
250
|
402
|
}
|
251
|
403
|
|
252
|
|
- div.append(Course_and_transformative)
|
253
|
|
- div.append(table);
|
|
404
|
+
|
254
|
405
|
table.DataTable();
|
255
|
406
|
|
256
|
407
|
|
257
|
408
|
}
|
|
409
|
+
|
|
410
|
+
|
258
|
411
|
|
259
|
412
|
|
260
|
413
|
})
|
|
@@ -270,6 +423,9 @@
|
270
|
423
|
|
271
|
424
|
|
272
|
425
|
})
|
|
426
|
+
|
|
427
|
+ draw_transformative_actions(outcome.transforming_actions, outcome.semester_info.id)
|
|
428
|
+ //$('#a_for_'+first_objective_id).click();
|
273
|
429
|
theArray = [];
|
274
|
430
|
|
275
|
431
|
$('#tableOutcome').html(tableStudent);
|
|
@@ -328,6 +484,10 @@
|
328
|
484
|
|
329
|
485
|
|
330
|
486
|
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
331
|
491
|
/* table.row.add([
|
332
|
492
|
objectivesHTML,
|
333
|
493
|
courseshtml,
|
|
@@ -355,6 +515,87 @@
|
355
|
515
|
|
356
|
516
|
}
|
357
|
517
|
|
|
518
|
+ function give_follow_up_questions(trans_id, semester_code, semester_id){
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+ $.ajax({
|
|
522
|
+ type: 'POST',
|
|
523
|
+ url: "{{ URL::action('TransformativeActionsController@fetchStatus') }}",
|
|
524
|
+ data: {
|
|
525
|
+ trans_id:trans_id,
|
|
526
|
+ semester_id:semester_id
|
|
527
|
+ },
|
|
528
|
+ success: function(transformative_action_with_status) {
|
|
529
|
+ transformative_action = transformative_action_with_status[0];
|
|
530
|
+
|
|
531
|
+ $('.modal-title').html('<strong>'+transformative_action.at_text+'</strong>: '+transformative_action.description);
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+ $('input[name="implemented"]').prop('checked',false);
|
|
535
|
+ $('input[name="useful"]').prop('checked',false);
|
|
536
|
+ $('#comments').val(' ');
|
|
537
|
+ $('#useful_radio_div').hide();
|
|
538
|
+ $('#comment_div').hide();
|
|
539
|
+
|
|
540
|
+ if(transformative_action['status']){
|
|
541
|
+ transformative_action['status'].accomplished;
|
|
542
|
+ $('input[name="implemented"][value="'+ transformative_action['status'].accomplished + '"]').prop('checked', true);
|
|
543
|
+ if(transformative_action['status'].accomplished){
|
|
544
|
+ $('#useful_radio_div').show();
|
|
545
|
+ $('input[name="useful"][value="'+ transformative_action['status'].it_was_useful + '"]').prop('checked', true);
|
|
546
|
+ }
|
|
547
|
+ $('#comment_div').show();
|
|
548
|
+ $('#comments').val(transformative_action['status'].comments);
|
|
549
|
+
|
|
550
|
+ }
|
|
551
|
+
|
|
552
|
+ $('#was_it_implemented').html('Was this transformative action implemented during Semester '+semester_code);
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+ $('#modal-status-trans').modal();
|
|
557
|
+ $('#save_transformative_info').attr('onclick', 'saveTransReport('+trans_id+','+semester_id+',"modal")');
|
|
558
|
+
|
|
559
|
+ },
|
|
560
|
+ async: true
|
|
561
|
+ });
|
|
562
|
+
|
|
563
|
+ }
|
|
564
|
+
|
|
565
|
+ function saveTransReport(trans_id, semester_id, type_of_input){
|
|
566
|
+ if(type_of_input=='modal'){
|
|
567
|
+ comments = $('#comments').val();
|
|
568
|
+ accomplished = parseInt($('input[name="implemented"]:checked').val());
|
|
569
|
+ if(accomplished)
|
|
570
|
+ was_it_useful = $('input[name="useful"]:checked').val();
|
|
571
|
+ else was_it_useful =0;
|
|
572
|
+ results = "";
|
|
573
|
+ }
|
|
574
|
+ else{
|
|
575
|
+ comments = $('#comments_for_'+trans_id).val();
|
|
576
|
+ accomplished = 1;
|
|
577
|
+ was_it_useful = $('input[name="useful_for_'+trans_id+'"]:checked').val();
|
|
578
|
+ results = $('#results_for_'+trans_id).val();
|
|
579
|
+ }
|
|
580
|
+
|
|
581
|
+ $.post(
|
|
582
|
+ "{{URL::action('TransformativeActionsController@saveTransStatus')}}",
|
|
583
|
+ {
|
|
584
|
+ semester_id:semester_id,
|
|
585
|
+ trans_id:trans_id,
|
|
586
|
+ results:results,
|
|
587
|
+ comments:comments,
|
|
588
|
+ accomplished:accomplished,
|
|
589
|
+ was_it_useful:was_it_useful,
|
|
590
|
+ },
|
|
591
|
+ function(message){
|
|
592
|
+ alert(message);
|
|
593
|
+ }
|
|
594
|
+ )
|
|
595
|
+ }
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
358
|
599
|
function posttoTransAnnual(annual_id, selectTransId, typ_course_id) {
|
359
|
600
|
ta = $("#" + selectTransId).val();
|
360
|
601
|
old_ta = $("#" + selectTransId).data('old-TA');
|