Active Directory Pictures as Moodle Pictures

Active Directory Pictures as Moodle Pictures

by Zak Fleming -
Number of replies: 4

Hi,

I have taken a copy of our current moodle and got it working nice with our AD, i am all happy with that.

We use the facility in AD that will assign pictures to user accounts. Is there a way to get moodle to pickup this image and use this instead of users uplaoding there own.

I hope that made sense.

Thanks

Average of ratings: -
In reply to Zak Fleming

Re: Active Directory Pictures as Moodle Pictures

by Przemek Malik -

Anyone?

In reply to Przemek Malik

Re: Active Directory Pictures as Moodle Pictures

by Jamie Kramer -

I am sure there would be a way to do this, albeit with some development. Moodle doesn't have this feature built in last I checked. 

Are you talking about the thumbnailPhoto attribute in AD? https://msdn.microsoft.com/en-us/library/cc221395.aspx

Or jpegPhoto? https://msdn.microsoft.com/en-us/library/cc221395.aspx

I suppose it could be mappable in field mappings. It could be made to behave like any other user profile field, to update on login, to lock, etc.

The ldap authentication plugin would need to be extended to build in logic to manage the user's photo in Moodle. I think this is a pretty feasible project, but does need some development.

You could get development service for this from a Moodle Partner (full disclosure, I am with a Moodle partner company). https://moodle.com/partners/




In reply to Jamie Kramer

Re: Active Directory Pictures as Moodle Pictures

by Dave Perry -
Picture of Testers

One of my colleagues has made this work (in 2.5), but it wasn't ported over to our latest major upgrade and he's not had a chance to try since.
We only used it on the 'enrol users' popup, as some of our staff here have student logins as well for courses they're studying, but I remember it taking a while to find the right place in the code for it to go.

This gist of it was, in the right place - get the picture attribute in AD, render out the image as a binary data img tag.

I'll see if I can dig out the code from the previous instance, assuming it's still on the server.