Can't switch role to 'student'

Can't switch role to 'student'

by Sergio Villa -
Number of replies: 1
Hello everyone,

We just upgraded from 1.9.2 to 1.9.8 and now neither admins nor teachers can switch role to 'student view'. When I click on 'Switch role to...' I can see all the roles but student.

We also checked the table 'allow role assignments' and 'Student' is allowed for admins and teachers.

I found a thread in this forun relating the same issue, but it happened when he upgraded to 1.9.5, instead of 1.9.8, but nobody could solve it.

All suggestions are welcome.

Thank you,

Sérgio Villa
Average of ratings: -
In reply to Sergio Villa

Re: Can't switch role to 'student'

by Sergio Villa -
cleardot.gifMostrar romanização
PROBLEM SOLVED !!!!!!
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.

Sds,

Sergio Villa.