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

Download button on /badges/badge.php doesn't work

    XMLWordPrintable

    Details

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

      Testing instructions are pretty much in bug description

      Show
      Testing instructions are pretty much in bug description
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:

      Description

      Steps to reproduce are...

      1. Earn a badge.
      2. Go into your profile and click the badge.
      3. Click download.

      Expected the badge to download.

      Page reloads and nothing happens.

      Note that downloading from /badges/mybadges.php does work, it's only /badges/badge.php that doesn't work.

      The issue seems to be on (or around) line 38 of badge.php...
      if ($bake && ($badge->recipient == $USER->id)) {

      On my local installation I have changed it to...

      if ($bake && ($badge->recipient->id == $USER->id)) {

      ...which appears to have fixed it.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Mar/14