Updated print_textarea()

This commit is contained in:
vyshane
2006-03-16 04:10:44 +00:00
parent ff84313378
commit bdd7aedc44
+4 -3
View File
@@ -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++;