Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Datalynx Fields.

Datalynx Fields

From MoodleDocs

Datalynx fields are used to collect and display predefined data elements such as text, dates or numbers in an entry. You can choose between a huge amount of fields. Field administration can be accessed via the tab "Manage -> Fields".

General field settings

These settings are available for all field types. For the settings of a specific field type have a look at the documentation of the specific field type.

Name

Name of the field. Will be used for creating the tag, that will be placed in a view. Example: Name = Car brands, the tag to place in view will be Car brands. Make the field name as short and simple as possible.

Description

Optional description of the field. Is not really used except in the fields overview in the "Manage" area.

Visible to

  • Everyone: Use this, if you want, that every course member (role with capability to access a view) can see the field. Example: Photo for a photo activity, that should be reviewed by other course members
  • Owners and managers: Use this, if you want to hide critical or personal informaation to be seen by other people than managers or the person who created the entry (= owner). Example: Hiding bank account numbers or other sensitive personal info.
  • Managers only: Use this to hide comments from the owner, such as evaluation comments, that should only be seen by other managers.

Editable

  • Yes: Owner and managers can edit
  • No: Only manager can edit the value (Example: Used for certification purposes)

Field label

The field label allows for specifying a designated field label that can be added to the view by means of the [[fieldname@]] field pattern. This field pattern observes the field visibility and is hidden if the field is set to be hidden. The field label can also serve as a field display template and it interprets patterns of that field if included in the label. For example, with a number field called Number and the field label defined as 'You have earned [[Number]] credits.' and an entry where the number value is 47 the pattern [[Number@]] would be displayed as 'You have earned 47 credits.'

Example

  • Field name: My number
  • Field label: <h1> My number is: [[My number]]. It is the best number of all! </h1>
  • Tag to be used in a view: [[My number@]]

Result in a view, that displays a chosen value: The tag [[My number@]] will be replaced with the field label and the field value, if the field is visible in a view. Assume you entered the number 40, then the result would look like this (it is a heading):

My number is: 40. It is the best number of all!

Result in a view, that is used for data input (creating an entry): Same as display, but instead of the number to display, the input field, where you have to enter the number will be displayed.

Adding a field

To add a field select the field type from the 'Add a field' dropdown. This will open the field configuration form where you can name the field instance and configure other settings as required.

Setting visibility

You can set the field visibility either in the field configuration form or by clicking the field's eye icon in the Visible column. The field can be visible to everyone (default), entry-author and managers, or only managers (where managers are users with manageentries capability in the context).

Setting editability

You can set the field editability either in the field configuration form or by clicking the field's lock icon in the Editable column. The field can be editable by the entry-author and managers (default) or only by managers (where managers are users with manageentries capability in the context).

Updating a field

You can click on the field's name or the edit icon of the field to open the configuration form for updating.

Duplicating one or more fields

You can duplicate a field by clicking the duplicate icon of the field. This will create an exact copy of the duplicated fiel with a different name. You can then proceed to update the field settings.

