<FIELD NAME="aggregationcoef" TYPE="number" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" DECIMALS="5" COMMENT="Aggregation coefficient used for category weights or other aggregation types" PREVIOUS="plusfactor" NEXT="sortorder"/>
<FIELD NAME="sortorder" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Sorting order of the columns" PREVIOUS="aggregationcoef" NEXT="display"/>
<FIELD NAME="display" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="-1" SEQUENCE="false" ENUM="false" COMMENT="Display as real grades, percentages (in reference to the minimum and maximum grades) or letters (A, B, C etc..), or course default (-1)" PREVIOUS="sortorder" NEXT="decimals"/>
- <FIELD NAME="decimals" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="2" SEQUENCE="false" ENUM="false" COMMENT="Also known as precision, the number of digits after the decimal point symbol." PREVIOUS="display" NEXT="hidden"/>
+ <FIELD NAME="decimals" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="Also known as precision, the number of digits after the decimal point symbol." PREVIOUS="display" NEXT="hidden"/>
<FIELD NAME="hidden" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="1 is hidden, &gt; 1 is a date to hide until (prevents viewing)" PREVIOUS="decimals" NEXT="locked"/>
<FIELD NAME="locked" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="1 is locked, &gt; 1 is a date to lock until (prevents update)" PREVIOUS="hidden" NEXT="locktime"/>
<FIELD NAME="locktime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="lock all final grades after this date" PREVIOUS="locked" NEXT="needsupdate"/>
$result = $result && add_field($table, $field);
}
+ if ($result && $oldversion < 2007092501) {
+
+ /// Changing the default of field decimals on table grade_items to drop it
+ $table = new XMLDBTable('grade_items');
+ $field = new XMLDBField('decimals');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, null, null, null, 'display');
+
+ /// Launch change of default for field decimals
+ $result = $result && change_field_default($table, $field);
+ }
+ if ($result && $oldversion < 2007092501) {
+
+ /// Changing nullability of field decimals on table grade_items to null
+ $table = new XMLDBTable('grade_items');
+ $field = new XMLDBField('decimals');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, null, null, null, 'display');
+
+ /// Launch change of nullability for field decimals
+ $result = $result && change_field_notnull($table, $field);
+ }
+
/*
/// drop old gradebook tables
if ($result && $oldversion < xxxxxxxx) {
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007092500; // YYYYMMDD = date
+ $version = 2007092501; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 Beta +'; // Human-friendly version name