Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: Dataformview plugin info.

Template:Dataformview plugin info: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Dataform}}
{{Dataform}}
 
{{{description|
{{{description|TBC}}}
}}}
==Usage==
==Usage==
{{{usage|TBC}}}
{{{usage|
This view type has no special functionality.
}}}
==Settings==
==Settings==
===General settings===
{{{general settings|
{{{general settings|
===General settings===
====Name====
*'''Name''' - 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 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.  
*'''Description''' - 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.  
====Description====
*'''Visibility''' - This setting allows denying students' access to the view. The setting does not affect managers' (manage templates capability) access.
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.  
**Disabled: Students cannot access the view and do not see the view name in the views menu.
====Visibility====
**Enabled: Students can access the view but do not see the view name in the views menu.
This setting allows denying access to the view without the viewaccesshidden capability. By default Students cannot access hidden views.
**Visible: Students can access the view and can see the view name in the views menu.
====Filter====
*'''Filter''' - A predefined filter from the Filters list (if any) that will be enforced in the view.  
A predefined filter from the Filters list (if any) that will be enforced in the view.  
*'''Per page''' - 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).
====Per page====
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).
}}}
===View template===
{{{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.
}}}
===Entry template===
{{{entry template|
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.
}}}
}}}
===Submission settings===
{{{submission settings|
{{{submission settings|
===Submission===
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.
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.
Note that in order to apply the submission settings you must enable at least one submit button.
====Display when editing====
====Display when editing====
*'''Display mode'''
*'''Show only edited entries''' – (Default) When editing one or more entries the view will display only the edited entries.   
**'''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 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.
**'''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.
====Submission buttons====   
====Submission buttons====   
*'''Save''' - Saves the edited entry and returns to the view.
*'''Save''' - Saves the edited entry and returns to the view.
*'''Save and Continue''' - Saves the edited entry and continues editing.
*'''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 and returns to the view.
*'''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 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 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.
*'''Cancel''' - Cancels submission and returns to the view.
====Redirection====
====Redirection====
Line 37: Line 49:
*'''Response to submission''' - A message to display to the user after successful 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.
}}}
}}}
{{{view template|
===Other settings===
===View template===
{{{other settings|
TBC
N/A
}}}
}}}
{{{other settings|}}}
==Patterns==
==Patterns==
===Common view patterns===
{{{common patterns|
{{{common patterns|
===Common view patterns===
====Entries====
====Entries====
<nowiki>
=====##notifications##=====
##notifications##: Displays entry action notifications such “Updated 3 entries”, “Deleted 10 entries”, etc.
Displays entry action notifications such “Updated 3 entries”, “Deleted 10 entries”, etc.
##numentriestotal##: Displays the total number of entries in the activity.
=====##numentriestotal##=====
##numentriesviewable##: Displays the number of entries the current user can view in the activity without filtering.
Displays the total number of entries in the activity.
##numentriesviewable##: Displays the number of viewable entries with filters applied.
=====##numentriesviewable##=====
##numentriesdisplayed##: Displays the number of entries displayed.
Displays the number of entries the current user can view in the activity without filtering.
##newentry##: Displays a new entry form (if user has permission to add).
=====##numentriesfiltered##=====
##entries##: Displays the entries.
Displays the number of viewable entries with filters applied.
##addnewentry##: Displays 'Add new entry' action link that allows the user to open a new entry form.
=====##numentriesdisplayed##=====
##addnewentries##: Displays 'Add new entries' dropdown that allows the user to open the selected number of new entries in the form.  
Displays the number of entries displayed.
</nowiki>
=====##newentry##=====
Displays a new entry form (if user has permission to add).
=====##editentry##=====
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.
=====##entries##=====
Displays the entries.
=====##addnewentry##=====
Displays 'Add new entry' action link that allows the user to open a new entry form.
=====##addnewentries##=====
Displays 'Add new entries' dropdown that allows the user to open the selected number of new entries in the form.  


====Reference====
====Reference====
<nowiki>
=====##viewurl##=====
##viewurl##: ...
=====##viewsmenu##=====
##viewsmenu##: ...
=====##filtersmenu##=====
##filtersmenu##: ...
</nowiki>
====Search and filtering====
====Search and filtering====
<nowiki>
=====##quicksearch##=====
##quicksearch##: ...
=====##quickperpage##=====
##quickperpage##: ...
=====##advancedfilter##=====
##advancedfilter##: ...
</nowiki>


====Paging bar====
====Paging bar====
<nowiki>
=====##pagingbar##=====
##pagingbar##: ...
=====##pagingbar:next##=====
</nowiki>
=====##pagingbar:previous##=====
 
}}}
}}}
 
