--- /dev/null
+<h2>Box.net API Key</h2>
+<p>Visit <a href="http://enabled.box.net">enabled.box.net</a> and register a developer account. You can then navigate to My projects, and create a new one.</p>
+<p>For all the settings, Moodle doesn't care what you put in except for the callback url, which should be $CFG->wwwroot/portfolio/add.php?postcontrol=1.</p>
+<p>Box.net will append the relevant authentication tokens to the url (detecting it already contains ? and everything already) </p>
+
<?php
-$string['apikey'] = 'API key (you need to get this from Box.net)';
+$string['apikey'] = 'API key';
+$string['apikeyhelp'] = 'You need to get this by signing up to enabled.box.net and adding an application. The callback url must be yourwwwroot/portfolio/add.php?postcontrol=1';
$string['err_noapikey'] = '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';
$string['folderclash'] = 'The folder you asked to create already exists!';
}
public function admin_config_form(&$mform) {
+ global $CFG;
$strrequired = get_string('required');
$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet'));
+ $helpparams = array(
+ 'boxnet_apikey',
+ get_string('apikeyhelp', 'portfolio_boxnet'),
+ 'portfolio',
+ );
+ $mform->setHelpButton('apikey', $helpparams);
$mform->addRule('apikey', $strrequired, 'required', null, 'client');
}