|
@@ -528,13 +528,13 @@ function fetchCriteria(outcome, objective)
|
528
|
528
|
function(data)
|
529
|
529
|
{
|
530
|
530
|
$('#select-criterion').empty();
|
531
|
|
-
|
|
531
|
+ console.log(data);
|
532
|
532
|
// Append criteria
|
533
|
533
|
data.forEach( function (arrayItem)
|
534
|
534
|
{
|
535
|
535
|
objectives = JSON.stringify(arrayItem.objectives);
|
536
|
536
|
$('#select-criterion')
|
537
|
|
- .append('<option data-criterion-id="'+arrayItem.id+'" data-program-ids = "'+arrayItem.program_ids+'" data-assoc-objectives= '+"'"+objectives+"'"+'>'+arrayItem.name+'</option>');
|
|
537
|
+ .append('<option data-criterion-id="'+arrayItem.id+'" data-program-ids = '+"'"+arrayItem.program_ids+"'"+' data-assoc-objectives= '+"'"+objectives+"'"+'>'+arrayItem.name+'</option>');
|
538
|
538
|
});
|
539
|
539
|
|
540
|
540
|
// If there are no criteria assigned to the selected outcome, disable the
|
|
@@ -932,12 +932,15 @@ function loadTemplate()
|
932
|
932
|
|
933
|
933
|
// Set the contents of the rubric
|
934
|
934
|
var temp_criterion = data.criterion;
|
|
935
|
+ console.log(temp_criterion);
|
935
|
936
|
for(temp_c in temp_criterion){
|
936
|
937
|
current_criterion = temp_criterion[temp_c]
|
|
938
|
+ console.log(current_criterion.program_ids);
|
937
|
939
|
objectives = JSON.stringify(current_criterion.objectives);
|
938
|
|
-
|
939
|
|
- var str = '<tr data-assoc-objectives= '+"'"+objectives+"'"+' data-program_ids = "'+current_criterion.program_ids+'" data-criterion-name = "'+current_criterion.name+'" data-criterion-id="'+temp_criterion[temp_c].criterion_id+'" data-criterion-copyright="'+temp_criterion[temp_c].copyright+'" data-criterion-notes="'+temp_criterion[temp_c].notes+'" data-outcomes = "'+temp_criterion[temp_c].outcomes+'"><th><span class="glyphicon glyphicon-move"></span></th><td>';
|
940
|
|
-
|
|
940
|
+ //var str = '<tr data-assoc-objectives= '+"'"+objectives+"'"+' data-program_ids = "'+current_criterion.program_ids+'" data-criterion-name = "'+current_criterion.name+'" data-criterion-id="'+temp_criterion[temp_c].criterion_id+'" data-criterion-copyright="'+temp_criterion[temp_c].copyright+'" data-criterion-notes="'+temp_criterion[temp_c].notes+'" data-outcomes = "'+temp_criterion[temp_c].outcomes+'"><th><span class="glyphicon glyphicon-move"></span></th><td>';
|
|
941
|
+ var str = "<tr data-assoc-objectives= "+"'"+objectives+"'"+" data-program_ids = '"+current_criterion.program_ids+"' data-criterion-name = '"+current_criterion.name+"' data-criterion-id='"+temp_criterion[temp_c].criterion_id+"' data-criterion-copyright='"+temp_criterion[temp_c].copyright+"' data-criterion-notes='"+temp_criterion[temp_c].notes+"' data-outcomes = '"+temp_criterion[temp_c].outcomes+"'><th><span class='glyphicon glyphicon-move'></span></th><td>";
|
|
942
|
+ console.log(str);
|
|
943
|
+
|
941
|
944
|
var subcriteria ='';
|
942
|
945
|
if(current_criterion.subcriteria){
|
943
|
946
|
var subcriteria_array = JSON.parse(current_criterion.subcriteria);
|
|
@@ -967,6 +970,7 @@ function loadTemplate()
|
967
|
970
|
str+= '<td>'+current_criterion.outcomes+'</td>'
|
968
|
971
|
|
969
|
972
|
str+='<th><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></th></tr>';
|
|
973
|
+ console.log(str);
|
970
|
974
|
|
971
|
975
|
$('table tbody').append(str);
|
972
|
976
|
|
|
@@ -1412,7 +1416,7 @@ $('.save').on('click', function(e)
|
1412
|
1416
|
htmlString = '';
|
1413
|
1417
|
console.log($(this));
|
1414
|
1418
|
|
1415
|
|
- program_ids = $(this).data('program-ids')
|
|
1419
|
+ program_ids = $(this).data('program_ids')
|
1416
|
1420
|
if(!program_ids.includes(program_id) ){
|
1417
|
1421
|
title = "<h6>The following criteria and objectives will be matched with this program</h6>"
|
1418
|
1422
|
htmlString += "<ol style='list-style-position: inside'>"
|