Adding users to a category role in bulk

Adding users to a category role in bulk

by Nepal B -
Number of replies: 4

Hello, 

is it possible to add users to a category role in bulk with the help of CVS

I found the way to add users to a system role with sysrole1, sysrole2

But I am not sure how it would work with the category level. 

I am also facing the issue, that if I am adding users to a certain category role, I cannot filter those users in the system-wide user list or the participant list of a certain course in this particular category. 

Thank you for your help

Average of ratings: -
In reply to Nepal B

Re: Adding users to a category role in bulk

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
This is actually a feature coming in the next version of Moodle out near the end of the year MDL-66453
In reply to Mary Cooch

Re: Adding users to a category role in bulk

by Nepal B -
wonderful. Thank you Mary for letting me know.

I can stop searching for a solution.
In reply to Mary Cooch

Re: Adding users to a category role in bulk

by Nepal B -
Maybe one more question:

I am having a bunch of people (around 100), which should only be able to see a certain category. We offer a study and meditation program on donation base (lets call it program 1) based on 4-months modules building up on each other. After each module the participants can decide if they will enrol into the next module or stop for now - Those who need a break, can continue one year later with another group (program 2) .

I built it up in a way, that each program is a category and each module a course within. No one else but the current participants of the running module should be able to "see" the new module to enrol into it.

I have hidden the category program 1 and created a group for all the current participants (around 100) , who can see this hidden category. When someone is not continuing, I just delete him out of the category group. He is still enrolled into his former modules, but cannot see the new ones anymore.

so far so good.

Now I am facing the problem, that another similar structured "program" starts and I need to "copy" all group members from the above described category group to another category's group. But I cannot find a way if not comparing all 100 participants and do it manually for each person.

I hope it is understandable.

If anyone has a functioning workaround, I would be very happy.


Thank you
In reply to Nepal B

Re: Adding users to a category role in bulk

by Pedro Garcia -
I have done a plugin for it. It is assigning a role (previously created) to the users at the category level. This plugin is assigning the role just to the users base on a profile custom field data