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

'View external Criteria URL' on Badgr links to badge awarded to somebody else

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_311_STABLE
    • MDL-66940-311
    • MDL-66940-master
    • Hide

      The public URL to the badge criteria can be edited in Badgr to link to a specific page (maybe a static webpage or another site) with the badge information.

      Show
      The public URL to the badge criteria can be edited in Badgr to link to a specific page (maybe a static webpage or another site) with the badge information.
    • Hide

      Tip: Firefox displays JSON files with collapsed information, so it will make it easier to find this information.

      Setup

      1. Login as admin.
      2. Go to "Badges > Add a new badge".
      3. Fill in required fields and also, at least, the Version.
      4. Press Create badge.
      5. Add badge criteria Manual issue by role.
      6. Select "Teacher" and press Save.
      7. Press Enable access > Continue.
      8. Annotate the id of this badge (you'll find it in the URL of the page, for instance: badges/overview.php?id=[BADGEID]).
      9. Press Recipients.
      10. Press Award Badge.
      11. Select the current user from Potential badge recipients, press Award Badge.
      12. Create a course.
      13. Add a badge to this course (with the same configuration as the previous system badge) and award it to the same user. 
      14. Add another badge to the course but do not enable access for it.
      15. Annotate the id of these badges too.

      Testing scenario 1: System badge

      1. Go to the user profile.
      2. Access to the system badge that appears in the Badges section.
      3. In the URL, replace "badges/badge.php?hash=" to "badges/assertion.php?b=". 
      4. Check the URL in the element badge/criteria/id contains [YOURMOODLESITEURL]/badges/badgeclass.php?id=[BADGEID] (where id is the system badge you created first).
      5. Access to this URL ([YOURMOODLESITEURL]/badges/badgeclass.php?id=[BADGEID])
      6. Check the page is displayed without errors and contains the badge information: image, title, description...
      7. In the URL, replace "badges/badgeclass.php?id=" to "badges/badge_json.php?id=". 
      8. Check the URL in the element criteria/id contains [YOURMOODLESITEURL]/badges/badgeclass.php?id=[BADGEID] (where id is the system badge you created first).

      Testing scenario 2: Course badge

      1. Go to the user profile.
      2. Access to the course badge that appears in the Badges section.
      3. In the URL, replace "badges/badge.php?hash=" to "badges/assertion.php?b=". 
      4. Check the URL in the element badge/criteria/id contains [YOURMOODLESITEURL]/badges/badgeclass.php?id=[BADGEID] (where id is the course badge you created first).
      5. Access to this URL ([YOURMOODLESITEURL]/badges/badgeclass.php?id=[BADGEID])
      6. Check the page is displayed without errors and contains the badge information: image, title, description, course...
      7. In the URL, replace "badges/badgeclass.php?id=" to "badges/badge_json.php?id=". 
      8. Check the URL in the element criteria/id contains [YOURMOODLESITEURL]/badges/badgeclass.php?id=[BADGEID] (where id is the course badge you created first).

      Testing scenario 3: Unpublished badge

      1. Access to the URL (YOURMOODLESITEURL]/badges/badgeclass.php?id= [BADGEID] where BADGEID is the id of the unpublished course badge (the last one that you created in the setup)
      2. Check the page displays the "There is no public badge with this identifier" error and the badge information (image, title, description...) is not displayed.

      Testing scenario 4: Unexisting badge

      1. Access to the URL (YOURMOODLESITEURL]/badges/badgeclass.php?id= [BADGEID] where BADGEID is an existing badge id (for instance, if you have a new clean instance, 99999)
      2. Check the page displays the "Badge with id xxx does not exist." error and the badge information (image, title, description...) is not displayed.

       

       

      ATTENTION!! The following testing scenarios should be only executed in 3.11 because MDL-71937 and MDL-72141 have been backported.

      Prerequisites

      1. An outgoing server configured (mailcacher or similar).
      2. One Badgr account on badgr.io with some badges and a collection (you'll find one testing account in the "Moodle testing accounts, data & credentials").

      Setup

      1. Login as admin.
      2. Create s1 user.
      3. Create system and course badges
      4. Go to " Recipients (0)" and assign the enabled system and course badges to s1.
      5. Logout.
      6. Login as s1.
      7. Go to "Preferences / Badges / Backpack settings".
      8. Connect to the backpack using the Badgr.io account.
      9. Open the verification email and open the URL to validate the account.
      10. Confirm status is set to Connected.
      11. In the "Badge import settings" section (in the "Backpack settings" page), select at least one collection with badges and save changes.
      12. Go to the user profile, and check there is, at least, one badge in the "Badges from other web sites:" section.
      13. Logout.

       

      Testing scenario A.1: The fields are displayed properly  (copied from MDL-72141)

      1. Login as s1.
      2. Go to the user profile page.
      3. Open a badge from the "Badges from other web sites:" section.
      4. Check the badge image, name, date and description are displayed in a similar way to the [^ux_badges_proposal.jpg] image (taken from MDL-71937).
      5. Check the Download button is not displayed.
      6. Check the "More details" link is not displayed.
      7. Check the "External URL" link is displayed and opens the external URL from badgr.io where the Badge was originally placed.

      Testing scenario A.2: New fields are displayed in the template

      1. Login as admin.
      2. Go to "Development > Template library"
      3. Search for the "issued_badge" template and click over the "core_badges/issued_badge" link
      4. Check the following fields are displayed:
        • A warning notification is displayed below the badge name and above the user who has awarded the badge (something like "This user cannot be verified as a recipient of this badge").
        • The External URL field is displayed above the course name and the badge description.

      Testing scenario B.1: All the fields are displayed properly (copied from MDL-71937)

      1. Login as s1
      2. Access to the user profile.
      3. Go to the badge.
      4. Check the badge image, name, date and description are displayed in a similar way to the [^ux_badges_proposal.jpg] image linked in MDL-71937.
      5. Check the Download button is displayed.
      6. Click the "More details" link.
      7. Check other fields appear, such as Version and Language.
      8. Click again the "More details" link.
      9. Check these extra fields (from step 7) are hidden.

      Testing scenario B.2: Deleted user (copied from MDL-71937)

      1. Login as admin.
      2. Go to "Site administration > Badges > Manage badges".
      3. Click over the badge you created during the setup.
      4. Access to "Recipients ".
      5. Follow the "View issued badge" link for the Student 1 row.
      6. Check the badge is displayed and the fullname of the user is displayed near the "Awarded to" text.
      7. Check the text "(This user no longer exists in XXXX)" is NOT displayed.
      8. Copy the URL of this page (you'll need it later).
      9. Access to "Site administration > Users > Accounts > Browse list of users".
      10. Delete user s1.
      11. Go to the URL copied in step #8.
      12. Check the badge is displayed and the fullname of the user is displayed near the "Awarded to" text. 
      13. Check the text "(This user no longer exists in XXXX)" is displayed, where XXXX is the site fullname.
      Show
      Tip : Firefox displays JSON files with collapsed information, so it will make it easier to find this information. Setup Login as admin. Go to "Badges > Add a new badge". Fill in required fields and also, at least, the Version. Press Create badge. Add badge criteria Manual issue by role. Select "Teacher" and press Save. Press Enable access > Continue. Annotate the id of this badge (you'll find it in the URL of the page, for instance: badges/overview.php?id= [BADGEID] ). Press Recipients. Press Award Badge. Select the current user from Potential badge recipients, press Award Badge. Create a course. Add a badge to this course (with the same configuration as the previous system badge) and award it to the same user.  Add another badge to the course but do not enable access for it. Annotate the id of these badges too. Testing scenario 1: System badge Go to the user profile. Access to the system badge that appears in the Badges section. In the URL, replace "badges/badge.php?hash=" to "badges/assertion.php?b=".  Check the URL in the element badge/criteria/id contains [YOURMOODLESITEURL] /badges/badgeclass.php?id= [BADGEID] (where id is the system badge you created first). Access to this URL ( [YOURMOODLESITEURL] /badges/badgeclass.php?id= [BADGEID] ) Check the page is displayed without errors and contains the badge information: image, title, description... In the URL, replace "badges/badgeclass.php?id=" to "badges/badge_json.php?id=".  Check the URL in the element criteria/id contains [YOURMOODLESITEURL] /badges/badgeclass.php?id= [BADGEID] (where id is the system badge you created first). Testing scenario 2: Course badge Go to the user profile. Access to the course badge that appears in the Badges section. In the URL, replace "badges/badge.php?hash=" to "badges/assertion.php?b=".  Check the URL in the element badge/criteria/id contains [YOURMOODLESITEURL] /badges/badgeclass.php?id= [BADGEID] (where id is the course badge you created first). Access to this URL ( [YOURMOODLESITEURL] /badges/badgeclass.php?id= [BADGEID] ) Check the page is displayed without errors and contains the badge information: image, title, description, course... In the URL, replace "badges/badgeclass.php?id=" to "badges/badge_json.php?id=".  Check the URL in the element criteria/id contains [YOURMOODLESITEURL] /badges/badgeclass.php?id= [BADGEID] (where id is the course badge you created first). Testing scenario 3: Unpublished badge Access to the URL (YOURMOODLESITEURL]/badges/badgeclass.php?id= [BADGEID] where BADGEID is the id of the unpublished course badge (the last one that you created in the setup) Check the page displays the "There is no public badge with this identifier" error and the badge information (image, title, description...) is not displayed. Testing scenario 4: Unexisting badge Access to the URL (YOURMOODLESITEURL]/badges/badgeclass.php?id= [BADGEID] where BADGEID is an existing badge id (for instance, if you have a new clean instance, 99999) Check the page displays the "Badge with id xxx does not exist." error and the badge information (image, title, description...) is not displayed.     ATTENTION!! The following testing scenarios should be only executed in 3.11 because MDL-71937 and MDL-72141 have been backported. Prerequisites An outgoing server configured (mailcacher or similar). One Badgr account on badgr.io with some badges and a collection (you'll find one testing account in the "Moodle testing accounts, data & credentials"). Setup Login as admin. Create s1 user. Create system and course badges Go to " Recipients (0)" and assign the enabled system and course badges to s1. Logout. Login as s1. Go to "Preferences / Badges / Backpack settings". Connect to the backpack using the Badgr.io account. Open the verification email and open the URL to validate the account. Confirm  status is set to Connected. In the "Badge import settings" section (in the "Backpack settings" page), select at least one collection with badges and save changes. Go to the user profile, and check there is, at least, one badge in the "Badges from other web sites:" section. Logout.   Testing scenario A.1: The fields are displayed properly  (copied from MDL-72141 ) Login as s1. Go to the user profile page. Open a badge from the "Badges from other web sites:" section. Check  the badge image, name, date and description are displayed in a similar way to the  [^ux_badges_proposal.jpg]  image (taken from  MDL-71937 ). Check  the Download button is not displayed. Check  the "More details" link is not displayed. Check  the "External URL" link is displayed and opens the external URL from badgr.io where the Badge was originally placed. Testing scenario A.2: New fields are displayed in the template Login as admin. Go to "Development > Template library" Search for the "issued_badge" template and click over the "core_badges/issued_badge" link Check  the following fields are displayed: A warning notification is displayed below the badge name and above the user who has awarded the badge (something like "This user cannot be verified as a recipient of this badge"). The External URL field is displayed above the course name and the badge description. Testing scenario B.1: All the fields are displayed properly (copied from MDL-71937 ) Login as s1 Access to the user profile. Go to the badge. Check  the badge image, name, date and description are displayed in a similar way to the  [^ux_badges_proposal.jpg] image linked in MDL-71937 . Check  the Download button is displayed. Click the "More details" link. Check other fields appear, such as Version and Language. Click again the "More details" link. Check  these extra fields (from step 7) are hidden. Testing scenario B.2: Deleted user (copied from MDL-71937 ) Login as admin. Go to "Site administration > Badges > Manage badges". Click over the badge you created during the setup. Access to "Recipients ". Follow the "View issued badge" link for the Student 1 row. Check  the badge is displayed and the fullname of the user is displayed near the "Awarded to" text. Check  the text "(This user no longer exists in XXXX)" is NOT displayed. Copy the URL of this page (you'll need it later). Access to "Site administration > Users > Accounts > Browse list of users". Delete user s1. Go to the URL copied in step #8. Check  the badge is displayed and the fullname of the user is displayed near the "Awarded to" text.  Check  the text "(This user no longer exists in XXXX)" is displayed, where XXXX is the site fullname.
    • Moppies Kanban

    Description

      As reported by akinwaleoshodi and Mónica Sánchez in the forum discussion Adding Learn Moodle badges to your Badgr backpack, after adding a badge from Moodle to your backpack, when you then view the badge in your backpack and follow the link 'View external Criteria URL', it links to a badge awarded to somebody else.

      Edited to add:

      How to reproduce (with thanks to mganderson):

      It appears that the first user who claims (I mean, upload to their backpack) a badge in Badgr will have their badge linked as the public badge criteria page.

      Attachments

        1. MDL-66940_master_test 1_1.png
          MDL-66940_master_test 1_1.png
          73 kB
        2. MDL-66940_master_test 1_2.png
          MDL-66940_master_test 1_2.png
          196 kB
        3. MDL-66940_master_test 1_3.png
          MDL-66940_master_test 1_3.png
          79 kB
        4. MDL-66940_master_test 2_1.png
          MDL-66940_master_test 2_1.png
          74 kB
        5. MDL-66940_master_test 2_2.png
          MDL-66940_master_test 2_2.png
          218 kB
        6. MDL-66940_master_test 2_3.png
          MDL-66940_master_test 2_3.png
          78 kB
        7. MDL-66940_master_test 3.png
          MDL-66940_master_test 3.png
          27 kB
        8. MDL-66940_master_test 4.png
          MDL-66940_master_test 4.png
          74 kB
        9. MDL-66940_v311_setup_1.png
          MDL-66940_v311_setup_1.png
          119 kB
        10. MDL-66940_v311_setup_2.png
          MDL-66940_v311_setup_2.png
          205 kB
        11. MDL-66940_v311_test A1.png
          MDL-66940_v311_test A1.png
          313 kB
        12. MDL-66940_v311_test A2.png
          MDL-66940_v311_test A2.png
          134 kB
        13. MDL-66940_v311_test B1_1.png
          MDL-66940_v311_test B1_1.png
          237 kB
        14. MDL-66940_v311_test B1_2.png
          MDL-66940_v311_test B1_2.png
          251 kB
        15. MDL-66940_v311_test B1_3.png
          MDL-66940_v311_test B1_3.png
          236 kB
        16. MDL-66940_v311_test B2_1.png
          MDL-66940_v311_test B2_1.png
          209 kB
        17. MDL-66940_v311_test B2_2.png
          MDL-66940_v311_test B2_2.png
          215 kB

        Issue Links

          Activity

            People

              sarjona Sara Arjona (@sarjona)
              tsala Helen Foster
              Carlos Escobedo Carlos Escobedo
              Ilya Tregubov Ilya Tregubov
              Angelia Dela Cruz Angelia Dela Cruz
              Yuliya Bozhko, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Mar/22

                Time Tracking

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