Issue Details (XML | Word | Printable)

Key: MDL-16929
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Jerome Mouneyrac
Reporter: Ralf Hilgenstock
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Bulk user export - import problem; wrong export string.

Created: 19/Oct/08 04:27 AM   Updated: 18/Mar/09 02:28 AM
Return to search
Component/s: Administration
Affects Version/s: 1.9.3
Fix Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 2.0

File Attachments: 1. Text File MDL-16929.patch (0.7 kB)

Issue Links:
Duplicate
 

Participants: Eloy Lafuente (stronk7), Jerome Mouneyrac, Petr Skoda and Ralf Hilgenstock
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 22/Oct/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
 user_bulk_download.php

Instaed of $v->name it should be $v-shortname

 if ($extrafields = get_records_select('user_info_field')) {
   foreach ($extrafields as $n=>$v){
     $fields['profile_field_'.$v->shortname] = 'profile_field_'.$v->name;
   }
 }

It should be

 if ($extrafields = get_records_select('user_info_field')) {
   foreach ($extrafields as $n=>$v){
     $fields['profile_field_'.$v->shortname] = 'profile_field_'.$v->shortname;
   }
 }


Error and solution found by Lars Kobbe

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 21/Oct/08 01:39 AM
Well spotted Ralf and Lars!

Assigning to Jerome and addressing for 1.9.4 (critical). Jerome can you test it now, confirm and fix if necessary?

TIA!


Jerome Mouneyrac added a comment - 21/Oct/08 10:21 AM
No problem, I have looked at it.

Thanks for the report and the fix.


Jerome Mouneyrac added a comment - 21/Oct/08 06:05 PM - edited
I confirm the bug and the fix is good. I attached the patch. I will have a look to see if an import function into Moodle exists (probably upload user).

here are the test steps for QA retest:

1. connect as Admin in 1.9
2. Create a new profil field in Administration menu > Users > Accounts > User profile fields
2. In administration menu > Users > Accounts > Bulk User Actions > 'Add All' button
3. Select the 'Download' option in the 'With selected users' select box. > Go button
=> check that the shortname of the new profil field is displayed into the file (title of this column should be profile_field_'shortname')


Jerome Mouneyrac added a comment - 22/Oct/08 09:38 AM
I tested the Moodle upload users functionality but it apparently required a different file format anyway. If someone know what to do with the bulk user download file (I mean if you can import back into Moodle), please test it.

I commited the fix into 1.9 and HEAD.
Thanks again for the report and the fix
PS: just a note about missing test steps here: http://docs.moodle.org/en/Missing_test_steps_into_a_bug_report


Petr Skoda added a comment - 29/Oct/08 07:44 AM
thanks, closing