Commit 4a67d7c8 authored by jerome mouneyrac's avatar jerome mouneyrac
Browse files

course MDL-25529 $introeditor not declared in some cases (=> it was displaying...

course MDL-25529 $introeditor not declared in some cases (=> it was displaying php notice when adding the official newmodule template)
parent 70913ab3
......@@ -427,6 +427,7 @@ if ($mform->is_cancelled()) {
// update embedded links and save files
$modcontext = get_context_instance(CONTEXT_MODULE, $fromform->coursemodule);
if (plugin_supports('mod', $fromform->modulename, FEATURE_MOD_INTRO, true)) {
$introeditor = $fromform->introeditor;
$fromform->intro = file_save_draft_area_files($introeditor['itemid'], $modcontext->id,
'mod_'.$fromform->modulename, 'intro', 0,
array('subdirs'=>true), $introeditor['text']);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment