MDL-25582 Fixed inconsistence in FEATURE_MOD_INTRO evaluation

This commit is contained in:
David Mudrak
2010-12-06 16:07:31 +00:00
parent 162f4e19d9
commit ff7670e79b
+2 -2
View File
@@ -398,7 +398,7 @@ if ($mform->is_cancelled()) {
print_error('cannotaddcoursemodule');
}
if (plugin_supports('mod', $fromform->modulename, FEATURE_MOD_INTRO, false)) {
if (plugin_supports('mod', $fromform->modulename, FEATURE_MOD_INTRO, true)) {
$introeditor = $fromform->introeditor;
unset($fromform->introeditor);
$fromform->intro = $introeditor['text'];
@@ -426,7 +426,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)) {
if (!empty($introeditor)) {
$fromform->intro = file_save_draft_area_files($introeditor['itemid'], $modcontext->id,
'mod_'.$fromform->modulename, 'intro', 0,
array('subdirs'=>true), $introeditor['text']);