Note: You are currently viewing documentation for Moodle 2.6. Up-to-date documentation for the latest stable version of Moodle may be available here: Conditional user fields.

Conditional user fields: Difference between revisions

From MoodleDocs
(Created page with "This page explains how to restrict an activity, resource or course section via user fields and/or custom profile fields. ==Instructions== 1. Conditional access must be enabled....")
 
(removing new features template)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page explains how to restrict an activity, resource or course section via user fields and/or custom profile fields.
{{Conditional activities}}This page explains how to restrict an activity, resource or course section via user fields and/or custom profile fields.


==Instructions==
==Instructions==


1. Conditional access must be enabled. (see [[Conditional_activities]] for instructions on how to enable this for your site).<br />
# Conditional access must be enabled (see [[Conditional activities]] for instructions on how to enable this for your site).
2. When adding or editing an activity, resource or course section scroll to the user fields in the 'Restrict Access' section.<br />
# When adding or editing an activity, resource or course section scroll to the user fields in the 'Restrict Access' section.
3. Choose which fields you want to restrict by (adding more if needed), select the restriction you want to put in place and then enter a value.<br />
# Choose which fields you want to restrict by (adding more if needed), select the restriction you want to put in place and then enter a value.
4. Save the settings.
# Save the settings.


==Example==
==Example==
Line 18: Line 18:
[[File:conditional_user_courseview.jpg]]
[[File:conditional_user_courseview.jpg]]


==User Fields==
==User fields==


You can restrict by using one of the user fields that are located in the Moodle user table. Not all the user fields are included, as not all of them would make sense in this context. The ones included are listed below.
You can restrict by using one of the user fields that are located in the Moodle user table. Not all the user fields are included, as not all of them would make sense in this context. The ones included are listed below.


===AIM ID===
* AIM ID - This is the value in the 'aim' column
* Address - This is the value in the 'address' column
* City/town - This is the value in the 'city' column
* Country - This is the value in the 'country' column
* Department - This is the value in the 'department' column
* Email Address - This is the value in the 'email' column
* First name - This is the value in the 'firstname' column
* ICQ number - This is the value in the 'icq' column
* ID number - This is the value in the 'idnumber' column
* Institution - This is the value in the 'institution' column
* Interests - This is the value in the 'interests' column
* MSN ID - This is the value in the 'msn' column
* Mobile phone - This is the value in the 'phone2' column
* Phone - This is the value in the 'phone1' column
* Skype ID - This is the value in the 'skype' column
* Surname - This is the value in the 'lastname' column
* Web page - This is the value in the 'url' column
* Yahoo ID - This is the value in the 'yahoo' column


This is the value in the 'aim' column.
==Custom profile fields==


===Address===
These are all the custom profile fields that have been created on the Moodle site. See [[User profile fields]].
 
This is the value in the 'address' column.
 
===City/town===
 
This is the value in the 'city' column.
 
===Country===
 
This is the value in the 'country' column.
 
===Department===
 
This is the value in the 'department' column.
 
===Email Address===
 
This is the value in the 'email' column.
 
===First name===
 
This is the value in the 'firstname' column.
 
===ICQ number===
 
This is the value in the 'icq' column.
 
===ID number===
 
This is the value in the 'idnumber' column.
 
===Institution===
 
This is the value in the 'institution' column.
 
===Interests===
 
This is the value in the 'interests' column.
 
===MSN ID===
 
This is the value in the 'msn' column.
 
===Mobile phone===
 
This is the value in the 'phone2' column.
 
===Phone===
 
This is the value in the 'phone1' column.
 
===Skype ID===
 
This is the value in the 'skype' column.
 
===Surname===
 
This is the value in the 'lastname' column.
 
===Web page===
 
This is the value in the 'url' column.
 
===Yahoo ID===
 
This is the value in the 'yahoo' column.
 
==Custom Profile Fields==
 
These are all the custom profile fields that have been created on the Moodle site. See [[User_profile_fields]]


==Operators==
==Operators==


