MDL-58220 repository_skydrive: Add deprecation warning

This commit is contained in:
Damyon Wiese 2017-03-30 13:16:30 +08:00
parent e518ea7949
commit 86a5f1efe1
3 changed files with 8 additions and 0 deletions

View File

@ -29,3 +29,4 @@ $string['oauthinfo'] = '<p>To use this plugin, you must register your site <a hr
$string['pluginname'] = 'Microsoft SkyDrive';
$string['secret'] = 'Secret';
$string['skydrive:view'] = 'View SkyDrive';
$string['deprecatedwarning'] = 'Warning: The API used by this repository plugin has been deprecated by Microsoft and it will stop working eventually. Please migrate to the newer "Microsoft OneDrive" repository.';

View File

@ -157,10 +157,14 @@ class repository_skydrive extends repository {
* @param string $classname repository class name
*/
public static function type_config_form($mform, $classname = 'repository') {
global $OUTPUT;
$a = new stdClass;
$a->callbackurl = microsoft_skydrive::callback_url()->out(false);
$mform->addElement('static', null, '', get_string('oauthinfo', 'repository_skydrive', $a));
$mform->addElement('static', null, '', $OUTPUT->notification(get_string('deprecatedwarning', 'repository_skydrive', $a)));
parent::type_config_form($mform);
$strrequired = get_string('required');
$mform->addElement('text', 'clientid', get_string('clientid', 'repository_skydrive'));

View File

@ -3,6 +3,9 @@ information provided here is intended especially for developers. Full
details of the repository API are available on Moodle docs:
http://docs.moodle.org/dev/Repository_API
=== 3.3 ===
The skydrive repository is deprecated - please migrate to the newer onedrive repository.
=== 3.2 ===
* The method repository::uses_post_requests() has been deprecated and must not be used anymore.