Création de rôles personnalisés

De MoodleDocs
Révision datée du 14 février 2014 à 15:30 par Nicolas Martignoni (discussion | contributions) (Page créée avec « {{Rôles}}{{Travail en cours}} == Créer un rôle personnalisé == Pour créer un rôle personnalisé : #Go to ''Administration > Site administration > Users > Permission... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à :navigation, rechercher

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.


Créer un rôle personnalisé

Pour créer un rôle personnalisé :

  1. Go to Administration > Site administration > Users > Permissions > Define roles.
  2. Click the "Add a new role" button.
  3. Select template for the new role or upload a preset
  4. Give the role a Short name e.g. 'Parent'.The short name is necessary for other plugins in Moodle that may need to refer to the role (e.g. when uploading users from a file or setting enrolments via an enrolment plugin).
  5. You must provide a full name for all custom roles. If you need to name the role for multiple languages you can use multi-lang syntax if you wish.
  6. Give the role a description (optional).
  7. Select an appropriate role archetype (see below for further information).
  8. Select the contexts where the role may be assigned e.g. 'User' for Parent role.
  9. Set permissions as required.
  10. Scroll to the top or bottom of the page and click the "Create this role" button.


Fichier:addinganewrole26.png
Adding a new role and setting context types
Fichier:permissions125.png
Choose "Allow" where required
Fichier:permissions225.png
Extra options with "Show advanced" enabled

Modèles de rôle

Un modèle de rôle est

  • un modèle non-modifiable (i.e. « codé en dur ») pour un rôle ;
  • utilisé au cours des mises à jour de Moodle lors de l'ajout de réglages par défaut pour des nouvelles capacités. Sans modèle de rôle, aucune nouvelle capacité au cours de la mise à jour ;
  • utilisé lors de la réinitialisation d'un rôle afin de déterminer les réglages par défaut. Sans modèle de rôle, les capacités n'ont pas de permission définie.

Il n'est pas nécessaire de définir un rôle modèle pour les rôles personnalisés ou si l'administrateur du site veut définir de nouveaux réglages pour les capacités après une mise à jour.

Dupliquer un rôle

To create a duplicate role:

  1. Go to Administration > Site administration > Users > Permissions > Define roles.
  2. Click the "Add a new role" button.
  3. Select existing role as a template
  4. Give a name and set permissions for your new role; scroll down and click "Create this role".

New role considerations

A new role is not automatically listed in course descriptions even if was created by copying a role that is listed, such as Teacher. If you want the new role to appear in the course listing, you must set it explicitly via Administration > Site administration > Appearance > Course managers.

Testing a new role

Administration > Switch role to Use the "Switch role to" link to see what another role will see in that context.

Since switching roles confines you to those roles you can assign in a course context, this method is only useful for testing course-scoped capabilities (i.e. it will not be useful for testing permissions that apply outside the course context, like moodle/user:edit).

Tip: You can always create test user and assign the new role to them. Then logout as admin and login as the test user. This is really the best way to test a new role.

Exemples de rôles personnalisés

  • Parent - for providing parents/mentors/tutors with permission to view certain information about their children/mentees/tutees
  • Demo teacher - for providing a demonstration teacher account with a password which can't be changed
  • Forum moderator - for providing a user with permission in a particular forum to edit or delete forum posts, split discussions and move discussions to other forums
  • Calendar editor - for enabling a user to add site or course events to the calendar
  • Blogger - for limiting blogging to specific users only
  • Quiz user with unlimited time - for allowing a user unlimited time to attempt a quiz which has a time limit set
  • Question creator - for enabling students to create questions for use in quizzes
  • Course requester role - for restricting users who can make course requests
  • Cohort enroller - for allowing teachers to enrol category cohorts into their course
  • Template creator - for allowing teachers to save as "Public" a Feedback template.

Voir aussi

Using Moodle forum discussions: