|
@@ -156,7 +156,7 @@
|
156
|
156
|
onchange='fetchCriterionForEditing()'>
|
157
|
157
|
@foreach ($criteria as $criterion)
|
158
|
158
|
<option value="{{ $criterion->id }}" data-subtext="
|
159
|
|
- @if ($criterion->program)
|
|
159
|
+ @if ($criterion->program)
|
160
|
160
|
[{{ $criterion->program->name }}]
|
161
|
161
|
@endif
|
162
|
162
|
">
|
|
@@ -1339,7 +1339,7 @@
|
1339
|
1339
|
$("#update_the_criterion_button").val("Create New")
|
1340
|
1340
|
$("#update_criterion").attr('action', "{{ URL::action('CriteriaController@create') }}")
|
1341
|
1341
|
$('#alert_placeholder').html(
|
1342
|
|
- '<div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <strong>Warning!</strong> The criterion is already used in assessments. Editting the criterion will actually create a new criterion </div>'
|
|
1342
|
+ '<div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <strong>Warning!</strong> If a criterion is already used in assessments, editting it will actually create a new one </div>'
|
1343
|
1343
|
);
|
1344
|
1344
|
|
1345
|
1345
|
|
|
@@ -1520,50 +1520,50 @@
|
1520
|
1520
|
|
1521
|
1521
|
|
1522
|
1522
|
/*
|
1523
|
|
- assocOutcomeCounter = 0;
|
1524
|
|
- var i = 0;
|
1525
|
|
- optionName = '<option value ="0">Nothing Selected</option>';
|
1526
|
|
- for(outcome in json.outcomes_assoc){
|
1527
|
|
- optionName += '<optgroup label="' + json.outcomes_assoc[outcome][0].name + '">';
|
1528
|
|
- var objectiveForOutcome = json.objectives_assoc;
|
1529
|
|
- var objectives = objectiveForOutcome[outcome];
|
1530
|
|
- for (objective in objectives) {
|
1531
|
|
-
|
1532
|
|
-
|
1533
|
|
- var obj= objectives[objective];
|
1534
|
|
- var option = '<option value ="' + obj.id + '">' +obj.text + '</option>';
|
1535
|
|
- optionName += (option);
|
|
1523
|
+ assocOutcomeCounter = 0;
|
|
1524
|
+ var i = 0;
|
|
1525
|
+ optionName = '<option value ="0">Nothing Selected</option>';
|
|
1526
|
+ for(outcome in json.outcomes_assoc){
|
|
1527
|
+ optionName += '<optgroup label="' + json.outcomes_assoc[outcome][0].name + '">';
|
|
1528
|
+ var objectiveForOutcome = json.objectives_assoc;
|
|
1529
|
+ var objectives = objectiveForOutcome[outcome];
|
|
1530
|
+ for (objective in objectives) {
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+ var obj= objectives[objective];
|
|
1534
|
+ var option = '<option value ="' + obj.id + '">' +obj.text + '</option>';
|
|
1535
|
+ optionName += (option);
|
|
1536
|
+ }
|
|
1537
|
+ optionName += "</optgroup>";
|
1536
|
1538
|
}
|
1537
|
|
- optionName += "</optgroup>";
|
1538
|
|
- }
|
1539
|
1539
|
|
1540
|
1540
|
|
1541
|
|
- $('#assoc_objective_0').html(optionName);
|
1542
|
|
- $('#assoc_objective_0').selectpicker('refresh');
|
1543
|
|
-
|
|
1541
|
+ $('#assoc_objective_0').html(optionName);
|
|
1542
|
+ $('#assoc_objective_0').selectpicker('refresh');
|
|
1543
|
+
|
1544
|
1544
|
|
1545
|
1545
|
|
1546
|
1546
|
|
1547
|
|
- try {
|
1548
|
|
- $('#assoc_objective_0').val(json.objectives[0].id);
|
1549
|
|
- $('#assoc_objective_0').selectpicker('refresh');
|
1550
|
|
- } catch (err) {
|
1551
|
|
- if (!json.objectives.length) {
|
1552
|
|
- $('#assoc_objective_0').val(0);
|
|
1547
|
+ try {
|
|
1548
|
+ $('#assoc_objective_0').val(json.objectives[0].id);
|
1553
|
1549
|
$('#assoc_objective_0').selectpicker('refresh');
|
|
1550
|
+ } catch (err) {
|
|
1551
|
+ if (!json.objectives.length) {
|
|
1552
|
+ $('#assoc_objective_0').val(0);
|
|
1553
|
+ $('#assoc_objective_0').selectpicker('refresh');
|
|
1554
|
+ }
|
|
1555
|
+
|
1554
|
1556
|
}
|
1555
|
|
-
|
1556
|
|
- }
|
1557
|
1557
|
|
1558
|
|
- for (var i = 1; i < json.objectives.length; i++) {
|
1559
|
|
- addAssocObjective();
|
1560
|
|
- $('#assoc_objective_' + i.toString()).val(json.objectives[i].id);
|
1561
|
|
- $('#assoc_objective_' + i.toString()).selectpicker('refresh');
|
1562
|
|
- }
|
1563
|
|
- $('assoc_objectiveGroup').data('value',json.objectives.length);
|
|
1558
|
+ for (var i = 1; i < json.objectives.length; i++) {
|
|
1559
|
+ addAssocObjective();
|
|
1560
|
+ $('#assoc_objective_' + i.toString()).val(json.objectives[i].id);
|
|
1561
|
+ $('#assoc_objective_' + i.toString()).selectpicker('refresh');
|
|
1562
|
+ }
|
|
1563
|
+ $('assoc_objectiveGroup').data('value',json.objectives.length);
|
1564
|
1564
|
|
1565
|
1565
|
|
1566
|
|
- */
|
|
1566
|
+ */
|
1567
|
1567
|
|
1568
|
1568
|
|
1569
|
1569
|
|