-
Improvement
-
Resolution: Won't Fix
-
Minor
-
None
-
1.7
-
None
-
Any
-
MOODLE_17_STABLE
Enumerations are currently specified by adding ENUM="true" and ENUMVALUE="..."
This introduces a whole new level of quoting special characters and syntax for specifying values for the enumeration
Perhaps instead you could specify the values in XML such as ...
<FIELD NAME="stattype" TYPE="char" LENGTH="20" NOTNULL="true" DEFAULT="activity" SEQUENCE="false" ENUM="true" COMMENT="type of stat">
<ENUMVALUE>value 1</ENUMVALUE>
<ENUMVALUE>value 2</ENUMVALUE>
<ENUMVALUE>value 3</ENUMVALUE>
</FIELD>
or
<FIELD NAME="stattype" TYPE="char" LENGTH="20" NOTNULL="true" DEFAULT="activity" SEQUENCE="false" ENUM="true" COMMENT="type of stat">
<ENUMVALUE value="value 1" />
<ENUMVALUE value="value 2" />
<ENUMVALUE value="value 3" />
</FIELD>
This would remove any doubt when trying to insert special characters into an enum field because the user would just write valid XML.
- has a non-specific relationship to
-
MDL-29514 remove enum support from DDL
-
- Closed
-