MDL-48107 tool_monitor: added total subs to the delete rule string
Also made some minor language string changes.
This commit is contained in:
@@ -82,7 +82,8 @@ $string['norules'] = 'There are no event monitoring rules.';
|
||||
$string['pluginname'] = 'Event monitor';
|
||||
$string['processevents'] = 'Process events';
|
||||
$string['rulename'] = 'Rule name';
|
||||
$string['ruleareyousure'] = 'Are you sure you want to delete rule "{$a}"?';
|
||||
$string['ruleareyousure'] = 'Are you sure you want to delete the rule "{$a}"?';
|
||||
$string['ruleareyousureextra'] = 'There are {$a} subscription(s) to this rule that will also be deleted.';
|
||||
$string['rulecopysuccess'] = 'Rule successfully duplicated';
|
||||
$string['ruledeletesuccess'] = 'Rule successfully deleted';
|
||||
$string['rulehelp'] = 'Rule details';
|
||||
@@ -91,9 +92,9 @@ $string['rulenopermissions'] = 'You do not have permissions to "{$a} a rule"';
|
||||
$string['rulescansubscribe'] = 'Rules you can subscribe to';
|
||||
$string['selectacourse'] = 'Select a course';
|
||||
$string['selectcourse'] = 'Visit this report at course level to get a list of possible modules';
|
||||
$string['subareyousure'] = 'Are you sure you want to delete this subscription for the rule "{$a}"?';
|
||||
$string['subcreatesuccess'] = "Subscription successfully created";
|
||||
$string['subdeletesuccess'] = "Subscription successfully removed";
|
||||
$string['subareyousure'] = 'Are you sure you want to delete the subscription to the rule "{$a}"?';
|
||||
$string['subcreatesuccess'] = 'Subscription successfully created';
|
||||
$string['subdeletesuccess'] = 'Subscription successfully removed';
|
||||
$string['subhelp'] = 'Subscription details';
|
||||
$string['subhelp_help'] = 'This subscription listens for when the event \'{$a->eventname}\' has been triggered in \'{$a->moduleinstance}\' {$a->frequency} time(s) in {$a->minutes} minute(s).';
|
||||
$string['subscribeto'] = 'Subscribe to rule "{$a}"';
|
||||
|
||||
@@ -94,8 +94,12 @@ if (!empty($action) && $ruleid) {
|
||||
$rule->delete_rule();
|
||||
echo $OUTPUT->notification(get_string('ruledeletesuccess', 'tool_monitor'), 'notifysuccess');
|
||||
} else {
|
||||
echo $OUTPUT->confirm(get_string('ruleareyousure', 'tool_monitor', $rule->get_name($context)),
|
||||
$confirmurl, $cancelurl);
|
||||
$strconfirm = get_string('ruleareyousure', 'tool_monitor', $rule->get_name($context));
|
||||
if ($numberofsubs = $DB->count_records('tool_monitor_subscriptions', array('ruleid' => $ruleid))) {
|
||||
$strconfirm .= '<br />';
|
||||
$strconfirm .= get_string('ruleareyousureextra', 'tool_monitor', $numberofsubs);
|
||||
}
|
||||
echo $OUTPUT->confirm($strconfirm, $confirmurl, $cancelurl);
|
||||
echo $OUTPUT->footer();
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user