Skip to content

Commit b9afde7

Browse files
Fixing final CI checks (#673)
* fix grunt amd. * fix behat. * Fix lang file. * Full CI checks. * Taking out of beta. --------- Co-authored-by: Luca Bösch <luca.boesch@bfh.ch>
1 parent 1557919 commit b9afde7

File tree

7 files changed

+113
-101
lines changed

7 files changed

+113
-101
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ jobs:
8484

8585
- name: Moodle Code Checker
8686
if: ${{ always() }}
87-
# run: moodle-plugin-ci phpcs --max-warnings 0
88-
run: moodle-plugin-ci phpcs
87+
run: moodle-plugin-ci phpcs --max-warnings 0
8988

9089
- name: Moodle PHPDoc Checker
9190
if: ${{ always() }}
@@ -105,14 +104,12 @@ jobs:
105104

106105
- name: Grunt
107106
if: ${{ always() }}
108-
# run: moodle-plugin-ci grunt --max-warnings 0
109-
run: moodle-plugin-ci grunt
107+
run: moodle-plugin-ci grunt --max-lint-warnings 0
110108

111109
- name: PHPUnit tests
112110
if: ${{ always() }}
113111
run: moodle-plugin-ci phpunit --fail-on-warning
114112

115113
- name: Behat features
116114
if: ${{ always() }}
117-
# run: moodle-plugin-ci behat --profile chrome --scss-deprecations
118-
run: moodle-plugin-ci behat --profile chrome
115+
run: moodle-plugin-ci behat --profile chrome --scss-deprecations

amd/build/table_sort.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/table_sort.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,39 @@ define(['jquery'], function($) {
5252
$(this).addClass('asc').removeClass('desc');
5353
}
5454
var arrData = $(this).closest('table').find('tbody >tr:has(td.cell)').get();
55-
arrData.sort(function (a, b) {
55+
arrData.sort(function(a, b) {
5656
var val1 = $(a).children('td').eq(col).text();
5757
var val2 = $(b).children('td').eq(col).text();
5858
// Regex to check for date sorting.
5959
var dateregx = /^\d{2}.*\d{4},/;
6060
if (dateregx.test(val1) && dateregx.test(val2)) {
6161
val1 = new Date(val1);
6262
val2 = new Date(val2);
63-
return (val1 < val2) ? -sortOrder : (val1 > val2) ? sortOrder : 0;
63+
if (val1 < val2) {
64+
return -sortOrder;
65+
} else if (val1 > val2) {
66+
return sortOrder;
67+
} else {
68+
return 0;
69+
}
6470
} else if ($.isNumeric(val1) && $.isNumeric(val2)) {
6571
return sortOrder == 1 ? val1 - val2 : val2 - val1;
6672
} else {
67-
return (val1 < val2) ? -sortOrder : (val1 > val2) ? sortOrder : 0;
73+
if (val1 < val2) {
74+
return -sortOrder;
75+
} else if (val1 > val2) {
76+
return sortOrder;
77+
} else {
78+
return 0;
79+
}
6880
}
6981
});
7082
/* Append the sorted rows to tbody*/
71-
$.each(arrData, function (index, row) {
83+
$.each(arrData, function(index, row) {
7284
var tableid = $('#' + id + ' tbody');
7385
tableid.append(row);
7486
});
7587
},
7688
};
7789
return t;
78-
});
90+
});

classes/output/renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function print_preview_formend($url, $submitstr, $resetstr) {
385385
$output .= \html_writer::empty_tag('input', ['type' => 'submit', 'name' => 'submit', 'value' => $submitstr,
386386
'class' => 'btn btn-primary']);
387387
$output .= ' ';
388-
$output .= \html_writer::tag('a', $resetstr, ['href' => $url, 'class' => 'btn btn-secondary mr-1']);
388+
$output .= \html_writer::tag('a', $resetstr, ['href' => $url, 'class' => 'btn btn-secondary me-1']);
389389
$output .= \html_writer::end_tag('div') . "\n";
390390
$output .= \html_writer::end_tag('form') . "\n";
391391
return $output;

0 commit comments

Comments
 (0)