From cde9bee874a04549b9691f542f774a83b25777a5 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Mon, 16 Aug 2010 14:32:43 +0000 Subject: [PATCH] MDL-21695 Got rid of the last call of setHelpButton() --- lang/en/help/portfolio/boxnet_apikey.html | 11 ----------- lib/formslib.php | 3 ++- portfolio/boxnet/lang/en/portfolio_boxnet.php | 1 - portfolio/boxnet/lib.php | 6 ------ 4 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 lang/en/help/portfolio/boxnet_apikey.html diff --git a/lang/en/help/portfolio/boxnet_apikey.html b/lang/en/help/portfolio/boxnet_apikey.html deleted file mode 100644 index 575df8762ca..00000000000 --- a/lang/en/help/portfolio/boxnet_apikey.html +++ /dev/null @@ -1,11 +0,0 @@ -

Box.net API Key

-

Visit enabled.box.net and register a -developer account. You can then navigate to My projects, and create a new one.

- -

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&type=boxnet.

- -

Box.net will append the relevant authentication tokens to the url (detecting -it already contains ? and everything already)

- diff --git a/lib/formslib.php b/lib/formslib.php index bd5bef34000..49cc4de187d 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1437,7 +1437,8 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless { */ function setHelpButton($elementname, $buttonargs, $suppresscheck=false, $function='helpbutton'){ global $OUTPUT; - //TODO: obsolete this function completely + + debugging('function moodle_form::setHelpButton() is deprecated'); if ($function !== 'helpbutton') { //debugging('parameter $function in moodle_form::setHelpButton() is not supported any more'); } diff --git a/portfolio/boxnet/lang/en/portfolio_boxnet.php b/portfolio/boxnet/lang/en/portfolio_boxnet.php index f7845712f23..53f8b896560 100644 --- a/portfolio/boxnet/lang/en/portfolio_boxnet.php +++ b/portfolio/boxnet/lang/en/portfolio_boxnet.php @@ -24,7 +24,6 @@ */ $string['apikey'] = 'API key'; -$string['apikeyhelp'] = 'You need to get this by signing up to box.net as a developer and adding an application. The callback url must be yourwwwroot/portfolio/add.php?postcontrol=1&type=boxnet'; $string['apikeyinlinehelp'] = '

To configure Box.net, visit the developer page at box.net and log in.

Under My Projects you will need to create one new project for each Moodle site.

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'; diff --git a/portfolio/boxnet/lib.php b/portfolio/boxnet/lib.php index 784262a67eb..249cc5d98c8 100644 --- a/portfolio/boxnet/lib.php +++ b/portfolio/boxnet/lib.php @@ -110,12 +110,6 @@ class portfolio_plugin_boxnet extends portfolio_plugin_push_base { 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'); $mform->addElement('warning', 'apikeyhelp', 'smalltext', get_string('apikeyinlinehelp', 'portfolio_boxnet', $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet'));