ELIS 2013 Manual

ELIS Data Hub 2

Batch Import/Update of Users

Setting Up User Import Fields

The fields that can be imported and exported are listed in the Field Mappings link.

ELIS version 1 impoert field mapping link

The user properties mapping table enables you to map the names of user properties from your export file to properties in ELIS Data Hub. You only need to remap data entered here if your export file has different names in it. Go to the Administration block > Site Administration > Plugins > Local plugins > Data Hub plugins > Version 1 ELIS import > Field mapping > User fields tab.

Data Hub user field map
  1. The tabs at the top indicate which fields we are editing - in this example the User Fields.
  2. Data Hub enables you to enter new values for these fields to match the values in your export file. For example if your backend system calls the username the uname, you can map the Moodle field username to uname here. The most common use here is to remap profile field values.
  3. New fields added with the ELIS 2.6.1.1 release. These fields can be used as identifying fields, their main use is for updating identifying fields. For more info go to the next page.
  4. ELIS custom user fields are included in the User properties mapping table. New values can be entered for custom fields the same way as standard fields.
  5. Save changes to save your changes and put them into effect.

Any of these parameters can be set or updated via the Data Hub import file. If you make changes to any property values, be sure to select the Save changes button.

The following tables contains the standard fields from the property map above with a brief explanation of each field. Required fields for user creation are in red.

action:
The action field is always required. Enter create, update, or delete. The actions from Data Hub 1 will work with Data Hub 2, "add" can be used instead of "create" and "disable" can be used instead of "delete".
username:
This is a required field for user creation. This is also an identifying field, optional. Identifying fields are used to identify users for updates/deletion.
password:
This is a required field for user creation.
idnumber:
The user's id number is a required field for user creation. This is also an identifying field, optional. Identifying fields are used to identify users for updates/deletion.
firstname:
This is a required field for user creation.
lastname:
This is a required field for user creation.
mi:
The user's middle initial
email:
This is a required field for user creation. This is also an identifying field, optional. Identifying fields are used to identify users for updates/deletion.
email2: A second email if the user has one
address:
The user's address
address2:
The rest of a user's address
city:
The user's city
state:
The user's state
postalcode
The user's postal code
country:
This is a required field for user creation.
phone:
The user's phone #
phone2:
The user's second phone #
fax
The user's fax
birthdate:
The user's birthdate
gender:
The user's gender
language:
Currently the site default is used for this entry.
transfercredits:
Credits the user has earned in another system
comments:
Any comments about the user
notes:
Notes on the user
inactive
Enter 1 for inactive. Enter 0 for active. The default value for new users is active.
user_idnumber
The idnumber of an existing ELIS user. This can be used as an identifying field. If this field and the idnumber field are in the file, both values have to be the same because the idnumber can not be changed once set.
user_username
The username of an existing ELIS user. This can be used as an identifying field. If this field and the username field are present in the file, this will be the identifying field and the username field can then be used for updating.
user_email
The email of an existing ELIS user. This can be used as an identifying field. If this field and the email field are present in the file, this will be the identifying field and the email field can then be used for updating.


The required fields for creating users with ELIS Data Hub import files are:
  1. action
  2. idnumber
  3. username
  4. password
  5. firstname
  6. lastname
  7. email
  8. country
The required fields for updating and deleting users with ELIS Data Hub import files are:
  1. action
  2. idnumber or username or email
For information about updating identifying fields go to the next page.

Data Hub Actions:
ELIS Data Hub tells ELIS what needs to be done with imported data via the Actions column. The sample csv file below illustrates this function:

Example of user import csv file

In the image of the user file above:
  • Mary is being added to the site. Only the required fields for user creation are included in the file.
  • James is being added to the site.
  • Patricia's city is being updated using her idnumber as the identifying field.
  • Jennifer is being deleted using her email as the identifying field. She will be deleted from ELIS and Moodle records.
If the 'disable' action is used instead of 'delete', the user is still deleted from ELIS and Moodle records.

To download the file in the example above, select this link.

For the file to process successfully the users in rows 4 and 5 must be added to the site before running the file.


Importing/Processing Data Hub Files


ELIS Data Hub import files can be scheduled to automatically process or can be manually processed. Import files should be scheduled to process in most instances, docs for scheduling imports are at this link. Manual processing should be used for testing small files only. Manual processing is currently limited to 28 seconds of processing time in our standard Data Hub installs. Scheduled processing will continue imports on subsequent cron runs when processing takes to long, manual processing does not do this.

The sample file being used here is simple enough to process manually. To manually process files go to the Settings block > Site Administration > Plugins > Blocks > Data Hub plugins > Manage Plugins. Under the Import Plugins section go to the Version 1 ELIS import row and select the "Go" link in the Run manually column.

Manually run job link

Select the "Choose a file" button. Select a file to process and then select the Run Now button.

Manually run job

Once the file is processed there will be a brief log message stating whether or not the file import was successful.

A complete log of all actions is kept in the logs file, as well as (optionally) emailed to an address or addresses each time the Data Hub script runs. Logs can be accessed from the Data Hub block > Data Hub logs link.

For information about scheduling imports to automatically process go to this page Importing/Processing files.