Kurse hochladen

Wechseln zu: Navigation, Suche

Hinweis: Sie sind auf den Seiten der Moodle 3.1 Dokumentation. Die Dokumentation der aktuellsten Moodle-Version finden Sie hier: Kurse hochladen.

in Moodle 3.1!

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.

An administrator can upload multiple courses using a text file.

There are many things you can do when using this tool:not only creating courses, but updating or deleting them. You can also update the course enrolment methods or import the content of another course.

Uploading the file

You can upload the file by navigating to Administration > Site administration > Courses > Upload courses and either dragging and dropping the csv file or clicking the button to upload from the file picker.

Upload courses admin screen
Courses successfully uploaded

Note: It is also possible to use the command-line tool admin/tool/uploadcourse/cli/uploadcourse.php.

When using the web interface, use the Preview option to see if any errors were detected in the previewed rows. If you proceed with the upload and there were something wrong detected with a course, it will be ignored.

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, the course information, and the course actions.

Course information fields

Most of those settings are available on the settings page of a course. Please refer to Course settings for more information.

The shortname
The full name
The ID number
The ID of the category to place the course in. This takes precedence over category_idnumber and category_path.
The ID number of the category to place the course in. This takes precedence over category_path.
The path of the category to place the course in. If you want to place the course in a category named "Science-Fiction" which is located under the category "Movies", the value to provide is:
Movies > Science-Fiction
. Note that the separator must be
. Also note that the category MUST exist, it will not be created.
1 if the course is visible, 0 if hidden
The time at which the course starts. Please note that this value is passed to the PHP function strtotime to generate a timestamp.
The summary of the course
The course format to use, this must be a valid course format plugin name. E.g. weeks, topics.
The theme to use
The language to use
The number of news items
1 to show the gradebook to students, 0 to hide it.
1 to show the activity reports, 0 to hide it.
1 to enable the legacy course files, 0 not to.
The maximum upload size of the course in bytes. Use 0 for the site limit.
0 for No groups, 1 for Separate groups and 2 for Visible groups.
1 to force the group mode, otherwise enter 0.
1 to enable the activity completion, 0 not to.

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.

The name of the enrolment method
1 to delete this enrolment method from the course, if set to 1 all the other properties will be ignored.
1 to disable this enrolment method from the course, if set to 1 all the other properties will be ignored.
The enrolment start date. This value is passed to the PHP function strtotime().
The enrolment start date. This value is passed to the PHP function strtotime().
Number of seconds, or if not a value understood by strtotime() such as "4 days".
The role short name
Where property is understood by the specified enrolment method


enrolment_1: manual
enrolment_1_role: student
enrolment_1_enrolperiod: 1 month

enrolment_2: self
enrolment_2_startdate: 2013-01-30

Role renaming

To rename some roles, using the following pattern:

The new name of the role [shortname].


role_student: Apprentice
role_teacher: Master
role_mycustomrole: Jedi

Course action fields

Those settings take precedence over the Course process parameters.

1 to delete the course
The shortname to rename the course to
An absolute path to a backup file (.mbz) to import in the course
The short name of a course to import the content from
1 to reset the course

Mandatory fields

This field is mandatory for every operation, with the only exception of creating new courses. See details on the course process parameter Shortname template for more information.
Required when creating a new course.
category, category_idnumber, category_path
One of these is required when creating a course.

Import options

To prevent unexpected behaviours, you have to specify what you want the tool to be able to do.

Upload mode
This allows you to specify if courses can be created and/or updated.
Update mode
If you allow courses to be updated, you also have to tell the tool what to update the courses with.
Allow deletes
Whether the delete field is accepted or not
Allow renames
Whether the rename field is accepted or not
Allow resets
Whether the reset field is accepted or not


This allows you to specify actions to be taken on every single courses uploaded.

Shortname template
If 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 file
A backup file (.mbz) to import in the course after create/update.
Restore from course
The shortname of a course to import content from after create/update.
Reset after upload
Whether to reset the course after creating/updating it.


Hier legen Sie die Standardeinstellungen für alle Datenfelder fest, die nicht in der .csv Datei enthalten sind. Diese Einstellungen werden beim Anlegen eines neuen Kurses verwendet. Bei der Aktualisierung von bereits bestehenden Kursen werden diese Werte nur verwendet, wenn der Update-Modus entsprechend gewählt wurde (siehe oben).

Geschwindigkeit erhöhen

Bei Importieren von Kursinhalten aus einer Kurssicherung oder aus einem anderen Kurs wird empfohlen, die Einstellung keeptempdirectoriesonbackup zu aktivieren. Dadurch wird der Upload-Prozess signifikant beschleunigt, wenn Sie mehrfach aus derselben Quelle importieren.