|A user with System Administration privileges must perform this operation.|
In LAMS v1 you could bulk import users by putting users' details into a spreadsheet template, and importing into the organisation where you wanted to put them. LAMS v2's bulk import works similarly, but also a little different.
|This page refers to LAMS 2.0.1+ bulk import|
In 2.0, there is no roles spreadsheet, only the users template which contains 2 extra columns, organisation_id and roles. Simply use these two optional columns as described below (under 'Adding users to groups') if you'd like to add a user to a group when creating them. The advantage of splitting this into 2 spreadsheets is that you can add users to more than one group at a time, and not only when creating them.
To do this, use the user template spreadsheet (lams_users_template.xls). This contains 20 columns in which you can enter a user's details. Login, password, first name, last name and email are mandatory; the other columns can be left blank.
Here is a description of each of the columns (most are self explanatory):
|authentication_method_id||optional - references authentication_method_id or the authentication_method_name in lams_authentication_method table. Use '1' or 'LAMS-Database' for a user in the local LAMS database, or '2' or 'MQ-LDAP' for an LDAP authentication. Defaults to a LAMS database user.|
|flash_theme_id||optional - only use when you have additional themes installed (references theme_ve_id in lams_css_theme_ve table); defaults to system default as configured in system configuration|
|html_theme_id||optional - only use when you have additional themes installed (references theme_ve_id in lams_css_theme_ve table); defaults to system default as configured in system configuration|
|locale_id||optional - references locale_id in lams_supported_locale table; defaults to system default as configured in system configuration. See Locale list. If not locale_id is specified, then the users get created with the server locale.|
|country||optional (must use 2 letter code as ISO 3166-1 alpha-2 code for country)|
When importing this spreadsheet, you will receive a message saying 'x number of users have been created', along with any error messages for users that could not be created. Fix the errors for these users, and import again. The importer will know not to import the same user twice.
Once accounts have been created, you will probably want to add them to their groups and/or subgroups. To do this, use the roles template spreadsheet (lams_roles_template.xls). It contains 3 columns, login, organisation, and roles; this basically tells the importer to import a user (login) into a group/subgroup (organisation) using the specified roles.
You can get the organisation id when you go to edit a group or subgroup.
|What's an organisation? And why can't I use a name instead of an id number?|
'Organisation' is just a generic name for groups and subgroups, used in the code. You need to specify an id number rather than a name, since only the id number is guaranteed to be unique.
Here are the roles you can specify in your roles spreadsheet:
|Organisation type||Allowable roles|
|Group||Group Admin|Group Manager|Author|Monitor|Learner|
|Global roles||Sysadmin|Author Admin|Group Admin|
The organisation id to use when assigning global roles in a spreadsheet is 1.
When importing this spreadsheet, you will receive a message saying 'x number of users have been added', along with any error messages for users that could not be added. e.g. you cannot give 'group manager' to a user in a subgroup.
|The roles spreadsheet sets roles, it does not add roles|
The roles specified for a user in a particular group/subgroup will be what the user ends up with. i.e. it will not simply add these roles to what the user already has, if they are already a member. Make sure you don't accidentally lose any roles!
- If you receive a java exception error while importing ('Sorry, there has been an error' page), try pasting your data into a fresh spreadsheet, and keep your data as simple as possible, i.e. leave out formulas, non-essential text, etc.
- Make sure you don't leave any empty rows between your list of users.
- Alternatively, post your error and the error message to the LAMS Community forum.
Use the locale_id according to the language and country you want to choose for a user: