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

Make badge notifications use internal Moodle messaging

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Badges
    • Labels:
    • Testing Instructions:
      Hide

      For testing you need admin user, several standard student users with email addresses that you can check, and a badge with manual award by role set up as criteria (so that it is possible to quickly award a badge to a user).

      Part 1.

      1. Go to /admin/settings.php?section=messagesettingemail admin settings and make sure that "Allow attachments" is set to NO.
      2. Go to badge message settings under /badges/edit.php?id=XXX&action=message where XXX is a badge ID. Make sure that you can't change "Attach badge to message" setting because it depends on attachments being enabled.
      3. Award a badge to any user. Check user email. There should be a message with subject specified earlier in a badge message settings (default one is "Congratulations! You just earned a badge!"). Make sure there is no image file attached to the email.

      Part 2.

      1. Now, enable "Allow attachments" in admin settings.
      2. Make sure that you can change checkbox "Attach badge to message" in badge message settings. Leave it checked.
      3. Award a badge to another user. Check this user email. There should be a badge message with subject specified earlier in a badge message settings (default one is "Congratulations! You just earned a badge!"). Make sure there is an image file attached to the email. This should be a badge that a user just earned.

      Part 3.

      1. Open the badge's messaging settings
      2. Disable attaching the badge to the message
      3. Award a user the badge
      4. Check that it was not included.
      Show
      For testing you need admin user, several standard student users with email addresses that you can check, and a badge with manual award by role set up as criteria (so that it is possible to quickly award a badge to a user). Part 1. Go to /admin/settings.php?section=messagesettingemail admin settings and make sure that "Allow attachments" is set to NO. Go to badge message settings under /badges/edit.php?id=XXX&action=message where XXX is a badge ID. Make sure that you can't change "Attach badge to message" setting because it depends on attachments being enabled. Award a badge to any user. Check user email. There should be a message with subject specified earlier in a badge message settings (default one is "Congratulations! You just earned a badge!"). Make sure there is no image file attached to the email. Part 2. Now, enable "Allow attachments" in admin settings. Make sure that you can change checkbox "Attach badge to message" in badge message settings. Leave it checked. Award a badge to another user. Check this user email. There should be a badge message with subject specified earlier in a badge message settings (default one is "Congratulations! You just earned a badge!"). Make sure there is an image file attached to the email. This should be a badge that a user just earned. Part 3. Open the badge's messaging settings Disable attaching the badge to the message Award a user the badge Check that it was not included.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39923_master

      Description

      As discussed in the thread https://moodle.org/mod/forum/discuss.php?d=229477#p996621, Badges should be awarded in a more 'triumphant' way than with an email, such as a pop-up. Currently the user is unaware (s)he has been awarded a badge unless they check either the 'my badges' block or their emails. It would be nice if they were told immediately, preferably with some nice graphics too to give them an immediate sense of achievement.

      Yuliya: This is happening because badges notifications are not going through standard Moodle messaging. Since now it is possible to send attachments using Moodle message libraries, I will update the code to make sure that badges are using them too.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    18/Nov/13