moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
55 stars 49 forks source link

load_custom_field_config does not fully support textarea as they cannot be conditionally hidden and shortname search is missing "_editor" #576

Closed SimonThornett closed 3 months ago

SimonThornett commented 4 months ago

Describe the bug When creating a smart menu item it will render the custom course fields on the settings page for the filtering. These are conditionally hidden until the menu item type "Dynamic courses" is selected. Unfortunately there is a long standing bug with Moodle whereby text areas can't be conditionally hidden. In addition, the logic is missing the additional "_editor" for the shortname when getting the element

To Reproduce The following steps to reproduce the behavior assume that you already have a custom course field of type "textarea" created:

  1. Go to 'Smart menus'
  2. Click on 'list' for a menu item
  3. Click on 'edit' for an item
  4. Change the "Menu item type" to "Dynamic Courses"
  5. See custom textarea field
  6. Change the "Menu item type" to "Static"
  7. Custom textarea field remains instead of being hidden.

Expected behavior When "Dynamic Courses" is not selected as a menu item, all custom course fields should be hidden

Desktop (please complete the following information):

SimonThornett commented 4 months ago

Following pull requests resolve the issue in 401, 402, and 403 respectively:

https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/pull/577 https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/pull/578 https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/pull/579