Issue Details (XML | Word | Printable)

Key: MDL-11752
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Anthony Borrow
Reporter: Anthony Borrow
Votes: 5
Watchers: 4
Operations

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

Add ability to mass/bulk upload user profile images

Created: 14/Oct/07 08:38 AM   Updated: 06/Jan/09 05:04 PM
Return to search
Component/s: Administration
Affects Version/s: 1.9
Fix Version/s: 1.9

File Attachments: 1. File gdlib.php.diff (4 kB)
2. GZip Archive mass-upload-user-pictures-1.8.2.tar.gz (5 kB)
3. File mass-upload-user-pictures-1.8.3.diff (18 kB)
4. File mass-upload-user-pictures-1.8.3.diff (17 kB)
5. GZip Archive mass-upload-user-pictures-1.8.3.tar.gz (8 kB)
6. GZip Archive mass-upload-user-pictures-1.8.3.tar.gz (8 kB)
7. File mass-upload-user-pictures-1.8.7.diff (19 kB)
8. File mass-upload-user-pictures-1.9beta2.diff (16 kB)
9. GZip Archive mass-upload-user-pictures-1.9beta2.tar.gz (8 kB)
10. File mass-upload-user-pictures-1.9beta3.diff (17 kB)
11. GZip Archive mass-upload-user-pictures-1.9beta3.tar.gz (9 kB)
12. Text File mass-upload-user-pictures-1.9beta4.diff (17 kB)

Issue Links:
Dependency
 
Relates
 

Participants: Anthony Borrow, David Banach, Helen Foster, Iñaki Arenaza, Martin Dougiamas, Nicolas Connault and Ray Lawrence
Security Level: None
QA Assignee: Nicolas Connault
Resolved date: 25/Feb/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE

Sub-Tasks  All   Open   
 Sub-Task Progress: 

 Description  « Hide
Since Moodle development is looking at user images I thought it might be a convenient time to add a feature request for administrators to be able to mass or bulk upload user profile images. This is particularly helpful in schools that receive school pictures from a photographer. The admins would be able to copy the files to a particular directory and have Moodle process those images into the user profile. A previous hack that I did accomplished this by modifying the /lib/gdlib file and creating a second save_profile_image function that took the filename as input for a filename rather than using the upload manager. I would think that the function could be fairly easily modified to detect file or upload manager. I am attaching a patch that Iñaki submitted for Moodle 1.8.2 (prior to the change in the location of files as related to MDL-8605). An updated patch file is to follow for 1.8+ and 1.9. For increased flexibility, it might be worth considering creating a CFG->uploadprofilepath to the path the the user profile images are stored (I had hardcoded mine to be /userpix/jpg but something like /userpix/import could work as well) and an option for CFG->uploadprofilename to determine whether to use the user's username, Moodle id, or idnumber as the name of the file (or any other field that could uniquely identify the user).

See http://moodle.org/mod/forum/discuss.php?d=36405 for the discussion.

I have also included my patch of the /lib/gdlib.php file (also 1.8.2, i.e. pre MDL-8605) that shows the changes I made to use a filename. This can be a real time saver for system administrators at schools and hopefully is fairly easy to accomplish. Peace - Anthony

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
moodler committed 6 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 21/Feb/08 02:23 PM
MDL-11752 Upload user pictures (from Anthony and Inaki)
          Verified with just major code formatting changes
MODIFY admin/settings/users.php   Rev. 1.26.2.4    (+2 -1 lines)
MODIFY lib/moodlelib.php   Rev. 1.960.2.49    (+5 -3 lines)
MODIFY lib/gdlib.php   Rev. 1.14.2.3    (+51 -17 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.154.2.33    (+12 -0 lines)
MODIFY admin/uploadpicture.php   Rev. 1.1.2.1    (+181 -0 lines)
MODIFY admin/uploadpicture_form.php   Rev. 1.1.2.1    (+29 -0 lines)
moodler committed 6 files to 'Moodle CVS' - 21/Feb/08 02:24 PM
MDL-11752 Upload users form merged from 1.9
MODIFY lang/en_utf8/admin.php   Rev. 1.186    (+12 -0 lines)
MODIFY admin/settings/users.php   Rev. 1.30    (+2 -1 lines)
MODIFY admin/uploadpicture_form.php   Rev. 1.2    (+29 -0 lines)
MODIFY admin/uploadpicture.php   Rev. 1.2    (+181 -0 lines)
MODIFY lib/gdlib.php   Rev. 1.17    (+51 -17 lines)
MODIFY lib/moodlelib.php   Rev. 1.1007    (+5 -3 lines)
Mitsuhiro Yoshida committed 4 files to 'Lang CVS' - 22/Feb/08 07:56 AM
Translated new strings for admin MDL-11752.
Updated translated strings for database, feedback and group.
MODIFY ja_utf8/feedback.php   Rev. 1.19    (+4 -4 lines)
MODIFY ja_utf8/group.php   Rev. 1.28    (+34 -34 lines)
MODIFY ja_utf8/data.php   Rev. 1.81    (+3 -3 lines)
MODIFY ja_utf8/admin.php   Rev. 1.249    (+8 -1 lines)
Mitsuhiro Yoshida committed 2 files to 'Lang CVS' - 25/Feb/08 04:00 PM
Translated new strings for admin MDL-11752.
Translated a new string for tag 'remove from interests' MDL-13638.
MODIFY ja_utf8/admin.php   Rev. 1.251    (+10 -1 lines)
MODIFY ja_utf8/tag.php   Rev. 1.10    (+1 -0 lines)
martignoni committed 1 file to 'Lang CVS' - 27/Feb/08 05:26 AM
MDL-11752: new language strings added
MODIFY fr_utf8/admin.php   Rev. 1.241    (+12 -0 lines)