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

Adding an endorsement to a badge without specifying an endorsement comment leads to invalid badges being generated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.3, 4.3
    • Badges
    • MOODLE_402_STABLE, MOODLE_403_STABLE

      When creating a new badge there is an option to specify an endorsement. Apart from specifying the issuer details, information about the claim needs to be provided as well. If the user chooses to provide only a Claim URL, but not an Endorsement comment (since this field is not marked as mandatory), the created badges will be invalid. Verifying a badge with the available OpenBadges verification tools such as https://www.virtualbadge.io/resources/open-badges-validator throws an error:

       

               {
                      "name": "VALIDATE_PROPERTY",
                      "success": false,
                      "result": "Node https://example.com/badges/endorsement_json.php?id=19 has claim property value `https://google.com/` that appears not to be in URI format or did not correspond to a known local node.",
                      "messageLevel": "ERROR",
                      "node_id": "https://example.com/badges/endorsement_json.php?id=19",
                      "prop_name": "claim"
                  }, 

      If a new badge is generated with exactly the same data and the same endorsement information, but also an endorsement comment, the error is no longer present and validation is successful. A diff excerpt between the JSON metadata of an invalid badge (without an Endorsement comment) and a valid badge (with an Endorsement comment) has been added as an attachment to the issue. The main difference seems to be the handling of the claim property: when no comment is added it is simply a string containing the URL, while when a comment is added it is an object.

       

      Steps to reproduce:

      1. Create a new badge within a Course
      2. After specifying the basic information, but before making the badge available, navigate to the Endorsement section using the dropdown switcher.
      3. Enter information in the mandatory fields (Endorser name, Email, Issuer URL, Claim URL), but omit the Endorsement comment
      4. Add criteria Manual issue by role and select that the badge can be issued by all currently defined roles within the course
      5. Issue the badge to yourself
      6. Download the issued badge and try to validate it using an OpenBadges validation tool

            Unassigned Unassigned
            tomtom9922 Tom
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

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