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

Missing choose option in search field for radio type entries

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a database activity with a radio field with two options and a text field
      2. Go to the 'Templates' tab and save the default single template which is auto-generated (just click 'Save template', nothing else)
      3. Create two or more entries with same text in text field and different values in radio field
      4. Now, on the search tab, search for the text you entered, leaving the radio field set as 'Choose...'.
      5. Verify you see both entries returned in the search results
      Show
      Create a database activity with a radio field with two options and a text field Go to the 'Templates' tab and save the default single template which is auto-generated (just click 'Save template', nothing else) Create two or more entries with same text in text field and different values in radio field Now, on the search tab, search for the text you entered, leaving the radio field set as 'Choose...'. Verify  you see both entries returned in the search results
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-60114_35_radio-option-choose
    • Pull Master Branch:
      MDL-60114_master_radio-option-choose

      Description

      If you create a Radio button field for your database entries, there is no option "choosedots" anymore. In the past this was the case before resolving the issue -MDL-56725-, which sets the html_writer::select parameter explicitely to null.

      As a consequence of this, you might not be able to set a filter for the database items, without using one of the options of the radio field.

      Example: Database uses a text field for name and a Radio field for gender (m/w). As there is no neutral option for gender, you cannot filter all the persons with name = Smith, despite they are men or women.

      Maybe I missed the intention of the change, but we ran in trouble with existing database activity instances on our moodle site, so it might be worth to think about a change?

      Possible solution: Replace null with choosedot array like the default parameter in html_writer::select() method.

      Replication Steps:

      1. Create a database activity with a radio field with two options and a text field
      2. Create two or more entries with same text in text field and different values in radio field
      3. Try to search for this name

      Your are not able to search for all entries  with same name, when they have different values in radio field.

       

       

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m