Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51966

Make case-insensitive search in autocomplete element

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0
    • 3.0
    • JavaScript
    • MOODLE_30_STABLE
    • MOODLE_30_STABLE
    • wip-MDL-51966-master
    • Hide
      1. apply patch suggested in the description
      2. go to edit any user profile page
      3. test that timezone search is case insensitive (or sensitive with the second patch)
      4. add some official tags with capital letters in Site administration > Appearance > Manage Tags
      5. edit course and make sure the tags are suggested when you type them without capital letters
      Show
      apply patch suggested in the description go to edit any user profile page test that timezone search is case insensitive (or sensitive with the second patch) add some official tags with capital letters in Site administration > Appearance > Manage Tags edit course and make sure the tags are suggested when you type them without capital letters

      I just tried to use autocomplete field on timezone field in user profile (the current selection is like 1000 elements), and realised that I have to type text case-sensitive

      Can we make an option for it? I would suggest case-insensitive by default.

      P.S. for testing:

      diff --git a/user/editlib.php b/user/editlib.php
      index 509a06d..016ddf0 100644
      --- a/user/editlib.php
      +++ b/user/editlib.php
      @@ -339,7 +339,7 @@ function useredit_shared_definition(&$mform, $editoroptions, $filemanageroptions
               $mform->setType('timezone', PARAM_TIMEZONE);
           } else {
               $choices = core_date::get_list_of_timezones($user->timezone, true);
      -        $mform->addElement('select', 'timezone', get_string('timezone'), $choices);
      +        $mform->addElement('autocomplete', 'timezone', get_string('timezone'), $choices);
           }
       
           // Multi-Calendar Support - see MDL-18375.
      

      For testing #2:

      $mform->addElement('autocomplete', 'timezone', get_string('timezone'), $choices, array('casesensitive' => true));
      

            marina Marina Glancy
            marina Marina Glancy
            Damyon Wiese Damyon Wiese
            Andrew Lyons Andrew Lyons
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.