From bdd7aedc445df0ef7d1cb60476bfe7885257e3d8 Mon Sep 17 00:00:00 2001 From: vyshane Date: Thu, 16 Mar 2006 04:10:44 +0000 Subject: [PATCH] Updated print_textarea() --- lib/weblib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index a23cfc7d50f..859be138ca9 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3023,7 +3023,8 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v $mincols = 65; $minrows = 10; - + $str = ''; + if (empty($courseid)) { if (!empty($course->id)) { // search for it in global context $courseid = $course->id; @@ -3037,9 +3038,9 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v if ($usehtmleditor) { if (!empty($courseid) and isteacher($courseid)) { - $str = ($scriptcount < 1) ? ''."\n" : ''; + $str .= ($scriptcount < 1) ? ''."\n" : ''; } else { - $str = ($scriptcount < 1) ? ''."\n" : ''; + $str .= ($scriptcount < 1) ? ''."\n" : ''; } $str .= ($scriptcount < 1) ? ''."\n" : ''; $scriptcount++;