|
|
|
Environment:
|
All
|
|
Issue Links:
|
Dependency
|
|
|
|
This issue will be resolved by:
|
|
MDL-11752
Add ability to mass/bulk upload user profile images
|
|
|
|
|
Relates
|
|
This issue has a non-specific relationship to:
|
|
MDL-11752
Add ability to mass/bulk upload user profile images
|
|
|
|
|
|
|
|
There's a little bit of discussion here (including diff output):
http://moodle.org/mod/forum/discuss.php?d=36405
The modification will change the function save_profile_image() allowing it to take a URL argument. This means in turn that enrolment scripts and other automatic ways of creating users will be able to suck profile photos into Moodle, if they're available at a URL.
|
|
Description
|
There's a little bit of discussion here (including diff output):
http://moodle.org/mod/forum/discuss.php?d=36405
The modification will change the function save_profile_image() allowing it to take a URL argument. This means in turn that enrolment scripts and other automatic ways of creating users will be able to suck profile photos into Moodle, if they're available at a URL. |
Show » |
|
MDL-11752work, we decoupled the uploading of the profile images, and the processing of those image files. As a result, we can now get the profile images from anywhere (from an external URL, an LDAP directory, etc.), put them in a temporary file in moodledata and use the following code to assign the picture to the user. $id is the user id, and $originalfile is the path to the (temporary) profile image file$destination = create_profile_image_destination($id, 'user');
if ($destination === false) { // do whatever you need to handle the error. }
$success = process_profile_image($originalfile, $destination);
So I'd say we can close this bug as fixed. Dan?
Saludos. Iñaki.