I recently had to create 94 profile fields in Moodle. Once I had done that, I had to create a bulk upload file for adding a new user. The csv file had to contain all the newly added profile fields.
The thought of manually creating the csv file did not seem like a task I would enjoy. So, being lazy, I look for alternatives.
I turns out you can get Moodle to create the csv file for you – or most of it at least. Here’s how I did it.
Head over to the Bulk user actions…
…and add one user to the bulk action list. In my case I only had the admin user, so I add that user.
Then simply download the user to Excel and your work is done.
If you only have a few profile fields, then building the csv by hand is no problem. But when there are 94, then a little hack like this may come in handy.
On a side note – if first created the profile fields in my dev site. I moved them to the live site using a simple SQL INSERT script without any problems. Just remember, that if you have added them to categories, you must also check this table “mdl_user_info_category” and insert the categories.