course MDL-20989 Fixed bug that threw notices if a module didn't support FEATURE_MOD_INTRO

This commit is contained in:
Sam Hemelryk
2009-12-07 06:23:00 +00:00
parent 81e3e1555e
commit b1a2d9d2af
+6 -4
View File
@@ -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);