From c19d952ad2881952e3de47949ab28bcdacfe74f4 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Thu, 7 Nov 2013 11:11:06 +0800 Subject: [PATCH] MDL-42666 repository_boxnet: New lang strings rather than replace --- repository/boxnet/lang/en/repository_boxnet.php | 11 +++++++++-- repository/boxnet/lib.php | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/repository/boxnet/lang/en/repository_boxnet.php b/repository/boxnet/lang/en/repository_boxnet.php index 84c65929ec1..b78ee34b936 100644 --- a/repository/boxnet/lang/en/repository_boxnet.php +++ b/repository/boxnet/lang/en/repository_boxnet.php @@ -24,16 +24,23 @@ */ $string['apikey'] = 'API key'; -$string['apiv1migration_message_content'] = 'As part of the recent Moodle upgrade (2.6, 2.5.3, 2.4.7), the Box.net repository plugin has been disabled. To re-enable it, you need to re-configure it as described in the documentation {$a->docsurl}.'; +$string['apiv1migration_message_content'] = 'As part of the recent Moodle upgrade to 2.5.3, the Box.net repository plugin has been disabled. To re-enable it, you need to re-configure it as described in the documentation {$a->docsurl}.'; $string['apiv1migration_message_small'] = 'This plugin has been disabled, as it requires configuration as described in the documentation Box.net APIv1 migration.'; $string['apiv1migration_message_subject'] = 'Important information regarding Box.net repository plugin'; $string['boxnet:view'] = 'View box.net repository'; $string['cannotcreatereference'] = 'Cannot create a reference, not enough permissions to share the file on Box.net.'; +$string['callbackurl'] = 'Redirect URL'; +$string['callbackurltext'] = '1. Visit www.box.net/developers/services again. +2. Make sure you set the redirect URL of this box.net service to {$a}.'; +$string['callbackwarning'] = '1. Get a Box.net API from www.box.net/developers/services for this Moodle site. +2. Enter the Box.net API key here, then click Save and then return to this page. You will see that Moodle has generated a redirect URL for you. +3. Edit your Box.net details on the box.net website again and set the redirect URL.'; $string['clientid'] = 'Client ID'; $string['clientsecret'] = 'Client secret'; $string['configplugin'] = 'Box.net configuration'; $string['filesourceinfo'] = 'Box.net ({$a->fullname}): {$a->filename}'; -$string['information'] = 'Get a client ID and secret from the Box.net developer page for your Moodle site.'; +$string['information'] = 'Get an API key from the Box.net developer page for your Moodle site.'; +$string['informationapiv2'] = 'Get a client ID and secret from the Box.net developer page 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 migration tool to convert the old references?'; $string['migrationinfo'] = '

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.

diff --git a/repository/boxnet/lib.php b/repository/boxnet/lib.php index 6ed96cc1656..e573a95ae4b 100644 --- a/repository/boxnet/lib.php +++ b/repository/boxnet/lib.php @@ -330,7 +330,7 @@ class repository_boxnet extends repository { $mform->addRule('clientsecret', $strrequired, 'required', null, 'client'); $mform->setType('clientsecret', PARAM_RAW_TRIMMED); - $mform->addElement('static', null, '', get_string('information', 'repository_boxnet')); + $mform->addElement('static', null, '', get_string('informationapiv2', 'repository_boxnet')); if (strpos($CFG->wwwroot, 'https') !== 0) { $mform->addElement('static', null, '', get_string('warninghttps', 'repository_boxnet'));