diff --git a/lib/form/editor.php b/lib/form/editor.php index f2003d2af0b..f56eb03336d 100644 --- a/lib/form/editor.php +++ b/lib/form/editor.php @@ -227,28 +227,10 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element { } /** - * Sets help button for editor - * - * @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-34508 this api will be removed. - * @see MoodleQuickForm::addHelpButton() + * @deprecated since Moodle 2.0 */ function setHelpButton($_helpbuttonargs, $function='_helpbutton') { - debugging('setHelpButton() is deprecated, please use $mform->addHelpButton() instead'); - if (!is_array($_helpbuttonargs)) { - $_helpbuttonargs = array($_helpbuttonargs); - } else { - $_helpbuttonargs = $_helpbuttonargs; - } - //we do this to to return html instead of printing it - //without having to specify it in every call to make a button. - if ('_helpbutton' == $function){ - $defaultargs = array('', '', 'moodle', true, false, '', true); - $_helpbuttonargs = $_helpbuttonargs + $defaultargs ; - } - $this->_helpbutton=call_user_func_array($function, $_helpbuttonargs); + throw new coding_exception('setHelpButton() can not be used any more, please see MoodleQuickForm::addHelpButton().'); } /** diff --git a/lib/form/hidden.php b/lib/form/hidden.php index b0e78b4c857..6c2f239264b 100644 --- a/lib/form/hidden.php +++ b/lib/form/hidden.php @@ -54,16 +54,10 @@ class MoodleQuickForm_hidden extends HTML_QuickForm_hidden{ } /** - * 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-34508 this api will be removed. - * @see MoodleQuickForm::addHelpButton() + * @deprecated since Moodle 2.0 */ function setHelpButton($helpbuttonargs, $function='helpbutton'){ - debugging('setHelpButton() is deprecated, please use $mform->addHelpButton() instead'); + throw new coding_exception('setHelpButton() can not be used any more, please see MoodleQuickForm::addHelpButton().'); } /**