* @param string $function function name to call to get html
*/
function setHelpButton($helpbuttonargs, $function='helpbutton'){
+ global $OUTPUT;
if (!is_array($helpbuttonargs)){
$helpbuttonargs=array($helpbuttonargs);
}else{
}
//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){
+ if ($function == 'helpbutton') {
$defaultargs=array('', '', 'moodle', true, false, '', true);
$helpbuttonargs=$helpbuttonargs + $defaultargs ;
+ $this->_helpbutton=$OUTPUT->help_icon(call_user_func_array('moodle_help_icon::make', $helpbuttonargs));
+ } else {
+ $this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
- $this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
/**
* set html for help button
* @param string $function function name to call to get html
*/
function setHelpButton($helpbuttonargs, $function='helpbutton'){
+ global $OUTPUT;
if (!is_array($helpbuttonargs)){
$helpbuttonargs=array($helpbuttonargs);
}else{
if ('helpbutton' == $function){
$defaultargs=array('', '', 'moodle', true, false, '', true);
$helpbuttonargs=$helpbuttonargs + $defaultargs ;
+ $this->_helpbutton=$OUTPUT->help_icon(call_user_func_array('moodle_help_icon::make', $helpbuttonargs));
+ } else {
+ $this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
- $this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
}
/**
* get html for help button