Skip to content

Commit

Permalink
MDL-58220 repository_skydrive: Add deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Apr 3, 2017
1 parent e518ea7 commit 86a5f1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions repository/skydrive/lang/en/repository_skydrive.php
Expand Up @@ -29,3 +29,4 @@
$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.';
4 changes: 4 additions & 0 deletions repository/skydrive/lib.php
Expand Up @@ -157,10 +157,14 @@ public static function get_type_option_names() {
* @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'));
Expand Down
3 changes: 3 additions & 0 deletions repository/upgrade.txt
Expand Up @@ -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.
Expand Down

0 comments on commit 86a5f1e

Please sign in to comment.