Skip to content

Commit

Permalink
Fix cime and unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Nguyen committed Aug 28, 2024
1 parent 2713656 commit 5f49ecb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion grade/penalty/duedate/lang/en/gradepenalty_duedate.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
$string['error_penalty_abovevalue'] = 'The penalty must be greater than the value of above rule: {$a}%.';
$string['error_penalty_maxvalue'] = 'The penalty cannot be greater than {$a}%.';
$string['error_penalty_minvalue'] = 'The penalty must be greater than or equal to {$a}%.';
$string['error_penalty_minvalue'] = 'The penalty must be greater than or equal to {$a}%.';
$string['existingrule'] = 'Existing rules';
$string['finalpenaltyrule'] = 'Final penalty rule';
$string['finalpenaltyrule_help'] = 'The penalty system uses the first matching rule found. If no rules match, the final rule is applied.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"title": "Penalty rule",
"editbutton": {
"id": "single_button12345",
"id": "single_button123",
"method" : "get",
"classes": "singlebutton",
"formid": null,
Expand All @@ -31,7 +31,7 @@
"attributes": []
},
"resetbutton": {
"id": "single_button12345",
"id": "single_button456",
"method" : "get",
"classes": "singlebutton",
"formid": null,
Expand Down
4 changes: 4 additions & 0 deletions grade/penalty/duedate/tests/penalty_test_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ abstract class penalty_test_base extends advanced_testcase {
*/
public function create_sample_rules(int $contextid = 1): void {
global $DB;

// Remove initial rule.
$DB->delete_records('gradepenalty_duedate_rule', ['contextid' => $contextid]);

$rules = [
['contextid' => $contextid, 'overdueby' => DAYSECS, 'penalty' => 10, 'sortorder' => 0],
['contextid' => $contextid, 'overdueby' => DAYSECS * 2, 'penalty' => 20, 'sortorder' => 1],
Expand Down

0 comments on commit 5f49ecb

Please sign in to comment.