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

Menu field type in the Database activity allows empty options list.

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE

      Description

      In the database activity, a field of menu type with no options provided causes "Catchable error, must be fixed by programmer", when trying to add an entry.
      Reproduce the problem:
      1. Create database activity
      2. Add a field of "Menu" or "Menu (multiselect)" type leaving options list empty.
      3. Add a new entry.
      This will result with the error.

      To resolve this issue, Options list must be a required field in Menu field settings.

      Adrian - I also noticed that while creating a checkbox or radiobutton with no options doesn't display an error, it also should be fixed so that some options are mandatory.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              vbalsys Vaidas Balsys
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: