MDL-69002 core_badges: remove site backpack verification from settings
authorSara Arjona <sara@moodle.com>
Wed, 10 Jun 2020 10:05:40 +0000 (12:05 +0200)
committerSara Arjona <sara@moodle.com>
Wed, 10 Jun 2020 10:06:59 +0000 (12:06 +0200)
This site backpack verification is not required so, instead of
running it always here, it will be moved to a separate page to let
admins decide when to check it.

admin/settings/badges.php
lang/en/badges.php
lang/en/deprecated.txt

index 2451390..b1671b4 100644 (file)
@@ -106,13 +106,6 @@ if (($hassiteconfig || has_any_capability(array(
             new lang_string('sitebackpack_help', 'badges'),
             $bp->id, $choices));
 
-    $warning = badges_verify_site_backpack();
-    if (!empty($warning)) {
-        $backpacksettings->add(new admin_setting_description('badges_site_backpack_verify',
-            new lang_string('sitebackpackverify', 'badges'),
-            $warning));
-    }
-
     $ADMIN->add('badges', $backpacksettings);
 
     $ADMIN->add('badges',
index ef17226..7373858 100644 (file)
@@ -516,7 +516,6 @@ $string['sitebackpack'] = 'Active external backpack';
 $string['sitebackpack_help'] = 'The external backpack that users can connect to from this site. Note that changing this setting after users have connected their backpacks will require each user to go to their backpack settings page and disconnect then reconnect.';
 $string['sitebackpackdeleted'] = 'The site backpack has been deleted.';
 $string['sitebackpacknotdeleted'] = 'This backpack couldn\'t be deleted because it\'s currently the site default.';
-$string['sitebackpackverify'] = 'Backpack connection';
 $string['sitebackpackwarning'] = 'Could not connect to backpack. <br/><br/>Check that the "Badge issuer email address" admin setting is the valid email for an account on the backpack website. <br/><br/>Check that the "Badge issuer password" on the <a href="{$a->url}">site backpack settings page</a>, is the correct password for the account on the backpack website. <br/><br/>The backpack returned: "{$a->warning}"';
 $string['sitebadges'] = 'Site badges';
 $string['sitebadges_help'] = 'Site badges can only be awarded to users for site-related activities. These include completing a set of courses or parts of user profiles. Site badges can also be issued manually by one user to another.
@@ -578,3 +577,4 @@ $string['nobackpackcollections'] = 'No badge collections have been selected. <a
 
 // Deprecated since Moodle 3.9.
 $string['editsettings'] = 'Edit settings';
+$string['sitebackpackverify'] = 'Backpack connection';
index 4203ac9..949af22 100644 (file)
@@ -145,3 +145,4 @@ editsettings,core_badges
 availablelicenses,core_admin
 managelicenses,core_admin
 userfilterplaceholder,core
+sitebackpackverify,core_badges