Give a student permission to do something

Give a student permission to do something

by John Isner -
Number of replies: 18
A teacher wants to grant a specific student the ability to do something that students normally can't do (something that teachers can do). Can anyone explain how to do this?
Average of ratings: -
In reply to John Isner

Re: Give a student permission to do something

by Steve Hyndman -

I don't use 1.7 or 1.8 but I would assume it's as simple as creating a new role and assigning that student to that role...at least that's the theory as I understand it.

Steve

In reply to Steve Hyndman

Re: Give a student permission to do something

by John Isner -
Hi Steve. As a teacher, I cannot define a new role. I would need to ask the admin to do it, and that's unacceptable. So I need a way to override the pre-defined Student role, but only for a specific student in my course.
In reply to John Isner

Re: Give a student permission to do something

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi John,

The easiest way is to assign a teacher role to the student in the activity module context. Please check docs.moodle.org/en/Assign_roles for more details.
In reply to Helen Foster

Re: Give a student permission to do something

by Amy Groshek -
So far as I know, assigning roles within the activity context is not fully implemented and is still very sketchy. I have not been able to make it work. Here is my post about the issue:
http://moodle.org/mod/forum/discuss.php?d=71576

I suggest having the admin create a custom role, then the teacher can assign that custom role to the student for the course.

In reply to Amy Groshek

Re: Give a student permission to do something

by John Isner -
I suggest having the admin create a custom role, then the teacher can assign that custom role to the student for the course.

This approach doesn't scale. Say you have 80,000 teachers and every one of them needs the admin to create a few custom roles so that they can assign those roles to specific students. You're going to need an army of admins.

There's a capability called Create and manage roles (we discussed this in another thread). If the admin granted this permission to teachers, you'd think teachers would be able to create their own roles, which would solve the scalability problem. However I have been unable to detect any effect of adding this capability. Is it broken?


In reply to John Isner

Re: Give a student permission to do something

by Amy Groshek -
Even when I'm logged in as an admin, there is no GUI to edit roles within a course. I guess the only place where you can do that is through the admin panel available to admins. In which case you're stuck. Hopefully you didn't tell your 80,000 teachers that they could edit roles. Some things just don't scale, I guess.
In reply to Amy Groshek

Re: Give a student permission to do something

by John Isner -
Even when I'm logged in as an admin, there is no GUI to edit roles within a course

If the teacher has been given permission to Override permissions for others (by editing the Teacher role in the Administration -> Users -> Permissions -> Define roles -> Manage roles tab), and has also been given permission to override the Student role (Administration -> Users -> Permissions -> Define roles -> Allow overrides tab), then the teacher will get a course-level GUI for tweaking the Student role (Course -> Admin -> Assign roles). Changes made by the teacher to the Student role will apply to ALL students. To affect a single student seems to require a custom role, provided by the admin.
In reply to Helen Foster

Re: Give a student permission to do something

by John Isner -
But I want to give a specific ability to the student, not all the abilities of a non-editing teacher. For the sake of argument, let's say I want to give the student permission to make a course backup. I as teacher have that ability, and I ought to be able to grant it to anyone I choose. Furthermore, I should be able to do it without asking the administrator to create a new role (based on student, with the backup ability added). That approach doesn't scale.

In reply to John Isner

Re: Give a student permission to do something

by John Isner -
I filed MDL-9935 "Create and manage roles capability not working." With luck we will get a response from a developer on this issue.
In reply to John Isner

Re: Give a student permission to do something

by John Isner -
Oops. After creating the issue, I went back and experimented some more. I finally I see the error in my thinking.

When the teacher overrides a role like Student in a particular context, it effectively defines a new role which is local to the context. My confusion arose from the fact that the modified role still bears the name 'Student' and is therefore confused with the legacy role.

For example, suppose a teacher overrides Student in a Choice activity (using the Override roles tab), removing the ability to vote. The teacher then assigns student John to the Student role using the Assign roles tab. John will not be able to vote in this Choice, but he will be able to vote in other Choices. Other students will be able to vote in this Choice because they are assigned to the unmodified Student role.

