Moodle

Include custom profile fields when downloading user information from bulk user actions

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.1
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I may be missing something, but I don't see a way to easily backup unique profile fields created for user accounts. If you select download from bulk user actions, you only get name, email, city/town, ID, etc. As people start customizing/adding to the user fields, I would think it would be beneifical to have a way to easily include those "extra fields" when they want to download an Excel backup file of all users information.

Todd

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Adding some people here for further discussion...

IMO it's correct to export all those custom fields together with the "official" ones in bulk user actions. After all, they are "official" too once they have been created.

Note that backup/restore does support custom fields since Moodle 1.9 (they will be restored in destination server if the same custom field exists there). So I guess no action is needed from a backup/restore point of view.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Adding some people here for further discussion... IMO it's correct to export all those custom fields together with the "official" ones in bulk user actions. After all, they are "official" too once they have been created. Note that backup/restore does support custom fields since Moodle 1.9 (they will be restored in destination server if the same custom field exists there). So I guess no action is needed from a backup/restore point of view. Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Any comment here? Addressable to 1.9.1 ?

Show
Eloy Lafuente (stronk7) added a comment - Any comment here? Addressable to 1.9.1 ?
Hide
Shane Elliott added a comment -

Makes sense to add them to the bulk users download - then again makes sense to add all the current optional fields as well.

They should use the same naming format that is found in the upload users script for consistency ie profile_field_xxxxx where xxxxx is the unique short name of the field.

I actually think we should change the bulk user download script to name the columns in the same way that the upload users script expects the columns eg firstname, lastname,... just to keep it consistent.

Show
Shane Elliott added a comment - Makes sense to add them to the bulk users download - then again makes sense to add all the current optional fields as well. They should use the same naming format that is found in the upload users script for consistency ie profile_field_xxxxx where xxxxx is the unique short name of the field. I actually think we should change the bulk user download script to name the columns in the same way that the upload users script expects the columns eg firstname, lastname,... just to keep it consistent.
Hide
Petr Škoda (skodak) added a comment -

my +1 for consistency and 1,9,1 here

Show
Petr Škoda (skodak) added a comment - my +1 for consistency and 1,9,1 here
Hide
Eloy Lafuente (stronk7) added a comment -

Oki, so objectives are:

1- Bulk user download:

a) export optional fields not currently being exported.
b) export custom profile fields.
c) use same name conventions for fields than the used in bulk user upload.

2- Bulk user upload:

a) check it works perfectly with files generated by bulk user download (1).

Dongsheng, could you take a look to this and propose one patch to fulfil all the objectives above? TIA!

Show
Eloy Lafuente (stronk7) added a comment - Oki, so objectives are: 1- Bulk user download: a) export optional fields not currently being exported. b) export custom profile fields. c) use same name conventions for fields than the used in bulk user upload. 2- Bulk user upload: a) check it works perfectly with files generated by bulk user download (1). Dongsheng, could you take a look to this and propose one patch to fulfil all the objectives above? TIA!
Hide
Dongsheng Cai added a comment -

I made a patch here. please review, should I save user preferences too?

Show
Dongsheng Cai added a comment - I made a patch here. please review, should I save user preferences too?
Hide
Petr Škoda (skodak) added a comment - - edited

+1
reviewed and tested, please fix the whitespace and commit into 1.9.x - on Wednesday -

Show
Petr Škoda (skodak) added a comment - - edited +1 reviewed and tested, please fix the whitespace and commit into 1.9.x - on Wednesday -
Hide
Eloy Lafuente (stronk7) added a comment -

+1 (not tested but believe on Petr). And no, user preferences are out from this. You can forget about them.

Show
Eloy Lafuente (stronk7) added a comment - +1 (not tested but believe on Petr). And no, user preferences are out from this. You can forget about them.
Hide
Dongsheng Cai added a comment -

Optional fields and custom fields are added, use same name conventions for fields now, the changes have been merged into HEAD.
Feel free to reopen it, if you find any problem

Show
Dongsheng Cai added a comment - Optional fields and custom fields are added, use same name conventions for fields now, the changes have been merged into HEAD. Feel free to reopen it, if you find any problem

Dates

  • Created:
    Updated:
    Resolved: