The Access API gives you functions so you can determine what the current user is allowed to do. It also allows plugins to extend Moodle with new capabilities.

Moodle uses a role-based access control model. Entities are represented by contexts which are arranged into a tree-like hierarchy known as the context tree.

The following context types are available:

A Role is a set of capability definitions, where each capability represents something that the user is able to do. Roles are defined at the top most context in the context tree, the System context.

Roles can be overridden by contexts further down the tree.

User access is calculated from the combination of roles which are assigned to each user.

All users that did not log-in yet automatically get the default role defined in $CFG->notloggedinroleid , it is not possible to assign any other role to this non-existent user id. There is one special guest user account that is used when user logs in using the guest login button or when guest auto-login is enabled. Again you can not assign any roles to the guest account directly, this account gets the $CFG->guestroleid automatically. All other authenticated users get the default user role specified in $CFG->defaultuserroleid and in the frontpage context the role specified in $CFG->defaultfrontpageroleid .

How to define new capabilities in plugins ​

Capabilities are defined by $capabilities array defined in db/access.php files. The name of the capability consists of plugintype/pluginname:capabilityname .

For example:

Where the meaning of array keys is:

It is necessary to bump up plugin version number after any change in db/access.php, so that the upgrade scripts can make the necessary changes to the database. To run the upgrade scripts, log in to Moodle as administrator, navigate to the site home page, and follow the instructions. (If you need to test the upgrade script without changing the plugin version, it is also possible to set back the version number in the mdl_block or mdl_modules table in the database.)

The capability names are defined in plugin language files, the name of the string consists of "pluginname :capabilityname ", in the example above it would be:

Deprecating a capability ​

When a capability is no longer needed or is replaced by another, it should be deprecated. The timeline for deprecation should follow the normal Deprecation process.

To mark a capability as deprecated, edit the access.php containing the capability, remove it from the $capabilities array, and add it to the $deprecatedcapabilities array in this file.

Entries in $deprecatedcapabilities can have a replacement key indicating a new or existing capability that replaces the deprecated one. If this is specified, any checks to the deprecated capability will check the replacement capability instead. A debugging message will always be output at DEBUG_DEVELOPER level if a deprecated capability is checked.

$deprecatedcapabilities can also define an optional message explaining the deprecation.

The following example demonstrates an access.php file where a capability has been deprecated and replaced with another.

Useful functions and classes ​

Context fetching ​.

In plugins context instances are usually only instantiated because they are instantiated and deleted automatically by the system.

Fetching by object id:

Fetching by context id:

  • by default exception is thrown if context can not be created
  • deleted users do not have contexts any more

Determining that a user has a given capability ​

When implementing access control always ask "Does the user have capability to do something?". It is incorrect to ask "Does the user have a role somewhere?".

has_capability() ​

has_capability() is the most important function:

Check whether a user has a particular capability in a given context. For example:

By default checks the capabilities of the current user, but you can pass a different user id. By default will return true for admin users, it is not recommended to use false here.

require_capability() ​

Function require_capability() is very similar, it is throwing access control exception if user does not have the capability.

Enrolment functions ​

See Enrolment API .

Other related functions ​

Require_login() ​.

Each plugin script should include require_login() or require_course_login() after setting up PAGE->url.

This function does following:

  • it verifies that user is logged in before accessing any course or activities (not-logged-in users can not enter any courses).
  • user is logged in as gu
  • verify access to hidden courses and activities
  • if an activity is specified, verify any availability restrictions for the activity
  • verify that user is either enrolled or has capability 'moodle/course :view ' or some enrol plugin gives them temporary guest access
  • logs access to courses

require_course_login() ​

This function is supposed to be used only in activities that want to allow read access to content on the frontpage without logging-in. For example view resource files, reading of glossary entries, etc.

isguestuser() , isloggedin() and is_siteadmin() ​

These function were previously needed for limiting of access of special accounts. It is usually not necessary any more, because any write or risky capabilities are now automatically prevented in has_capability().

It is strongly discouraged to use is_siteadmin() in activity modules, please use standard capabilities and enrolment status instead.

is_guest() , is_viewing() and is_enrolled() ​

In order to access course data one of these functions must return true for user:

  • is_enrolled() - user has active record in user_enrolments table
  • is_viewing() - user has 'moodle/course :view ' capability (may access course, but is not considered to be participant)
  • is_guest() - user was given temporary guest access by some enrolment plugin

get_users_by_capability() ​

This method returns list of users with given capability, it ignores enrolment status and should be used only above the course context.

  • Role archetypes
  • Hardening new Roles system
  • Roles and modules
  • NEWMODULE Adding capabilities
  • New permissions evaluation in 2.0
  • (Forums) How to check if current user is student?
  • Deprecating a capability
  • Context fetching
  • Determining that a user has a given capability
  • Enrolment functions
  • Other related functions

moodle user_has_role_assignment

Role Assignments Table Schema (role_assignments)

Description.

assigning roles in different context

role_assignments table columns

plugin responsible responsible for role assignment, empty when manually assigned