Once you understand it, it makes perfect sense. The implementation is much simpler than one that would require the teacher to create a new (named) role.

I still think that the Override roles page (and the documentation) could be improved with a short explanation that you are effectively defining a new role, not modifying an existing one.
In reply to John Isner

Re: Give a student permission to do something

by Amy Groshek -
So override removes the permissions granted a role for a context, it doesn't relax the permissions for that context. It works negatively. This makes sense. But does it help with your problem? The teacher will have to override for all students except the one with permission. Sounds like a lot of work.
In reply to Amy Groshek

Re: Give a student permission to do something

by John Isner -
Overriding can work in a positive way (allow) or negative way (prevent).

But you made me think of a new issue: How can you "tweak" a role more than once in a given context? For example, what if you want two versions of Student in the same forum, some who can't start new discussions and others who can neither start new discussions nor reply to discussions? Aaaaagh!
In reply to John Isner

Re: Give a student permission to do something

by Samuli Karevaara -
It's already quite complicated to find who can do what and where. I'd say you'd be better of by just creating a new global role of "Tutor" which would default to the Student role, for example. This gives all courses at least two levels of students without admins having to step in after the initial new role creation.
In reply to Samuli Karevaara

Re: Give a student permission to do something

by John Isner -
Hi Samuli,
Yes, this will work, but I'm trying to avoid involving the admin. Suppose we get the admin to duplicate the Student role (Student copy 1). Another teacher later discovers that one isn't enough and asks the admin to make Student copy 2. Eventually the admin has created Student copy 100. I would be embarassed to explain this scheme to a Moodle skeptic smile


In reply to John Isner

Re: Give a student permission to do something

by Samuli Karevaara -
It should be taken case by case. Usually a "student with priviledges" should be enough. Just up the priviledges on that one, have policies etc. Too many fences makes it much more difficult for the teacher too to juggle all of the roles. In some cases a special course is what is required: have a course of their own for the team with more priviledges and so on...
In reply to Samuli Karevaara

Re: Give a student permission to do something

by John Isner -
Here is a scenario where one copy of Student is not enough.

The context is a Choice activity. The teacher wants
  • some students who can choose but not see results
  • some students who can see results but not choose
  • some students who can both choose and see results
  • some students who can neither choose nor see results
But the teacher has only two roles that she can override: Student and Student copy 1. She needs four! The administrator must create two more copies of Student before this teacher can deploy the activity.

If an activity has N associated capabilities, we can create 2**N distinct roles. For forum, N=20, from which we can create 1,048,576 distinct roles! We should therefore ask each administrator to create 1,048,575 copies of Student today so that we will never have to bother the administrator again.
In reply to John Isner

Re: Give a student permission to do something

by Jason Cole -
Hi John,

When the new groups system is in place across the board, you will be able to assign roles and capabilities to groups, rather than individuals. So you will simply need to create a new group for each set of capabilities. Until then, you are right, you need 4 student roles to do what you want to do.

I don't know that you'll need 1 million student roles. For most activities, having a few roles will be fine. Remember you can assign someone a role within a context. So if you want someone to be able to read and review everything in a context, you can assign them to the non-editing teacher role in the context of the activity.
In reply to Jason Cole

Re: Give a student permission to do something

by John Isner -
Jason,
Group roles will be a welcome feature, but I don't see how they help with this problem. Remember, the problem is that the teacher can override an existing role only once in a given context. So if the teacher needs two different sets of capabilities for Students in a forum, she must ask the admin to create a copy of the Student role so she can make the necessary overrides and assign them to her students. This will be true with or without group roles.

By the way, my example with the million roles is wrong. If an activity has 20 capabilities, then the admin could cover all future role requests by pre-defining 20 roles for this one activity. Each would have a single capability Allowed and the hundred plus remaining capabilities Not set. Then a teacher could assign subsets of the 20 roles (there are 2^20 distinct subsets). This "mix in" approach effectively gives the teacher the ability to create roles using role assignment.