The operators define the relationship between the field chosen and the value entered. For example, when the user's email must contain @school.com, the field chosen is 'Email address', the operater is 'contains' and the value is '@school.com'.
The operators define the relationship between the field chosen and the value entered. For example, when the user's email must contain @school.com, the field chosen is 'Email address', the operator is 'contains' and the value is '@school.com'.
 
===Contains===
 
This operator restricts access to those whos chosen field contains the value provided.
 
===Does not contain===
 
This operator restricts access to those whos chosen field does not contain the value provided.
 
===Is Equal To===


This operator restricts access to those whos chosen field equals the value provided.
;Contains
:This operator restricts access to those whose chosen field contains the value provided.


===Starts With===
;Does not contain
:This operator restricts access to those whose chosen field does not contain the value provided.


This operator restricts access to the activity to those whos chosen field starts with the value provided.
;Is Equal To
:This operator restricts access to those whos chosen field equals the value provided.


===Ends With===
;Starts With
:This operator restricts access to the activity to those whos chosen field starts with the value provided.


This operator restricts access to the activity to those whos chosen field ends with the value provided.
;Ends With
:This operator restricts access to the activity to those whos chosen field ends with the value provided.


===Is Empty===
;Is Empty
:This operator restricts access to the activity to those whos chosen field is empty. Note, if any value is provided in this case, it is ignored.


This operator restricts access to the activity to those whos chosen field is empty. Note, if any value is provided in this case, it is ignored.
[[de:Bedingte Nutzerfelder]]

Latest revision as of 20:21, 9 April 2013

This page explains how to restrict an activity, resource or course section via user fields and/or custom profile fields.

Instructions

  1. Conditional access must be enabled (see Conditional activities for instructions on how to enable this for your site).
  2. When adding or editing an activity, resource or course section scroll to the user fields in the 'Restrict Access' section.
  3. Choose which fields you want to restrict by (adding more if needed), select the restriction you want to put in place and then enter a value.
  4. Save the settings.

Example

This is an example of the interface in Moodle when adding an activity to a course with the conditional functionality enabled

conditional user setup.jpg

This is how it will appear to users who fail to meet the restrictions set in place.

conditional user courseview.jpg

User fields

You can restrict by using one of the user fields that are located in the Moodle user table. Not all the user fields are included, as not all of them would make sense in this context. The ones included are listed below.

  • AIM ID - This is the value in the 'aim' column
  • Address - This is the value in the 'address' column
  • City/town - This is the value in the 'city' column
  • Country - This is the value in the 'country' column
  • Department - This is the value in the 'department' column
  • Email Address - This is the value in the 'email' column
  • First name - This is the value in the 'firstname' column
  • ICQ number - This is the value in the 'icq' column
  • ID number - This is the value in the 'idnumber' column
  • Institution - This is the value in the 'institution' column
  • Interests - This is the value in the 'interests' column
  • MSN ID - This is the value in the 'msn' column
  • Mobile phone - This is the value in the 'phone2' column
  • Phone - This is the value in the 'phone1' column
  • Skype ID - This is the value in the 'skype' column
  • Surname - This is the value in the 'lastname' column
  • Web page - This is the value in the 'url' column
  • Yahoo ID - This is the value in the 'yahoo' column

Custom profile fields

These are all the custom profile fields that have been created on the Moodle site. See User profile fields.

Operators

The operators define the relationship between the field chosen and the value entered. For example, when the user's email must contain @school.com, the field chosen is 'Email address', the operator is 'contains' and the value is '@school.com'.

Contains
This operator restricts access to those whose chosen field contains the value provided.
Does not contain
This operator restricts access to those whose chosen field does not contain the value provided.
Is Equal To
This operator restricts access to those whos chosen field equals the value provided.
Starts With
This operator restricts access to the activity to those whos chosen field starts with the value provided.
Ends With
This operator restricts access to the activity to those whos chosen field ends with the value provided.
Is Empty
This operator restricts access to the activity to those whos chosen field is empty. Note, if any value is provided in this case, it is ignored.