Id of enrolment/auth instance responsible for this role assignment

role_assignments table indexes

Role_assignments table relationships, close relationships within degrees of separation.

  • Two degrees
  • One implied
  • Two implied

Understanding Roles and Adding users to Moodle courses

Moodle roles facilitate controlling what a user can and cannot do within a course.

Course-specific Roles

The default course roles are Teacher and Student. A librarian role and two types of assistant roles also are available to allow for the addition of a reference librarian and course assistants such as Writing Associates and lab assistants.

  • Teacher – Teachers can do anything within a course, including changing the activities and grading students. Teachers are the only role with the ability to enroll new users in the course.
  • Student – Students generally have fewer privileges within a course. They can submit assignments for grading, make posts to forums, send email through Quickmail, and generally participate in a course. Students cannot edit any of the course settings. Students see only their grades.
  • Audit – Very similar to the student role, but will not show up in the gradebook.
  • Librarian – Librarians can assist with content creation including adding, modifying, and deleting resources, activities, and blocks. Librarians also can access assignments for download and grading, but cannot view the full gradebook.
  • Assistant: Limited Grade Access – For Writing Assistants, lab assistants, and teaching assistants who need editing rights to a course site as well as access to assignments for download and grading. This role does not allow access to the full view of the gradebook, meaning this role cannot grade manual grade items.
  • Assistant: No Grade Access – For Writing Assistants, lab assistants, and teaching assistants who need editing rights in a course, but who do not need access to student grades, submitted assignments, or assessments.
  • Non-editing Teacher – Non-editing teachers can teach in courses and grade students, but may not alter activities.

Roles in Spaces

Office and Organizational Moodle sites have two primary roles: Leader and Member.

  • Leader/Teacher – Leader/Teachers can do anything within a course, including changing the activities, enrolling new users, and grading students.
  • Member/Student – They can submit assignments for grading, make posts to forums, send email through Quickmail, and generally participate in a course. Members cannot edit any of the course settings.

Manually enrolling users

Course enrollments in Moodle are updated nightly from Banner, so it’s unlikely Teachers will need to add students. However, to add users to a Spaces site, or if a student in a Moodle course needs to be added before Moodle enrollments are automatically updated, perform the following:

  • Select the “Participants” tab within the course.
  • On the next screen, click the [ Enroll users] button at the top.
  • Enter all or part of the name of the person you wish to add in the Select users field and select the user once they appear.
  • If enrolling a student that will be enrolled later via Banner, be sure to select  Show more…  to set an Enrollment Duration. Typically, setting this duration to 14 days should be sufficient to allow Banner time to manage the student’s enrollment in Moodle automatically.
  • Once you have completed all the enrollments, click the [ Enroll selected users and cohorts] button.

Changing a user’s role

  • Click the role of the user, click the pencil icon, and then X next to the user’s role to remove it.
  • Click the down arrow to select the new role to add it.
  • Click the floppy disk icon to save these selections.

Adding students who are auditing your course

Because students auditing a course are not automatically added to your Moodle course site, you will need to manually add auditing students needing access to your course site.

  • Repeat the steps for manually enrolling a student (above), except assign the Audit role to the student.

If a user is already enrolled as a student, and then becomes an auditor, you must still go through the steps to manually enroll them and  not just change their role.

Deleting a manually added user

  • In the row of the user, click the trash can icon under the Status column.

Note: Only manually added users can be deleted.

skip to content

Search Google Appliance

Information technology, services at a glance.

  • Instructional Technologies
  • Network Connectivity
  • Online Storage & Collaboration
  • Web Hosting
  • Classroom Technologies

Article Details

  • Access and Logging In

Last Updated:

Assign roles to individuals in your moodle course, we're taking you to an updated version of this article..

UMass Amherst Information Technology support articles are now updated in the new IT Knowledge Base. We found an updated version of this article, so we're sending you there.

Taking you to:

Stay here to view this page in the legacy Support Center . Information may be outdated as these articles are no longer maintained.

Find answers to your tech questions in the new IT Knowledge Base .

UMass Amherst Information Technology support articles are now updated in the new IT Knowledge Base.

This article is part of our archived legacy Support Center and may be outdated or inaccurate . We did not find an updated version of this article. That means this archived content is more likely to be outdated or no longer relevant. Check the new IT Knowledge Base for updated information:

More tech help options

On This Page:

Add a role at the course level, assign a role to a student for a particular resource or activity.

Instructors can add abilities for individual users enrolled in their course by adding a "role." Roles can be added at the course level, or only for a particular resource or activity. Roles are "additive"; they add new privileges without blocking what the user can already do. For example, teaching assistants start out as Non-editing Teachers . If you add the role of Course Designer , they will still be able to grade student work and will have the added permission to upload course files and edit activities.

