Dataform Import Export

Revision as of 17:42, 25 January 2014 by Itamar Tzadok (talk | contribs)

Jump to: navigation, search

You can import entries into the Dataform from entries data in CSV format. CSV means Comma-Separated-Values and is a common format for text interchange.

Import from CSV


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).

The CSV 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:


Note: Certain field types may not be supported.

Do not put spaces after your commas or upload will fail!

Export to CSV

When using the CSV format, the user can select either the comma, semicolon, or tab to separate the fields. The selection of the proper character is important. If users select to use a comma to separate the fields and some of the fields contain data with commas then the number of columns is going to be misaligned and likely cause confusion.

The content to export is determined by the field tags you include in the view template. The subset of entries export can be controlled by applying available filters to the export view.

To export the displayed entries in the export view, click on the Export pushbutton. You will usually have the option of either opening or saving the file.

Export to portfolios

Exporting Dataform entries requires Moodle Download Portfolio enabled by site admin. Then, the ##export## may be added to a view designated for export and allow exporting entries to a downloadable file.