MDL-47360 tool_monitor: add more help link and default template message

This commit is contained in:
Simey Lameze 2014-11-05 14:57:53 +08:00
parent 6ce4b8ea30
commit 0194d87ec5
2 changed files with 4 additions and 2 deletions

View 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');

View 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';