diff --git a/grade/grading/form/rubric/rubriceditor.php b/grade/grading/form/rubric/rubriceditor.php index 92cd3be7f35..61d8307f179 100644 --- a/grade/grading/form/rubric/rubriceditor.php +++ b/grade/grading/form/rubric/rubriceditor.php @@ -42,17 +42,6 @@ class MoodleQuickForm_rubriceditor extends HTML_QuickForm_input { parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes); } - /** - * set html for help button - * - * @access public - * @param array $help array of arguments to make a help button - * @param string $function function name to call to get html - */ - public function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/advcheckbox.php b/lib/form/advcheckbox.php index f4c165bfe10..26ae788005f 100644 --- a/lib/form/advcheckbox.php +++ b/lib/form/advcheckbox.php @@ -84,19 +84,6 @@ class MoodleQuickForm_advcheckbox extends HTML_QuickForm_advcheckbox{ parent::HTML_QuickForm_advcheckbox($elementName, $elementLabel, $text, $attributes, $values); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function (optional)function name get help html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/button.php b/lib/form/button.php index f37baf66ff3..bfa9615c142 100644 --- a/lib/form/button.php +++ b/lib/form/button.php @@ -54,19 +54,6 @@ class MoodleQuickForm_button extends HTML_QuickForm_button parent::HTML_QuickForm_button($elementName, $value, $attributes); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/checkbox.php b/lib/form/checkbox.php index c578decd887..37397da5189 100644 --- a/lib/form/checkbox.php +++ b/lib/form/checkbox.php @@ -56,19 +56,6 @@ class MoodleQuickForm_checkbox extends HTML_QuickForm_checkbox{ parent::HTML_QuickForm_checkbox($elementName, $elementLabel, $text, $attributes); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/editor.php b/lib/form/editor.php index 0f054a52c1b..ff28c9ec190 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -208,10 +208,11 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { * @param mixed $_helpbuttonargs arguments to create help button * @param string $function name of the callback function * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. + * @todo MDL-34508 this api will be removed. * @see MoodleQuickForm::setHelpButton() */ function setHelpButton($_helpbuttonargs, $function='_helpbutton') { + debugging('setHelpButton() is deprecated, please use $mform->addHelpButton() instead'); if (!is_array($_helpbuttonargs)) { $_helpbuttonargs = array($_helpbuttonargs); } else { diff --git a/lib/form/filemanager.php b/lib/form/filemanager.php index f6d968d2841..82f9090131b 100644 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -169,19 +169,6 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element { $this->_options['maxfiles'] = $num; } - /** - * Sets help button for filemanager - * - * @param mixed $helpbuttonargs arguments to create help button - * @param string $function name of the callback function - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * Returns html for help button. * diff --git a/lib/form/filepicker.php b/lib/form/filepicker.php index 58253bbe6c9..fb5e0f36036 100644 --- a/lib/form/filepicker.php +++ b/lib/form/filepicker.php @@ -84,19 +84,6 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input { parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes); } - /** - * Sets help button for filepicker - * - * @param mixed $helpbuttonargs arguments to create help button - * @param string $function name of the callback function - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton') { - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * Returns html for help button. * diff --git a/lib/form/grading.php b/lib/form/grading.php index e89460bdda6..00674218849 100644 --- a/lib/form/grading.php +++ b/lib/form/grading.php @@ -89,19 +89,6 @@ class MoodleQuickForm_grading extends HTML_QuickForm_input{ return $this->get_gradinginstance()->render_grading_element($PAGE, $this); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - public function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/group.php b/lib/form/group.php index 7c734aca2ed..3d95d9f53db 100644 --- a/lib/form/group.php +++ b/lib/form/group.php @@ -57,19 +57,6 @@ class MoodleQuickForm_group extends HTML_QuickForm_group{ /** @var string template type, would cause problems with client side validation so will leave for now */ //var $_elementTemplateType='fieldset'; - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * set html for help button */ diff --git a/lib/form/header.php b/lib/form/header.php index c232d9941cd..36c5a08e6f3 100644 --- a/lib/form/header.php +++ b/lib/form/header.php @@ -63,19 +63,6 @@ class MoodleQuickForm_header extends HTML_QuickForm_header $renderer->renderHeader($this); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/hidden.php b/lib/form/hidden.php index 02e88f41385..e2c1ff0e2b9 100644 --- a/lib/form/hidden.php +++ b/lib/form/hidden.php @@ -59,11 +59,11 @@ class MoodleQuickForm_hidden extends HTML_QuickForm_hidden{ * @param array $helpbuttonargs array of arguments to make a help button * @param string $function function name to call to get html * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. + * @todo MDL-34508 this api will be removed. * @see MoodleQuickForm::setHelpButton() */ function setHelpButton($helpbuttonargs, $function='helpbutton'){ - + debugging('setHelpButton() is deprecated, please use $mform->addHelpButton() instead'); } /** diff --git a/lib/form/htmleditor.php b/lib/form/htmleditor.php index 0a8252bb8de..2e79dcc3d97 100644 --- a/lib/form/htmleditor.php +++ b/lib/form/htmleditor.php @@ -85,19 +85,6 @@ class MoodleQuickForm_htmleditor extends MoodleQuickForm_textarea{ editors_head_setup(); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * Returns the input field in HTML * diff --git a/lib/form/password.php b/lib/form/password.php index c443bad7c2a..014e271c49e 100644 --- a/lib/form/password.php +++ b/lib/form/password.php @@ -68,19 +68,6 @@ class MoodleQuickForm_password extends HTML_QuickForm_password{ parent::HTML_QuickForm_password($elementName, $elementLabel, $attributes); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/radio.php b/lib/form/radio.php index dd97ee9732d..6aaa7809a0b 100644 --- a/lib/form/radio.php +++ b/lib/form/radio.php @@ -55,19 +55,6 @@ class MoodleQuickForm_radio extends HTML_QuickForm_radio{ parent::HTML_QuickForm_radio($elementName, $elementLabel, $text, $value, $attributes); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/recaptcha.php b/lib/form/recaptcha.php index 35a0c8420ff..ccbd8cced82 100644 --- a/lib/form/recaptcha.php +++ b/lib/form/recaptcha.php @@ -110,19 +110,6 @@ class MoodleQuickForm_recaptcha extends HTML_QuickForm_input { return $html . recaptcha_get_html($CFG->recaptchapublickey, $error, $this->_https); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/select.php b/lib/form/select.php index 22c8752d1b7..6d17686b146 100644 --- a/lib/form/select.php +++ b/lib/form/select.php @@ -80,19 +80,6 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{ } } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/selectgroups.php b/lib/form/selectgroups.php index 310c49294be..2d5dd635d31 100644 --- a/lib/form/selectgroups.php +++ b/lib/form/selectgroups.php @@ -474,19 +474,6 @@ class MoodleQuickForm_selectgroups extends HTML_QuickForm_element { $this->_hiddenLabel = $hiddenLabel; } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/selectwithlink.php b/lib/form/selectwithlink.php index dc683396556..4377b316464 100644 --- a/lib/form/selectwithlink.php +++ b/lib/form/selectwithlink.php @@ -119,19 +119,6 @@ class MoodleQuickForm_selectwithlink extends HTML_QuickForm_select{ return $retval; } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/static.php b/lib/form/static.php index 825b3e1a56f..716b0268849 100644 --- a/lib/form/static.php +++ b/lib/form/static.php @@ -55,19 +55,6 @@ class MoodleQuickForm_static extends HTML_QuickForm_static{ parent::HTML_QuickForm_static($elementName, $elementLabel, $text); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/text.php b/lib/form/text.php index 40b1e9658c1..307c4f6c311 100644 --- a/lib/form/text.php +++ b/lib/form/text.php @@ -79,19 +79,6 @@ class MoodleQuickForm_text extends HTML_QuickForm_text{ } } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/textarea.php b/lib/form/textarea.php index d3719b1aa65..f03b610726e 100644 --- a/lib/form/textarea.php +++ b/lib/form/textarea.php @@ -58,19 +58,6 @@ class MoodleQuickForm_textarea extends HTML_QuickForm_textarea{ parent::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes); } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/url.php b/lib/form/url.php index 743a796468e..18c74650ea3 100644 --- a/lib/form/url.php +++ b/lib/form/url.php @@ -127,19 +127,6 @@ EOD; return $str; } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * get html for help button * diff --git a/lib/form/warning.php b/lib/form/warning.php index f67dfc554f0..90865ea1cc2 100644 --- a/lib/form/warning.php +++ b/lib/form/warning.php @@ -62,19 +62,6 @@ class MoodleQuickForm_warning extends HTML_QuickForm_static{ $this->_class = $elementClass; } - /** - * set html for help button - * - * @param array $helpbuttonargs array of arguments to make a help button - * @param string $function function name to call to get html - * @deprecated since Moodle 2.0. Please do not call this function any more. - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::setHelpButton() - */ - function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead'); - } - /** * Returns HTML for this form element. * diff --git a/lib/formslib.php b/lib/formslib.php index 129c2140bf5..73c6b4ce3b6 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1529,63 +1529,6 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless { $this->setDefaults(array($elementName=>$defaultValue)); } - /** - * Add an array of buttons to the form - * - * @param array $buttons An associative array representing help button to attach to - * to the form. keys of array correspond to names of elements in form. - * @param bool $suppresscheck if true then string check will be suppressed - * @param string $function callback function to dispaly help button. - * @deprecated since Moodle 2.0 use addHelpButton() call on each element manually - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::addHelpButton() - */ - function setHelpButtons($buttons, $suppresscheck=false, $function='helpbutton'){ - - debugging('function moodle_form::setHelpButtons() is deprecated'); - //foreach ($buttons as $elementname => $button){ - // $this->setHelpButton($elementname, $button, $suppresscheck, $function); - //} - } - - /** - * Add a help button to element - * - * @param string $elementname name of the element to add the item to - * @param array $buttonargs arguments to pass to function $function - * @param bool $suppresscheck whether to throw an error if the element - * doesn't exist. - * @param string $function - function to generate html from the arguments in $button - * @deprecated since Moodle 2.0 - use addHelpButton() call on each element manually - * @todo MDL-31047 this api will be removed. - * @see MoodleQuickForm::addHelpButton() - */ - function setHelpButton($elementname, $buttonargs, $suppresscheck=false, $function='helpbutton'){ - global $OUTPUT; - - debugging('function moodle_form::setHelpButton() is deprecated'); - if ($function !== 'helpbutton') { - //debugging('parameter $function in moodle_form::setHelpButton() is not supported any more'); - } - - $buttonargs = (array)$buttonargs; - - if (array_key_exists($elementname, $this->_elementIndex)) { - //_elements has a numeric index, this code accesses the elements by name - $element = $this->_elements[$this->_elementIndex[$elementname]]; - - $page = isset($buttonargs[0]) ? $buttonargs[0] : null; - $text = isset($buttonargs[1]) ? $buttonargs[1] : null; - $module = isset($buttonargs[2]) ? $buttonargs[2] : 'moodle'; - $linktext = isset($buttonargs[3]) ? $buttonargs[3] : false; - - $element->_helpbutton = $OUTPUT->old_help_icon($page, $text, $module, $linktext); - - } else if (!$suppresscheck) { - print_error('nonexistentformelements', 'form', '', $elementname); - } - } - /** * Add a help button to element, only one button per element is allowed. *