Roles available are:

  • Course Designer can upload materials and add content to a course.
  • TA - Manage Gradebook , in addition to directly entering grades, can export student data and edit grade categories and calculations.  Note : This role can only be added for TAs.
  • Course Assistant can participate in activities and interact with students. Course Assistants can apply grades from within an activity (such as an Assignment), but do not have access to the Gradebook. * Note : This role can only be assigned to an already-enrolled user from within an activity or resource.
  • Student - Unlimited Quiz Time has unlimited time to complete quizzes in Moodle, regardless of the time limit set in the quiz settings.
  • Student - with Incomplete can access a course when the course is not generally available to students (e.g., after the end of the semester). Note : To access the course, the student must click Show all courses to see the link to the course in their My Courses block on the Moodle home page.
  • Access Quickmail Block allows an individual course member to send email to course members from the Quickmail block without allowing all students to access Quickmail.
  • Post to Announcements  can post to the Announcements forum (formerly called the News forum).  Note : This role cannot be added to an individual who only has a Course Designer role in the course.

For a guide to role capabilities, see Role Permissions in Moodle .

* Important : Because adding roles may allow access to student posts, assignments, and other work, it should be exercised only when federal FERPA privacy rules will not be broken. In accordance with FERPA, all University employees are legally and ethically obligated to protect the confidentiality of student records. For more on FERPA and how to obtain certification to ensure that you are familiar with the provisions of the law and that you are prepared for the day-to-day challenges of protecting confidential student information, see About FERPA Certification .

Note: Teaching Assistants and Co-instructors who need access to the gradebook and grading functions must be listed in SPIRE as a Teaching Assistant or Secondary Instructor to be given the Non-editing Teacher or Teacher role in Moodle.

Adding a role at the course level grants broad permissions to the selected user. The most common uses are:

  • Allow a Non-editing Teacher (TA) to upload materials and add content to a course ( Course Designer ).
  • Allow a Non-editing Teacher (TA) to have full access to the gradebook ( TA - Manage Gradebook ).
  • Give a Student unlimited time on any quiz assigned in the course ( Student - Unlimited Quiz Time ).
  • Give a Student access to a previous semester's course in which they were enrolled and allow them to complete assigned work ( Student - with Incomplete ).
  • Allow a course member to use the Quickmail block ( Access Quickmail Block ).
  • Allow a course member to post in the Announcements forum ( Post to Announcements ).

Note : It is not recommended to add Course Designer at the course level for students enrolled in the course for credit. To allow a student to facilitate a particular Activity or contribute a Resource, see Assign a Role to a Student for a Particular Resource or Activity below.

To add a role at the course level:

moodle user_has_role_assignment

  • On the  Course Management  panel, under  User Links , select  Participants , the  Participants  page will open.
  • Locate the individual for whom you would like to add a role. The list may be more than one page for a large class. You can sort the list by clicking the top-left header to sort by First name ,  Last name or Email address .

moodle user_has_role_assignment

  • To add a role, select the role name from the drop-down menu or type the role name . The added role will appear next to the previously existing roles.

diskette icon

Adding a role at the item level grants permissions to a user only for that activity or resource. Common uses of this feature include: 

  • To allow a particular student to add a resource such as a folder of readings, or build an activity such as a quiz, assign the student the  Course Designer role for that activity .
  • To allow a particular student to facilitate an activity, for example, to lead a discussion forum, assign the student the  Course Assistant  role for that activity. Note : Because Course Assistants can apply grades from within an activity (such as an Assignment) and can access student discussion posts, assignment submissions, and other work, the role should only be assigned when FERPA privacy rules will not be broken.  
  • To allow a particular student unlimited time to complete a particular Quiz, assign the Student - Unlimited Quiz Time role for that activity.

To add a role for a student (or students) for a particular Resource or Activity:

moodle user_has_role_assignment

  • On the Assign Roles in... page, click the role you want to add: Course Designer , Course Assistant ,  Student - Unlimited Quiz Time , etc. The Assign role page will open.
  • In the Potential users list (at right), click the name of the person for whom you want to add the role. The name will become highlighted.
  • Click < Add (at the center of the page). The name will move out of the Potential users list and into the Existing users list (at left).
  • To remove a name from the Existing users list and return it to the Potential users list, click the Name in the left list then click Remove > .
  • When you are done, click B ack to the list of all roles  (at bottom left). The individuals for whom you added roles will appear to the right of the role's description under Users with role .

Printer-friendly version

Related Topics

Get it help.

Ask an expert at the IT Service Desk.

IT Service Desk Thanksgiving Recess Hours

  • Wednesday, 11/22 and Friday, 11/24 : Email/chat, phone, and in-person support available 8:30 a.m. - 5 p.m.
  • Thursday, 11/23 : IT Service Desk closed
  • Email and Chat Support 8:30 a.m. - 9:45 p.m. Monday - Friday 10 a.m. - 10 p.m. Saturdays & Sunday
  • Phone Support | 413-545-9400 8:30 a.m. - 4:45 p.m. Monday - Friday
  • In-Person Support ( Campus Center ) 8:30 a.m. - 7:45 p.m. Monday - Friday No appointment necessary. Walk-ins and calls accepted until 15 minutes before closing.
  • Computer, Phone & Other Device Repairs

Mobile search

User Roles and Access rights in Moodle

