diff --git a/repository/onedrive/lang/en/repository_onedrive.php b/repository/onedrive/lang/en/repository_onedrive.php index 3e6c5999192..b59019ee85a 100644 --- a/repository/onedrive/lang/en/repository_onedrive.php +++ b/repository/onedrive/lang/en/repository_onedrive.php @@ -42,7 +42,7 @@ $string['pluginname'] = 'Microsoft OneDrive'; $string['removetempaccesstask'] = 'Remove temporary write access from controlled links'; $string['searchfor'] = 'Search for {$a}'; $string['servicenotenabled'] = 'Access not configured.'; -$string['skydrivefilesexist'] = 'Files found in the Microsoft SkyDrive repository. This repository has been deprecated by Microsoft, however the files may be imported to the Microsoft OneDrive repository.'; +$string['skydrivefilesexist'] = 'The Microsoft SkyDrive repository is enabled but it has been deprecated, however, the files may be imported to the Microsoft OneDrive repository. If you haven\'t migrated the files from the SkyDrive repository yet, please migrate them before upgrading to Moodle 4.4, because by then it will not be possible to import them so they will be completely lost.'; $string['skydrivefilesimported'] = 'All files were imported from the Microsoft SkyDrive repository.'; $string['skydrivefilesnotimported'] = 'Some files could not be imported from the Microsoft SkyDrive repository.'; $string['onedrive:view'] = 'View OneDrive repository'; diff --git a/repository/onedrive/lib.php b/repository/onedrive/lib.php index b2c6d807b2f..abe558add97 100644 --- a/repository/onedrive/lib.php +++ b/repository/onedrive/lib.php @@ -1008,6 +1008,8 @@ class repository_onedrive extends repository { * Return true if any instances of the skydrive repo exist - and we can import them. * * @return bool + * @deprecated since Moodle 4.0 + * @todo MDL-72620 This will be deleted in Moodle 4.4. */ public static function can_import_skydrive_files() { global $DB; @@ -1046,10 +1048,15 @@ class repository_onedrive extends repository { * Import all the files that were created with the skydrive repo to this repo. * * @return bool + * @deprecated since Moodle 4.0 + * @todo MDL-72620 This will be deleted in Moodle 4.4. */ public static function import_skydrive_files() { global $DB; + debugging('import_skydrive_files() is deprecated. Please migrate your files from repository_skydrive to ' . + 'repository_onedrive before it will be completely removed.', DEBUG_DEVELOPER); + if (!self::can_import_skydrive_files()) { return false; } @@ -1090,6 +1097,9 @@ class repository_onedrive extends repository { $mform->addElement('static', null, '', get_string('oauth2serviceslink', 'repository_onedrive', $url)); if (self::can_import_skydrive_files()) { + debugging('can_import_skydrive_files() is deprecated. Please migrate your files from repository_skydrive to ' . + 'repository_onedrive before it will be completely removed.', DEBUG_DEVELOPER); + $notice = get_string('skydrivefilesexist', 'repository_onedrive'); $url = new moodle_url('/repository/onedrive/importskydrive.php'); $attrs = ['class' => 'btn btn-primary']; diff --git a/repository/upgrade.txt b/repository/upgrade.txt index d9b4c6b0a34..197c2271810 100644 --- a/repository/upgrade.txt +++ b/repository/upgrade.txt @@ -7,6 +7,8 @@ http://docs.moodle.org/dev/Repository_API * The repository_picasa has been completely removed (Picasa is discontinued since 2016). * The skydrive repository has been completely removed from core. It has been moved to the plugins database repository, so it can still be installed as a third-party plugin. +* Methods can_import_skydrive_files() and import_skydrive_files have been deprecated from repository_onedrive. The feature For +importing files from repository_skydrive to repository_onedrive will be completely removed in Moodle 4.4. === 3.11 === * The Google Drive repository now includes a new rest API function 'shared_drives_list', which can be used to fetch