MDL-70073 badges: Fix the backpack-add to match current master
authorPeter Dias <peter@moodle.com>
Sun, 1 Nov 2020 14:33:28 +0000 (22:33 +0800)
committerPeter Dias <peter@moodle.com>
Sun, 1 Nov 2020 14:33:28 +0000 (22:33 +0800)
badges/backpack-add.php

index 2e2478b..1ff7795 100644 (file)
@@ -98,7 +98,7 @@ if (!empty($issuedbadge->recipient->id)) {
                 $assertionid
             );
 
-            if (!$assertionentityid && strpos($sitebackpack->backpackapiurl, 'badgr')) {
+            if ($assertionentityid && strpos($sitebackpack->backpackapiurl, 'badgr')) {
                 $assertionentityid = badges_generate_badgr_open_url(
                     $sitebackpack,
                     OPEN_BADGES_V2_TYPE_ASSERTION,