UNSW Moodle supports a number of user roles for staff and students, with each role having its own set of permissions that provides users with access to different capabilities.

The different user roles have different access rights and some advanced functionality is only available to specific roles. The functionalities of the roles can be:

  • enable to edit course content
  • preview what students see
  • switch role to student, or log in as a specific student, to view the course in that role

How Roles are Assigned in Moodle

All active staff and students can access UNSW Moodle using their zID and zPass. Which courses they see once they login depends on what user roles they have been given via systems such as MyUNSW.

Award Course(s) : Staff/student access is setup through the Learning Management tab in MyUNSW, and is typically managed by faculty/school TELT Administrators. Changes made in MyUNSW flow to Moodle overnight (24-48 hrs wait time to be expected).

NCAR Courses like eLISE : User access is setup by the Academic Admin department within MyUNSW, and flow to Moodle overnight (24-48 hrs wait time to be expected).

SCAR Courses like OH&S : User access is setup by the UNSW HR department within PIMS, and flow to Moodle overnight (24-48 hrs wait time to be expected).

Sandpit Courses:  The staff member creating the sandpit course either assigns roles at creation, or organises the creation of a self-enrolment key for ongoing access.

For more information on any of these, please our  Moodle Course Types  page.

TELT Administrator role

The TELT Administrator role is a powerful role which faculty/school staff are provided with to help manage the course life-cycle and/or provide staff support.

The TELT Administrator role functionality is quite extensive, which in Moodle consists of an equivalent or higher level of access an Instructor has at the course level, plus category (eg. faculty/school) level access that allows them to work across courses. TELT Administrators also work heavily in MyUNSW within the Learning Management tab, where they create courses and assign staff enrolments.

More information about course administration can be found in  Moodle Course Administration page.

TELT Administrators can see courses in their faculty/ school even though they are not enrolled in those courses. They can see and access activities and resources, even though they are hidden from students. They can also use functions such as "Switch role" and "Login as".

Staff can request access to the TELT Administrator role via the  UNSW TELT Administrator Role Request Form . Users with TELT Administrator access can access the TELT Administration Guide page for support.

Switch Role View

TELT Administrators can view courses within their category as a generic student/instructor would see them by using the 'switch role' functionality. This is particularly useful when helping Instructors to build a course to ensure it comes out as desired. Switch role is a very useful tool, but is not always a perfect representation of what students will see. Individual students may see something different due to their personal circumstances, and some tools (typically external tools) may not work well with switch role.

Click ' Get Started'  to view the step-by-step guide.

Log In As View

TELT Administrators can view their own courses as a specific student/instructor would see it by using the 'log-in-as' functionality. This is particularly useful when helping a student or instructor with a query. Due to a security vulnerability identified in April 2019, the Log-In-As view is no longer as reliable as it once was. For additional information, please visit our  Log-in-as Reliability  page.

Assign the Question Sharer role

TELT Administrators can assign the Question Sharer role to users. This role allows users to share questions on category level. Once they have Question Sharer role, staff members can access different categories when they go to the Question bank and click on Select a category dropdown.

Instructor role

The instructor role is the primary role for building course and delivering activities for learning and teaching at UNSW. Instructors have access to most features and functions in a course, allowing them to perform design, development, teaching and maintenance tasks, including course backup and rollover. Instructors can also use "Switch role" and "Log In As" functionalities.

The instructor role is not permitted to:

  • Create courses
  • For permission (in both myUNSW and Moodle) apply to Academic Administration . Your Head of School or Associate Dean, Education, will have to sign off on your application.
  • Change imported course data that comes from the Student/People Information Management Systems (SIMS/PIMS)
  • Restore a copy of a course with all the staff/student enrolments.

Teaching Assistant, Grading Tutor and Non-Grading Tutor roles

The Teaching Assistant and Tutor roles are given to staff who assist Instructors with delivering a course, but do not need the full permissions to a course that Instructor(s) need. The roles are roughly intended for these purposes:

  • Teaching Assistant  - A high powered role, which shares most permissions of the Instructor and can grade students at the gradebook level.
  • Grading Tutor  - A role provided to staff who assist student learning and who grade students at the activity level.
  • Non-Grading Tutor  - A role provided to staff who assist student learning but does not grade students.

Teaching Assistant

Teaching Assistants  have similar privileges to Instructors, but they cannot:

  • control course availability
  • perform course rollover tasks

They have full access to all functions within the course files area, including deletion of files. They also have access to the Moodle Gradebook.

Grading Tutor

Grading Tutors  have permissions within Moodle as follows:

  • No  Turn editing on  button displays to them, so they may not edit resources, activities etc.
  • In the Gradebook, they can use the  Separate Groups  filter to view the grades for the entire class or for individual groups. That is, they are not restricted to viewing only the student records in the group they have been added to themselves, but can see all student records in all groups.
  • They can access to all student submissions, not just those of their own group. They can filter the view by selecting a group from the  Separate Groups  drop-down list and see submissions by all students in that group.
  • They can grade assignments for all groups. However, if you set up students in groups and make the assignments group assignments,  Grading Tutors can filter the list of submissions by their group and grade only the assignment submissions for their group.
  • They cannot edit the Gradebook. Grading Tutors can only grade assignments using the  View/grade all submissions  link on the assignment grading page - they cannot perform any grade administration.
  • They cannot log in as any another user.
  • Can see the full list of students and staff in the Participants list.

