From: Sam Hemelryk Date: Mon, 7 Dec 2009 06:23:00 +0000 (+0000) Subject: course MDL-20989 Fixed bug that threw notices if a module didn't support FEATURE_MOD_... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b1a2d9d2af3064cfd03d43ce4166cf4554ee2543;p=moodle.git course MDL-20989 Fixed bug that threw notices if a module didn't support FEATURE_MOD_INTRO --- diff --git a/course/modedit.php b/course/modedit.php index ebc5294842..d6d898f083 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -429,10 +429,12 @@ print_error('cannotaddcoursemodule'); } - $introeditor = $fromform->introeditor; - unset($fromform->introeditor); - $fromform->intro = $introeditor['text']; - $fromform->introformat = $introeditor['format']; + if (plugin_supports('mod', $fromform->modulename, FEATURE_MOD_INTRO, false)) { + $introeditor = $fromform->introeditor; + unset($fromform->introeditor); + $fromform->intro = $introeditor['text']; + $fromform->introformat = $introeditor['format']; + } $returnfromfunc = $addinstancefunction($fromform, $mform);