-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: Dataformview CSV.

Dataformview CSV: Difference between revisions

From MoodleDocs
No edit summary
Line 2: Line 2:
The Dataform CSV view is designed mainly for export/import purposes. This view allows you to predefine which Dataform field can be csv exported/imported, in which order, choose your own custom names for columns (which may be different from the field names) and add flexible input/output data (e.g. human readable dates, entry author info etc.).  
The Dataform CSV view is designed mainly for export/import purposes. This view allows you to predefine which Dataform field can be csv exported/imported, in which order, choose your own custom names for columns (which may be different from the field names) and add flexible input/output data (e.g. human readable dates, entry author info etc.).  
You may also define different export/import templates (different instances of the csv view) and via the view access permissions allow different roles/users access to a designated export/import instance.
You may also define different export/import templates (different instances of the csv view) and via the view access permissions allow different roles/users access to a designated export/import instance.
=Setup=
==Usage==
*In the Dataform activity go to ''Manage'' >''Views''<br>
===Export data to a csv file===
*Go to ''Add a view'' option and choose ''Csv''
==View general settings==
==View timing==
==View template==
==Settings==
*'''Output type''' - choose your preferred file format for export purposes. The default format is set to CSV. Other options are: excel, calc, etc.
*'''Delimiter''' – define the character which separates each field of the text. The comma  character (,) is  set as the default character. Other available characters are: semicolon (;) colon (:) and tab (/t).
*'''Enclosure''' – characters that surround each field.
 
*'''Encoding''' – choose your character encoding.
*'''Export fields''' –  choose which fields to export and in what order (first field on the list will be the first column in your csv file). You can also add  tags from the field tags with additional data.
*'''Field tags''' - list of additional input you can add to the Export fields.
 
=Export data to a csv file=
*Open view
*Open view
*Click ''Export all'' or ''Export page'' from the menu bar.
*Click ''Export all'' or ''Export page'' from the menu bar.
*A csv file will be downloaded to your computer.
*A csv file will be downloaded to your computer.
 
===Import data from a csv file===
=Import data from a csv file=
*Click ''import'' option in the menu bar.
*Click ''import'' option in the menu bar.
*Fields import settings - list of fields to be imported.
*Fields import settings - list of fields to be imported.
*Csv settings - control file settings and upload file.
*Csv settings - control file settings and upload file.
=Tips and tricks=
==Settings==
*Building personal journal - you can build personal journal for each student where the student report and/or import data from external files to designated fields (e.g. case-noted, performance log, etc.). Use the view permissions to control the access to each view, and the view setting to control export/import fields.
{{Dataformview General settings}}
{{Dataformview View template}}
===Export/Import settings===
====Patterns====
====Export====
====Export to====
Select your preferred file format for export purposes. The default format is set to CSV. Other options are: excel, calc, etc.
====Import====
===CSV settings===
*'''Delimiter''': Select the character which separates fields in the exported/imported CSV file. The comma  character (,) is  set as the default character. Other available characters are: semicolon (;) colon (:) and tab (/t).
*'''Enclosure''': Select the character that surrounds each field. By default there is no enclosure.
*'''Encoding''': Select a default character encoding. For Import you can override this default in the Import form.
{{Dataformview Submission settings}}
==Patterns==
{{Dataformview View patterns}}
===Type specific patterns===
<nowiki>
##export:all##: ...
##export:page##: ...
##import##: ...
 
</nowiki>

Revision as of 14:45, 29 January 2014

The Dataform CSV view is designed mainly for export/import purposes. This view allows you to predefine which Dataform field can be csv exported/imported, in which order, choose your own custom names for columns (which may be different from the field names) and add flexible input/output data (e.g. human readable dates, entry author info etc.). You may also define different export/import templates (different instances of the csv view) and via the view access permissions allow different roles/users access to a designated export/import instance.

Usage

Export data to a csv file

  • Open view
  • Click Export all or Export page from the menu bar.
  • A csv file will be downloaded to your computer.

Import data from a csv file

  • Click import option in the menu bar.
  • Fields import settings - list of fields to be imported.
  • Csv settings - control file settings and upload file.

Settings

Export/Import settings

Patterns

Export

Export to

Select your preferred file format for export purposes. The default format is set to CSV. Other options are: excel, calc, etc.

Import

CSV settings

  • Delimiter: Select the character which separates fields in the exported/imported CSV file. The comma character (,) is set as the default character. Other available characters are: semicolon (;) colon (:) and tab (/t).
  • Enclosure: Select the character that surrounds each field. By default there is no enclosure.
  • Encoding: Select a default character encoding. For Import you can override this default in the Import form.

Patterns

Type specific patterns

##export:all##:	...
##export:page##:	...
##import##:	...