Non-Grading Tutor

Non-Grading Tutors  can access all content and use most tools in the same way as students.

They cannot edit course content, however, and they have no grading capabilities.

Summary Table of Teaching Assistant and Tutor permissions

To grade an assignment, a Grading Tutor clicks the assignment's heading link in the Gradebook, or accesses the assignment’s  Grading summary  page using the assignment link on the course home page. 

A Non-Grading Tutor can only access the assignment’s grades by going to the assignment page and clicking View all submissions . They cannot access Grades tab.

A Grading Tutor can  override quiz grades  in exactly the same way as Instructor or Teaching Assistant can - the only difference is that, because a Grading Tutor cannot edit the Gradebook, they cannot change the quiz grade just by changing the total in the gradebook. To re-grade a quiz, an Instructor, a Teaching Assistant or a Grading Tutor must click the quiz link from  inside the Grader report . A Non-Grading tutor cannot view the Grader report, so they cannot re-grade a quiz.

Student role

Students have access to all the features and functions they need to complete their learning activities in a course. They will not see the course if the course is hidden by the instructor, also if they are not enrolled in that course. Students also cannot see activities in the course that are hidden from them, or restricted to different groups that they do not belong to. Students can only see their own grades, and only those that are not hidden by the instructor. Students can see the Participants list of the courses they are enrolled in. All student enrolment is done through MyUNSW.

Auditor role

An Auditor has access to Moodle content and most tools, but can only do so in read-only mode. Auditor typically does not gain access to plugin services, like UNSW Lecture Recordings + , Turnitin or theBox, they also cannot see assignment activities, nor access gradebook. This role is designed to give limited, "read-only" access to courses. 

For more information and comparison of Auditor and Guest access, please check the FAQ section.

Auditor (Student) role

This role typically allows postgraduate students access to courses that they are not enrolled in but that contain information their supervisors consider vital to their studies.

The student auditor role can be provisioned upon request to the PVCESE LMS&I team, by a TELT Administrator contacting the  [email protected]  mailbox.

Access is commonly approved in the following two scenarios:

  • Where a higher degree by research student requires access to a course that is directly linked to their current research and such access has been approved by the student’s supervisor and the course convenor.
  • Where a student requires access to a course they have already attempted in order to prepare for a supplementary exam. Such access would normally only be granted if the student originally attempted the course no longer than a year prior and failed to meet the minimum requirement due to illness or misadventure.

An auditor has access to content and most tools in Moodle but only in a read-only mode. Auditors typically do not have access to plugin services like Turnitin, Lecture Recordings +, Leganto, etc. They also cannot see Assignment activity, participate in forums (but can view them), attempt the quiz (only preview).

Guest access can now be enabled for non-award courses.

Enabling guest access allows users external to UNSW to view your course materials within Moodle. These users will access content anonymously but will not be able to participate in activities that require an identity within Moodle. For example:  Assignment submissions and Forum posts.

Guest access for courses require approval from the Head of Organisational Unit.

You can request guest access to be added to new or existing courses by  completing the online Moodle Guest Access Course Request form . Requests will be processed within 48 business hours.

Comparison of Auditor and Guest Access

Who can grant access to the academic who just joined the faculty.

Academics first point of contact should be their faculty/school who are able to assist them in getting access to Moodle courses. The faculty TELT admin will then be able to set up their Moodle role etc. FAculty contacts can be found on ETS Support page.

On this page

Logo

User Roles In Moodle

At the course level, the two basic roles are "Teacher" and "Student". When a user is assigned the role of "Teacher" they will have the ability to change the roles of other users in their course. The following are the different types of roles that are used in CU's Moodle. 

Keep in mind: the role applied at the course level will apply to all activities within the course, and it will supersede roles set at the activity level.  For that reason, it is recommended that User Overrides are used at the activity level.  

Teacher: Teachers have a high level of control within a course, including changing the activities and grading students. They may enroll users with the following roles: Teaching Assistant, Teaching Support, Tutor. They can not enroll Students into a course.

Teaching Support: Teaching Supporters have the same access as Teachers, but won't display in the course as the official teacher.

Student: Students generally have fewer privileges within a course.

Student (Microcredential): Exact same permissions as Student role, but with the ability to self-enroll into courses prohibited.

Teaching Assistant: Teaching Assistants can teach in courses and grade students, but may not alter activities.

Student Enroller:  Student Enrollers permissions are limited to enrolling students into an existing course only. Role is intended to be used in addition to Teacher or Non-editing Teacher roles. 

Guest: Guests have minimal privileges and usually can not enter text anywhere.

Student with Unlimited Time: A student role that ignores time limits set on assignments.

Student - With Incomplete: Students who have an incomplete status and/or need access to a course of a previous semester.

