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

Availability dataformcontent

From MoodleDocs
Revision as of 13:38, 28 March 2015 by Itamar Tzadok (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

Basic application

The Dataform content condition requires a designated Dataform activity (dashboard) where the instructor will add entries 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 that is set in the condition configuration. By default the reserved name is 'Conditional Activity'. The Moodle administrator can set a different reserved name via the admin settings or lang strings of the condition plugin.

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 dashboard Dataform set up in the course and activities/resources with restriction conditions on content of the dashboard Dataform the instructor can start adding entries in the dashboard to grant access to the restricted activities.

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

To grant access the instructor has to add an entry and enter the name of the restricted activity in the input box of the 'Conditional Activity' field.

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

All participants who can view this entry in the dashboard will be granted access to the specified activity effective immediately.

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

Participants can also view in the dashboard Dataform the list of activities that the instructor unlocked.

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

Personalized access

To set personalized access control, the instructor can set the dashboard Dataform to separate participants. In this mode participants can see only their own entries. The instructor can also add entries on behalf of participants either by CSV import or by using the [[EAU:edit]] pattern in the entry template.

Steps for basic personalized access

  1. In site administration, enable conditional access .
  2. In the course, add a Dataform with the name 'Dashboard'.
    1. In the Dataform settings, set 'Separate participants' to 'Yes'.
    2. In the Dataform fields index, add a text field with the name 'Conditional Activity'.
    3. In the Dataform views index, add an aligned view with the name 'List'.
      1. Set the view template to ##entries##.
      2. Uncheck all the view submission buttons.
      3. Set the view as the default view.
    4. In the Dataform views index, add an aligned view with the name 'Manage List'.
      1. Replace in the entry template '[[EAU:name]]' with '[[EAU:edit]]'.
  3. In the course, add a Page resource with the name 'Extra Page'.
    1. In the Page settings add a Datafrom content restriction condition and select 'Dashboard'.
    2. Set the condition to hidden.
  4. Log in as a student.
    1. You will not see the Extra Page resource in the course.
  5. Log in as a teacher.
    1. Go the dashboard.
    2. Go to the Manage List view.
    3. Click 'Add a new entry'.
    4. Select the student in the entry user dropdown.
    5. Enter the text 'Extra Page' in the text field.
    6. Save the entry.
  6. Log in as the student.
    1. You will see the Extra Page resource in the course.

Advanced access criteria

The instructor can set advanced access criteria by adding to the dashboard Dataform a filter with the reserved name 'Availability'. The condition will automatically apply the filter, if exists, when calculating the activity restriction for the current user.

df-availability-condition-Availability-filter1.png

With such a filter the instructor can use further entry content to condition access to the restricted activity. For example, if the dashboard Dataform has From and To time fields and the Availability filter contains the search criteria:

  • From is less or equal now
  • To is greater or equal now
df-availability-condition-Availability-filter2.png

access to the target activity will be granted only in the period between the From time and To time.

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