events and grades db fixes
This commit is contained in:
+6
-3
@@ -1192,7 +1192,9 @@
|
||||
<FIELD NAME="eventname" TYPE="char" LENGTH="166" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="name of the event, e.g. 'grade_added'" PREVIOUS="id" NEXT="handlermodule"/>
|
||||
<FIELD NAME="handlermodule" TYPE="char" LENGTH="166" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="e.g. moodle, mod/forum, block/rss_client" PREVIOUS="eventname" NEXT="handlerfile"/>
|
||||
<FIELD NAME="handlerfile" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" COMMENT="path to the file of the function, eg /grade/export/lib.php" PREVIOUS="handlermodule" NEXT="handlerfunction"/>
|
||||
<FIELD NAME="handlerfunction" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="serialized string or array describing function, suitable to be passed to call_user_func()" PREVIOUS="handlerfile"/>
|
||||
<FIELD NAME="handlerfunction" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="serialized string or array describing function, suitable to be passed to call_user_func()" PREVIOUS="handlerfile" NEXT="schedule"/>
|
||||
<FIELD NAME="schedule" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="'cron' or 'instant'." PREVIOUS="handlerfunction" NEXT="status"/>
|
||||
<FIELD NAME="status" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="number of failed attempts to process this handler" PREVIOUS="schedule"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me"/>
|
||||
@@ -1348,8 +1350,9 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" SEQUENCE="true" ENUM="false" COMMENT="id of the table, please edit me" NEXT="gradesid"/>
|
||||
<FIELD NAME="gradesid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="The exact grade in grade_grades_raw this corresponds to" PREVIOUS="id" NEXT="information"/>
|
||||
<FIELD NAME="information" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Further information like forum rating distribution 4/5/7/0/1" PREVIOUS="gradesid" NEXT="feedback"/>
|
||||
<FIELD NAME="feedback" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Manual feedback from the teacher. Could be a code like 'mi'." PREVIOUS="information" NEXT="timecreated"/>
|
||||
<FIELD NAME="information" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Further information like forum rating distribution 4/5/7/0/1" PREVIOUS="gradesid" NEXT="informationformat"/>
|
||||
<FIELD NAME="informationformat" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Text format for information" PREVIOUS="information" NEXT="feedback"/>
|
||||
<FIELD NAME="feedback" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Manual feedback from the teacher. Could be a code like 'mi'." PREVIOUS="informationformat" NEXT="timecreated"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" COMMENT="the time these entry was first created" PREVIOUS="feedback" NEXT="timemodified"/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" ENUM="false" COMMENT="the time this entry was last updated" PREVIOUS="timecreated" NEXT="usermodified"/>
|
||||
<FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" ENUM="false" COMMENT="the userid of the person who last modified this entry" PREVIOUS="timemodified"/>
|
||||
|
||||
@@ -1114,6 +1114,33 @@ function xmldb_main_upgrade($oldversion=0) {
|
||||
$result = $result && add_field($table, $field);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2007043001) {
|
||||
|
||||
/// Define field informationformat to be added to grade_grades_text
|
||||
$table = new XMLDBTable('grade_grades_text');
|
||||
$field = new XMLDBField('informationformat');
|
||||
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null, null, '0', 'information');
|
||||
|
||||
/// Launch add field informationformat
|
||||
$result = $result && add_field($table, $field);
|
||||
|
||||
/// Define field schedule to be added to events_handlers
|
||||
$table = new XMLDBTable('events_handlers');
|
||||
$field = new XMLDBField('schedule');
|
||||
$field->setAttributes(XMLDB_TYPE_CHAR, '255', null, null, null, null, null, null, 'handlerfunction');
|
||||
|
||||
/// Launch add field schedule
|
||||
$result = $result && add_field($table, $field);
|
||||
|
||||
/// Define field status to be added to events_handlers
|
||||
$table = new XMLDBTable('events_handlers');
|
||||
$field = new XMLDBField('status');
|
||||
$field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'schedule');
|
||||
|
||||
/// Launch add field status
|
||||
$result = $result && add_field($table, $field);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2007043000; // YYYYMMDD = date
|
||||
$version = 2007043001; // YYYYMMDD = date
|
||||
// XY = increments within a single day
|
||||
|
||||
$release = '1.9 dev'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user