From 6823ac39cc04c428d706b1c8ea0fe4910bf0d6ab Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Wed, 26 Apr 2017 13:36:53 +0800 Subject: [PATCH] MDL-57807 mod_data: Advanced search with menu item. It is now possible to search other criteria without first setting the menu items. Thanks to Sergey Gorbatov for providing this patch. --- mod/data/field/menu/field.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/data/field/menu/field.class.php b/mod/data/field/menu/field.class.php index 7e6fdf994e5..9727640a41e 100644 --- a/mod/data/field/menu/field.class.php +++ b/mod/data/field/menu/field.class.php @@ -105,7 +105,8 @@ class data_field_menu extends data_field_base { $return = html_writer::label(get_string('fieldtypelabel', "datafield_" . $this->type), 'menuf_' . $this->field->id, false, array('class' => 'accesshide')); - $return .= html_writer::select($options, 'f_'.$this->field->id, $content, array('class' => 'custom-select')); + $return .= html_writer::select($options, 'f_'.$this->field->id, $content, array('' => get_string('menuchoose', 'data')), + array('class' => 'custom-select')); return $return; }