You can duplicate more than one field in one go by selecting the designated fields and clicking the bulk-duplicate icon (in the list's header).

Deleting one or more fields

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

Available fields

A list of fields, available for data input and display

Checkbox

Suitable for choosing multiple option values. (Multiselect). You can add new option values or update existing option values. Datalynx deals also with the case, if someone already did choose a certain option value, and you rename or delete this option value.

Add options

One option per line

Default values (one per line)

These are the options with an already activated checkbox, when a user creates a new entry.

Options separator

Choose how the options should be displayed.

Allow adding options

If enabled, a user is not limited to select from the given options, but can also add a new option to the already defined options.

Course grade item

Select a grade item from a course activity.

Course group

Display course group of the owner.

Datalynx view

The fields embeds another datalynx activity in the hosting activity. It displays entries of the embedded activity according to the filter settings of the field. Example: Display all the entries of datalynx activity B of the owner of an entry in datalynx activity A.

Datalynx

Choose the Datalynx whose view you want to display. You can select any Datalynx in this site for which you have 'managetemplates' capability.

View

Choose the view you want to display from the selectd Datalynx.

Filter by

Select Entry author to include in the displayed view only entries by the author of the hosting entry. Select Entry group to include in the displayed view only entries by members of the hosting entry author's group.

Custom sort

You can add custom sort criteria that would be applied to the displayed view. Each criterion is a comma separated [[field name]],ASC/DESC pair. One criterion per line. The pattern must be included in the selected view template. For example, assuming the patterns ##author:firstname## and [[Count]] are included in the selected view template, by the following criteria the view will display the entries sorted by the author first name in ascending order and counts in descending order: ##author:firstname##,ASC [[Count]],DESC

Custom search

You can add custom search criteria that would be applied to the displayed view. Each criterion is a comma separated AND/OR,remote field pattern,0/1,operator,local field pattern/value. One criterion per line. The pattern must be included in the selected view template. For example, assuming the patterns ##author:firstname## is included in the selected view template, by the following criteria the view will display only entries by the author first name: AND,##author:firstname##,0,=,##author:firstname##

Duration

The only duration config option is the width of the input box. The input box is used to enter a number when editing an entry. It looks like this:

File

Upload one or more files.

Specific settings for this field:

  • Total size of uploaded files
  • Max number of uploaded files
  • Accepted file types: Any file, HTML, image.

Identifier

Create automatically a unique ID for an entry. Specific settings are:

  • Salt source: Usually you should use Random for that option
  • Salt size: Numerical value, default 10
  • Uniqueness: YES/NO: Checks if generated Identifier is really unique. If not it is calculated again.

Nanogong

Input live audio. This field has been removed. Please use https://moodle.org/plugins/view.php?plugin=repository_recordaudio instead to record and upload audio files.

Number

Input a number. Settings available:

  • Decimals: How many decimals should be accepted
  • Width: Width of the input field used in edit mode

Picture

Upload one or more pictures.

  • Display dimensions (width x height)px: fixed dimensions, image will be scaled disproportionally if both values width and height are given. If only width or height is given the other value is scaled proportionally
  • Max dimensions (width x height)px:
  • Thumb dimensions (width x height)px: Size of the thumbnail. To generate a thumb use tha tag imagefieldname:thumb
  • Total size of uploded files
  • Max number of uploaded files
  • Accepted file types: all image files, jpg only, png only or gif only

Radio button

Choose one option from many available options. Available settings:

  • Add options: Fill in one option per line
  • Default: Default value to use, optional.
  • Allow adding options: If set, users are not limited to choose from the given values defined in "Add options", but can add a completely new option value. This option value is added to "Add options" so that other users can choose the newly created option value
  • Limit choices for users: Enable this to prevent a user from choosing the same option more than once in separate entries.
  • Options separator: How to display the options

Select

Like radio, but a dropdown menu is displayed for choosing a value.

Select (multiple)

Select multiple values from a list

Team member select

Select users who are enrolled and have the given role. You can also define if a team member is notified when it is added.

  • Maximum team size: Specify the maximum size of the team. It must be a positive integer.
  • Minimum team size: Enter the miminum allowed number of team members here. 0 for unlimited team members
  • Admissible roles: Users possessing any of the selected roles will be admissible to the team. At least one role must be selected.
    • Student
    • Non-editing teacher
    • Teacher
    • Manager
  • List format:
  • Notify team members: Select this option to inform team members of their membership status change.
  • Team field: Check this box to designate this field as a team field. When approving an entry with a specified team that entry will be copied and assigned to every team member. Only one field per Datalynx instance may be designated as a team field.
  • Reference field: Select a field to serve as a duplicate prevention field. This will skip creating entries for users who already have an approved entry with the same field value as the one being approved.

Text

Enter a single line of text.

  • Allow autolink:
  • Width: The width of the input field in edit mode
  • Format: Restrict the input text to one of the following values
    • You must enter only letters or numbers here.
    • You must enter only letters here.
    • You must enter a number here.
    • You must enter a valid email address here.
    • You must enter no punctuation characters here.
  • Number of characters: Restrict the allowed number of chars to:
    • Minimun
    • Max
    • Ramge

Text area

Enter complex HTML with a visual editor.

  • Enable editor: Choose whether a visual editor should be used for formatting the text.
  • Columns: Width of the input field
  • Rows: Height of the input field
  • Trust text: Users can input malicious code, prevent them from doing that?
  • Total size of uploded files: You can upload files with the editor to be included in the text
  • Max number of uploaded files:

Time

Enter a time or a date. Available settings:

  • Date only: Select this option to display only the date portion of the field value and a date only selector when the field is edited.
  • Masked: Select this option to render Time/Date selector dropdowns with labels (e.g. Year, Month, Day) for empty values. The labels are defined in the language pack.
  • Start year: Year value (YYYY). This value determines the min year value in the date/time selector in editing mode. Leave 0 or empty to use Moodle default.
  • Stop year:Year value (YYYY). This value determines the max year value in the date/time selector in editing mode. Leave 0 or empty to use Moodle default.
  • Display format:You can set a custom display format for the field value. Format options can be found at PHP strftime format. http://php.net/manual/en/function.strftime.php

Url

Enter an url

  • Use url picker when editing: Use moodle url picker
  • Force name for the link: When set this string is used as link text, otherwise user can choose a link text.
  • CSS classes: Style to append to the link
  • 'target' attribute: User the value _blank for new window, otherwise leave empty.

User custom info

If custom user profile fields are defined, select a custom user profile field to display. More info on user profile fields: User profile fields