Wrong role for student

Wrong role for student

by Deb Vasenda -
Number of replies: 8
Somehow I have 3 students enrolled in a course as students AND teachers.  How do I delete their "Teacher" role?
Average of ratings: -
In reply to Deb Vasenda

Re: Wrong role for student

by Ger Tielemans -
I use the very, very, very handy script from Tim Hunt: User role's report

You must also patch your system. but it is worth the effort, thanks Tim!


To make this report work, you need to make one very small change to one core file. In lib/weblib.php, in the function print_header, just after the line:

 $meta .= "\n".require_js();

add the lines

 $fnname = 'require_css';
 if (function_exists($fnname)) {
 $meta .= "\n".$fnname();
 } 
In reply to Ger Tielemans

Re: Wrong role for student

by Susan Mangan -
Why would you not just be able to go into 'Assign Roles' in the course, click on 'Teacher', and then remove the students that way?
In reply to Susan Mangan

Re: Wrong role for student

by Ger Tielemans -
Because that does not reset the roles in the table, ESPECIALLY when you create ADDITIONAL ROLES (a bug in 195?) sad

mOOdle is Modulair, not really Object Oriented
In reply to Ger Tielemans

Re: Wrong role for student

by Susan Mangan -
You're kidding me ... wow. So even if you remove the 'Teacher' role in the 'Assign Roles' view of the course, the student still keeps the teacher rights? surprise
In reply to Susan Mangan

Re: Wrong role for student

by Ger Tielemans -
No, I had an additional role parent. This became the default role in a course. removing that role only worked with the script.. so keep it in mind when normal removal does not work: this works always.
In reply to Ger Tielemans

Re: Wrong role for student

by Susan Mangan -
Great, thanks for the info! I just installed it on our dev server and seems like a great tool to have on hand. The 'latest version' didn't work so I tried the other one and it seemed to work OK. (we run 1.9.5 20090826)

Just out of curiosity, do you know of a way to CHANGE bulk role assignments as opposed to just removing them? (besides using a db query of course..)
In reply to Ger Tielemans

Re: Wrong role for student

by Deb Vasenda -
I did what Susan suggested.  Now I have to log in as one of the students to see what he can do.............