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

Gravatar integration

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.7, 2.1, 2.2
    • 2.2
    • None
    • None
    • MOODLE_19_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • wip-MDL-21676-master-revised
    • Easy
    • Hide

      If you don't already have one, go to http://en.gravatar.com/ and create one or more Gravatar accounts with one or more email addresses you control, for testing.

      Create (or edit) two Moodle users to use the Gravatar-assigned email addresses, one with an uploaded user picture and one without. You will also want at least two other Moodle users with non-Gravatar email addresses - one with an uploaded picture, and another without. (Alternatively, you could simply alter one user as you go, to fulfil the various testing criteria as needed).

      Run a site upgrade at /admin/ to pick up the new Gravatar setting (leave at the default: NO).

      1. Gravatar OFF
      Examine user pictures (in user profile view and edit pages, in forums, course participants, etc.) to see that the existing behaviour has persisted (normal user picture, no Gravatar image).

      2. Gravatar ON by default
      Change the Gravatar admin setting to "YES, show by default".
      Examine user pictures again - the user picture should now be the Gravatar image, for those users with a Gravatar-enabled email address. Moodle users without a Gravatar-enabled email address should show their picture as normal (if any).

      3. Gravatar ON, but user-decided
      Change the Gravatar admin setting to "YES, but don't them show by default (let the user decide)".
      Examine user pictures again - there should be no Gravatar images, unless the user has specified to use the Gravatar image in their user profile. The user picture should be their uploaded picture as normal (or the system default if none uploaded).
      Change a Gravatar-enabled Moodle user to use Gravatar in their profile. This user's picture should now appear as their Gravatar image.

      Show
      If you don't already have one, go to http://en.gravatar.com/ and create one or more Gravatar accounts with one or more email addresses you control, for testing. Create (or edit) two Moodle users to use the Gravatar-assigned email addresses, one with an uploaded user picture and one without. You will also want at least two other Moodle users with non-Gravatar email addresses - one with an uploaded picture, and another without. (Alternatively, you could simply alter one user as you go, to fulfil the various testing criteria as needed). Run a site upgrade at /admin/ to pick up the new Gravatar setting (leave at the default: NO). 1. Gravatar OFF Examine user pictures (in user profile view and edit pages, in forums, course participants, etc.) to see that the existing behaviour has persisted (normal user picture, no Gravatar image). 2. Gravatar ON by default Change the Gravatar admin setting to "YES, show by default". Examine user pictures again - the user picture should now be the Gravatar image, for those users with a Gravatar-enabled email address. Moodle users without a Gravatar-enabled email address should show their picture as normal (if any). 3. Gravatar ON, but user-decided Change the Gravatar admin setting to "YES, but don't them show by default (let the user decide)". Examine user pictures again - there should be no Gravatar images, unless the user has specified to use the Gravatar image in their user profile. The user picture should be their uploaded picture as normal (or the system default if none uploaded). Change a Gravatar-enabled Moodle user to use Gravatar in their profile. This user's picture should now appear as their Gravatar image.

    Description

      I don't know if you guys have heard of Gravatar, but I think it's a very cool idea. If you haven't heard of it, check out http://www.gravatar.com/.

      I've attached a very small patch that will add a "Enable Gravatar for profile pictures" setting to the "Site Administration > Miscellaneous > Experimental" page. When the check box is checked, if a user has not uploaded a profile picture yet, Moodle will try to display a Gravatar image for that user. If no Gravatar image is found, the default profile picture is displayed.

      I decided NOT to add this to the "Modules and plugins" on moodle.org, because if it's added as a setting that's disabled by default, there's no reason not to simply add it to Moodle.

      Some of the credit for this should go to Piotr Majewski. He originally suggested it in http://moodle.org/mod/forum/discuss.php?d=135968

      Attachments

        1. gravatar_head.txt
          4 kB
        2. gravatar_head2.patch
          7 kB
        3. gravatar_head3.patch
          8 kB
        4. gravatar_head4.patch
          10 kB
        5. gravatar_integration.patch
          3 kB
        6. gravatar_integration2.patch
          3 kB
        7. gravatar_integration3.patch
          4 kB
        8. MDL-21676-simple.diff
          6 kB

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              jnrbsn Jonathan Robson
              Jonathan Harker Jonathan Harker
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Votes:
              9 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/11