Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11752

Add ability to mass/bulk upload user profile images

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.9
    • Administration
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      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

            aborrow Anthony Borrow
            aborrow Anthony Borrow
            Nicolas Connault Nicolas Connault (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.