Skip to content

Commit

Permalink
MDL-25582 Fixed inconsistence in FEATURE_MOD_INTRO evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Dec 6, 2010
1 parent 162f4e1 commit ff7670e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/modedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
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'];
Expand Down Expand Up @@ -426,7 +426,7 @@

// 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']);
Expand Down

0 comments on commit ff7670e

Please sign in to comment.