Adding users to the platform through xml or csv files

From Dokeos

Jump to: navigation, search

In the previous chapter we showed how you can add give users access to your dokeos installation. If however you need to add a lot of users then it will be faster if you import the users in batch. This can be done using a XML or CSV file.

SCREENSHOT

  • Location of the CSV / XML file : the form to browse for the XML or CSV file on your local harddisk
  • File type: you have to manually select if you are using a XML or a CSV file
  • Send a mail to users : This is the same option as when you are adding users one by one. The users will all get an email with their registration information (see previous chapter for example).


The CSV file must have the following format (fields in Bold are mandatory)

LastName;FirstName;UserName;Password;Email;OfficialCode;PhoneNumber;Status;Courses

The different fields are separated by a semi-colon (;) and the courses are separated by a pipe symbol (|).

example

LastName;FirstName;UserName;Password;Email;OfficialCode;PhoneNumber;Status;Courses
Gates;Bill;BillGates;secret_password;bill.gates@microsoft.com;12345678;001-123-456-789;user;COURSE1|COURSE2|COURSE3
Bush;Georges;;;georges_bush@usa.org;;;teacher;COURSE2

The XML file must have the following format (fields in Bold are mandatory)

<?xml version="1.0" encoding="ISO-8859-1"?>
<Contacts>
   <Contact>
       <LastName>xxx</LastName>
       <FirstName>xxx</FirstName>
       <UserName>xxx</UserName>
       <Password>xxx</Password>
       <Email>xxx</Email>
       <OfficialCode>xxx</OfficialCode>
       <PhoneNumber>xxx</PhoneNumber>
       <Status>user/teacher</Status>
       <Courses>xxx1|xxx2|xxx3</Courses>
   </Contact>
</Contacts>

example

<Contacts>
   <Contact>
       <LastName>Gates</LastName>
       <FirstName>Bill</FirstName>
       <UserName>BillGates</UserName>
       <Password>secret_password</Password>
       <Email>bill.gates@microsoft.com</Email>
       <OfficialCode>12345678</OfficialCode>
       <PhoneNumber>001-123-456-789</PhoneNumber>
       <Status>user</Status>
       <Courses>COURSE1|COURSE2|COURSE3</Courses>
   </Contact>
   <Contact>
       <LastName>Bush</LastName>
       <FirstName>Georges</FirstName>
       <UserName/>
       <Password/>
       <Email>georges_bush@usa.org</Email>
       <OfficialCode/>
       <PhoneNumber/>
       <Status>teacher</Status>
       <Courses>COURSE2</Courses>
   </Contact>
</Contacts>


To generate a CSV export of your existing database or Excel file, see documentation of your software. Excel and Open Office, for instance, allows easy CSV export by "Save as".

Personal tools