Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Datalynx Views.

Datalynx Views

From MoodleDocs
Revision as of 21:52, 10 June 2014 by David Bogner (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Datalynx views allow to display and arrange fields, forms and entries in a lot of different ways. Views can be edited and created via the tab "Manage -> Views".

Usage of views

A view can be used to:
  • Display forms for data input (Edit and create an entry)
  • Display all data collected (all entries) in a list view
  • Display a single entry
  • Export entries as PDF or CSV

Manage -> Views

When going to "Manage -> Views", you will see an overview of all views already created for the datalynx instance. It will look similar to this:

Views Index

1: Adding a view

To add a view select the view type from the 'Add a view' dropdown. This will open the view configuration form where you can configure the view templates and behaviour. Typically, views have default configuration and if this default configuration serves your purpose you can simply enter a name for the view and save.

2: Name of the view

By clicking on the name of the view, you access the view in browse mode. The name of the view can be edited with clicking on the "Edit" button (5)

3: Type of the view

This column show the type of the view. Standard type is "grid". For displaying a view for bulk editing or in tabular form, the type "tabular" is the best choice.

4: Description

An optional description of the view. The description is only used in "Manage -> Views" and provides additional information of the purpose of the view.

5: Visibility

A view can be visible for certain roles only. This is conrtolled by a capability, that has the same name as the role, that has the specific capability set per default. That means the role "student" has the permission to access the view, when the "student" permission is checked. But you can also add the permission "viewprivilegestudent" (that's the name for it in "Datalynx instance -> Block Administration -> Permissions") to another role. Please note, that a teacher does not have the permission "viewprivilegestudent". So if you want, that a teacher can access the view you have to check the "viewprivilegeteacher" in the view settings. If there is not any permission checked in the view settings, then only admins can access the view. They have the permission "viewprivilegeadmin". This permission isn't assigned to any role, but as admins can do anything, they have the permission.

6: DEM: Default view, Editing view, More view

The Datalynx activity must have a default view to fall back on to when the activity is accessed without specifying the target view (for instance, when you access the activity from the activity link on the course page). Without a default view, the activity can not be accessed by students and roles, that have not the right to edit the settings of the datalynx activity. That means: Make sure to always check the default view by clicking on the symbol in the column 'D

You can select the default view by clicking the 'Default' box in the view list. The selected default view is marked by a check sign. You can change the default view at any time. Since the default view must be visible, if you set a hidden view to default, this view will automatically become visible and you will not be able to hide it as long as it is the default view.

7: Forcing a view filter

When filters are defined for the activity you can force a filter on a view by selecting the filter either from the index list or in the view configuration form. When the view forces a filter, users without cannot apply other activity filters (the activity filters menu will not be displayed). This will be changed in future versions. You will be able to override or narrow view filters according tot he settings of the filter.

8: Editing a view

Clicking on the edit symbol, will open the view settings form. There you can change all the settings of a view, except D,E,M. These options can only be applied in "Manage -> Views".

9: Duplicating one or more views

You can duplicate a view by clicking the duplicate icon of the view. This will create an exact copy of the duplicated view with a different name. You can then proceed to update the view settings. This may be particularly useful if you need to create several very similar views. For example, you can create a complex view and then duplicate it, and assign to each of the instances a different filter so as to have a designated view for certain subsets of the entries. You can duplicate more than one view in one go by selecting the designated views and clicking the bulk-duplicate icon (in the list's header).

10: Resetting a view

Each view type has default templates which are generated and automatically added to the configuration form when adding a new view. The default View template typically consists of navigation menus, quick filters, add new entry link and entries display. The default Entry template (where applicable) typically adds the base pattern for each field and the edit and delete action buttons. As you build the activity you may change the templates of a view and in some cases you may wish to reset the templates to their defaults. This can be done by clicking the reset icon of the designated view in the views index or in the view configuration form.

11: Deleting one or more views

You can delete a view by clicking the delete icon of the view. You can delete more than one view in one go by selecting the designated views and clicking and bulk-delete icon (in the list's header).

12: Select views for bulk duplication or deleting

You can bulk delete or duplicate views by selecting multiple views in this column. In the header of the list, click on the bulk-symbolf of either deleting or duplicating the view.


Elements of a view

A view consists of different elements, most of them are optional

  • fields: They are used to define data units such as numbers, dates, etc. that can be edited/added to an entry
  • filter: A filter defines how many entries are displayed in a view, how the entries are sorted and which entries are displayed according to predifened search criteria
  • html: With the moodle text editor the layout of a view can be created
  • name: The name of the view
  • tags: There are tags for special elements such as a paging bar, a search box, an advanced filter, etc..
  • view dependant settings: For each view type, there are special settings, that can be applied. For example, the PDF view allows to set the format of the PDF (letter or A4)
  • visibility: A setting, that