Import Users

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.

Creating user accounts

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):









Column Description
login mandatory
password mandatory
title optional
first_name mandatory
last_name mandatory
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.
email mandatory
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.
address_1 optional
address_2 optional
address_3 optional
city optional
state optional
postcode optional
country optional
day_phone optional
evening_phone optional
mobile_phone optional
fax optional

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.









Adding users to groups

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
Subgroup Author|Monitor|Learner
Global roles Sysadmin|Author Admin|Group Admin


Global roles
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!

Troubleshooting

  • 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.

Related LAMS Community discussions

Locale List and IDs

Use the locale_id according to the language and country you want to choose for a user:

locale_id language_iso_code country_iso_code language name
1 en AU English (Australia)
2 es ES Espanol
3 mi NZ Maori
4 de DE Deutsch
5 zh CN Chinese (China)
6 fr FR French (France)
7 it IT Italiano
8 no NO Norsk
9 sv SE Svenska
10 ko KR Korean
11 pl PL Polski
12 pt BR Portugues (Brasil)
13 hu HU Magyar
14 bg BG Bulgarian
15 cy GB Cymraeg (Cymru)
16 th TH Thai
17 el GR Greek
18 nl BE Nederlands (Belgium)
19 ar JO Arabic (Jordan)
20 da DK Dansk
21 ru RU Russian
22 vi VN Vietnamese
23 zh TW Chinese (Taiwan)
24 ja JP Japanese
25 ms MY Malay (Malaysia)
26 tr TR Turkish
27 ca ES Catalan

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.