diff --git a/course/modedit.php b/course/modedit.php index 8cfe0a0afd74c..db70a9fceddb7 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -78,7 +78,7 @@ if (plugin_supports('mod', $data->modulename, FEATURE_MOD_INTRO, true)) { $draftid_editor = file_get_submitted_draft_itemid('introeditor'); - file_prepare_draft_area($draftid_editor, null, null, null, null); + file_prepare_draft_area($draftid_editor, null, null, null, null, array('subdirs'=>true)); $data->introeditor = array('text'=>'', 'format'=>FORMAT_HTML, 'itemid'=>$draftid_editor); // TODO: add better default } diff --git a/course/moodleform_mod.php b/course/moodleform_mod.php index 97724aa7f47b1..8a7aa14b6bc23 100644 --- a/course/moodleform_mod.php +++ b/course/moodleform_mod.php @@ -821,7 +821,7 @@ function add_intro_editor($required=false, $customlabel=null) { $label = is_null($customlabel) ? get_string('moduleintro') : $customlabel; $mform->addElement('editor', 'introeditor', $label, array('rows' => 10), array('maxfiles' => EDITOR_UNLIMITED_FILES, - 'noclean' => true, 'context' => $this->context)); + 'noclean' => true, 'context' => $this->context, 'subdirs' => true)); $mform->setType('introeditor', PARAM_RAW); // no XSS prevention here, users must be trusted if ($required) { $mform->addRule('introeditor', get_string('required'), 'required', null, 'client');