Skip to content

Commit

Permalink
Merge branch 'MDL-56301-31' of https://github.com/snake/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_31_STABLE
  • Loading branch information
andrewnicols committed Dec 6, 2016
2 parents f1b3e2e + 3724d12 commit 1d3f57d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions course/modlib.php
Expand Up @@ -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']);
Expand Down

0 comments on commit 1d3f57d

Please sign in to comment.