Hello. I'm using Moodle 1.9 and i have created a new role for the students. I want them to be able to create courses but not to be able to assign roles after a course has been created. I've been trying to change the capabilities for this role but i haven't solved the problem yet.
I've made the following settings:
Legacy role type -> none
role:assign -> prevent
role:override -> prevent
role:manage -> prevent
role:switchroles prevent
Am i missing something?
I would really appreciate some help, please.
You didn't say what role you want students to have in the courses they create. Will they have Student or Teacher role? That's a key question. The answer depends on it.
I'm sorry. When a student creates a course he becomes a teacher.
In reply to maria ak
Re: Απάντηση: Re: Prevent assigning roles after creating a course
by John Isner -
- Choose a category for all student-created courses, say category CAT
- In CAT, override Teacher, setting moodle/role:assign = Not set
- Assign your students the role of Course creator in category CAT.
Notice that I said "the student" because I'm talking about a user, like "joe." I'm not talking about a role. When I refer to a role, I use an upper case letter.
So when the student (small s) logs in, he should click on category CAT. When he enters CAT he gets the role of Course creator, which allows him to create courses. When he creates a course, he is automatically assigned the Teacher role within the course. The override prevents the user (who now has two roles) from making any role assignments in the course.
The reason that you must set aside a category for student-created courses is that no user with the Teacher role will be able to assign roles in the category (at least not without doing some more work). If this is a problem, let me know and I'll give you a more elegant solution. This solution is a simple one
Notice that you do not need to modify any roles. All predefined roles (Teacher, Student, etc.) should be reset to their default values. Otherwise I can't guarantee this solution.
Let us know how it works out!