Uploading Users to #Moodle 2.x @diben

Moodle 2.x user upload

A colleague asked me the following:

Do you have a sample import excel file for Moodle 2.0

The import process for Moodle 2.x is fairly straightforward. While you might begin with an MS Excel file to organize your information, the final file that you must upload to Moodle–and I recommend not uploading students directly into Moodle, instead using external database authentication if Active Directory/LDAP is unavailable–will be a comma-delimited value (CSV) file.

comma-separated values (CSV) (also sometimes called character-separated values, because the separator character does not have to be a comma) file stores tabular data (numbers and text) in plain-text form. Plain text means that the file is a sequence of characters, with no data that has to be interpreted instead, as binary numbers. A CSV file consists of any number of records, separated by line breaks of some kind; each record consists of fields, separated by some other character or string, most commonly a literal comma or tab. Usually, all records have an identical sequence of fields.

When you click on the CSV delimiter,  you’ll notice there are several options. You can easily create a comma-delimited file in various spreadsheet and database programs. MS Excel is one that some people still use. Whatever you use, you’ll want to follow the format outlined in Moodle documentation:

File formats for upload users fileThe upload files have their fields separated by a comma (or other delimiter). The first line contains the valid field names. The rest of the lines (records) contain information about each user.
:Tip: If you are not an expert, avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload. Remember there are other ways to authenticate users on you site or enroll users in a course.
:Tip: You can use a spread sheet program to create the file with the required columns and fields. Then save the file as “CSV (comma delimited)”. These files can be opened with simple text editors for verification.
Valid upload file for testingHere is an example of a simple valid upload file:
username, password, firstname, lastname, email, course1, group1jonest, verysecret, Tom, Jones, jonest@someplace.edu, math102, Section 1reznort, somesecret, Trent, Reznor, reznort@someplace.edu, math102, Section 3

That’s pretty much it.


Check out Miguel’s Workshop Materials online at http://mglearns.wikispaces.com


Everything posted on Miguel Guhlin’s blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure

var _gaq = _gaq || []; _gaq.push([‘_setAccount’, ‘UA-3445626-5’]); _gaq.push([‘_setDomainName’, ‘mguhlin.org’]); _gaq.push([‘_trackPageview’]); (function() { var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true; ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’; var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s); })();

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: