From fdb7f280c4e746fcd7d3fcf3d302d1aabb5eece8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikel=20Mart=C3=ADn?= Date: Thu, 25 Apr 2024 11:26:56 +0200 Subject: [PATCH] MDL-81743 mod_feedback: Fix multichoice items separation --- mod/feedback/item/multichoice/lib.php | 2 +- mod/feedback/item/multichoicerated/lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/feedback/item/multichoice/lib.php b/mod/feedback/item/multichoice/lib.php index 925ed01f52d..dc9c25c5bbf 100644 --- a/mod/feedback/item/multichoice/lib.php +++ b/mod/feedback/item/multichoice/lib.php @@ -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) ? ' ' : '
'; + $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: diff --git a/mod/feedback/item/multichoicerated/lib.php b/mod/feedback/item/multichoicerated/lib.php index 54e62ccafc8..781510114df 100644 --- a/mod/feedback/item/multichoicerated/lib.php +++ b/mod/feedback/item/multichoicerated/lib.php @@ -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 ? ' ' : '
'; + $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);