From 0a497898c56aef2eb7aa663061cd1b7efdadcab7 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 e4ac3e0a74e..1463648c2de 100644 --- a/mod/data/field/menu/field.class.php +++ b/mod/data/field/menu/field.class.php @@ -104,7 +104,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; }