MDL-42666 repository_boxnet: Advise the user to run the migration tool
This commit is contained in:
@@ -32,6 +32,7 @@ $string['configplugin'] = 'Box.net configuration';
|
||||
$string['filesourceinfo'] = 'Box.net ({$a->fullname}): {$a->filename}';
|
||||
$string['information'] = 'Get a client ID and secret from the <a href="https://app.box.com/developers/services">Box.net developer page</a> for your Moodle site.';
|
||||
$string['invalidpassword'] = 'Invalid password';
|
||||
$string['migrationadvised'] = 'It appears that you were using Box.net with the API version 1, have you run the <a href="{$a}">migration tool</a> to convert the old references?';
|
||||
$string['migrationinfo'] = '<p>As part of the migration to the new API provided by Box.net, your file references have to be migrated. Unfortunately the reference system is not compatible with the API v2, so we are going to download them and convert them to real files.</p>
|
||||
<p>Please also be aware that the migration can <strong>take a very long time</strong>, depending on how many references are used, and how large their files are.</p>
|
||||
<p>You can run the migration tool by clicking the button below, or alternatively by executing the CLI script: repository/boxnet/cli/migrationv1.php.</p>
|
||||
|
||||
@@ -332,6 +332,12 @@ class repository_boxnet extends repository {
|
||||
|
||||
$mform->addElement('static', null, '', get_string('information', 'repository_boxnet'));
|
||||
$mform->addElement('static', null, '', get_string('warninghttps', 'repository_boxnet'));
|
||||
|
||||
if (get_config('boxnet', 'api_key') && strtotime('15 December 2013') > time()) {
|
||||
$url = new moodle_url('/repository/boxnet/migrationv1.php');
|
||||
$url = $url->out();
|
||||
$mform->addElement('static', null, '', get_string('migrationadvised', 'repository_boxnet', $url));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user