|
|
|
Sub-Tasks:
|
All
|
Open
|
|
| Sub-Task Progress: |
|
|
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
|
|
Description
|
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 |
Show » |
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
|
|
|
moodler committed 6 files to 'Moodle CVS' - 21/Feb/08 02:24 PM
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.
|
|
|
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.
|
|
|
martignoni committed 1 file to 'Lang CVS' - 27/Feb/08 05:26 AM
|