Skip to content

Commit 8156515

Browse files
committed
MDL-84981 core_grades: Update penalty success banners
1 parent 9396551 commit 8156515

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

grade/penalty/manage_exemptions.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

25+
use core\output\notification;
2526
use core\url;
2627
use core_grades\penalty_exemption;
2728
use core_reportbuilder\system_report_factory;
@@ -118,18 +119,23 @@
118119
$exemption->delete();
119120
}
120121

121-
redirect(new url($url, ['tab' => $exemption->get_itemtype()]),
122-
get_string('exemptions:form:successdelete', 'core_grades'));
122+
redirect(
123+
new url($url, ['tab' => $exemption->get_itemtype()]),
124+
get_string('exemptions:form:successdelete', 'core_grades'),
125+
0,
126+
notification::NOTIFY_SUCCESS
127+
);
123128
}
124129

125130
if ($data = $mform->get_data()) {
126131
$mform->process($data);
127132

128-
$message = '';
129-
if ($data->create) {
130-
$message = get_string('exemptions:form:success', 'core_grades');
131-
}
132-
redirect(new url($url, ['tab' => $data->type]), $message);
133+
redirect(
134+
new url($url, ['tab' => $data->type]),
135+
$data->create ? get_string('exemptions:form:success', 'core_grades') : '',
136+
0,
137+
notification::NOTIFY_SUCCESS
138+
);
133139
}
134140

135141
// Start output.

lang/en/grades.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@
228228
$string['exemptions:form:header'] = 'Add exemption';
229229
$string['exemptions:form:reason'] = 'Reason';
230230
$string['exemptions:form:reason_help'] = 'The reason for the exemption.';
231-
$string['exemptions:form:success'] = 'Exemption updated successfully. Grades affected by the exemption will be recalculated automatically.';
232-
$string['exemptions:form:successdelete'] = 'Exemption deleted successfully. Grades affected by the exemption will be recalculated automatically.';
231+
$string['exemptions:form:success'] = 'Exemption updated successfully. Initiated penalty recalculation for affected users. There may be a delay before grades are updated.';
232+
$string['exemptions:form:successdelete'] = 'Exemption deleted successfully. Initiated penalty recalculation for affected users. There may be a delay before grades are updated.';
233233
$string['exemptions:form:type'] = 'Type';
234234
$string['exemptions:form:type:group'] = 'Groups';
235235
$string['exemptions:form:type:user'] = 'Users';

0 commit comments

Comments
 (0)