tsugi icon indicating copy to clipboard operation
tsugi copied to clipboard

Badge Issuer and Class are unique for each awarded Badge

Open bencomp opened this issue 3 years ago • 0 comments

Since #90 was resolved (thanks again!), I can import earned badges into a backpack like Badgr's. I noticed that each badge shows up as coming from a different issuer, while the badges I earned are all from Python for Everyone.

It looks like the Badge Issuer URI is indeed unique, because it includes the assertion ID (the encoded badge information): https://github.com/tsugiproject/tsugi/blob/e991a259d2670b3aa3db9a241dc8ffb95e6de2a9/badges/badge-util.php#L105 and in https://github.com/tsugiproject/tsugi/blob/e991a259d2670b3aa3db9a241dc8ffb95e6de2a9/badges/badge-util.php#L126

I then realised that the line https://github.com/tsugiproject/tsugi/blob/e991a259d2670b3aa3db9a241dc8ffb95e6de2a9/badges/badge-util.php#L104 makes each badge class, i.e. the type of badge, unique as well – which makes comparing badges by their URIs impossible.

Would it be possible to define a single badge issuer URI per installation and one badge class URI for each defined badge in lessons.json? I think it is likely that one installation is supported by a singe issuer and it would reduce some of the code complexity as well.

bencomp avatar Jun 25 '21 19:06 bencomp