Student - Hold: Students who have a hold on their account.

Tutor:  Tutors can view course material such as documents, links, and videos. They do not have the ability to view grades, activities (quizzes/assignments), or edit anything. They will not appear in the Gradebook. Think of this role as "read-only" access.

Course Auditor: Auditors can view course material such as documents, links, and videos. They do not have the ability to view grades, activities (quizzes/assignments), or edit anything. They will not appear in the Gradebook. Think of this role as "read-only" access.

Assigning a role to a user

When you are on your course home page click on "Course administration" in the "Administration" block to the left of the webpage. Click on "users", and then "Enrolled Users".  A list of users will appear. To remove a role click on the red "X" and to add a role click in the white space of the "role" column of the user you wish to assign a role to. 

WARNING: It is not wise to assign a user multiple roles as Moodle will automatically use the role with the most restrictions.

Switch role to...

Teachers have the ability to switch user roles to test out their course views. In order to do so you will need to click on person icon located to the top right of the page and choose "Switch role to..." 

m4profileicon.png

Documentation

Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Roles settings .

  • Roles settings
  • Managing roles
  • Assign roles
  • Using roles
  • Standard roles
  • Creating custom roles
  • Permissions
  • Override permissions
  • 1.1 Role for visitors
  • 1.2 Role for guest
  • 1.3 Deny Guest Access to a site altogether
  • 1.4 Default role for all users
  • 1.5 Auto-login guest
  • 1.6 Hide user fields
  • 1.7 Show user identity
  • 1.8 Maximum users per page
  • 1.9 Enable Gravatar
  • 1.10 Gravatar default image URL
  • 2.1 Is it possible to remove the open door with green arrow icon that represents Self enrolment? Disable Self enrolment altogether?

User policies

The following settings may be changed by an administrator in Administration > Site administration > Users > Permissions > User policies .

Role for visitors

Users who are not logged in to the site will be treated as if they have the role specified here, granted to them at the site context. The role of Guest is the default and the recommended setting for standard Moodle sites. The user will still be required to login to participate in an activity.

Role for guest

This option specifies the role that will automatically be assigned to the guest user. This role is also temporarily assigned to non enrolled users when they enter a course that allows guests without password.

Deny Guest Access to a site altogether

Go to Site administration ► Plugins ► Authentication ► Manage authentication and there is a switch there that allows you to turn the Guest Access button off altogether.

Default role for all users

It is recommended that the default role for all users is set to Authenticated user . To set it to a custom role, the custom role must be assignable in the system context and have role archetype set to none.

Note: It is not recommended that the default role for all users is set to student, for reasons given in MDL-26805 .

Auto-login guest

If not set, then visitors must click the "Login as a guest" button before entering a course which allows guest access .

Note: If auto-login guest is set, the guest login button also needs to be set to show (in Administration > Site administration > Plugins > Authentication > Manage authentication ), even though visitors won't necessarily use it.

Hide user fields

The following user fields appear on users' profile pages. Certain user fields are also listed on the course participants page. You can increase student privacy by hiding selected user fields.

Description, city/town, country, web page, ICQ number, Skype ID, Yahoo ID, AIM ID, MSN ID, last access, My courses and first access and groups

  • User fields on users' profile pages are hidden from all users with the capability moodle/user:viewhiddendetails not set.
  • User fields on the course participants page are hidden from all users with the capability moodle/course:viewhiddenuserfields not set.

Show user identity

Any of the following fields may be shown to users with the capability moodle/site:viewuseridentity when searching for users and displaying lists of users.

  • Email address
  • Phone number
  • Mobile phone
  • Institution

This setting is useful for sites with large number of users, where the likelihood of users with the same name is high.

Locations where user identity fields are shown are as follows:

  • User selectors ( Assign roles in some places, groups , forum subscribers)
  • Browse list of users
  • Course participants
  • Grader report
  • Quiz reports
  • SCORM reports
  • Assignment submissions
  • Course completion report
  • Activity completion report
  • Enroling users

Tip: Select only one or two fields that are mandatory at your institution. Do not select more than two field otherwise tables become very wide.

Maximum users per page

New feature in Moodle 2.5!

You can choose here the maximum number of users to be displayed when searching in courses, groups, cohorts etc. The default is 100 but if your Moodle site is very large you can increase the number here.

Enable Gravatar

Gravatar (an abbreviation for globally recognized avatar) is a service for providing globally unique avatars.

An administrator can enable the use of gravatars in Administration > Site administration > Users > Permissions > User policies . If a user has not uploaded a user picture, Moodle will check whether the user's email address has an associated gravatar and if so, will use the gravatar as the user's picture.

  • Use your Gravatar in Moodle 2.2 screencast

Gravatar default image URL

In Moodle 2.3.3 onwards, if gravatars are enabled, an alternative default user picture may be specified. The options are:

  • A gravatar default image - by entering a code such as mm. See https://en.gravatar.com/site/implement/images/ for codes of other gravatar default images.
  • A specified image - by entering the image URL

If the field is left empty then the theme's default user picture is used.

