MDL-23561 Fixed support for addHelpButton() in repeated elements
This commit is contained in:
+2
-1
@@ -914,7 +914,8 @@ abstract class moodleform {
|
||||
$mform->setDefault($realelementname, $params);
|
||||
break;
|
||||
case 'helpbutton' :
|
||||
$mform->addHelpButton($realelementname, $params);
|
||||
$params = array_merge(array($realelementname), $params);
|
||||
call_user_func_array(array(&$mform, 'addHelpButton'), $params);
|
||||
break;
|
||||
case 'disabledif' :
|
||||
foreach ($namecloned as $num => $name){
|
||||
|
||||
@@ -51,8 +51,7 @@ class mod_choice_mod_form extends moodleform_mod {
|
||||
$repeateloptions['limit']['disabledif'] = array('limitanswers', 'eq', 0);
|
||||
$mform->setType('limit', PARAM_INT);
|
||||
|
||||
//TODO: MDL-23561 temp workaround for fatal errors caused by following line
|
||||
//$repeateloptions['option']['helpbutton'] = array('choiceoptions', get_string('modulenameplural', 'choice'), 'choice');
|
||||
$repeateloptions['option']['helpbutton'] = array('choiceoptions', 'choice');
|
||||
$mform->setType('option', PARAM_CLEAN);
|
||||
|
||||
$mform->setType('optionid', PARAM_INT);
|
||||
|
||||
Reference in New Issue
Block a user