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

Badgr.com is not working because the apiBase in badgeconnect.json is ignored

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-75552-401
    • MDL-75552-master
    • Hide
      1. Open https://badgr.com/.well-known/badgeconnect.json
      2. Copy the URL in the apiBase field (currently, https://api.badgr.io/bcv1/ims/ob/v2p1).
      3. Login as admin.
      4. Go to the "Manage backpacks" admin page (badges/backpacks.php).
      5. Edit your Badgr backpack, paste the apiBase URL copied in step #2 to the "Backpack API URL" field and save changes.

      NOTE: If you manually change this value, you'll need to remember to update the "Backpack API URL" to set it back to the previous value (i.e. https://badgr.com) when you upgrade to Moodle 4.0 onwards.

      Show
      Open https://badgr.com/.well-known/badgeconnect.json Copy the URL in the apiBase field (currently, https://api.badgr.io/bcv1/ims/ob/v2p1 ). Login as admin. Go to the "Manage backpacks" admin page (badges/backpacks.php). Edit your Badgr backpack, paste the apiBase URL copied in step #2 to the "Backpack API URL" field and save changes. NOTE : If you manually change this value, you'll need to remember to update the "Backpack API URL" to set it back to the previous value (i.e. https://badgr.com ) when you upgrade to Moodle 4.0 onwards.
    • Hide

      Requirements

      1. Run your site with public access and HTTPS (use ngrok or similar).
      2. One account on https://badgr.com/
      3. One account on https://eu.badgr.com/.
      4. Valid IMS account to access https://certification.imsglobal.org/certification/badgeconnect/launch.html

      Setup without the patch

      NOTE: The following steps should be done on a site without the patch!!! For instance, you can run the following command to checkout to a previous version on integration.git:

      master: git checkout 5d320dd7d18d2442fe2f585d653579909fe700f0
      4.2: git checkout 29a21ee986effe65bf60b7b0d9670616240eb2b1
      4.1: git checkout 176a323b4e8b1cc3e83ccf48ce9c56715dc16c2e
      4.0: git checkout 9deb29c0d6cb83c7b33c4f857e3d776b1d665ceb

      1. Login as admin.
      2. Go to "Site administration > Server > OAuth 2 services".
      3. Create an "Open Badges" service with the following information:
      4. Go to the Configure endpoints page for this issuer.
      5. Check "apiBase" doesn't appear in the endpoints displayed.
      6. Go to "Site administration > Badges > Manage backpacks".
      7. Create a new backpack with the following information:

      Setup with the patch

      1. Apply the patch (or checkout to the lastest version in the proper branch):

        master: git checkout master
        4.2: git checkout MOODLE_402_STABLE
        4.1: git checkout MOODLE_401_STABLE
        4.0: git checkout MOODLE_400_STABLE

      2. Login as admin.
      3. Edit the user profile and set the Moodle email to match the email used in the Badgr account.
      4. Create the “badgeuser1” user:
        • Username: badgeuser1
        • First name: Badge User1
        • Surname: IMS
        • Email: badgeuser1@imsglobal.org  
      5. Create two different badges, publish them and award them to the admin and badgeuser1 users.
      6. Go to "Site administration > Server > OAuth 2 services".
      7. Create an "Open Badges" service with the following information:
      8. Go to the Configure endpoints page for this issuer.
      9. Check "apiBase" is one of the endpoints displayed.
      10. Go to "Site administration > Badges > Manage backpacks".
      11. Create a new backpack with the following information:
      12. Logout (to guarantee the email is updated properly in the $USER var).

      Testing scenario 1. Badgr

      1. Login as admin.
      2. Go to the user preferences page.
      3. Access to "Backpack settings".
      4. Select "https://badgr.com" from the list and connect using the user account in Badgr.com.
      5. Go to the user profile page and access one of the badges you've been awarded.
      6. Click the "Add to backpack" button.
      7. Check the message "Added badge to backpack " is displayed.
      8. Go to the user preferences page.
      9. Access to "Backpack settings".
      10. Click the "Disconnect" button.
      11. Select "https://eu.badgr.com" from the list and connect using the user account in eu.badgr.com
      12. Go to the user profile page and access the other badge you've been awarded.
      13. Click the "Add to backpack" button.
      14. Check the message "Added badge to backpack " is displayed.

       

      Testing scenario 2. IMS Global

      IMPORTANT: If at any point you need to restart the process, you’ll need to click the “Restart Testing” button and logout and login the admin user. Apart from that, you'll also need to remove the oAuth service and the backpack (before creating them again).

      NOTE: If you haven't a valid IMS account, ping me (Sara) and I'll restart the process on your behalf and will share with you the results

       

      1. Access to using a valid IMS account: https://certification.imsglobal.org/certification/badgeconnect/launch.html 
      2. Read the information and press the “Get Started” button.
      3. Review your information (name, email address and organization) and “Confirm” it.
      4. Select the Moodle version (for the master branch you can select 4.2).
      5. Select the “Service Consumer (Write)”, which is the one implemented by Moodle.
      6. Read the testing instructions and save the information (some data will be used later, such as the base API URL or the password for badgeuser1).
      7. Click the “Done” button and keep the “Auto-registration” window open, to confirm the certification process is working as expected.
      8. Login as admin to your Moodle site.
      9. Go to "Site administration > Server > OAuth 2 services".
      10. Create an "Open Badges" service with the following information:
      11. Go to the Configure endpoints page for this issuer ("1EdTech Badge Host").
      12. Check "apiBase" is one of the endpoints displayed.
      13. In the “IMS Global Badge Connect Validator“ tab, check that “Get manifest” and “Do Auto-Registration” have been executed.
      14. Go to "Site administration > Badges > Manage backpacks".
      15. Create a new backpack with the following information:
      16. Login as badgeuser1 (you can open it in a different browser).
      17. Go to the user preferences page.
      18. Access to "Backpack settings".
      19. Select "https://certification.imsglobal.org/badgeconnect" from the list and click the “Connect to backpack” button. You should be redirected to the login page for the IMS Global backpack service.
      20. Use the credentials for badgeuser1 defined in the “IMS Global Badge Connect Validator” page (right now they are “badgeuser1” / “user1rocks”). You can use the username instead of email.
      21. Accept the terms and conditions displayed.
      22. Check " Backpack is connected" is displayed.
      23. In the “IMS Global Badge Connect Validator“ tab, check that “Do Authorization Grant” and “Retrieve OAuth2 Token” have been executed too.
      24. Go to the user profile page and access one of the badges you've been awarded.
      25. Click the "Add to backpack" button.
      26. Check the message "Added badge to backpack " is displayed.
      Show
      Requirements Run your site with public access and HTTPS (use ngrok or similar). One account on https://badgr.com/ .  One account on https://eu.badgr.com/ . Valid IMS account to access  https://certification.imsglobal.org/certification/badgeconnect/launch.html Setup without the patch NOTE: The following steps should be done on a site without the patch!!! For instance, you can run the following command to checkout to a previous version on integration.git: master: git checkout 5d320dd7d18d2442fe2f585d653579909fe700f0 4.2 : git checkout 29a21ee986effe65bf60b7b0d9670616240eb2b1 4.1 : git checkout 176a323b4e8b1cc3e83ccf48ce9c56715dc16c2e 4.0 : git checkout 9deb29c0d6cb83c7b33c4f857e3d776b1d665ceb Login as admin. Go to "Site administration > Server > OAuth 2 services". Create an "Open Badges" service with the following information: Name: Badgr without the patch Service base URL:  https://badgr.com Go to the Configure endpoints page for this issuer. Check "apiBase" doesn't appear in the endpoints displayed. Go to "Site administration > Badges > Manage backpacks". Create a new backpack with the following information: Backpack API:  https://badgr.com Backpack URL:  https://badgr.com API version supported: Open Badges v2.1 OAuth 2 services: Badgr without the patch Setup with the patch Apply the patch (or checkout to the lastest version in the proper branch): master: git checkout master 4.2 : git checkout MOODLE_402_STABLE 4.1 : git checkout MOODLE_401_STABLE 4.0 : git checkout MOODLE_400_STABLE Login as admin. Edit the user profile and set the Moodle email to match the email used in the Badgr account. Create the “badgeuser1” user: Username: badgeuser1 First name: Badge User1 Surname: IMS Email: badgeuser1@imsglobal.org   Create two different badges, publish them and award them to the admin and badgeuser1 users. Go to "Site administration > Server > OAuth 2 services". Create an "Open Badges" service with the following information: Name: <leave the default value>  Service base URL: https://eu.badgr.com   Go to the Configure endpoints page for this issuer. Check "apiBase" is one of the endpoints displayed. Go to "Site administration > Badges > Manage backpacks". Create a new backpack with the following information: Backpack API: https://eu.badgr.com   Backpack URL: https://eu.badgr.com   API version supported: Open Badges v2.1 OAuth 2 services: Canvas Badges Logout (to guarantee the email is updated properly in the $USER var). Testing scenario 1. Badgr Login as admin. Go to the user preferences page. Access to "Backpack settings". Select "https://badgr.com" from the list and connect using the user account in Badgr.com. Go to the user profile page and access one of the badges you've been awarded. Click the "Add to backpack" button. Check  the message "Added badge to backpack " is displayed. Go to the user preferences page. Access to "Backpack settings". Click the "Disconnect" button. Select "https://eu.badgr.com" from the list and connect using the user account in eu.badgr.com Go to the user profile page and access the other badge you've been awarded. Click the "Add to backpack" button. Check  the message "Added badge to backpack " is displayed.   Testing scenario 2. IMS Global IMPORTANT : If at any point you need to restart the process, you’ll need to click the “Restart Testing” button and logout and login the admin user. Apart from that, you'll also need to remove the oAuth service and the backpack (before creating them again). NOTE : If you haven't a valid IMS account, ping me (Sara) and I'll restart the process on your behalf and will share with you the results   Access to using a valid IMS account:  https://certification.imsglobal.org/certification/badgeconnect/launch.html   Read the information and press the “Get Started” button. Review your information (name, email address and organization) and “Confirm” it. Select the Moodle version (for the master branch you can select 4.2). Select the “Service Consumer (Write)”, which is the one implemented by Moodle. Read the testing instructions and save the information (some data will be used later, such as the base API URL or the password for badgeuser1). Click the “Done” button and keep the “Auto-registration” window open, to confirm the certification process is working as expected. Login as admin to your Moodle site. Go to "Site administration > Server > OAuth 2 services". Create an "Open Badges" service with the following information: Name: <leave the default value>  Service base URL: https://certification.imsglobal.org/badgeconnect Go to the Configure endpoints page for this issuer ("1EdTech Badge Host"). Check "apiBase" is one of the endpoints displayed. In the “IMS Global Badge Connect Validator“ tab,  check  that “Get manifest” and “Do Auto-Registration” have been executed. Go to "Site administration > Badges > Manage backpacks". Create a new backpack with the following information: Backpack API: https://certification.imsglobal.org/badgeconnect   Backpack URL: https://certification.imsglobal.org/badgeconnect   API version supported: Open Badges v2.1 OAuth 2 services: 1EdTech Badge Host Login as badgeuser1 (you can open it in a different browser). Go to the user preferences page. Access to "Backpack settings". Select "https://certification.imsglobal.org/badgeconnect" from the list and click the “Connect to backpack” button. You should be redirected to the login page for the IMS Global backpack service. Use the credentials for badgeuser1 defined in the “IMS Global Badge Connect Validator” page (right now they are “badgeuser1” / “user1rocks”). You can use the username instead of email. Accept the terms and conditions displayed. Check  " Backpack is connected" is displayed. In the “IMS Global Badge Connect Validator“ tab,  check  that “Do Authorization Grant” and “Retrieve OAuth2 Token” have been executed too. Go to the user profile page and access one of the badges you've been awarded. Click the "Add to backpack" button. Check  the message "Added badge to backpack " is displayed.
    • Maintenance&Planning Sprint 2, HQ 2023 Planning i2 Moppies

      Requirements:

      1. Run your site with public access and HTTPS (use ngrok or similar).
      2. Two different accounts set up on https://badgr.com/

      Steps to reproduce:

      1. Login as admin
      2. Go to "Site administration > Server > OAuth 2 services"
      3. Create an "Open Badges" service with the following information:
      4. Go to "Site administration > Badges > Manage backpacks"
      5. Create a new backpack with the following information:
      6. Create a badge, publish it and award it to the admin user.
      7. Go to the user preferences page.
      8. Access to "Backpack settings".
      9. Select "https://badgr.com" from the list and connect using a valid user account in Badgr.com.
      10. Go to the user profile page and access to the badge you've been awarded.
      11. Click the "Add to backpack" button.

       

      Expected behaviour:

      The badge is sent to the Badgr backpack.

       

      Current behaviour:

      The following error is displayed: " Can't export the badge to backpack". When adding some debugging, the following response is obtained from the Badgr.com server: "string(205) "{"timestamp":"2022-08-23T14:04:07.998+00:00","status":405,"error":"Method Not Allowed","message":"Request method 'POST' not supported","path":"/assertions","traceId":"8bdd413b-9f66-4399-bd3a-f35c27e5fddf"}""

       

      It is working properly with the IMS Global certification platform, but failing with Badgr (it was working in the past, so it seems to be related to some change done in Badgr.

      The Badgr API can be found at https://api.eu.badgr.io/docs/v2/

            sarjona Sara Arjona (@sarjona)
            sarjona Sara Arjona (@sarjona)
            Mikel Martín Corrales Mikel Martín Corrales
            Jake Dallimore Jake Dallimore
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            7 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 6 hours, 36 minutes
                1d 6h 36m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.