Unsupported role assignments

Unsupported role assignments are role assignments in contexts that make no sense for that role, such as the course creator role in the course or activity context, or the teacher role in the user context.

Prior to Moodle 2.0, there was no 'Context types where this role may be assigned' setting in the edit role form, and so any role could be assigned in any context. Upon upgrading a site from 1.9, any role assignments in contexts that make no sense for that role are listed as unsupported role assignments in Settings > Site administration > Users > Permissions > Unsupported role assignments .

In general, it is safe to delete all unsupported role assignments. In doing so, the worst that can happen is for a user to be unassigned a custom role; no other data loss will occur.

Is it possible to remove the open door with green arrow icon that represents Self enrolment? Disable Self enrolment altogether?

Yes, as an Administrator, go into

In Common Settings, turn Self Registration to Disable and then if you do not want the Guest login button to show, turn it to Hide. Consider also the Authentication methods you want to use, you can set them on by clicking on any closed eye. This removes the self enrolment option completely.

If you just want to remove/hide the icon and not remove the ability to self enrol then you can take one of a couple of different options.

The Self Enrolment icon itself is theme dependent which means it is not always an open door with a green arrow. One way would be to replace it in whichever theme you are using with a transparent png of the same size. If you use something like Firebug, click on the icon to see its properties, (right click in Windows, or Cmd+Click in Mac) you should be able to see the path to the icon and its name - then you replace it with a file of the same name which is transparent (ie, invisible, hopefully) or one pixel by one pixel.

You can isolate the image and disable it using CSS but first you need to know the css path for that image.

For the Front Page it is this...

Depending on your theme, you can either add the CSS to your theme's Custom Settings page, or add that CSS rule directly into yourtheme/style/core.css or whatever name your CSS stylesheet is called. If you add the CSS to the stylesheet you need to add it at the very bottom of that file.

Before you do any of this it is best enabling Theme Designer Mode from Site Administration > Appearance > themes > Theme settings as this will allow the changes to be seen. You will also need to refresh your browser window to using Ctrl + F5 which forces the page to reload. Or, you can click the Clear Theme Caches button in the Site Administration > Appearance > themes > Theme selector page.

Thanks to Mary Cooch and Mary Evans.

  • New features
  • Site administration

Powered by MediaWiki

moodle user_has_role_assignment

Changing a User's Role in Your Course

Faculty can change the role that a specific user who is enrolled in their course has within the course in moodle. jan 25, 2024 • knowledge, article summary, article body.

2U has added two roles, “TA Grader” and “Student TA” to accommodate the different ways that you engage TAs in your courses.

  • The ​TA ​​Grader ​has the ability to review and assign grades to assignments, but ​cannot access the Gradebook/Grader Report.
  • The ​Student TA​ role is suited for TAs who engage with students and participate in forum discussions, but do not grade assignments. They ​do not​ have the ability to review assignments, assign grades or look at the Gradebook/Grader Report.
  • In the Course Administration block at the top right of your course, click to expand the Users dropdown menu.

User-added image

2. Click on the Enrolled Users link.

User-added image

3. Find the user that you would like to make a role change to in the list of users.

User-added image

4. Click the pencil next to their current role in the Roles column.

User-added image

5. Click the down arrow to view a list of available roles for the user.

User-added image

6. Click the role that you would like to add for the user.

7. If this role should be replacing another role, delete the previous role by clicking the “x” next to the old role.

User-added image

8. Once only the correct role is listed; click the Save button.

User-added image

9. Once only the correct role is listed; click the Save button. The new role should now display next to the user’s name.

User-added image

Trending Articles

  • How to Uninstall an Application on a Mac
  • How to Designate a Zoom Alternative Hosts
  • How to Access Recorded Live Sessions
  • Handbrake - Compressing Videos Guide (MAC)
  • Question Sets Powered by Learnosity: Getting Started

