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

Old code used when listed the fields in a database resource

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a database activity.
      2. Click on the "Fields" tab and add each of the different fields.
      3. The table with all of the fields that you have added should have correct strings for the field type. Incorrect names means that there is a warning that a string has not been defined.
      Show
      Create a database activity. Click on the "Fields" tab and add each of the different fields. The table with all of the fields that you have added should have correct strings for the field type. Incorrect names means that there is a warning that a string has not been defined.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:

      Description

      In file: mod/data/field.php line 299 approx.

      When is write the fields list, it is used de get_string function in order to get the type name. It is a problem for the custom plugins. Now exists the "name" method for it.

      The wrong/old code is:

      get_string($field->type, 'data')
      

      The correct code is:

      $field->name()
      

        Attachments

          Activity

            People

            Assignee:
            abgreeve Adrian Greeve
            Reporter:
            cirano David Herney Bernal
            Peer reviewer:
            Jun Pataleta
            Integrator:
            Dan Poltawski
            Tester:
            John Okely
            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/Nov/16