A colleague recently wrote me with the following situation:
How do I mass assign roles in Moodle? I have about 200 Science teachers that will need to contribute to a Science Professional Learning Community moodle. They will need at least the role of a Teacher in order to add content…their accounts have already been created. I have already imported the spreadsheet with the users. I just need them as teachers in that one course. That moodle has other department PLC’s as well.
My response included the following:
This situation offered some great learning opportunities because it meant modifying existing Moodle users en masse with an upload. Although I’d read about it, I hadn’t actually had the opportunity to try it out. Although in the scenario above, the users were originally created via upload, the solution I tried included modifying existing LDAP authenticated users. This means that the solution works not only for users created via a previous upload, but also, for modifying users who were created as a result of LDAP authenticated login!
Restating the Problem:
To quickly restate the problem, the Moodle admin in scenario wanted to quickly ascribe editing teacher rights to users created through a previous upload. And, the Moodle admin wanted to make it possible to easily locate users who belonged a specific Professional Learning Community (e.g. Science as opposed to Math). This is necessary because when doing bulk user modifications to assign permissions, the only search term allowed is a search of name and/or email.
Step 1 – Adding the Name of the Professional Learning Community, Course Enrollment, and Assigning Teacher Role
To accomplish this, you will need to re-upload your CSV file–be sure to select the option to update existing records–with all the accounts.
a) Create a CSV (comma-delimited) file that includes some new pieces of information, namely the title of the professional learning community (PLC) to the last name, as well as the course (course1) and role (type1).
The CSV file should look like the one below:
What this will do is update Abigail’s record to add “(SCIENCE)” to her last name, assigns her to the SCIENCE course and gives her the role of editing teacher (“2”). You may want to let users know NOT to modify their last name, or you could adjust the settings to not allow them to modify their last name.
To Ms. Artosia’s name, I’ve added (Science), as shown below:
When you do the search again to assign teacher rights (Admin->User->Permissions), you’ll be able to pick them out of the large group of users. If you add the course (the short name,or breadcrumb name) title and the type of role, you can enroll people in one fell swoop.
b) Upload process that involves updating existing users only. Here’s what the upload users preview looks like…be sure to change your upload settings to match:
Here’s what the preview upload looks like:
To accomplish the mass edits, I’d recommend exporting your user list, editing it in Excel and concatenate last name and “(Science)” to get Artosia+(Science) so as to yield “Artosia (Science)” and register them in the appropriate course.
What would you have done?
Everything posted on Miguel Guhlin’s blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure