Permalink
Browse files

MDL-20402 - update bulk user action messages from regular textarea to…

… HTML editor.
  • Loading branch information...
rwijaya committed Jan 25, 2010
1 parent 4eb9530 commit 740128d6e25db4be3a256254a6e2deafba26fec6
Showing with 4 additions and 5 deletions.
  1. +1 −1 admin/user/user_bulk_message.php
  2. +3 −4 admin/user/user_message_form.php
@@ -50,7 +50,7 @@
$options->newlines = true;
$options->smiley = false;
- $msg = format_text($formdata->messagebody, $formdata->format, $options);
+ $msg = format_text($formdata->messagebody['text'], $formdata->messagebody['format'], $options);
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
@@ -9,10 +9,9 @@ function definition() {
$mform->addElement('header', 'general', get_string('message', 'message'));
- $mform->addElement('textarea', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>60));
- $mform->addRule('messagebody', '', 'required', null, 'client');
- $mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext2'), false, 'editorhelpbutton');
- $mform->addElement('format', 'format', get_string('format'));
+ $mform->addElement('editor', 'messagebody', get_string('messagebody'), null, null);
+ $mform->addRule('messagebody', '', 'required', null, 'server');
+ $mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext2'), false, 'editorhelpbutton');
$this->add_action_buttons();
}

0 comments on commit 740128d

Please sign in to comment.