...
- shortname: The shortname for the course
- fullname: The full name for the course
- idnumber: The ID number for the course
- category: The ID of the category to place the course in. This takes precedence over category_idnumber and category_path.
- category_idnumber: The ID number of the category to place the course in. This takes precedence over category_path.
- category_path: The path of the category to place the course in. If you want to place the course in a category named "Clinical" which is located under the category "Classroom", the value to provide is: Classroom / Clinical. Note that the separator must be [space]/[space]. Also note that the category MUST exist, it will not be created. If you want to place the course in the top-level category "Clinical", the value to provide is: Clinical
- visible: Use the value 1 if the course is visible, 0 if hidden
- startdate: The time at which the course starts. The format should be DD.MM.YYYY. For example, to set a start time of DecemberĀ 1stĀ 2014, use 01.12.2014
- summary: The summary of the course
- format: The course format to use, this must be a valid course format plugin name. E.g. topicsadvanced,singleactivityadv.
- duration: The duration of the course in hours. The format should be hh:mm. For example, to set a duration of 2 hours and 30 minutes, use 2:30 (New in 3.5.8.2)
- showgrades: Use the value 1 to show the gradebook to students, 0 to hide it.
- showreports: Use the value 1 to show the activity reports, 0 to hide it.
- maxbytes: The maximum upload size of the course in bytes. Use 0 for the site limit.
- groupmode: Use the value 0 for No groups, 1 for Separate groups and 2 for Visible groups.
- groupmodeforce: Use the value 1 to force the group mode, otherwise enter 0.
- enablecompletion: Use the value 1 to enable the activity completion, 0 not to.
Custom Fields
As of version 3.9, it is possible to include custom fields in courses. For example, a "duration" field is added by default to all installations so that an instructor can specify the expectation duration for a course. To upload information to custom fields, the convention is to add the word "customfield_" followed by the short name of the field.
For example, to upload the duration a course, the field name in the CSV file would be "customfield_duration". The field is simply a text field, so the value would be "1:00" for a 1 hour course. It is important that you follow this convention, which is HH:MM. Typing "1 hour" or "60 minutes" may result is display issues in certain reports and web pages.
Below are the conventions for uploading different file types.
Field Type | Field Name | Field Value | Sample Value | Additional Notes |
---|---|---|---|---|
Checkbox | customfield_[shortname] | 0 = unchecked 1 = checked | 1 | |
Date and time | customfield_[shortname] | YYYY-MM-DD HH:MM | 2021-06-28 14:00 | |
Dropdown menu | customfield_[shortname] | Value of selection | 10 | The system does not verify / validate the value to see if it exists in the list of valid values for the field. In other words, if the list of valid values are 1-5 and you enter 10 in the CSV, the value of 10 will still be uploaded but you will not be able to see it when viewing the course information because "10" is not considered a valid value. Also, the field is case sensitive. So if the valid values are A-Z and you enter lowercase a in the CSV, the value of a will still be uploaded but it will not be considered different than uppercase A. |
Short text | customfield_[shortname] | Text | Hello World | If entering commas in your text, you must wrap the value in quotes. HTML is NOT supported in this field. |
Text area | customfield_[shortname] | Text | Hello World. Goodbye !! | If entering commas in your text, you must wrap the value in quotes. HTML is supported in this field. |
Enrolment Fields
Some fields can be constructed to enable and configure enrolment methods. The fields must be named enrolment_[number] for the enrolment method name, and enrolment_[number]_property for its properties.
...