I would really appreciate if you could give me any ideas or suggestions on how to fix this problem.
check the capability "moodle/role:switchroles" in your roles. It should be set to "allow". Then check the table "allow role assignments" (tab on top of role definitions), cf.
Hope this helps ...
Thank you very much for your reply!
I checked the settings for both teachers and admin, and "moodle/role:switchroles" and "moodle/role:assign" are both set to "allow." The table under "Allow role assignment" is set up in a way that teachers can assign roles to teachers, students, and guests. However, the drop-down menu with "Switch role to..." gives only one option: "Teacher." I tried to login both as an admin and a teacher, but the result is the same - no "Student" option.
Good to know that I am not the only one who experiences this problem. Would it be reasonable to assume that we are dealing with some bug in the system? I wish more people would share whether they can switch to "Student" view in Moodle 1.9.5.
I tried everything you suggested but the student view is still not available. Debugging didn't show any errors either. I just updated Moodle to the latest version of 1.9.5+ but nothing changed. Is there anything else I can do? I am desperate because the fall semester will start in several weeks, and I know that not being able to switch to student view will be a big issue for many instructors...
Thank you for all your help!
This is a long shot...
have you checked in an individual course in the Admin box, the Assign Roles and the Overide Permissions for the allow roles? You just need to check one to see if somehow this changed in the back up.
Sorry this is unrelated but we need to set up a User as both a Student and a Teacher. However, when you go to set it up you can only enter the Users email address once. Has anyone come across this problem before?
The reasoning behind this is because the user will need to complete the courses as a Student, but also will need access to upload course material. So I was going to create two logins for them - one as student and one as teacher but then encountered the email address issue?
Any feedback would be much appreciated.
One of the tables had a "roleid" wrong, was pointing in May when one should be pointing. That is was a problem in the table in the database.
After the change in the profile table student returned to work, and without the need for changes in the Moodle code!
The table is mdl_role_capabilities, research in this table has rows where capability 'moodle / site: doanything'.
mysql> SELECT * FROM WHERE bancodedados.mdl_role_capabilities capability = 'moodle / site: doanything';
# Do not know what the database #
certainly appeared two lines of this table, one with the 'roleid' equal to 5,
Just for a change.
Hi, that was the problem on my moodle site too.
I do the following steps to solve it.
SELECT * FROM mdl_role_capabilities WHERE capability LIKE '%moodle/site%doany%'
this leeds to 3 entries:
(timemodified is maybe false, cause I changed the entry with roleid 5 often to reproduce the effects).
UPDATE mdl_role_capabilities SET capability ='moodle/site:doanything STRANGE error in switch role to student' WHERE id=21038
that solves the problem, but does not explain anything.
If I do the select in a fresh install, then I get:
I don't now, if I have to change the entry with ID 19828
does anybody understand the system.
Thanks to Sergio - he gives the most important hint for me.