MDL-81743 mod_feedback: Fix multichoice items separation
This commit is contained in:
@@ -319,7 +319,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
$class = 'multichoice-' . $info->subtype;
|
||||
$inputname = $item->typ . '_' . $item->id;
|
||||
$options = $this->get_options($item);
|
||||
$separator = !empty($info->horizontal) ? ' ' : '<br>';
|
||||
$separator = !empty($info->horizontal) ? ' ' : \html_writer::div('', 'w-100');
|
||||
$tmpvalue = $form->get_item_value($item) ?? 0; // Used for element defaults, so must be a valid value (not null).
|
||||
|
||||
// Subtypes:
|
||||
|
||||
@@ -324,7 +324,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
}
|
||||
// Span to hold the element id. The id is used for drag and drop reordering.
|
||||
$objs[] = ['static', '', '', html_writer::span('', '', ['id' => 'feedback_item_' . $item->id])];
|
||||
$separator = $info->horizontal ? ' ' : '<br>';
|
||||
$separator = $info->horizontal ? ' ' : \html_writer::div('', 'w-100');
|
||||
$class .= ' multichoicerated-' . ($info->horizontal ? 'horizontal' : 'vertical');
|
||||
$el = $form->add_form_group_element($item, 'group_'.$inputname, $name, $objs, $separator, $class);
|
||||
$form->set_element_type($inputname, PARAM_INT);
|
||||
|
||||
Reference in New Issue
Block a user