mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
fixed print_texarea() capability requirement
This commit is contained in:
parent
3055079518
commit
a44de9c12f
1 changed files with 2 additions and 2 deletions
|
@ -3566,8 +3566,8 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usehtmleditor) {
|
if ($usehtmleditor) {
|
||||||
// not sure if this capability is appropriate
|
if (!empty($courseid) and has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid))) {
|
||||||
if (!empty($courseid) and has_capability('moodle/course:trustcontent', get_context_instance(CONTEXT_COURSE, $courseid))) {
|
// needed for course file area browsing in image insert plugin
|
||||||
$str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
|
$str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
|
||||||
$CFG->wwwroot .'/lib/editor/htmlarea/htmlarea.php?id='. $courseid .'"></script>'."\n" : '';
|
$CFG->wwwroot .'/lib/editor/htmlarea/htmlarea.php?id='. $courseid .'"></script>'."\n" : '';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue