Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
3.0.7, 3.1.3, 3.2
-
MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MDL-57429-master -
Hide
N.b. All steps as admin user.
Prereqs
- Important: Make sure your site is publically accessible (using ngrok : ngrok http --region=au 80)
- Make sure you have your outbound email set up in Moodle. You can use something like mailcatcher to view all outbounds easily.
- Also make sure you adjust your noreply email address adding a domain, otherwise you'll get debugging errors. noreply@localhost needs to be noreply@localhost.xx.
- Make sure you have an account registered on openbadges backpack
Set up a new connection
- Go to Site admin > Badges > Manage badges and create two different badges.
- Award the badges to yourself from the Manage badges page.
- Confirm that you can see both the assigned badges when you view your profile.
- Now, go to Preferences > Backpack settings
- You shouldn't have an existing connection to the backpack. If you do, click 'Disconnect'.
- Now, enter 'test@example.com' into the email field and click 'Connect to Backpack'
- Confirm that you see a validation failure and a message about the email not being registered with the backpack provider. (Regression test).
- Now, enter the email address of your Backpack account and click 'Connect'.
- Confirm that:
- You see a notice stating that the verification email has been sent.
- You see the status listed as 'Verification pending'
- You see the email address listed, but read only.
- Check mailcatcher (or other) and confirm that you see the email.
- Click the link in the email (you may need to copy/paste if using mailcatcher)
- Confirm that:
- You are redirected to mypackback and are presented with a success message
- The status of the connection is 'Connected'
- The email address is listed but not editable.
Export a badge
- Now, go to Preferences > Manage badges
- In another tab, make sure you are disconnected from https://backpack.openbadges.org/. I.e. sign out.
- Now, back in Moodle, With the first badge you created earlier, click the 'Add to backpack' icon.
- Confirm that you are prompted to sign in to the Backpack
Note: Don't worry if you see a console error like 'assertion.badge.image not found 404'. This is an external bug. See here - Enter details and click 'Login'.
- Confirm that you are now presented with an overview, asking you to accept the badge.
- Click 'Yes'.
- Confirm that you see a confirmation saying, you've 'sent 1 badge to your backpack'.
- Now, back in Moodle, send the second badge to the backpack.
- Confirm that you're not asked to log in this time, only asked to accept the badge.
- Check your Openbadges backpack in another tab and confirm that you can see the recent badges.
Importing badges from a collection
- Still in the backpack, click 'collections'.
- Create a new collection, make it public, and drag the two badges to it.
- Now go to Preferences > Backpack settings
- Under 'Badge import settings', Confirm that you see the collection you made public just before.
- Select the collection and save.
- Confirm that:
- You're redirected to mybadges
- You see the badge you exported before in both sections (site badges, and badges from other sites).
Disconnecting
- Disconnect from the backpack.
- Go to manage badges page.
- Confirm that you can't see the backpack badges any more.
- Reconnect, going through the verification process again and confirm that the badges are now visible again. You may need to reselect the collection.
Verification when not logged in
- Disconnect from the backpack.
- Enter your email again and click 'Connect to backpack'.
- Log out of Moodle.
- Now, click the link in the email.
- Confirm that you're asked to log in.
- Log in.
- Confirm that:
- You're redirected to mypackpack
- You see the success notice
- The connection is listed as 'Connected'
Verification cancellation (perhaps a mis-typed email address, etc).
- Disconnect from the backpack.
- Enter your email and connect.
- Instead of checking the verification link in the email, click the 'Connect using a different email address' button.
- Confirm that the process is reset.
- Now, click the link in the email.
- Confirm that you're redirected to the backpack setting page and see no notifications.
API Unreachable (If, for some reason, the backpack APIs can't be reached during the process of establishing a connection)
- Disconnect from any active connection.
- Edit your hosts file and create an entry for 'backpack.openbadges.org' pointing to some unreachable address like 255.255.255.255.
- Try to connect to the backpack entering your email and clicking 'connect to backpack' - as before.
- Confirm that:
- you see a form validation error stating 'There was a problem contacting the Backpack...etc'
- No email has been sent.
- Now, comment out the hosts entry.
- Connect again, and confirm that the verification email is sent. Don't click the link yet.
- Now, uncomment the hosts entry again.
- Follow the link and Confirm that:
- You're redirected to mybackpack
- You see an error message 'There was a problem contacting the Backpack...etc'
- Now comment out the hosts entry.
- Now, follow the same link again.
- Confirm that the connection is created successfully.
ShowN.b. All steps as admin user. Prereqs Important: Make sure your site is publically accessible (using ngrok : ngrok http --region=au 80) Make sure you have your outbound email set up in Moodle. You can use something like mailcatcher to view all outbounds easily. Also make sure you adjust your noreply email address adding a domain, otherwise you'll get debugging errors. noreply@localhost needs to be noreply@localhost.xx. Make sure you have an account registered on openbadges backpack Set up a new connection Go to Site admin > Badges > Manage badges and create two different badges. Award the badges to yourself from the Manage badges page. Confirm that you can see both the assigned badges when you view your profile. Now, go to Preferences > Backpack settings You shouldn't have an existing connection to the backpack. If you do, click 'Disconnect'. Now, enter 'test@example.com' into the email field and click 'Connect to Backpack' Confirm that you see a validation failure and a message about the email not being registered with the backpack provider. (Regression test). Now, enter the email address of your Backpack account and click 'Connect'. Confirm that : You see a notice stating that the verification email has been sent. You see the status listed as 'Verification pending' You see the email address listed, but read only. Check mailcatcher (or other) and confirm that you see the email. Click the link in the email (you may need to copy/paste if using mailcatcher) Confirm that : You are redirected to mypackback and are presented with a success message The status of the connection is 'Connected' The email address is listed but not editable. Export a badge Now, go to Preferences > Manage badges In another tab, make sure you are disconnected from https://backpack.openbadges.org/ . I.e. sign out. Now, back in Moodle, With the first badge you created earlier, click the 'Add to backpack' icon. Confirm that you are prompted to sign in to the Backpack Note: Don't worry if you see a console error like 'assertion.badge.image not found 404'. This is an external bug. See here Enter details and click 'Login'. Confirm that you are now presented with an overview, asking you to accept the badge. Click 'Yes'. Confirm that you see a confirmation saying, you've 'sent 1 badge to your backpack'. Now, back in Moodle, send the second badge to the backpack. Confirm that you're not asked to log in this time, only asked to accept the badge. Check your Openbadges backpack in another tab and confirm that you can see the recent badges. Importing badges from a collection Still in the backpack, click 'collections'. Create a new collection, make it public, and drag the two badges to it. Now go to Preferences > Backpack settings Under 'Badge import settings', Confirm that you see the collection you made public just before. Select the collection and save. Confirm that : You're redirected to mybadges You see the badge you exported before in both sections (site badges, and badges from other sites). Disconnecting Disconnect from the backpack. Go to manage badges page. Confirm that you can't see the backpack badges any more. Reconnect, going through the verification process again and confirm that the badges are now visible again. You may need to reselect the collection. Verification when not logged in Disconnect from the backpack. Enter your email again and click 'Connect to backpack'. Log out of Moodle. Now, click the link in the email. Confirm that you're asked to log in. Log in. Confirm that : You're redirected to mypackpack You see the success notice The connection is listed as 'Connected' Verification cancellation (perhaps a mis-typed email address, etc). Disconnect from the backpack. Enter your email and connect. Instead of checking the verification link in the email, click the 'Connect using a different email address' button. Confirm that the process is reset. Now, click the link in the email. Confirm that you're redirected to the backpack setting page and see no notifications. API Unreachable (If, for some reason, the backpack APIs can't be reached during the process of establishing a connection) Disconnect from any active connection. Edit your hosts file and create an entry for 'backpack.openbadges.org' pointing to some unreachable address like 255.255.255.255. Try to connect to the backpack entering your email and clicking 'connect to backpack' - as before. Confirm that : you see a form validation error stating 'There was a problem contacting the Backpack...etc' No email has been sent. Now, comment out the hosts entry. Connect again, and confirm that the verification email is sent. Don't click the link yet. Now, uncomment the hosts entry again. Follow the link and Confirm that : You're redirected to mybackpack You see an error message 'There was a problem contacting the Backpack...etc' Now comment out the hosts entry. Now, follow the same link again. Confirm that the connection is created successfully.
-
3.3 sprint 4
Description
Earlier this month, Mozilla shut down the persona service. This results in New backpack connections being unable to authenticate against backpack.openbadges.org.
The openbadges backpack has been migrated to a new authentication service, but Moodle is still calling the deactivated persona service for login:
SEE:
https://github.com/sbourget/moodle/blob/master/badges/backpackconnect.php#L57
This can be easily reproduced on Moodle.org.
1. Disconnect from the backpack if you are currently connected.
2. Try to re-connect. You will get a popup window telling you that the persona service has shut down.