Permalink
Browse files

Updated print_textarea()

  • Loading branch information...
1 parent ff84313 commit bdd7aedc445df0ef7d1cb60476bfe7885257e3d8 vyshane committed Mar 16, 2006
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/weblib.php
View
@@ -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) ? '<script type="text/javascript" src="'. $CFG->wwwroot .'/lib/editor/htmlarea.php?id='. $courseid .'"></script>'."\n" : '';
+ $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'. $CFG->wwwroot .'/lib/editor/htmlarea.php?id='. $courseid .'"></script>'."\n" : '';
} else {
- $str = ($scriptcount < 1) ? '<script type="text/javascript" src="'. $CFG->wwwroot .'/lib/editor/htmlarea.php"></script>'."\n" : '';
+ $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'. $CFG->wwwroot .'/lib/editor/htmlarea.php"></script>'."\n" : '';
}
$str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'. $CFG->wwwroot .'/lib/editor/lang/en.php"></script>'."\n" : '';
$scriptcount++;

0 comments on commit bdd7aed

Please sign in to comment.