Problems when importing users in bulk

Problems when importing users in bulk

by Francis Vendrell -
Number of replies: 16

Hello,

I was not able to enroll students in a group when uploading users in bulk (using a file).

This is the content of my file:

username, password, firstname, lastname, email, course1, group1

studentname, secret, harry, potter, magic@world.com, magiccourse, groupeA 

The student get enrolled in the course but NOT in the group. sad

Does anyboody have an idea why this does not work?
It is the first time I ever used this way of enrolling.

Thank you very much for any help or clue.

Francis

___________________________________________________________

I use Moodle 1.8.
The setting I used:

Password field handling: Field required in file
Update existing accounts: Yes
Create password if needed:   No

-------------------------------------------------------------- /tr>

/td> /td>
Average of ratings: -
In reply to Francis Vendrell

Re: Problems when importing users in bulk

by Darren Munday -
Hi Francis,

I am unable to help and would just like to add that I am experiencing the same problem.

My csv is:
username,password,firstname,lastname,email,group1,course1,type1
tuser05,pw,Test,User,tuser05@School.Hants.sch.uk,7Atest,Y7ICT,1


I get the reply:
1142 , tuser05 User updated
-->Enrolled in course "Y7ICT"
-->Not added to group 7Atest
New users: 0
Users updated: 1
Errors: 0
This is also my first attempt of using the bulk import. The user is already a member of the system and I have the Update existing accounts switched on. I have tested that I am able to add the user manually.

I guess this is something to do with the new grouping thing and have tried adding grouping to the csv with no success.

Darren.
In reply to Darren Munday

Re: Problems when importing users in bulk

by Don Schwartz -
I've had the same import problems with both 1.7 and 1.8 and there is a tracker issue open: http://tracker.moodle.org/browse/MDL-9075
In reply to Don Schwartz

Re: Problems when importing users in bulk

by Darren Munday -
It is suggested on the tracker to try saving the cvs as utf-8. I have tried but get "username" is not a valid field name as an error, also tried the other encoding options in notepad.

I will comment this back in the tracker and link back over to this thread.
In reply to Francis Vendrell

Re: Problems when importing users in bulk

by Darren Munday -
This is now fixed in cvs, for more info check here:
http://tracker.moodle.org/browse/MDL-9324
In reply to Darren Munday

Re: Problems when importing users in bulk

by Francis Vendrell -
Dear Darren,

Thank you for your help concerning bug MDL-9324.

I am still experiencing some problems when important users in bulk, in particular regarding the password which is overwritten.

For exemple, assume "JamesBond" is enrolled for the first time (in course1 = C1). The file to upload is:

username, password, firstname, lastname, email, course1, group1
JamesBond, secret, James, Bond, email@mi5.com, C1, G1

JamesBond decides then to change is password to "topsecret".

Next "JameBond" is enrolled in course2 = C2:

username, password, firstname, lastname, email, course1, group1
JamesBond, secret, James, Bond, email@mi5.com, C2, G2

The actual password is then again "secret" (i.e. not "topsecret") which is quite embarassing.

I have tried with all possible parameters (the parameter "Update existing accounts =Yes" is neccessary for the enrollment in the course but then the password is overwritten; I have also tried "Allow renames=No").

Did you experienced the same problem?

Thanks

Francis


In reply to Francis Vendrell

Re: Problems when importing users in bulk

by Ed McLafferty -
Hi Francis,

I have the same problem with the password being over-written.

Any help on this would be appreciated. smile



Cheers,

Ed
In reply to Francis Vendrell

Re: Problems when importing users in bulk

by David Rogers -

In the documentation:

http://docs.moodle.org/en/Upload_users

the limit for the number of courses that can be added at a time appears to be 5. Is it possible to go beyond course5? Is there a limit or does one just go on with course6, course7, ... courseN?

Has anyone tried this yet?

In reply to David Rogers

Re: Problems when importing users in bulk

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm afraid 5 is the limit. If you need to enrol users in more courses, you should investigate the different enrolment plugins (you can even use a CSV upload file, albeit with a different format).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Problems when importing users in bulk

by A. T. Wyatt -
Greetings, Iñaki!

Can you please elaborate on
(you can even use a CSV upload file, albeit with a different format).

I have looked for a long time, but do not understand how to do anything but upload users. Is this information somewhere? Could you please provide a link?

Thank you,
atw

In reply to A. T. Wyatt

Re: Problems when importing users in bulk

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Can you please elaborate on

Sure wink

You can use 'Flat file' enrolment. Just go to: Administration >> Courses >> Enrolments (Enrolment Plugins in 1.6.x) and follow the instructions you get there.

The 'big' inconvenience is that you need to know 'idnumber' for users and courses (and they have to exist beforehand), but otherwise you can make as many enrolments as you want wink

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: Problems when importing users in bulk

by Douglas Ianitsky -
Hi!
i'm using moodle 1.5 version, so the select option "ALLOW RENAME" isn't displayed.
then, what can i do to upload account users to insert this users in a new course.

help me!

thanks
In reply to Iñaki Arenaza

Re: Problems when importing users in bulk

by Vedran Mušica -
Hi.

I've found in uploaduser.php an group of actions that are adding up to 5 groups, courses, roles...

What would happened if I change that to 10? Would Moodle process all 10, or would stop at 5?

This is easiest way for me to upload users. For now I'm uploading users with 5 groups and then upload them again with up to five more courses, with change user set to On.

Best regards,
Vedran Musica
In reply to Vedran Mušica

Re: Problems when importing users in bulk

by Tom Cox -
Yup, you can keep going beyond course5, role5 etc...If anyone is interested we put together an excel spreadsheet and edited 1.7 "uploaduser.php" to autogenerate some user info, bulk upload into 20 groups/courses/roles and set user theme. It's tailored to to our needs, but it may be of some use to others. Sheet one of the excel doc. is where you input the users and the csv is generated from sheet two:

lastname,firstname,username,password,email,role1,role2,role3,role4,role5,role6,role7,role8,role9,role10,role11,role12,role13,role14,role15,role16,role17,role18,role19,role20,group1,group2,group3,group4,group5,group6,group7,group8,group9,group10,group11,group12,group13,group14,group15,group16,group17,group18,group19,group20,course1,course2,course3,course4,course5,course6,course7,course8,course9,course10,course11,course12,course13,course14,course15,course16,course17,course18,course19,course20,theme Manager,Example2,ManagerExample,Manager491,ManagerExample@2dummySite.not,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Alder Bridge Days,Activities,Alzh/Mem,Death/Dying,First Aid,Food/Nutrition,Marketing,Care,Safety,na,na,na,na,na,na,na,na,na,na,na,Alderbridge,dummySite Learner,Example2,LearnerExample,Learner367,LearnerExample@2dummySite.not,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Alder Bridge Swing,Activities,Alzh/Mem,Death/Dying,First Aid,Food/Nutrition,Marketing,Care,Safety,na,na,na,na,na,na,na,na,na,na,na,Alderbridge,dummySite

Tom
In reply to Francis Vendrell

Re: Problems when importing users in bulk

by craig dobson -

Hi sorry to bother you all,

How do I register pupils in bulk onto my site?

http://moodle.flintshire.gov.uk/hawarden

Thanks

Craig