MDL-52954 marking guide: Wrap radio fields in a label for styling

This commit is contained in:
Damyon Wiese 2016-02-24 14:48:23 +08:00
parent 84a32f156e
commit 2a3647bae5

View File

@ -647,21 +647,25 @@ class gradingform_guide_renderer extends plugin_renderer_base {
$checked_s2 = $checked; $checked_s2 = $checked;
} }
$radio = html_writer::tag('input', get_string('showmarkerdesc', 'gradingform_guide'), array('type' => 'radio', $radio1 = html_writer::tag('input', get_string('showmarkerdesc', 'gradingform_guide'), array('type' => 'radio',
'name' => 'showmarkerdesc', 'name' => 'showmarkerdesc',
'value' => "true")+$checked1); 'value' => "true")+$checked1);
$radio .= html_writer::tag('input', get_string('hidemarkerdesc', 'gradingform_guide'), array('type' => 'radio', $radio1 = html_writer::tag('label', $radio1);
$radio2 .= html_writer::tag('input', get_string('hidemarkerdesc', 'gradingform_guide'), array('type' => 'radio',
'name' => 'showmarkerdesc', 'name' => 'showmarkerdesc',
'value' => "false")+$checked2); 'value' => "false")+$checked2);
$output .= html_writer::tag('div', $radio, array('class' => 'showmarkerdesc')); $radio2 = html_writer::tag('label', $radio2);
$output .= html_writer::tag('div', $radio1 . $radio2, array('class' => 'showmarkerdesc'));
$radio = html_writer::tag('input', get_string('showstudentdesc', 'gradingform_guide'), array('type' => 'radio', $radio1 = html_writer::tag('input', get_string('showstudentdesc', 'gradingform_guide'), array('type' => 'radio',
'name' => 'showstudentdesc', 'name' => 'showstudentdesc',
'value' => "true")+$checked_s1); 'value' => "true")+$checked_s1);
$radio .= html_writer::tag('input', get_string('hidestudentdesc', 'gradingform_guide'), array('type' => 'radio', $radio1 = html_writer::tag('label', $radio1);
$radio2 = html_writer::tag('input', get_string('hidestudentdesc', 'gradingform_guide'), array('type' => 'radio',
'name' => 'showstudentdesc', 'name' => 'showstudentdesc',
'value' => "false")+$checked_s2); 'value' => "false")+$checked_s2);
$output .= html_writer::tag('div', $radio, array('class' => 'showstudentdesc')); $radio2 = html_writer::tag('label', $radio2);
$output .= html_writer::tag('div', $radio1 . $radio2, array('class' => 'showstudentdesc'));
} }
return $output; return $output;
} }
@ -775,4 +779,4 @@ class gradingform_guide_renderer extends plugin_renderer_base {
return $html; return $html;
} }
} }