Hello Tony!
Adding the filemanager in course_format_option will only allow you to add the files to the draft area of your moodle site.
You will need to do 2 things from there. First of all, go to your update_course_format_options and save your files to a filearea from the draft area. For instance:
$context = context_course::instance($this->courseid); $saved = file_save_draft_area_files($data->headingimage, $context->id, 'format_yourformatname', 'headingimage', 0, array('subdirs' => 0, 'maxfiles' => 1));
That will not be enough though, in order to request your image from pluginfile with an address such as "/pluginfile.php/CONTEXTID/format_yourformatname/headingimage/0/filename.png", you will need to tell moodle how to behave when he finds that specific component. For that, you will need to create a function in your lib.php file (outside of your format class) that looks similar to this:
function format_yourformatname_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) { global $DB; if ($context->contextlevel != CONTEXT_COURSE) { return false; } require_login(); if ($filearea != 'headingimage') { return false; } $itemid = (int)array_shift($args); if ($itemid != 0) { return false; } $fs = get_file_storage(); $filename = array_pop($args); if (empty($args)) { $filepath = '/'; } else { $filepath = '/'.implode('/', $args).'/'; } $file = $fs->get_file($context->id, 'format_yourformatname', $filearea, $itemid, $filepath, $filename); if (!$file) { return false; } send_stored_file($file, 0, 0, $forcedownload, $options); }That should do the trick. By the way, I assumed you will limit the amount of files to 1, but I'm sure you will be able to adapt that code to your needs.
If someone has a better approach you're more than welcome to correct the example code pieces, but for the time being I hope that helps!