diff --git a/grade/grading/form/rubric/rubriceditor.php b/grade/grading/form/rubric/rubriceditor.php index 92cd3be7f3508..61d8307f1794e 100644 --- a/grade/grading/form/rubric/rubriceditor.php +++ b/grade/grading/form/rubric/rubriceditor.php @@ -42,17 +42,6 @@ function MoodleQuickForm_rubriceditor($elementName=null, $elementLabel=null, $at 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 f4c165bfe105e..26ae788005f51 100644 --- a/lib/form/advcheckbox.php +++ b/lib/form/advcheckbox.php @@ -84,19 +84,6 @@ function MoodleQuickForm_advcheckbox($elementName=null, $elementLabel=null, $tex 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 f37baf66ff3c9..bfa9615c142f9 100644 --- a/lib/form/button.php +++ b/lib/form/button.php @@ -54,19 +54,6 @@ function MoodleQuickForm_button($elementName=null, $value=null, $attributes=null 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 c578decd88771..37397da51899c 100644 --- a/lib/form/checkbox.php +++ b/lib/form/checkbox.php @@ -56,19 +56,6 @@ function MoodleQuickForm_checkbox($elementName=null, $elementLabel=null, $text=' 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 0f054a52c1b6d..ff28c9ec190ec 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -208,10 +208,11 @@ function isRequired() { * @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 f6d968d284156..82f9090131bee 100644 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -169,19 +169,6 @@ function setMaxfiles($num) { $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 58253bbe6c9fe..fb5e0f360361c 100644 --- a/lib/form/filepicker.php +++ b/lib/form/filepicker.php @@ -84,19 +84,6 @@ function MoodleQuickForm_filepicker($elementName=null, $elementLabel=null, $attr 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 e89460bdda60b..00674218849fb 100644 --- a/lib/form/grading.php +++ b/lib/form/grading.php @@ -89,19 +89,6 @@ public function toHtml(){ 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 7c734aca2ed72..3d95d9f53db02 100644 --- a/lib/form/group.php +++ b/lib/form/group.php @@ -57,19 +57,6 @@ function MoodleQuickForm_group($elementName=null, $elementLabel=null, $elements= /** @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 c232d9941cd4d..36c5a08e6f3cc 100644 --- a/lib/form/header.php +++ b/lib/form/header.php @@ -63,19 +63,6 @@ function accept(&$renderer, $required=false, $error=null) $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 02e88f4138520..e2c1ff0e2b995 100644 --- a/lib/form/hidden.php +++ b/lib/form/hidden.php @@ -59,11 +59,11 @@ function MoodleQuickForm_hidden($elementName=null, $value='', $attributes=null) * @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 0a8252bb8de04..2e79dcc3d9742 100644 --- a/lib/form/htmleditor.php +++ b/lib/form/htmleditor.php @@ -85,19 +85,6 @@ function MoodleQuickForm_htmleditor($elementName=null, $elementLabel=null, $opti 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 c443bad7c2a86..014e271c49e16 100644 --- a/lib/form/password.php +++ b/lib/form/password.php @@ -68,19 +68,6 @@ function MoodleQuickForm_password($elementName=null, $elementLabel=null, $attrib 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 dd97ee9732d52..6aaa7809a0b4c 100644 --- a/lib/form/radio.php +++ b/lib/form/radio.php @@ -55,19 +55,6 @@ function MoodleQuickForm_radio($elementName=null, $elementLabel=null, $text=null 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 35a0c8420ffff..ccbd8cced8214 100644 --- a/lib/form/recaptcha.php +++ b/lib/form/recaptcha.php @@ -110,19 +110,6 @@ function toHtml() { 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 22c8752d1b7b2..6d17686b14640 100644 --- a/lib/form/select.php +++ b/lib/form/select.php @@ -80,19 +80,6 @@ function toHtml(){ } } - /** - * 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 310c49294be86..2d5dd635d3142 100644 --- a/lib/form/selectgroups.php +++ b/lib/form/selectgroups.php @@ -474,19 +474,6 @@ function setHiddenLabel($hiddenLabel){ $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 dc683396556c3..4377b316464ca 100644 --- a/lib/form/selectwithlink.php +++ b/lib/form/selectwithlink.php @@ -119,19 +119,6 @@ function toHtml(){ 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 825b3e1a56f2b..716b026884943 100644 --- a/lib/form/static.php +++ b/lib/form/static.php @@ -55,19 +55,6 @@ function MoodleQuickForm_static($elementName=null, $elementLabel=null, $text=nul 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 40b1e9658c1b4..307c4f6c3116a 100644 --- a/lib/form/text.php +++ b/lib/form/text.php @@ -79,19 +79,6 @@ function toHtml(){ } } - /** - * 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 d3719b1aa65f6..f03b610726e02 100644 --- a/lib/form/textarea.php +++ b/lib/form/textarea.php @@ -58,19 +58,6 @@ function MoodleQuickForm_textarea($elementName=null, $elementLabel=null, $attrib 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 743a796468e9b..18c74650ea335 100644 --- a/lib/form/url.php +++ b/lib/form/url.php @@ -127,19 +127,6 @@ function toHtml(){ 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 f67dfc554f0ee..90865ea1cc26a 100644 --- a/lib/form/warning.php +++ b/lib/form/warning.php @@ -62,19 +62,6 @@ function MoodleQuickForm_warning($elementName=null, $elementClass='notifyproblem $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 129c2140bf5e3..73c6b4ce3b660 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1529,63 +1529,6 @@ function setDefault($elementName, $defaultValue){ $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. *