Note: You are currently viewing documentation for Moodle 2.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Availability dataformcontent.

Availability dataformcontent: Difference between revisions

From MoodleDocs
No edit summary
Line 12: Line 12:


==Using the condition==
==Using the condition==
The Dataform content condition requires a designated Dataform activity (Dashboard) where the instructor will add entries on behalf of participants to unlock the restricted activities and resources.
The Dataform content condition requires a designated Dataform activity (dashboard) where the instructor will add entries on behalf of participants to unlock the restricted activities and resources.


The Dashboard must have a field that can hold a reference to the restricted activity. The default reference type is the activity name. Accordingly the standard text field type and select field type can be used for the designated field. The field must have the reserved field name. By default the reserved name is 'Conditional Activity'. The Moodle administrator can set a different reserved name via the admin settings or lang strings.  
The dashboard must have a field that can hold a reference to the restricted activity. The default reference type is the activity name. Accordingly the standard text field type and select field type can be used for the designated field. The field must have the reserved field name. By default the reserved name is 'Conditional Activity'. The Moodle administrator can set a different reserved name via the admin settings or lang strings.  


  [[File:df-availability-condition-dashboard-designated-field.png]]
  [[File:df-availability-condition-dashboard-designated-field.png]]


With the Dashboard added in the course, the instructor can assign the condition to the desired activities. The Dataform content restriction type appears in the restriction chooser only if there exists in the course a Dataform instance with a field that has the reserved name.
With the dashboard Dataform added in the course, the instructor can assign the condition to the desired activities. The Dataform content restriction type appears in the restriction chooser only if there exists in the course a Dataform instance with a field that has the reserved name.


  [[File:df-availability-condition-add-restriction1.png]]
  [[File:df-availability-condition-add-restriction1.png]]
Line 29: Line 29:


With the 'Conditional Activity' field the instructor can apply the condition for particular participants. To apply the condition, the instructor has to add an entry on behalf of a particpant, and enter in the name of the restricted activity in the 'Conditional Activity' field. The participant will be granted access to the restricted activity effective immediately.
With the 'Conditional Activity' field the instructor can apply the condition for particular participants. To apply the condition, the instructor has to add an entry on behalf of a particpant, and enter in the name of the restricted activity in the 'Conditional Activity' field. The participant will be granted access to the restricted activity effective immediately.
[[File:df-availability-condition-by-dataform-content-1.png]]
[[File:df-availability-condition-by-dataform-content-1a.png]]
[[File:df-availability-condition-by-dataform-content-2.png]]
[[File:df-availability-condition-by-dataform-content-2a.png]]


==Steps for a basic example==
==Steps for a basic example==
* Enable conditional access in site administration
* Enable conditional access in site administration
* Go the course.
* Go the course.
* Add "Dashboard" Dataform
* Add "dashboard" Dataform
** In the Dataform settings, set 'Separate participants' to 'Yes'
** In the Dataform settings, set 'Separate participants' to 'Yes'
* Add fields in the Dashboard Dataform
* Add fields in the dashboard Dataform
** Add a text field with the name 'Conditional Activity'
** Add a text field with the name 'Conditional Activity'
* Add views in the Dashboard Dataform
* Add views in the dashboard Dataform
** Add an aligned view with the name 'List'
** Add an aligned view with the name 'List'
*** Set the view template to ##entries##
*** Set the view template to ##entries##
Line 46: Line 59:
* Add conditional activiy
* Add conditional activiy
** Add a Page resource in the course with the name 'Extra Page'.
** Add a Page resource in the course with the name 'Extra Page'.
** In the Page settings add a Datafrom content restriction condition and select the Dashboard.
** In the Page settings add a Datafrom content restriction condition and select the dashboard.
** Set the condition to hidden.
** Set the condition to hidden.
* As a student you will not see the Page resource.
* As a student you will not see the Page resource.
Line 53: Line 66:
* As a teacher, add an entry on behalf of the student to unlock the Extra Page resource.
* As a teacher, add an entry on behalf of the student to unlock the Extra Page resource.
** Log in as a teacher.
** Log in as a teacher.
** Go the Dashboard.
** Go the dashboard.
** Go to the Manage List view.
** Go to the Manage List view.
** Click 'Add a new entry'.
** Click 'Add a new entry'.

Revision as of 00:21, 27 March 2015


The Dataform content availability condition allows teachers to restrict user access to an activity or section based on content of a designated Dataform instance in the course.

Using the condition

The Dataform content condition requires a designated Dataform activity (dashboard) where the instructor will add entries on behalf of participants to unlock the restricted activities and resources.

The dashboard must have a field that can hold a reference to the restricted activity. The default reference type is the activity name. Accordingly the standard text field type and select field type can be used for the designated field. The field must have the reserved field name. By default the reserved name is 'Conditional Activity'. The Moodle administrator can set a different reserved name via the admin settings or lang strings.

df-availability-condition-dashboard-designated-field.png

With the dashboard Dataform added in the course, the instructor can assign the condition to the desired activities. The Dataform content restriction type appears in the restriction chooser only if there exists in the course a Dataform instance with a field that has the reserved name.

df-availability-condition-add-restriction1.png

In the condition the instructor has to select the preferred dashboard. Only Dataform instances with the designated field will be available for selection in the dropdown.

df-availability-condition-add-restriction2.png

With the 'Conditional Activity' field the instructor can apply the condition for particular participants. To apply the condition, the instructor has to add an entry on behalf of a particpant, and enter in the name of the restricted activity in the 'Conditional Activity' field. The participant will be granted access to the restricted activity effective immediately.

df-availability-condition-by-dataform-content-1.png


df-availability-condition-by-dataform-content-1a.png


df-availability-condition-by-dataform-content-2.png


df-availability-condition-by-dataform-content-2a.png


Steps for a basic example

  • Enable conditional access in site administration
  • Go the course.
  • Add "dashboard" Dataform
    • In the Dataform settings, set 'Separate participants' to 'Yes'
  • Add fields in the dashboard Dataform
    • Add a text field with the name 'Conditional Activity'
  • Add views in the dashboard Dataform
    • Add an aligned view with the name 'List'
      • Set the view template to ##entries##
      • Uncheck all the view submission buttons
    • Set the 'List' view as the default view
    • Add an aligned view with the name 'Manage List'
  • Add conditional activiy
    • Add a Page resource in the course with the name 'Extra Page'.
    • In the Page settings add a Datafrom content restriction condition and select the dashboard.
    • Set the condition to hidden.
  • As a student you will not see the Page resource.
    • Log in as a student.
    • You will not see the Extra Page resource in the course.
  • As a teacher, add an entry on behalf of the student to unlock the Extra Page resource.
    • Log in as a teacher.
    • Go the dashboard.
    • Go to the Manage List view.
    • Click 'Add a new entry'.
    • Select the student in the entry user dropdown.
    • Enter the text Extra Page in the text field.
    • Save the entry.
  • Now the student can see and access the Extra Page resource.

Admin settings

df-availability-condition-admin-settings.png

The reserved field name and reserved filter name are also available via the plugin language strings. The language strings take effect when the admin settings remain empty.

Note: Moodle doesn't yet provide access to the admin settings page of availability condition plugins. You can still set these settings directly in config.php.

Installation

Git clone

Download

See also