Shoaib Bazmi February 2016

Moodle CSV Upload User with Roles

There are two questions I need to ask:

  1. When I upload a CSV and mention the Password field in it with a generic password "!Letmein123", I can't login through this password. But if I try a specified username in password i.e same username and password, it logs me in. How can I overcome this?

  2. Is there any way I can define the role of user in CSV? A default one will be good too. Right now after the successful upload of the CSV, I need to define the user role one by one. Can we do it in a CSV?

Answers


Edgar Conrado February 2016

Wich moodle version do you use?

For question 1: If included, values should meet the requirements for the site's Password policy.

For question 2:

You can use the role id of any role, including roles that you have created. In the example below, I'm assigning the Student role (roleid 5) to John Smith in the "Features" course. You can find the role id of any role by going to Site administration -> Users -> Permissions -> Define roles and letting your mouse hover over any one of the roles (see the roleid in the URI).

username,password,firstname,lastname,email, role1, course1 jsmith, demo, John, Smith, s7@example.com, 5, Features

Post Status

Asked in February 2016
Viewed 1,295 times
Voted 5
Answered 1 times

Search




Leave an answer