Skip to content

Commit

Permalink
MDL-28094 fix subdirs support in module intro editor
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 7, 2013
1 parent 5e95223 commit f9beaf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion course/modedit.php
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion course/moodleform_mod.php
Expand Up @@ -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');
Expand Down

0 comments on commit f9beaf4

Please sign in to comment.