Moodle
  1. Moodle
  2. MDL-29584

Libravatar (and other avatar services) support

    Details

    • Testing Instructions:
      Hide

      If you don't already have one, go to http://en.gravatar.com/ and http://www.libravatar.org/ and create two accounts each on Gravatar and Libravatar, using email addresses you control, for testing. Create (or edit) Moodle users to use these email addresses - two with Gravatar accounts, two with Libravatar accounts; one each with an uploaded user picture, and one each without. You will also want at least two other Moodle users with non-avatar email addresses, one with an uploaded picture, and another without. (Alternatively, you could simply alter fewer users, or even one user, as you go, to fulfil the various testing criteria as needed).

      Run a site upgrade at /admin/ to pick up the new "Enable Avatars" setting (leave at the default: NO, unchecked).

      1. Avatars OFF
      Examine user pictures (in user profile view and edit pages, in forums, course participants, etc.) to see that the default existing Moodle behaviour has persisted (normal user pictures, no avatar images, user can upload and change their pictures).

      2. Avatars ON, using Gravatar (default)
      Change the "Enable Avatars" to enabled (checked), and leave the "Avatar Service" setting to the default, Gravatar.
      Examine user pictures again - the user picture should now be the Gravatar image for those users with a Gravatar-enabled email address, unless they have uploaded their own image. Moodle users without a Gravatar-enabled email address should show their picture as normal (if any). For an account with a Gravatar-enabled email address that is showing a Gravatar image, uploading a user picture should override the avatar image.

      3. Avatars ON, using Libravatar
      Repeat 2, but the avatar image should be from the Libravatar service.
      Additionally, the Libravatar image should come from a local federated libravatar image server, as queried from the DNS SRV record on the domain of the user's email address, as described at http://wiki.libravatar.org/api/ We have a federated server at Catalyst that we can test this on.

      Show
      If you don't already have one, go to http://en.gravatar.com/ and http://www.libravatar.org/ and create two accounts each on Gravatar and Libravatar, using email addresses you control, for testing. Create (or edit) Moodle users to use these email addresses - two with Gravatar accounts, two with Libravatar accounts; one each with an uploaded user picture, and one each without. You will also want at least two other Moodle users with non-avatar email addresses, one with an uploaded picture, and another without. (Alternatively, you could simply alter fewer users, or even one user, as you go, to fulfil the various testing criteria as needed). Run a site upgrade at /admin/ to pick up the new "Enable Avatars" setting (leave at the default: NO, unchecked). 1. Avatars OFF Examine user pictures (in user profile view and edit pages, in forums, course participants, etc.) to see that the default existing Moodle behaviour has persisted (normal user pictures, no avatar images, user can upload and change their pictures). 2. Avatars ON, using Gravatar (default) Change the "Enable Avatars" to enabled (checked), and leave the "Avatar Service" setting to the default, Gravatar. Examine user pictures again - the user picture should now be the Gravatar image for those users with a Gravatar-enabled email address, unless they have uploaded their own image. Moodle users without a Gravatar-enabled email address should show their picture as normal (if any). For an account with a Gravatar-enabled email address that is showing a Gravatar image, uploading a user picture should override the avatar image. 3. Avatars ON, using Libravatar Repeat 2, but the avatar image should be from the Libravatar service. Additionally, the Libravatar image should come from a local federated libravatar image server, as queried from the DNS SRV record on the domain of the user's email address, as described at http://wiki.libravatar.org/api/ We have a federated server at Catalyst that we can test this on.
    • Affected Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-29584_4
    • Rank:
      19096

      Description

      Extend Gravatar functionality to support Libravatar and potentially other similar avatar services

        Activity

        Hide
        Francois Marier added a comment -

        This library makes it easy to generate the right URL and do the required DNS lookups:

        https://launchpad.net/services-libravatar
        https://gitorious.org/services_libravatar

        Show
        Francois Marier added a comment - This library makes it easy to generate the right URL and do the required DNS lookups: https://launchpad.net/services-libravatar https://gitorious.org/services_libravatar
        Hide
        Michael de Raadt added a comment -

        Thanks for suggesting this.

        If you can propose a code solution, that will increase the chance of this improvement/feature coming about sooner. If you are able to provide a patch, please add a patch label so we will spot it.

        Show
        Michael de Raadt added a comment - Thanks for suggesting this. If you can propose a code solution, that will increase the chance of this improvement/feature coming about sooner. If you are able to provide a patch, please add a patch label so we will spot it.
        Hide
        Jonathan Harker added a comment - - edited

        Rebased on to latest master. (Now two commits - the second adds updated Libravatar_Services code with a nifty convenience function)

        Show
        Jonathan Harker added a comment - - edited Rebased on to latest master. (Now two commits - the second adds updated Libravatar_Services code with a nifty convenience function)
        Hide
        Jonathan Harker added a comment -

        Rebased onto October 20 master.

        Show
        Jonathan Harker added a comment - Rebased onto October 20 master.
        Hide
        Jonathan Harker added a comment -

        This branch is now rebased off weekly 2.2dev and integrates changes from the peer review done by François.

        Show
        Jonathan Harker added a comment - This branch is now rebased off weekly 2.2dev and integrates changes from the peer review done by François.
        Hide
        Jonathan Harker added a comment -

        Changes by François can be viewed on wip-MDL-29584_1 branch - these have been squashed into one commit and rebased on recent master onto wip-MDL-29584_3.

        Show
        Jonathan Harker added a comment - Changes by François can be viewed on wip- MDL-29584 _1 branch - these have been squashed into one commit and rebased on recent master onto wip- MDL-29584 _3.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.
        Hide
        Jonathan Harker added a comment -

        New wip_4 branch rebased onto master 2.2beta (15 Nov)

        Show
        Jonathan Harker added a comment - New wip_4 branch rebased onto master 2.2beta (15 Nov)
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Hi Jonathan,

        I'm reopening this because release freeze happened some days ago and, right now (days before release), we cannot accept new features like this.

        I'd recommend to put it back to integration once 2.2 branching happens so it will have high chances to land for 2.3 (June/July 2012).

        Perhaps that is also good from the POV of allowing you to fine-tune a bit the implementation, with:

        • Provide upgrade code, so sites with gravatar enabled in 2.2 will get it also enabled in 2.3.
        • The code includes one new library (pear/...), that needs to be added to lib/thirdpartylibs.xml
        • Perhaps, try to encapsulate each avatar service into some class, providing from there the links and friends. Surely this will allow to add more avatar services later easily (OpenAvatar, Yahoo...). Note they won't be real moodle plugins, but just well separated classes to implement new ones easier.

        And those are my thoughts... thanks for the effort, I hope this will land soon. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Hi Jonathan, I'm reopening this because release freeze happened some days ago and, right now (days before release), we cannot accept new features like this. I'd recommend to put it back to integration once 2.2 branching happens so it will have high chances to land for 2.3 (June/July 2012). Perhaps that is also good from the POV of allowing you to fine-tune a bit the implementation, with: Provide upgrade code, so sites with gravatar enabled in 2.2 will get it also enabled in 2.3. The code includes one new library (pear/...), that needs to be added to lib/thirdpartylibs.xml Perhaps, try to encapsulate each avatar service into some class, providing from there the links and friends. Surely this will allow to add more avatar services later easily (OpenAvatar, Yahoo...). Note they won't be real moodle plugins, but just well separated classes to implement new ones easier. And those are my thoughts... thanks for the effort, I hope this will land soon. Ciao
        Hide
        Jonathan Harker added a comment -

        No worries, have a good Moodle release

        Show
        Jonathan Harker added a comment - No worries, have a good Moodle release
        Hide
        Charles Fulton added a comment -

        I'd be interested in seeing this incorporated, especially in light of MDL-35669.

        Show
        Charles Fulton added a comment - I'd be interested in seeing this incorporated, especially in light of MDL-35669 .
        Hide
        Dan Marsden added a comment -

        Hey JH - would you like to help get this into 2.6? - if not let me know and I'll reassign and see if we can help push it through finally.

        Show
        Dan Marsden added a comment - Hey JH - would you like to help get this into 2.6? - if not let me know and I'll reassign and see if we can help push it through finally.
        Hide
        Dan Marsden added a comment -

        ping JH? - let me know if you're not going to make it and I'll see if someone else can pick it up....

        Show
        Dan Marsden added a comment - ping JH? - let me know if you're not going to make it and I'll see if someone else can pick it up....

          People

          • Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: