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

checkbox field cannot be unchecked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6.9, 1.7.7, 1.8.8, 1.9.4
    • Fix Version/s: 1.9.5, 2.0
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      If I setup a checkbox, whether it has one or more options is not important.. When I create new record or edit record that no checkbox in that checkbox group was set, all checkboxes are unchecked as expected. If I check any on, the setting is saved.

      What I can't do is to uncheck again all checkboxes. After saving the record with all checkboxes unchecked, the last checked checkxbox comes back on. It seems that database module is unable to save checkbox content that is empty. It insists to have at least one entry saved, that is one checkbox checked.

      I don't know whether the data module should be saving empty field content in this case or whether unchecking all checkboxes should delete the checkbox entry from data_content table..

      In any case, this is a blocker for using checkbox field since the point of that field is not be on or off.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              howardsmiller Howard Miller
              Reporter:
              robek Robert Brenstein
              Tester:
              Petr Skoda Petr Skoda
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09