diff --git a/admin/tool/usertours/classes/local/forms/editstep.php b/admin/tool/usertours/classes/local/forms/editstep.php index 8c586101f33..b36ef1f57fc 100644 --- a/admin/tool/usertours/classes/local/forms/editstep.php +++ b/admin/tool/usertours/classes/local/forms/editstep.php @@ -116,11 +116,9 @@ class editstep extends \moodleform { 'changeformat' => 1, 'trusttext' => true, ]; - $objs = $mform->createElement('editor', 'content', get_string('content', 'tool_usertours'), null, $editoroptions); - // TODO: MDL-68540 We need to add the editor to a group element because editor element will not work with hideIf. - $mform->addElement('group', 'contenthtmlgrp', get_string('content', 'tool_usertours'), [$objs], ' ', false); - $mform->addHelpButton('contenthtmlgrp', 'content', 'tool_usertours'); - $mform->hideIf('contenthtmlgrp', 'contenttype', 'eq', static::CONTENTTYPE_LANGSTRING); + $mform->addElement('editor', 'content', get_string('content', 'tool_usertours'), null, $editoroptions); + $mform->addHelpButton('content', 'content', 'tool_usertours'); + $mform->hideIf('content', 'contenttype', 'eq', static::CONTENTTYPE_LANGSTRING); // Add the step configuration. $mform->addElement('header', 'heading_options', get_string('options_heading', 'tool_usertours')); diff --git a/admin/tool/usertours/tests/behat/tour_content_type.feature b/admin/tool/usertours/tests/behat/tour_content_type.feature index 102fcef3fa6..df120600ae5 100644 --- a/admin/tool/usertours/tests/behat/tour_content_type.feature +++ b/admin/tool/usertours/tests/behat/tour_content_type.feature @@ -27,9 +27,9 @@ Feature: Apply content type to a tour And the "Content type" select box should contain "Manual" And I select "Language string ID" from the "Content type" singleselect And I should see " Language string ID" - And "#fgroup_id_contenthtmlgrp" "css_element" should not be visible + And I should not see "Content" in the "#fitem_id_content" "css_element" And I select "Manual" from the "Content type" singleselect - And "#fgroup_id_contenthtmlgrp" "css_element" should be visible + And I should see "Content" in the "#fitem_id_content" "css_element" And I should not see "Language string ID" in the "#fitem_id_contentlangstring" "css_element" @javascript