diff --git a/lib/form/htmleditor.php b/lib/form/htmleditor.php
index 32353d67376..c3aeb405d4b 100644
--- a/lib/form/htmleditor.php
+++ b/lib/form/htmleditor.php
@@ -88,21 +88,17 @@ class MoodleQuickForm_htmleditor extends MoodleQuickForm_textarea{
*
* @return string
*/
- function toHtml(){
+ public function toHtml() {
+ global $OUTPUT;
+
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} else {
+ $value = preg_replace("/(\r\n|\n|\r)/", '
', $this->getValue());
+
return $this->_getTabs() .
- print_textarea(true,
- $this->_options['rows'],
- $this->_options['cols'],
- $this->_options['width'],
- $this->_options['height'],
- $this->getName(),
- preg_replace("/(\r\n|\n|\r)/", '
',$this->getValue()),
- 0, // unused anymore
- true,
- $this->getAttribute('id'));
+ $OUTPUT->print_textarea($this->getName(), $this->getAttribute('id'), $value, $this->_options['rows'],
+ $this->_options['cols']);
}
}
diff --git a/mod/feedback/show_nonrespondents.php b/mod/feedback/show_nonrespondents.php
index d6297362dd3..8be8e65cc21 100644
--- a/mod/feedback/show_nonrespondents.php
+++ b/mod/feedback/show_nonrespondents.php
@@ -31,7 +31,7 @@ require_once($CFG->libdir.'/tablelib.php');
////////////////////////////////////////////////////////
$id = required_param('id', PARAM_INT);
$subject = optional_param('subject', '', PARAM_CLEANHTML);
-$message = optional_param('message', '', PARAM_CLEANHTML);
+$message = optional_param_array('message', '', PARAM_CLEANHTML);
$format = optional_param('format', FORMAT_MOODLE, PARAM_INT);
$messageuser = optional_param_array('messageuser', false, PARAM_INT);
$action = optional_param('action', '', PARAM_ALPHA);
@@ -44,6 +44,10 @@ $current_tab = 'nonrespondents';
//get the objects
////////////////////////////////////////////////////////
+if ($message) {
+ $message = $message['text'];
+}
+
list ($course, $cm) = get_course_and_cm_from_cmid($id, 'feedback');
if (! $feedback = $DB->get_record("feedback", array("id"=>$cm->instance))) {
print_error('invalidcoursemodule');
@@ -275,7 +279,7 @@ if (empty($students)) {
echo '';
echo '';
echo '';
- print_textarea(true, 15, 25, 30, 10, "message", $message);
+ echo $OUTPUT->print_textarea('message', 'edit-message', $message, 15, 25);
print_string('formathtml');
echo '';
echo '