]> git.mjollnir.org Git - moodle.git/commitdiff
fixed print_texarea() capability requirement
authorskodak <skodak>
Mon, 2 Oct 2006 19:47:11 +0000 (19:47 +0000)
committerskodak <skodak>
Mon, 2 Oct 2006 19:47:11 +0000 (19:47 +0000)
lib/weblib.php

index d782deaeffa6b4afc13d4c7b5d4e9605062f3e3b..46d2aedfda3a4405956305ee5b868accb9163bc4 100644 (file)
@@ -3566,8 +3566,8 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
         }
 
         if ($usehtmleditor) {
-            // not sure if this capability is appropriate
-            if (!empty($courseid) and has_capability('moodle/course:trustcontent', get_context_instance(CONTEXT_COURSE, $courseid))) {
+            if (!empty($courseid) and has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid))) {
+                // needed for course file area browsing in image insert plugin 
                 $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
                 $CFG->wwwroot .'/lib/editor/htmlarea/htmlarea.php?id='. $courseid .'"></script>'."\n" : '';
             } else {