-

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: Dataform System events.

Dataform System events: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 2: Line 2:
{{Dataform Docs Note 1}}
{{Dataform Docs Note 1}}


The list below shows the Dataform capabilities and their default Allow setting.
The Dataform system events are triggered with attached data during the activity, at moments that may be of interest and worth capturing for various purposes (e.g. logging, notifications). You can capture these events in your existing custom module or create a designated plugin (e.g. block, local) for that.


The View capabilities can be set in the Dataform context for all views in the activity or in a [[Dataformaccess View]] rule for a subset of the view.
Add-on views and fields may provide further event triggers.
The Entry capabilities can be set in the Dataform context for entries in all the views or in a [[Dataformaccess Entry]] rule for a subset of entries in a subset of the views.  


{| class=""  style="background-color:inherit;border:0;"     
==Activity==
|-     
{| class="nicetable"  style="background-color:inherit;
| style="text-align:left;" colspan="9" | <h2>Activity capabilities</h2>   
<!--{{ Dataform system event table row |  | course_module_viewed | The activity has been displayed. }}-->
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
<!-- {{ Dataform system event table row |  | course_module_instance_list_viewed | The Dataform index has been viewed. }} -->
{{Dataform capability table row |  | [[Capabilities/mod/dataform:addinstance|dataform:addinstance]] | Add a new Dataform activity |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:indexview|dataform:indexview]] | View the course's Dataform index |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:messagingview|dataform:messagingview]] | View the messaging options of a Dataform activity |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managetemplates|dataform:managetemplates]] | Can do everything in the Dataform activity |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:manageviews|dataform:manageviews]] | Manage Dataform views |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefields|dataform:managefields]] | Manage Dataform fields |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefilters|dataform:managefilters]] | Manage Dataform filters |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefilters|dataform:manageaccess]] | Manage Dataform access rules |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefilters|dataform:managenotifications]] | Manage Dataform notification rules |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefilters|dataform:managecss]] | Manage Dataform css |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefilters|dataform:managejs]] | Manage Dataform js |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managefilters|dataform:managejs]] | Manage Dataform tools |  |  |  |  | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h2>View capabilities</h2>   
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  | | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:viewaccess|dataform:viewaccess]] | Access a non-hidden view | V | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:viewaccesshidden|dataform:viewaccesshidden]] | Access a hidden view |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:viewaccessearly|dataform:viewaccessearly]] | Access a view before activity availability |  |  | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:viewaccesslate|dataform:viewaccesslate]] | Access a view after activity is due |  |  | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:viewfilteroverride|dataform:viewfilteroverride]] | Override view filter |  |  |  | V | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h2>Entry capabilities</h2>   
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:manageentries|dataform:manageentries]] | Manage entries<br /><br />*Can view hidden or owner-only  fields.<br />*Can update non-editable fields.<br />*Can add more than max entries.<br />*Not conditioned by required entries.<br />*Can view others' entries in separate participants mode.<br />*Can edit entry author (via the <nowiki>[[EAU:edit]]</nowiki> pattern).<br />*Can edit entry group (via the <nowiki>[[EGR:edit]]</nowiki> pattern).|  |  |  |  | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h3>Entries before the activity is available</h3>   
|-     
| style="text-align:left;" colspan="9" | If the activity is not yet available and these permissions are not granted, the user will not be able to do the corresponding actions on any type of entry.
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryearlyview|dataform:entryearlyview]] | View entries early |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryearlyadd|dataform:entryearlyadd]] | Add entries early |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryearlyupdate|dataform:entryearlyupdate]] | Update entries early |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryearlydelete|dataform:entryearlydelete]] | Delete entries early |  |  |  | V | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h3>Entries after the activity is due</h3>   
|-     
| style="text-align:left;" colspan="9" | If the activity is past due and these permissions are not granted, the user will not be able to do the corresponding actions on any type of entry.
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrylateview|dataform:entrylateview]] | View entries late |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrylateadd|dataform:entrylateadd]] | Add entries late |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrylateupdate|dataform:entrylateupdate]] | Update entries late |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrylatedelete|dataform:entrylatedelete]] | Delete entries late |  |  |  | V | V | V }}
|-      
| style="text-align:left;" colspan="9" | <h3>Entries authored by the current user</h3>    
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryownview|dataform:entryownview]] | View own entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryownexport|dataform:entryownexport]] | Export own entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryownadd|dataform:entryownadd]] | Add own entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryownupdate|dataform:entryownupdate]] | Update own entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryowndelete|dataform:entryowndelete]] | Delete own entries |  | V | V | V | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h3>Entries authored by members of the current user's group</h3>   
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrygroupview|dataform:entrygroupview]] | View group entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrygroupexport|dataform:entrygroupexport]] | Export group entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrygroupadd|dataform:entrygroupadd]] | Add group entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrygroupupdate|dataform:entrygroupupdate]] | Update group entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entrygroupdelete|dataform:entrygroupdelete]] | Delete group entries |  | V | V | V | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h3>Entries that are not own, group, or anonymous</h3>   
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanyview|dataform:entryanyview]] | View any entries | V | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanyexport|dataform:entryanyexport]] | Export any entries | V | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanyadd|dataform:entryanyadd]] | Add any entries |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanyupdate|dataform:entryanyupdate]] | Update any entries |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanydelete|dataform:entryanydelete]] | Delete any entries |  |  |  | V | V | V }}
|-     
| style="text-align:left;" colspan="9" | <h3>Entries authored anonymously</h3>   
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanonymousview|dataform:entryanonymousview]] | View anonymous entries | V | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanonymousexport|dataform:entryanonymousexport]] | Export anonymous entries |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanonymousadd|dataform:entryanonymousadd]] | Add anonymous entries |  | V | V | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanonymousupdate|dataform:entryanonymousupdate]] | Update anonymous entries |  |  |  | V | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:entryanonymousdelete|dataform:entryanonymousdelete]] | Delete anonymous entries |  |  |  | V | V | V }}
|-      
| style="text-align:left;" colspan="9" | <h2>Preset capabilities</h2>    
{{Dataform capability table row | font-weight:bold;background-color:#F2F2F2; |  |  | Guest | Front page | Student | Teacher | Teacher (editing) | Manager }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:managepresets|dataform:managepresets]] | Manage presets |  |  |  |  | V | V }}
{{Dataform capability table row |  | [[Capabilities/mod/dataform:presetsviewall|dataform:presetsviewall]] | View all presets |  |  |  |  | V | V }}
|}
|}
==View==
{| class="nicetable"  style="background-color:inherit;" 
{{Dataform system event table row |  | view_created | A view has been added to the activity. }}
{{Dataform system event table row |  | view_updated | A view has been updated in the activity. }}
{{Dataform system event table row |  | view_deleted | A view has been deleted from the activity. }}
{{Dataform system event table row |  | view_viewed | A view has been displayed. }}
|}
==Field==
{| class="nicetable"  style="background-color:inherit;" 
{{Dataform system event table row |  | field_created | A field has been added to the activity. }}
{{Dataform system event table row |  | field_updated | A field has been updated in the activity. }}
{{Dataform system event table row |  | field_deleted | A field has been deleted from the activity. }}
{{Dataform system event table row |  | field_content_updated | The entry content of a field has been updated. }}
|}
==Filter==
{| class="nicetable"  style="background-color:inherit;" 
{{Dataform system event table row |  | filter_created | A filter has been added to the activity. }}
{{Dataform system event table row |  | filter_updated | A filter has been updated in the activity. }}
{{Dataform system event table row |  | filter_deleted | A filter has been deleted from the activity. }}
|}
==Entry==
{| class="nicetable"  style="background-color:inherit;" 
{{Dataform system event table row |  | entry_created | An entry has been added to the activity. }}
{{Dataform system event table row |  | entry_updated | An entry has been updated in the activity. }}
{{Dataform system event table row |  | entry_deleted | An entry has been deleted from the activity. }}
|}
==Other==
{| class="nicetable"  style="background-color:inherit;" 
{{Dataform system event table row |  | comment_created | A comment has been added to an entry in the activity. }}
{{Dataform system event table row |  | comment_deleted | A comment has been deleted from an entry in the activity. }}
{{Dataform system event table row |  | rating_created | A rating has been added to an entry in the activity. }}
{{Dataform system event table row |  | rating_deleted | A rating has been deleted from an entry in the activity. }}
|}
==See also==
[https://docs.moodle.org/dev/Event_2 Event 2]

Revision as of 00:54, 8 April 2014


The Dataform system events are triggered with attached data during the activity, at moments that may be of interest and worth capturing for various purposes (e.g. logging, notifications). You can capture these events in your existing custom module or create a designated plugin (e.g. block, local) for that.

Add-on views and fields may provide further event triggers.

Activity

View

view_created

A view has been added to the activity.

view_updated

A view has been updated in the activity.

view_deleted

A view has been deleted from the activity.

view_viewed

A view has been displayed.

Field

field_created

A field has been added to the activity.

field_updated

A field has been updated in the activity.

field_deleted

A field has been deleted from the activity.

field_content_updated

The entry content of a field has been updated.

Filter

filter_created

A filter has been added to the activity.

filter_updated

A filter has been updated in the activity.

filter_deleted

A filter has been deleted from the activity.

Entry

entry_created

An entry has been added to the activity.

entry_updated

An entry has been updated in the activity.

entry_deleted

An entry has been deleted from the activity.

Other

comment_created

A comment has been added to an entry in the activity.

comment_deleted

A comment has been deleted from an entry in the activity.

rating_created

A rating has been added to an entry in the activity.

rating_deleted

A rating has been deleted from an entry in the activity.

See also

Event 2