MDL-78132 badges: deprecate functions and strings
When the logic to get the correct apiBase has been moved to the backpack, some strings and methods have been marked as deprecated.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
imsobv2p1_service,tool_oauth2
|
||||
@@ -56,7 +56,6 @@ $string['endpointurl_help'] = 'URL for this endpoint. Must use https:// protocol
|
||||
$string['endpointurl'] = 'URL';
|
||||
$string['facebook_service'] = 'Facebook';
|
||||
$string['google_service'] = 'Google';
|
||||
$string['imsobv2p1_service'] = 'Open Badges';
|
||||
$string['issuersetup'] = 'Detailed instructions on configuring the common OAuth 2 services';
|
||||
$string['issuersetuptype'] = 'Detailed instructions on setting up the {$a} OAuth 2 provider';
|
||||
$string['issueralloweddomains_help'] = 'If set, this setting is a comma separated list of domains that logins will be restricted to when using this provider.';
|
||||
@@ -125,3 +124,6 @@ $string['userfieldinternalfield'] = 'Internal field name';
|
||||
$string['userfieldmappingdeleted'] = 'User field mapping deleted';
|
||||
$string['userfieldmappingsforissuer'] = 'User field mappings for issuer: {$a}';
|
||||
$string['privacy:metadata'] = 'The OAuth 2 services plugin does not store any personal data.';
|
||||
|
||||
// Deprecated since Moodle 4.3.
|
||||
$string['imsobv2p1_service'] = 'Open Badges';
|
||||
|
||||
@@ -1366,24 +1366,6 @@ function badges_verify_backpack(int $backpackid) {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get OAuth2 services for the external backpack.
|
||||
*
|
||||
* @return array
|
||||
* @throws coding_exception
|
||||
*/
|
||||
function badges_get_oauth2_service_options() {
|
||||
global $DB;
|
||||
|
||||
$issuers = core\oauth2\api::get_all_issuers();
|
||||
$options = ['' => 'None'];
|
||||
foreach ($issuers as $issuer) {
|
||||
$options[$issuer->get('id')] = $issuer->get('name');
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a public badgr URL that conforms to OBv2. This is done because badgr responses do not currently conform to
|
||||
* the spec.
|
||||
|
||||
@@ -3861,3 +3861,26 @@ function cron_setup_user($user = null, $course = null, $leavepagealone = false)
|
||||
|
||||
\core\cron::setup_user($user, $course, $leavepagealone);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get OAuth2 services for the external backpack.
|
||||
*
|
||||
* @return array
|
||||
* @throws coding_exception
|
||||
* @deprecated since 4.3.
|
||||
*/
|
||||
function badges_get_oauth2_service_options() {
|
||||
debugging(
|
||||
'badges_get_oauth2_service_options() is deprecated. Don\'t use it.',
|
||||
DEBUG_DEVELOPER
|
||||
);
|
||||
global $DB;
|
||||
|
||||
$issuers = core\oauth2\api::get_all_issuers();
|
||||
$options = ['' => 'None'];
|
||||
foreach ($issuers as $issuer) {
|
||||
$options[$issuer->get('id')] = $issuer->get('name');
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ information provided here is intended especially for developers.
|
||||
|
||||
* Admin settings for passwords (admin_setting_configpasswordunmask) can now be a required field using the following class:
|
||||
- admin_setting_requiredpasswordunmask
|
||||
* The badges_get_oauth2_service_options() method has been deprecated, because it's not required anymore. It should no longer
|
||||
be used.
|
||||
|
||||
=== 4.2 ===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user