tsugiproject / tsugi

Tsugi Admin, Developer, and Management Console (pls join the dev list)
http://www.tsugi.org
Apache License 2.0
347 stars 257 forks source link

Badge assertion ID should be unique, not same as unbaked image URI #90

Closed bencomp closed 3 years ago

bencomp commented 4 years ago

After signing up for py4e I was pleasantly surprised to have been awarded an Open Badge. However, my Badgr Backpack doesn't accept it and unfortunately, the only message given is Badge import failed. The given badge failed validation: [object Object], [object Object].

My educated guess at this validation failure is that, after extracting the assertion data from the PNG using the hosted obi-sample and inspecting it, one issue may be that the URI for the assertion is not for the assertion, but for the unbaked image. The line that adds that URI is https://github.com/tsugiproject/tsugi/blob/86833a6549b1e03d2c92b7ba2cb1f3859254dc20/badges/assert.php#L46 Of course there may be other issues. Badgr may not support older Open Badge specifications – I don't know.

I understand that awarding badges may not be core to TSUGI (looking at earlier issues csev/obi-sample#2 and csev/obi-sample#3 as well), but I couldn't find an issue in this repository and did want to mention the incompatibility. If awarding Open Badges is indeed not part of TSUGI anymore, maybe documentation could point at LMS-asserted badges, awarded by the LMS itself (like Brightspace appears to do) or through external issuers like Credly or Badgr (like Canvas and Moodle do AFAIK).

csev commented 3 years ago

Ben - Better late than never - this has been fixed as the Tsugi code now is generating validatable Open Badges 2.0 badges. Here is an example badge

https://www.py4e.com/tsugi/badges/images/6841505953643759314741303846534b2f784d4d7476545a3642447a6a6758343354535835673d3d.png

It should validate on Badger, etc. I also fixed the obi-sample code as well to generate and support OpenBadges 2.0 Thanks.