diff --git a/reportbuilder/classes/local/helpers/custom_fields.php b/reportbuilder/classes/local/helpers/custom_fields.php index b7ffe1e33c0..3d078970f2f 100644 --- a/reportbuilder/classes/local/helpers/custom_fields.php +++ b/reportbuilder/classes/local/helpers/custom_fields.php @@ -237,12 +237,7 @@ class custom_fields { // Options are stored inside configdata json string and we need to convert it to array. if ($field->get('type') === 'select') { $filter->set_options_callback(static function() use ($field): array { - $options = explode("\r\n", $field->get_configdata_property('options')); - // Method set_options starts using array at index 1. we shift one position on this array. - // In course settings this menu has an empty option and we need to respect that. - array_unshift($options, " "); - unset($options[0]); - return $options; + return $field->get_options(); }); }