mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions
This commit is contained in:
parent
48a67d9f01
commit
4bcc51185c
113 changed files with 442 additions and 970 deletions
|
@ -47,18 +47,7 @@ class MoodleQuickForm_htmleditor extends MoodleQuickForm_textarea{
|
|||
* @param string $function function name to call to get html
|
||||
*/
|
||||
function setHelpButton($helpbuttonargs, $function='helpbutton'){
|
||||
if (!$this->_canUseHtmlEditor){
|
||||
if ('editorhelpbutton' == $function){
|
||||
$key = array_search('richtext2', $helpbuttonargs);
|
||||
if ($key !== FALSE){
|
||||
array_splice($helpbuttonargs, $key, 1, array('text2', 'emoticons2'));
|
||||
}
|
||||
} elseif ('helpbutton' == $function && $helpbuttonargs[0] == 'richtext2' && ((!isset($helpbuttonargs[2])) || $helpbuttonargs[2] == 'moodle')){
|
||||
//replace single 'richtext' help button with text and emoticon button when htmleditor off.
|
||||
return $this->setHelpButton(array('text2', 'emoticons2'), 'editorhelpbutton');
|
||||
}
|
||||
}
|
||||
return parent::setHelpButton($helpbuttonargs, $function);
|
||||
debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead');
|
||||
}
|
||||
|
||||
function toHtml(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue