roles got copied in moodle

roles got copied in moodle

by Jakub Ctvrtnicek -
Number of replies: 4

Dear All,

we are facing an issue that is weird and hard for us to understand in moodle 1.8.

in one of our instances, irregurarly there are teacher and student roles copied and creates anohter sets of teachers and students in user/define roles (see attached picture) did anyone experienced anything similar?

note to say that there is no role assignment on this copied roles the only entry in db is in the table mdl_role_capabilities

should anyone know what is the issue, please let me know.

regards

jakub

Attachment roles_copy.JPG
Average of ratings: -
In reply to Jakub Ctvrtnicek

Re: roles got copied in moodle

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 Jakub,

Are you able to update your Moodle site to the latest 1.8 version? The role copying bug that you describe has been fixed.
In reply to Jakub Ctvrtnicek

Re: roles got copied in moodle

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I was not aware that it was fixed but that is good news. In fact I was not even sure it was a bug. We noticed that what triggered it was importing a course with users and the teacher and student roles were copied over under a different name. I assumed that this was to ensure that in case some custom role assignments had been made on the original course that they would be preserved in the restored course. I would be interested to know what issue this was and which files were changed. I'll try to take a look later today. Peace - Anthony
In reply to Anthony Borrow

Re: roles got copied in moodle

by Jakub Ctvrtnicek -

Thanks Anthony, Helen,

we running this on 1.8.1 version and as Anthony said, its caused by the restore function where one of the steps is to restore either into legacy roles, which is what we prefer, and the other option is to restore and create new role. The script originally match the role to the legacy one, e.g. to teacher or student most usually. But then some of our teacher who did restore wanted to be creative and so he did.
There is no impact on the other functions as such, it just make the list of role longer and soon unmanagible.

The fix should be only in a sence that the "new role" creation would be disallowed to the roles apart of administrator.

Do you know if this was fixed like that or should it be reported?

Kind thanks

In reply to Jakub Ctvrtnicek

Re: roles got copied in moodle

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 Jakub and Anthony,

The bug I referred to previously is MDL-8681. You may want to reopen it.