MDL-47360 tool_monitor: add more help link and default template message
authorSimey Lameze <simey@moodle.com>
Wed, 5 Nov 2014 06:57:53 +0000 (14:57 +0800)
committerSimey Lameze <simey@moodle.com>
Wed, 5 Nov 2014 06:57:53 +0000 (14:57 +0800)
admin/tool/monitor/classes/rule_form.php
admin/tool/monitor/lang/en/tool_monitor.php

index ec7beb4..549adba 100644 (file)
@@ -123,7 +123,8 @@ class rule_form extends \moodleform {
 
         // Message template.
         $mform->addElement('editor', 'template', get_string('messagetemplate', 'tool_monitor'), $editoroptions);
-        $mform->setDefault('template', get_string('defaultmessagetemplate', 'tool_monitor'));
+        $mform->setDefault('template', array('text' => get_string('defaultmessagetemplate', 'tool_monitor'),
+                'format' => FORMAT_HTML));
         $mform->addRule('template', get_string('required'), 'required');
         $mform->addHelpButton('template', 'messagetemplate', 'tool_monitor');
 
index 1d58608..cd972ae 100644 (file)
@@ -31,7 +31,7 @@ $string['area'] = 'Area';
 $string['areatomonitor'] = 'Area to monitor';
 $string['core'] = 'Core';
 $string['currentsubscriptions'] = 'Your current subscriptions';
-$string['defaultmessagetemplate'] = 'The rule "{rulename}" you have subscribed to has occurred - please find further details at {link}';
+$string['defaultmessagetemplate'] = 'Rule name: {rulename}<br />Description: {description}<br />Event name: {eventname}';
 $string['deleterule'] = 'Delete rule';
 $string['deletesubscription'] = 'Delete subscription';
 $string['description'] = 'Description:';
@@ -67,6 +67,7 @@ $string['messagetemplate_help'] = 'A notification message is sent to subscribers
 * Rule name {rulename}<br />
 * Description {description}<br />
 * Event {eventname}';
+$string['messagetemplate_link'] = 'admin/tool/monitor/managerules';
 $string['moduleinstance'] = 'Instance';
 $string['monitor:managerules'] = 'Manage event monitor rules';
 $string['monitor:subscribe'] = 'Subscribe to event monitor rules';