export a list of users with custom fields

export a list of users with custom fields

by Технічна підтримка Владислав Ванда -
Number of replies: 1

I use (Settings>Site administration>Users>Accounts>Bulk user actions) for download users list as table, but the table does not contain all the fields I need, I also need a list of global groups in which the user belongs. How can i add a field to export?

Average of ratings: -
In reply to Технічна підтримка Владислав Ванда

Re: export a list of users with custom fields

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

What version of Moodle is this?

Custom profile fields should be included in the file downloaded using Bulk user actions. On my Moodle 3.11 site I have a custom field with shortname yyyymm. When I download the list of users, I get this field at the end:

id,username,email,firstname,lastname,idnumber,institution,department,phone1,phone2,city,country,profile_field_yyyymm

3,fred,fred@example.com,Fred,Flintstone,,,,,,,,202109

For the group report I don't think Moodle does this. You would need to write your own report, maybe this report is a good starting place. Plugins like Configurable Reports may help make such reports easier to manage.