]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16353 - help for boxnet portfolio plugin admin config
authormjollnir_ <mjollnir_>
Fri, 5 Sep 2008 12:39:17 +0000 (12:39 +0000)
committermjollnir_ <mjollnir_>
Fri, 5 Sep 2008 12:39:17 +0000 (12:39 +0000)
lang/en_utf8/help/portfolio/boxnet_apikey.html [new file with mode: 0644]
lang/en_utf8/portfolio_boxnet.php
portfolio/type/boxnet/lib.php

diff --git a/lang/en_utf8/help/portfolio/boxnet_apikey.html b/lang/en_utf8/help/portfolio/boxnet_apikey.html
new file mode 100644 (file)
index 0000000..a1d2feb
--- /dev/null
@@ -0,0 +1,5 @@
+<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>
+
index 783d347ede2d9fe3139d78073742f1a386fcc745..077d54c927bcc80af8b3ddd69e841b15ef72f24d 100644 (file)
@@ -1,6 +1,7 @@
 <?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!';
index a2726cc07884ccdbc8721f86dc0786cd99ba728d..5a18f9d66a1707c1b3f891a5ce97fe4fbd8e9a14 100644 (file)
@@ -114,8 +114,15 @@ class portfolio_plugin_boxnet extends portfolio_plugin_push_base {
     }
 
     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');
     }