From: vyshane Date: Wed, 15 Mar 2006 05:38:02 +0000 (+0000) Subject: Made added $return argument to print_textarea() function. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=035d465cb6919359e967345686905ad3d087b98e;p=moodle.git Made added $return argument to print_textarea() function. --- diff --git a/lib/weblib.php b/lib/weblib.php index bbff827136..16b946957d 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3136,7 +3136,7 @@ function print_recent_activity_note($time, $user, $isteacher, $text, $link) { * @param int $courseid ? * @todo Finish documenting this function */ -function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $value='', $courseid=0) { +function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $value='', $courseid=0, $return=false) { /// $width and height are legacy fields and no longer used as pixels like they used to be. /// However, you can set them to zero to override the mincols and minrows values below. @@ -3160,13 +3160,13 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v if ($usehtmleditor) { if (!empty($courseid) and isteacher($courseid)) { - echo ($scriptcount < 1) ? ''."\n" : ''; } else { - echo ($scriptcount < 1) ? ''."\n" : ''; } - echo ($scriptcount < 1) ? ''."\n" : ''; $scriptcount++; @@ -3182,13 +3182,18 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v } } } - echo ''."\n"; + $str .= ''."\n"; + + if ($return) { + return $str; + } + echo $str; } /**