2007-01-04 13:15:04 +13:00
<?xml version="1.0" encoding="UTF-8" ?>
2007-01-21 23:37:54 +00:00
<XMLDB PATH= "group/db" VERSION= "20070122" COMMENT= "XMLDB file for Moodle groups."
2007-01-04 13:15:04 +13:00
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
<TABLES >
2007-01-22 17:50:42 +00:00
<TABLE NAME= "groups" COMMENT= "Each record represents a group." NEXT= "groups_groupings" >
2007-01-04 13:15:04 +13:00
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" ENUM= "false" NEXT= "name" />
<FIELD NAME= "name" TYPE= "char" LENGTH= "254" NOTNULL= "true" SEQUENCE= "false" ENUM= "false" COMMENT= "Short human readable unique name for the group." PREVIOUS= "id" NEXT= "description" />
2007-01-20 18:59:22 +00:00
<FIELD NAME= "description" TYPE= "text" LENGTH= "small" NOTNULL= "false" SEQUENCE= "false" ENUM= "false" PREVIOUS= "name" NEXT= "enrolmentkey" />
<FIELD NAME= "enrolmentkey" TYPE= "char" LENGTH= "50" NOTNULL= "true" SEQUENCE= "false" ENUM= "false" PREVIOUS= "description" NEXT= "lang" />
2007-01-21 23:37:54 +00:00
<FIELD NAME= "lang" TYPE= "char" LENGTH= "30" NOTNULL= "true" DEFAULT= "en" SEQUENCE= "false" ENUM= "false" PREVIOUS= "enrolmentkey" NEXT= "theme" />
2007-01-20 18:59:22 +00:00
<FIELD NAME= "theme" TYPE= "char" LENGTH= "50" NOTNULL= "true" SEQUENCE= "false" ENUM= "false" PREVIOUS= "lang" NEXT= "picture" />
2007-01-04 13:15:04 +13:00
<FIELD NAME= "picture" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "theme" NEXT= "hidepicture" />
<FIELD NAME= "hidepicture" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "picture" NEXT= "timecreated" />
<FIELD NAME= "timecreated" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "hidepicture" NEXT= "timemodified" />
<FIELD NAME= "timemodified" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "timecreated" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" COMMENT= "Primary key for groups" />
</KEYS>
</TABLE>
2007-01-22 17:50:42 +00:00
<TABLE NAME= "groups_groupings" COMMENT= "A grouping is a collection of groups." PREVIOUS= "groups" NEXT= "groups_members" >
2007-01-04 13:15:04 +13:00
<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= "name" />
<FIELD NAME= "name" TYPE= "char" LENGTH= "255" NOTNULL= "true" SEQUENCE= "false" ENUM= "false" COMMENT= "Short human readable unique name for group." PREVIOUS= "id" NEXT= "description" />
2007-01-20 18:59:22 +00:00
<FIELD NAME= "description" TYPE= "text" LENGTH= "small" NOTNULL= "false" SEQUENCE= "false" ENUM= "false" PREVIOUS= "name" NEXT= "timecreated" />
2007-01-04 13:15:04 +13:00
<FIELD NAME= "timecreated" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "description" NEXT= "viewowngroup" />
<FIELD NAME= "viewowngroup" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "1" SEQUENCE= "false" ENUM= "false" PREVIOUS= "timecreated" NEXT= "viewallgroupsmembers" />
<FIELD NAME= "viewallgroupsmembers" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "viewowngroup" NEXT= "viewallgroupsactivities" />
<FIELD NAME= "viewallgroupsactivities" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "viewallgroupsmembers" NEXT= "teachersgroupmark" />
<FIELD NAME= "teachersgroupmark" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "viewallgroupsactivities" NEXT= "teachersgroupview" />
<FIELD NAME= "teachersgroupview" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "teachersgroupmark" NEXT= "teachersoverride" />
<FIELD NAME= "teachersoverride" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "teachersgroupview" NEXT= "teacherdeletable" />
<FIELD NAME= "teacherdeletable" TYPE= "int" LENGTH= "1" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "teachersoverride" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" COMMENT= "Primary key for groups_groupings" />
</KEYS>
</TABLE>
2007-01-22 17:50:42 +00:00
<TABLE NAME= "groups_members" COMMENT= "Link a user to a group." PREVIOUS= "groups_groupings" NEXT= "groups_courses_groups" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "true" ENUM= "false" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "id" NEXT= "userid" />
<FIELD NAME= "userid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "groupid" NEXT= "timeadded" />
<FIELD NAME= "timeadded" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "userid" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" COMMENT= "Primary key for groups_members" NEXT= "groupid" />
<KEY NAME= "groupid" TYPE= "foreign" FIELDS= "groupid" REFTABLE= "groups" REFFIELDS= "id" PREVIOUS= "primary" NEXT= "userid" />
<KEY NAME= "userid" TYPE= "foreign" FIELDS= "userid" REFTABLE= "user" REFFIELDS= "id" PREVIOUS= "groupid" />
</KEYS>
<INDEXES >
<INDEX NAME= "groupid-courseid" UNIQUE= "true" FIELDS= "groupid, userid" />
</INDEXES>
</TABLE>
<TABLE NAME= "groups_courses_groups" COMMENT= "Link a group to a course (or the site)." PREVIOUS= "groups_members" NEXT= "groups_courses_groupings" >
2007-01-04 13:15:04 +13:00
<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= "courseid" />
<FIELD NAME= "courseid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "id" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "false" ENUM= "false" COMMENT= "Default comment for the field, please edit me" PREVIOUS= "courseid" />
</FIELDS>
<KEYS >
2007-01-22 17:50:42 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" COMMENT= "Primary key for groups_courses_groups" NEXT= "courseid" />
<KEY NAME= "courseid" TYPE= "foreign" FIELDS= "courseid" REFTABLE= "course" REFFIELDS= "id" PREVIOUS= "primary" NEXT= "groupid" />
<KEY NAME= "groupid" TYPE= "foreign" FIELDS= "groupid" REFTABLE= "groups" REFFIELDS= "id" PREVIOUS= "courseid" />
2007-01-04 13:15:04 +13:00
</KEYS>
2007-01-22 17:50:42 +00:00
<INDEXES >
<INDEX NAME= "courseid-groupid" UNIQUE= "true" FIELDS= "courseid, groupid" />
</INDEXES>
2007-01-04 13:15:04 +13:00
</TABLE>
<TABLE NAME= "groups_courses_groupings" COMMENT= "Link a grouping to a course (or the site)." PREVIOUS= "groups_courses_groups" NEXT= "groups_groupings_groups" >
<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= "courseid" />
<FIELD NAME= "courseid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "id" NEXT= "groupingid" />
<FIELD NAME= "groupingid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "false" ENUM= "false" PREVIOUS= "courseid" />
</FIELDS>
<KEYS >
2007-01-22 17:50:42 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" COMMENT= "Primary key for groups_courses_groupings" NEXT= "courseid" />
<KEY NAME= "courseid" TYPE= "foreign" FIELDS= "courseid" REFTABLE= "course" REFFIELDS= "id" PREVIOUS= "primary" NEXT= "groupingid" />
<KEY NAME= "groupingid" TYPE= "foreign" FIELDS= "groupingid" REFTABLE= "groups_groupings" REFFIELDS= "id" PREVIOUS= "courseid" />
2007-01-04 13:15:04 +13:00
</KEYS>
2007-01-22 17:50:42 +00:00
<INDEXES >
<INDEX NAME= "courseid-groupingid" UNIQUE= "true" FIELDS= "courseid, groupingid" />
</INDEXES>
2007-01-04 13:15:04 +13:00
</TABLE>
<TABLE NAME= "groups_groupings_groups" COMMENT= "Link a group to a grouping." PREVIOUS= "groups_courses_groupings" >
<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= "groupingid" />
<FIELD NAME= "groupingid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "id" NEXT= "groupid" />
<FIELD NAME= "groupid" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" SEQUENCE= "false" ENUM= "false" PREVIOUS= "groupingid" NEXT= "timeadded" />
<FIELD NAME= "timeadded" TYPE= "int" LENGTH= "10" NOTNULL= "true" UNSIGNED= "true" DEFAULT= "0" SEQUENCE= "false" ENUM= "false" PREVIOUS= "groupid" />
</FIELDS>
<KEYS >
2007-01-22 17:50:42 +00:00
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" COMMENT= "Primary key for groups_groupings_groups" NEXT= "groupingid" />
<KEY NAME= "groupingid" TYPE= "foreign" FIELDS= "groupingid" REFTABLE= "groups_groupings" REFFIELDS= "id" PREVIOUS= "primary" NEXT= "groupid" />
<KEY NAME= "groupid" TYPE= "foreign" FIELDS= "groupid" REFTABLE= "groups" REFFIELDS= "id" PREVIOUS= "groupingid" />
2007-01-04 13:15:04 +13:00
</KEYS>
2007-01-22 17:50:42 +00:00
<INDEXES >
<INDEX NAME= "groupingid-groupid" UNIQUE= "true" FIELDS= "groupingid, groupid" />
</INDEXES>
2007-01-04 13:15:04 +13:00
</TABLE>
</TABLES>
<STATEMENTS >
<STATEMENT NAME= "insert log_display" TYPE= "insert" TABLE= "log_display" COMMENT= "Initial insert of records on table log_display" >
<SENTENCES >
<SENTENCE TEXT= "(module, action, mtable, field) VALUES ('group', 'view', 'groups', 'name')" />
</SENTENCES>
</STATEMENT>
</STATEMENTS>
2007-01-20 18:59:22 +00:00
</XMLDB>