Updated print_textarea()
This commit is contained in:
+4
-3
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user