Skip to content

Commit

Permalink
Box.net portfolio setup instructions updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Nov 11, 2010
1 parent 76116d2 commit eefb011
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions portfolio/boxnet/lang/en/portfolio_boxnet.php
Expand Up @@ -24,7 +24,6 @@
*/

$string['apikey'] = 'API key';
$string['apikeyinlinehelp'] = '<p>To configure Box.net, visit the developer page at <a href="http://www.box.net/developers/services">box.net</a> and log in.</p><p>Under My Projects you will need to create one new project for each Moodle site.</p><p>The only setting that matters is the callback url, which should be {$a}. You can put anything you like for the other settings. Save it and you\'re done!';
$string['err_noapikey'] = 'No API Key';
$string['err_noapikey_help'] = 'There is no API Key configured for this plugin. You can get one of these from http://enabled.box.net';
$string['existingfolder'] = 'Exiting folder to put file(s) into';
Expand All @@ -36,8 +35,10 @@
$string['notarget'] = 'You must specify either an existing folder or a new folder to upload into';
$string['noticket'] = 'Could not retrieve a ticket from box.net to begin the authentication session';
$string['password'] = 'Your box.net password (will not be stored)';
$string['pluginname'] = 'Box.net internet storage';
$string['pluginname'] = 'Box.net';
$string['sendfailed'] = 'Failed to send content to box.net: {$a}';
$string['setupinfo'] = 'Setup instructions';
$string['setupinfodetails'] = 'To obtain API key, log in to Box.net and visit their <a href="{$a->servicesurl}">OpenBox development page</a>. In \'Developer Tools\', follow \'Create new application\' and create new application for your Moodle site. API key is displayed in \'Backend parameters\' section of the application edit form. In that form, fill \'Redirect URL\' field to:<br /><code>{$a->callbackurl}</code><br />Optionally, you can also provide other information about your Moodle site. These values can be edited later at \'View my applications\' page.';
$string['sharedfolder'] = 'Shared';
$string['sharefile'] = 'Share this file?';
$string['sharefolder'] = 'Share this new folder?';
Expand Down
11 changes: 7 additions & 4 deletions portfolio/boxnet/lib.php
Expand Up @@ -108,11 +108,14 @@ public function export_config_validation($data) {

public function admin_config_form(&$mform) {
global $CFG;
$strrequired = get_string('required');
$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet'));
$mform->addRule('apikey', $strrequired, 'required', null, 'client');
$mform->addElement('warning', 'apikeyhelp', 'smalltext', get_string('apikeyinlinehelp', 'portfolio_boxnet', $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet'));

$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet'));
$mform->addRule('apikey', get_string('required'), 'required', null, 'client');
$a = new stdClass();
$a->servicesurl = 'http://www.box.net/developers/services';
$a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet';
$mform->addElement('static', 'setupinfo', get_string('setupinfo', 'portfolio_boxnet'),
get_string('setupinfodetails', 'portfolio_boxnet', $a));
}

public function steal_control($stage) {
Expand Down

0 comments on commit eefb011

Please sign in to comment.