Note: You are currently viewing documentation for Moodle 3.2. Up-to-date documentation for the latest stable version of Moodle is probably available here: Download courses.

Download courses

From MoodleDocs
Revision as of 17:09, 6 December 2015 by Alexandru Elisei (talk | contribs)

Download courses

Allows an administrator to download a list of all the courses to a comma-separated values format (CSV) or Excel 2007 file format. In addition to the web interface there is also a command line tool located in admin/tool/downloaddata/cli/downloaddata.php.

To download courses:

  1. Proceed to Administration > Site administration > Courses > Download courses
  2. Select the download options, then click on the download button
Download courses page

Download options

There are several options to choose from when download the courses:

File format
Choose the file format: CSV or Excel 2007.
Encoding
Choose an encoding for the file. Only available when downloading a CSV file.
CSV delimiter
Choose a delimiter for the CSV file fields.
Use defaults
Whether to use the default fields and overrides (if the option is selected) provided in admin/tool/downloaddata/config.php.
Override fields
Whether to override fields or not. You can either use the overrides provided in admin/tool/downloaddata/config.php by selecting Use defaults or provide you own overrides as a comma separated list of field=value pairs. Note: by default there are no overrides specified in the admin/tool/downloaddata/config.php file.
Sort by category path
Whether the courses should be sorted by the category path. Useful if the site uses a Year/Semester or similar hierarchy for course categories.

Downloading the file

In order to successfully download the file you need to specify which course fields should be saved. This can be done by either choosing Use defaults and providing the fields in the admin/tool/downloaddata/config.php file or manually specifying them in the Fields section of the page.

Likewise, if you have chosen to use overrides, then you similarly need to provide them in the admin/tool/downloaddata/config.php file or in the Overrides section of the page.

Course fields

You can specify which fields to be present in the downloaded file in the Fields section as a comma separated list of valid field names. Valid fields are those described Upload courses under the section Course information fields. The fields specified here will take precedence over the default fields from admin/tool/downloaddata/config.php even if the Use defaults option was selected.

Course overrides

If you have enabled Use overrides you can specify the overrides as a comma separated list of field=override pairs in the Overrides section. There are no restrictions on the field names or values. Any data specified here will take precedence over the overrides from admin/tool/downloaddata/config.php file. Note: any values specified here have no effect if the Use overrides option isn't selected.