===Other patterns===
{{{other patterns|
{{{additional patterns|
===Additional patterns===
This view does not provide additional patterns.
This view does not provide additional patterns.
}}}
}}}
Line 89: Line 102:
{{Dataformview
{{Dataformview
|description = Enter a short description of the view with an illustration if applicable.
|description = Enter a short description of the view with an illustration if applicable.
|usage = Enter usage description if the view provides specialized functionality in addition or instead of the standard functionality of displaying entries. For example, the dataformview_csv view provides the specialized functionality of csv import and export of entries. The content of this parameter resides under a level 2 Usage heading and sub-headings should start from level 3.  
|usage = Enter a description of special functionality of the view with illustrations if applicable.
|general settings = Enter description of general settings if different from the base general settings. Defaults to base general settings.
|general settings = Enter description of general settings if different from the base general settings. Defaults to base general settings.
|view template = Enter description of view template settings if different from the base view template settings. Defaults to base view template settings.
|entry template = Enter description of view template settings if different from the base view template settings. Defaults to base view template settings.
|submission settings = Enter description of submission settings if different from the base submission settings. Defaults to base submission settings.
|submission settings = Enter description of submission settings if different from the base submission settings. Defaults to base submission settings.
|view template = Enter description of view template settings if different from the base view template settings. Defaults to base view template settings.
|other settings = Enter description of any other settings available in the view configuration form.
|other settings = Enter description of any other settings available in the view configuration form.
|common patterns = Enter description of common view patterns if different from the base common view patterns. Defaults to base common view patterns.
|common patterns = Enter description of common view patterns if different from the base common view patterns. Defaults to base common view patterns.
|additional patterns = Enter description of any additional patterns provided by the view if any.
|other patterns = Enter description of any additional patterns provided by the view if any.
}}
}}
</pre>
</pre>

Latest revision as of 23:01, 28 March 2014


Usage

This view type has no special functionality.

Settings

General settings

Name

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.

Description

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.

Visibility

This setting allows denying access to the view without the viewaccesshidden capability. By default Students cannot access hidden views.

Filter

A predefined filter from the Filters list (if any) that will be enforced in the view.

Per page

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

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.

Entry template

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.


Submission settings

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.

Submission buttons

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

Redirection

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

Other settings

N/A

Patterns

Common view patterns

Entries

##notifications##

Displays entry action notifications such “Updated 3 entries”, “Deleted 10 entries”, etc.

##numentriestotal##

Displays the total number of entries in the activity.

##numentriesviewable##

Displays the number of entries the current user can view in the activity without filtering.

##numentriesfiltered##

Displays the number of viewable entries with filters applied.

##numentriesdisplayed##

Displays the number of entries displayed.

##newentry##

Displays a new entry form (if user has permission to add).

##editentry##

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.

##entries##

Displays the entries.

##addnewentry##

Displays 'Add new entry' action link that allows the user to open a new entry form.

##addnewentries##

Displays 'Add new entries' dropdown that allows the user to open the selected number of new entries in the form.

Reference

##viewurl##
##viewsmenu##
##filtersmenu##

Search and filtering

##quicksearch##
##quickperpage##
##advancedfilter##

Paging bar

##pagingbar##
##pagingbar:next##
##pagingbar:previous##

Other patterns

This view does not provide additional patterns.


Copy and complete the following code to document a dataformview plugin:

{{Dataformview
|description = Enter a short description of the view with an illustration if applicable.
|usage = Enter a description of special functionality of the view with illustrations if applicable.
|general settings = Enter description of general settings if different from the base general settings. Defaults to base general settings.
|view template = Enter description of view template settings if different from the base view template settings. Defaults to base view template settings.
|entry template = Enter description of view template settings if different from the base view template settings. Defaults to base view template settings.
|submission settings = Enter description of submission settings if different from the base submission settings. Defaults to base submission settings.
|other settings = Enter description of any other settings available in the view configuration form.
|common patterns = Enter description of common view patterns if different from the base common view patterns. Defaults to base common view patterns.
|other patterns = Enter description of any additional patterns provided by the view if any.
}}