General developer forum

Upload courses: course format options

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Michael Ransburg
Upload courses: course format options

Dear all,

I have created a custom course format and added several course format options ( to it. I'm now using the "upload courses" feature ( to import courses.

However, I do not seem to be able to also import the additional course format options. I tried adding a column to the import CSV which corresponds to the column name of the additional course format option in the mdl_course_format_options table, however it was not imported.

Is it currently possible to import additional course format options using the "upload courses" feature?

If not, can someone point me into the right direction in order to extend the correct PHP file which handles the uploading of courses?

Many thanks and all the best,


Average of ratings: -
Picture of Michael Ransburg
Re: Upload courses: course format options

Hi all,

sorry for again replying to my own questions.

I figured it out. Should anyone ever need it: You just have to extend the $validfields array at line 96 of /admin/tool/uploadcourse/classes/course.php by your additional course format options. It then correctly imports these options if you add them to your CSV.

All the best,


Average of ratings: Useful (2)