Database activity import

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Database activity import.


Location: Settings > Database activity administration > Import in Moodle 2.0 onwards and via the 'Add entry' tab in Moodle 1.9.


Database activity entries may be imported by uploading a text file. The easiest way to determine the format of the text file is to manually add an entry to the database and then export it. The resulting export text file may then be edited and used for importing entries.

CSV means Comma-Separated-Values and is a common format for text interchange.

The expected file format is a plain text file with a list of field names as the first record. The data then follows, one record per line.

The field delimiter defaults to a comma character and the field enclosure is not set by default (field enclosures are characters that surround each field in each record).

Records should be delimited by new lines (usually generated by pressing RETURN or ENTER in your text editor). Tabs can be specified using \t and newlines by \n.

Sample file:

 name,height,weight
 Kai,180cm,80kg
 Kim,170cm,60kg
 Koo,190cm,20kg

Warning: all field types may not be supported.

See also