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

Creating menu field in a database activity with no options throws an error

    XMLWordPrintable

    Details

      Description

      Unfortunately the entries do not use moodle forms so you can't add validation before submitting the field entry easily.

      1. Create a database activity.
      2. Add a 'menu' field with no options.
      3. Go to add an entry you will get the following error - "Go to ‘Add entry’ and you get “Debug info: Argument 1 passed to html_writer::select() must be of the type array, null given, called in [dirroot]/mod/data/field/menu/field.class.php on line 50 and defined”"

        Attachments

          Activity

            People

            Assignee:
            markn Mark Nelson
            Reporter:
            markn Mark Nelson
            Peer reviewer:
            Adrian Greeve
            Integrator:
            Dan Poltawski
            Tester:
            Simey Lameze
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Jul/14