MDL-56301 course: Use value for intro field if set in a mods function
Respects a module that has set a value for the db field intro in it's lib function modulename_add_instance.
This commit is contained in:
committed by
Jake Dallimore
parent
f945d178cc
commit
3724d12ab4
@@ -145,6 +145,9 @@ function add_moduleinfo($moduleinfo, $course, $mform = null) {
|
||||
// Update embedded links and save files.
|
||||
$modcontext = context_module::instance($moduleinfo->coursemodule);
|
||||
if (!empty($introeditor)) {
|
||||
// This will respect a module that has set a value for intro in it's modname_add_instance() function.
|
||||
$introeditor['text'] = $moduleinfo->intro;
|
||||
|
||||
$moduleinfo->intro = file_save_draft_area_files($introeditor['itemid'], $modcontext->id,
|
||||
'mod_'.$moduleinfo->modulename, 'intro', 0,
|
||||
array('subdirs'=>true), $introeditor['text']);
|
||||
|
||||
Reference in New Issue
Block a user