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

"Invalid request" when sending badges to backpack

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-70139-310
    • Pull Master Branch:
      MDL-70139-master
    • Testing Instructions:
      Hide

      Requirements

      • 2 different Badgr.io US accounts
      • Outgoing server configured (mailcacher or similar)
      • ngrok or similar (for having a public URL in your Moodle instance).

       

      Setup

      1. Login as admin.
      2. Go to "Site administration / Badges / Badges settings" and set:
        • Badge issuer name: "my_moodle" (or any other value you consider)
        • Badge issuer email address: email user for a Badgr.io (US) account.
      3. Go to "Site administration / Badges / Manage backpacks", edit https://badgr.io and add the credentials (email and password), for a valid Badbr.io account.
      4. Go to "Site administration / Badges / Backpack settings" and confirm the "Active external backpack" is set to "http://badgr.io".
      5. Create a badge and award it to some users.

       

      Testing instructions

      1. Login as some of the users awarded with the badge.
      2. Go to "Preferences / Badges / Backpack settings".
      3. Connect to the backpack using the second Badgr.io account.
      4. Open the verification email and open the URL to validate the account.
      5. Confirm status is set to Connected.
      6. Go to the user profile, open the badge and click over "Add to backpack" button.
      7. Confirm the message " Added badge to backpack " is displayed.
      8. Access to  https://badgr.io using this user credentials and confirm the badge is displayed (sometimes it might take a few minutes).

       
       

      Show
      Requirements 2 different Badgr.io US accounts Outgoing server configured (mailcacher or similar) ngrok or similar (for having a public URL in your Moodle instance).   Setup Login as admin. Go to "Site administration / Badges / Badges settings" and set: Badge issuer name: "my_moodle" (or any other value you consider) Badge issuer email address: email user for a Badgr.io (US) account. Go to "Site administration / Badges / Manage backpacks", edit https://badgr.io and add the credentials (email and password), for a valid Badbr.io account. Go to "Site administration / Badges / Backpack settings" and confirm the "Active external backpack" is set to "http://badgr.io". Create a badge and award it to some users.   Testing instructions Login as some of the users awarded with the badge. Go to "Preferences / Badges / Backpack settings". Connect to the backpack using the second Badgr.io account. Open the verification email and open the URL to validate the account. Confirm status is set to Connected. Go to the user profile, open the badge and click over "Add to backpack" button. Confirm the message " Added badge to backpack " is displayed. Access to  https://badgr.io  using this user credentials and confirm the badge is displayed (sometimes it might take a few minutes).    
    • Sprint:
      Moppies Kanban

      Description

      It seems that some of the changes in MDL-70066 are causing this error under some circumstances.

      You'll need 2 different Badgr.io US accounts and outgoing server configured (you can use mailcatcher or similar).

      Steps to reproduce:

      1. Login as admin.
      2. Go to "Site administration / Badges / Badges settings" and set:
        • Badge issuer name: "stable_310" (or any other value you consider)
        • Badge issuer email address: email user for a Badgr.io (US) account.
      3. Go to "Site administration / Badges / Manage backpacks", edit https://badgr.io and add the credentials (email and password), for a valid Badbr.io account.
      4. Go to "Site administration / Badges / Backpack settings" and confirm the "Active external backpack" is set to "http://badgr.io".
      5. Create a badge and award it to some users.
      6. Login as some of the users awarded with the badge.
      7. Go to "Preferences / Badges / Backpack settings".
      8. Connect to the backpack using a different Badgr.io account.
      9. Open the verification email and open the URL to validate the account.
      10. Go to the profile, open the badge and click over "Add to backpack" button.

      Expected behaviour

      The badge is sent to the backpack and a message saying it has been sent is displayed.

       

      Current behaviour

      The following error appears:

       

        Attachments

        1. badge_uploaded_ok_310.png
          badge_uploaded_ok_310.png
          89 kB
        2. badge_uploaded_ok_38.png
          badge_uploaded_ok_38.png
          86 kB
        3. badge_uploaded_ok_39.png
          badge_uploaded_ok_39.png
          86 kB
        4. badge_uploaded_ok_400.png
          badge_uploaded_ok_400.png
          87 kB
        5. error_badges.png
          error_badges.png
          635 kB
        6. error_before_patch.png
          error_before_patch.png
          155 kB

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              sarjona Sara Arjona (@sarjona)
              Peer reviewer:
              Carlos Escobedo Carlos Escobedo
              Integrator:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 57 minutes
                  3h 57m