This article is about creating and managing courses with a text (.csv) file using the Upload courses functionality of Lambda Learn (Moodle).
Creating the Text File
The text file to upload courses must be a CSV file. It accepts the following columns which are divided in two categories:
COURSE INFORMATION FIELDS
Most of these settings are available on the settings page of a course. Please refer to Course settings for more information. Field names must be lower-case.
The following are the required fields when using a CSV text file to create and manage courses.
- shortname This field is mandatory for every operation, with the only exception of creating new courses.
- fullname Required when creating a new course.
- category, category_idnumber, category_path One of these is required when creating a course.
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.
To rename some roles, using the following pattern:
role_[shortname]The new name of the role [shortname].
It is worth noting that the short name for the teacher role is editingteacher and the short name for the non-editing teacher is teacher.
COURSE ACTION FIELDS
Those settings take precedence over the Course process parameters.
To prevent unexpected behaviour, you have to specify what you want the tool to be able to do.
Upload modeThis allows you to specify if courses can be created and/or updated.
Update modeIf you allow courses to be updated, you also have to tell the tool what to update the courses with.
Allow deletesWhether the delete field is accepted or not
Allow renamesWhether the rename field is accepted or not
Allow resetsWhether the reset field is accepted or not
This allows you to specify actions to be taken for every course uploaded.
Shortname templateIf you are creating courses without a shortname, you can use this field to automatically generate a shortname. This field accepts two placeholders: %i for the ID number, %f for the summary.Restore fileA backup file (.mbz) to import in the course after create/update.Restore from courseThe shortname of a course to import content from after create/update.Reset after uploadWhether to reset the course after creating/updating it.