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

Check for missing length in XMLDB_TYPE_FLOAT fields when decimals are specified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5, 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      While XMLDB_TYPE_FLOAT columns are supported but "deprecated" in favour of XMLDB_TYPE_NUMBER due to some DB, right now it's possible to edit them. Valid possibilities are:

      • both length and decimals empty.
      • length defined and decimals empty.
      • both length and decimals defined.

      This leaves out this combination:

      • length empty and decimals defined.

      That combination is properly checked in the XMLDB Editor... but now when the field is defined directly in XML files and loaded / executed (SQL error under MySQL)

      Add one check to the XML validator to look for those "missing length" definitions. Thanks to Penny (and her hackering) for detecting that.

      Ciao

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

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