Filemanager format option in new course format

Filemanager format option in new course format

by Michael Gwynne -
Number of replies: 1

Hi,

I am creating a new course format in 2.6.1.

I have found that I need to override the function course_format_options() in order to add options specific to this format. At the moment I'm trying to upload an icon per course.

$courseformatoptionsedit = array(
 'icon' => array(
  'label' => new lang_string('icon', 'format_skill'),
  'element_type' => 'filemanager',
  'element_attributes' => array(
   'filemanager',
   'icon',
   get_string('skillicon', 'format_skill'),
   null,
   $options,
  ),
  'help' => 'icon',
  'help_component' => 'format_skill',
 )
); 
But, I'm not sure where to hook into the file_get_submitted_draft_itemid() and file_prepare_draft_area() and then pass the $draftid into the form.
Similar problem with the postprocessing.

Is this even possible without a core code hack?

Many thanks,

Michael
Average of ratings: -
In reply to Michael Gwynne

Re: Filemanager format option in new course format

by Jason La Greca -

Hi Michael,

did you ever figure this out? Im looking to do something similar.