Skip to content
Browse files

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.
  • Loading branch information...
emyb2 authored and snake committed Nov 16, 2016
1 parent b182239 commit b1972729870555c0a2d8e2cdc2e7c5d49310d18b
Showing with 3 additions and 0 deletions.
  1. +3 −0 course/modlib.php
@@ -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']);

0 comments on commit b197272

Please sign in to comment.
You can’t perform that action at this time.