MDL-70288 qtype: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text was provided, the label will be displayed on the right of the the checkbox element. So there's no point in passing an empty string for the label just to render the text to the right of the checkbox.
This commit is contained in:
@@ -116,8 +116,7 @@ class qtype_ddimageortext_edit_form extends qtype_ddtoimage_edit_form_base {
|
||||
protected function definition_draggable_items($mform, $itemrepeatsatstart) {
|
||||
$mform->addElement('header', 'draggableitemheader',
|
||||
get_string('draggableitems', 'qtype_ddimageortext'));
|
||||
$mform->addElement('advcheckbox', 'shuffleanswers', ' ',
|
||||
get_string('shuffleimages', 'qtype_'.$this->qtype()));
|
||||
$mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffleimages', 'qtype_'.$this->qtype()));
|
||||
$mform->setDefault('shuffleanswers', 0);
|
||||
$this->repeat_elements($this->draggable_item($mform), $itemrepeatsatstart,
|
||||
$this->draggable_items_repeated_options(),
|
||||
@@ -143,8 +142,7 @@ class qtype_ddimageortext_edit_form extends qtype_ddtoimage_edit_form_base {
|
||||
get_string('group', 'qtype_gapselect'),
|
||||
$options,
|
||||
array('class' => 'draggroup'));
|
||||
$grouparray[] = $mform->createElement('advcheckbox', 'infinite', ' ',
|
||||
get_string('infinite', 'qtype_ddimageortext'));
|
||||
$grouparray[] = $mform->createElement('advcheckbox', 'infinite', get_string('infinite', 'qtype_ddimageortext'));
|
||||
$draggableimageitem[] = $mform->createElement('group', 'drags',
|
||||
get_string('draggableitemheader', 'qtype_ddimageortext', '{no}'), $grouparray);
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@ class qtype_ddmarker_edit_form extends qtype_ddtoimage_edit_form_base {
|
||||
}
|
||||
|
||||
protected function definition_inner($mform) {
|
||||
$mform->addElement('advcheckbox', 'showmisplaced', ' ',
|
||||
get_string('showmisplaced', 'qtype_ddmarker'));
|
||||
$mform->addElement('advcheckbox', 'showmisplaced', get_string('showmisplaced', 'qtype_ddmarker'));
|
||||
parent::definition_inner($mform);
|
||||
|
||||
$mform->addHelpButton('drops[0]', 'dropzones', 'qtype_ddmarker');
|
||||
@@ -60,8 +59,7 @@ class qtype_ddmarker_edit_form extends qtype_ddtoimage_edit_form_base {
|
||||
protected function definition_draggable_items($mform, $itemrepeatsatstart) {
|
||||
$mform->addElement('header', 'draggableitemheader',
|
||||
get_string('markers', 'qtype_ddmarker'));
|
||||
$mform->addElement('advcheckbox', 'shuffleanswers', ' ',
|
||||
get_string('shuffleimages', 'qtype_'.$this->qtype()));
|
||||
$mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffleimages', 'qtype_'.$this->qtype()));
|
||||
$mform->setDefault('shuffleanswers', 0);
|
||||
$this->repeat_elements($this->draggable_item($mform), $itemrepeatsatstart,
|
||||
$this->draggable_items_repeated_options(),
|
||||
|
||||
@@ -49,8 +49,7 @@ class qtype_ddwtos_edit_form extends qtype_gapselect_edit_form_base {
|
||||
|
||||
protected function choice_group($mform) {
|
||||
$grouparray = parent::choice_group($mform);
|
||||
$grouparray[] = $mform->createElement('checkbox', 'infinite', ' ',
|
||||
get_string('infinite', 'qtype_ddwtos'), null,
|
||||
$grouparray[] = $mform->createElement('checkbox', 'infinite', get_string('infinite', 'qtype_ddwtos'), '', null,
|
||||
array('size' => 1, 'class' => 'tweakcss'));
|
||||
return $grouparray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user