Attention : vous consultez actuellement la documentation dédiée aux versions 2.x de Moodle. La documentation pour les versions 3.x de Moodle est consultable ici : Les différents critères de restriction et celle pour Moodle 4.x est consultable là : Les différents critères de restriction.

Les différents critères de restriction

De MoodleDocs

Remarque : la traduction de cette page n'est pas terminée. N'hésitez pas à traduire tout ou partie de cette page ou à la compléter. Vous pouvez aussi utiliser la page de discussion pour vos recommandations et suggestions d'améliorations.

Remarque : cet article est en cours de rédaction. N'hésitez pas à le compléter. Veuillez utiliser la page de discussion ou un forum adéquat de Moodle en français pour vos recommandations et suggestions d'améliorations.

Cette page précise les critères de restriction qu'il est possible d'ajouter à une activité, unr ressource our une section de cours en lien avec le profil utilisateur.

Instructions

  • Les restrictions d'accès doivent être activées (voir Restrictions d'accès pour des précisions sur cette activation).
  • Lors de l'ajout ou de la modification d'une activité, d'une ressource ou d'une section de cours, il faut se rendre à la section 'Restreindre l'accès' et cliquer sur Ajouter une restriction.

Fichier:RA01.png

  • Click the button User profile
  • Choose the settings and profile fields you want to add restrictions for:

Fichier:userprofilenew.png

  • Save the settings.
  • Note that clicking the eye icon will hide the condition completely, whereas leaving it as "open" will give a greyed out message about the restriction:

Fichier:userprofilerestricted.png

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.