IMAGES

  1. How to create Assignment in Moodle (how to upload assignments on moodle

    moodle user_has_role_assignment

  2. Assign roles

    moodle user_has_role_assignment

  3. 3 Steps to Enable & Configure Category Enrolment in Moodle for role

    moodle user_has_role_assignment

  4. How To Edit Role Permissions in Moodle

    moodle user_has_role_assignment

  5. How To Edit Role Permissions in Moodle

    moodle user_has_role_assignment

  6. Assign roles

    moodle user_has_role_assignment

VIDEO

  1. Adding a Moodle Assignment

  2. Moodle User Guide

  3. Moodle

  4. How to locally assign roles in a Moodle activity/resource?

  5. Moodle User Group Higher Education (HE) March 2014

  6. Moodle 2 Administration User Accounts

COMMENTS

  1. Moodle how to find out the role of the logged in user

    How to get context/role of logged in user in moodle? I am trying to implement a context-aware block. The block would suggest the right quizzes to its users based on their moods. ... Please note that one user can have various roles. The function user_has_role_assignment seems to test of which roles he has system wide. Share. Improve this answer ...

  2. Moodle in English: Get current roles of user and assign user to role

    The role id of a teacher is usually 3, and the role id of a student is usually 5, but you can test this looking at the table in Site Administration-> Users -> Permissions -> Define Roles. Please note that one user can have various roles. The function user_has_role_assignment seems to test of which roles he has system wide.

  3. Access API

    A Role is a set of capability definitions, where each capability represents something that the user is able to do. Roles are defined at the top most context in the context tree, the System context. Roles can be overridden by contexts further down the tree. User access is calculated from the combination of roles which are assigned to each user.

  4. Assign roles

    User context: Roles tab in user profile page; Moodle 1.9. In Moodle 1.9 onwards, the assign roles page lists the names of users assigned to each role (unless there are more than 10 users, in which case this is stated). ... Hidden assignments. To hide which role a user is assigned to, click the Hidden assignments check box before assigning the ...

  5. Role Assignments table / role_assignments

    roleassi_use_ix. Performance. Asc. userid. roleassi_useconrol_ix. Performance. Asc / Asc / Asc. userid + contextid + roleid. Showing 1 to 8 of 8 entries.

  6. Allow role assignments

    Allow role assignments. By default, teachers can only assign other users the roles of non-editing teachers, students and guests. If you want teachers to be able to assign other teachers in their course, you can allow the role assignment: Click on Permissions in the Site Administration block, then Define roles. Click the Allow role assignments tab.

  7. Understanding Roles and Adding users to Moodle courses

    Once you have completed all the enrollments, click the [Enroll selected users and cohorts] button. Changing a user's role. Select the "Participants" tab within the course. Click the role of the user, click the pencil icon, and then X next to the user's role to remove it. Click the down arrow to select the new role to add it.

  8. Roles

    Definitions. A role is an identifier of the user's status in some context. For example: Teacher, Student and Forum moderator are examples of roles. A capability is a description of some particular Moodle feature. Capabilities are associated with roles. For example, mod/forum:replypost is a capability. A permission is some value that is assigned for a capability for a particular role.

  9. Assign Roles to Individuals in Your Moodle Course

    Note: This role cannot be added to an individual who only has a Course Designer role in the course. For a guide to role capabilities, see Role Permissions in Moodle . * Important : Because adding roles may allow access to student posts, assignments, and other work, it should be exercised only when federal FERPA privacy rules will not be broken.

  10. User Roles and Access rights in Moodle

    How Roles are Assigned in Moodle. All active staff and students can access UNSW Moodle using their zID and zPass. Which courses they see once they login depends on what user roles they have been given via systems such as MyUNSW. Award Course (s): Staff/student access is setup through the Learning Management tab in MyUNSW, and is typically ...

  11. User Roles In Moodle

    Click on "users", and then "Enrolled Users". A list of users will appear. To remove a role click on the red "X" and to add a role click in the white space of the "role" column of the user you wish to assign a role to. WARNING: It is not wise to assign a user multiple roles as Moodle will automatically use the role with the most restrictions.

  12. Roles settings

    Upon upgrading a site from 1.9, any role assignments in contexts that make no sense for that role are listed as unsupported role assignments in Settings > Site administration > Users > Permissions > Unsupported role assignments . In general, it is safe to delete all unsupported role assignments. In doing so, the worst that can happen is for a ...

  13. Manually assign roles

    Roles in Moodle control how users can interact with the Moodle unit, for example tutors can mark assignments but not create or edit content. This guide covers how to manually assign roles and provides an overview of the permissions for each role.

  14. Changing a User's Role in Your Course

    Click on the Enrolled Users link. 3. Find the user that you would like to make a role change to in the list of users. 4. Click the pencil next to their current role in the Roles column. 5. Click the down arrow to view a list of available roles for the user. 6. Click the role that you would like to add for the user.

  15. Moodle in English: assigning users to a custom role

    Somehow my 'user defined role' is not showing up in the 'front page role', it is only showing manager, teacher, non-editing teacher and student. ... Moodle Docs - Allow Role Assignments. Note: I only have 1.9.11 so I can't verify that it is the same in 2.0. Average of ratings: -

  16. Unlock self-directed learning with Moodle Workplace 4.4

    Moodle Workplace 4.4 introduces the capability to add multilingual appointment descriptions, enhancing communication for users across diverse language backgrounds. With this feature, learners and trainees receive notifications in their preferred language, facilitating better understanding and engagement. Trainers can effectively manage course ...

  17. Auto assign student role to new registred user in Moodle

    We need to change some settings in admin to achieve this. In Administration > user' > Permissions > Define roles`. Edit student role : change Role archetype to None. For Context types where this role may be assigned enable system. In Site administration > Plugins > Enrolments > Self enrolment. Change Default role assignment Invalid current ...

  18. Moodle in English: role assignments not showing up

    Re: role assignments not showing up. Hi Seinna, From the method you are using, it seems you are in Moodle 1.9+ So, go Site admin > Users > Define roles and make sure that Teacher, student, guest, and authenticated user exist at the site level. If yes, then go to the course settings scroll down to "Role renaming" and make sure that "Teacher" isn ...