From e1947876ec80edc4e2f3244cdc6a251db78f2360 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 12 Oct 2002 07:23:16 +0000 Subject: [PATCH] Moved the object code out into a function print_textarea --- lib/moodlelib.php | 19 +++++++++++++++++++ mod/forum/post.html | 14 ++------------ mod/journal/edit.html | 9 +-------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index ea013a4d14..1faf0ba823 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -314,6 +314,25 @@ function print_editing_switch($courseid) { } } +function print_textarea($richedit, $rows, $cols, $width, $height, $name, $value="") { + global $CFG, $THEME; + + if ($richedit) { + echo "wwwroot/lib/rte/richedit.html\""; + echo " width=\"$width\" height=\"$height\" "; + echo " type=\"text/x-scriptlet\" VIEWASTEXT>"; + echo ""; + } else { + echo ""; + } +} + + function update_course_icon($courseid) { global $CFG, $USER; diff --git a/mod/forum/post.html b/mod/forum/post.html index ca32b430bb..765a41fef3 100644 --- a/mod/forum/post.html +++ b/mod/forum/post.html @@ -18,15 +18,7 @@ - - - - - - - - + message); ?> @@ -38,9 +30,7 @@

:

- format, ""); ?> + format, ""); ?>   diff --git a/mod/journal/edit.html b/mod/journal/edit.html index 8a1e62af6d..6b76d8ad59 100644 --- a/mod/journal/edit.html +++ b/mod/journal/edit.html @@ -1,12 +1,5 @@
action="edit.php"> - - - - - - - + text); ?>