Note: You are currently viewing documentation for Moodle 2.6. Up-to-date documentation for the latest stable version of Moodle may be available here: Dataformview CSV.
- Building an activity
- Activity settings
- Activity administration
- Activating RSS
- Activity workflow
The Dataform CSV view is designed mainly for CSV export/import purposes. The view allows you to predefine the set of Dataform fields to export/import, the desired field content by pattern (e.g. human readable dates, entry author info etc.), the export column order, the import column headings and the target export type (csv, xls, ods). You can define different export/import templates (different instances of the csv view) for the same activity and via the view access permissions allow different role/user access to designated export/import views.
- 1 Usage
- 2 Settings
- 2.1 General settings
- 2.2 View template
- 2.3 Entry template
- 2.4 Submission settings
- 2.5 Other settings
- 2.6 Export/Import settings
- 2.7 CSV settings
- 3 Patterns
- 3.1 Common view patterns
- 3.1.1 Entries
- 3.1.2 Reference
- 3.1.3 Search and filtering
- 3.1.4 Paging bar
- 3.2 Other patterns
- 3.1 Common view patterns
Export data to a csv file
- Open view
- Click Export all or Export page from the menu bar.
- Depending on your system settings, a dialogue will pop up for opening or saving the csv export file or the file will be saved automatically to your computer.
Import data from a csv file
- Follow the 'Import' link on the view display to open the Import form.
- In the pattern settings, enter the csv heading for each imported pattern if different from the pattern name.
- Upload (or drag&drop) the csv import file into the file picker or paste csv formatted text into the text area.
- Adjust the csv settings if required.
- Click the 'Import' button.
Short name for the view. The view name can be used in certain view patterns in which case the format of the name should as simple as possible, only alpha or alphanumeric characters, to avoid pattern parsing problems.
Short description of the view purpose and characteristics to allow managers to see at a glance what each view is intended for. This description is displayed only in the view management list.
This setting allows denying access to the view without the viewaccesshidden capability. By default Students cannot access hidden views.
A predefined filter from the Filters list (if any) that will be enforced in the view.
The max number of entries to display in the view at any given time. If the number of viewable entries is higher than the selected per-page a paging bar will be displayed (provided the ##pagingbar## is added to the view template).
The view template allows you to determine content, behaviour and general layout of a front view page in the Dataform activity. This template typically contains elements for activity navigation, search and sort, and entries display. When creating a new view, the template is populated automatically with a default layout and you can then add or remove elements as needed. The WYSIWYG editor also allows you to decorate the template and create your own look and feel with color, font and images.
The entry template allows you to determine content, behaviour and general layout of an entry both for browsing and for editing. This template typically contains field elements for displaying and updating the entry content. When creating a new view, the template is populated automatically with a default layout that consists of base field patterns, edit action and delete action. You can then add or remove patterns as needed. The WYSIWYG editor also allows you to decorate the template and create your own look and feel with color, font and images.
The submission settings allow you to determine the behaviour of the view when editing entries. Depending on your activity application, you can display different submission buttons with default or custom labels, display all or only the edited entries and show a response to the submission. Note that in order to apply the submission settings you must enable at least one submit button.
Display when editing
- Show only edited entries – (Default) When editing one or more entries the view will display only the edited entries.
- Show edited entries separate – When editing one or more entries the view will display the edited entries above the rest of the entries.
- Show edited entries inline – When editing one or more entries the view will display the edited entries blended with other entries according to their display order.
- Save - Saves the edited entry and returns to the view.
- Save and Continue - Saves the edited entry and remains in the form to continue editing the entry.
- Save as New - Saves the edited entry as a new entry (the original entry is not changed) and returns to the view.
- Save and Start New - Saves the edited entry and opens a new entry form.
- Save as New and Continue - Saves the edited entry as a new entry (the original entry is not changed) and remains in the form to continue editing the new entry.
- Cancel - Cancels submission and returns to the view.
- Target view - By default the user remains in the same view after entry submission. If an alternate view of the activity is selected, the user will be redirected to that view after submission.
- Response timeout - The delay (in seconds) after submission and before the user is redirected to the target view.
- Response to submission - A message to display to the user after successful submission and before the user is redirected to the target view.
The list of patterns to export import, each pattern in a new line. This list is equivalent to the Entry template of the Aligned view type and if the view is designed to display entries (by adding the ##entries## tag in the View template), the entries will be displayed in an aligned table, one column per pattern.
Enable/Disable export for the view instance.
Enable/Disable export for the view instance.
- 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.
Common view patterns
Displays entry action notifications such “Updated 3 entries”, “Deleted 10 entries”, etc.
Displays the total number of entries in the activity.
Displays the number of entries the current user can view in the activity without filtering.
Displays the number of viewable entries with filters applied.
Displays the number of entries displayed.
Displays a new entry form (if user has permission to add).
Displays the requested entry form or a new entry form if entry id has not been specified for editing. Useful for creating a 'single edit' view.
Displays the entries.
Displays 'Add new entry' action link that allows the user to open a new entry form.
Displays 'Add new entries' dropdown that allows the user to open the selected number of new entries in the form.
Search and filtering
This view does not provide additional patterns.