2023-05-17 21:19:14 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-19 16:46:30 +02:00
<XMLDB PATH= "local/treestudyplan/db" VERSION= "20240415" COMMENT= "XMLDB file for Moodle local/treestudyplan"
2023-05-17 21:19:14 +02:00
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES >
<TABLE NAME= "local_treestudyplan_invit" COMMENT= "Invitations to view report card" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "user_id" TYPE= "int" LENGTH= "10" NOTNULL= "false" SEQUENCE= "false" COMMENT= "ID of user to view report of" />
<FIELD NAME= "name" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" COMMENT= "Name or description of invite recipient" />
<FIELD NAME= "email" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" COMMENT= "email address the invite was sent to" />
<FIELD NAME= "invitekey" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" COMMENT= "Invitation key for this invite" />
2023-08-09 09:48:06 +02:00
<FIELD NAME= "idate" TYPE= "int" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" COMMENT= "Date the invite was created" />
2023-05-17 21:19:14 +02:00
<FIELD NAME= "allow_details" TYPE= "int" LENGTH= "2" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "allow_calendar" TYPE= "int" LENGTH= "2" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "allow_badges" TYPE= "int" LENGTH= "2" NOTNULL= "false" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "user_id-id" TYPE= "foreign" FIELDS= "user_id" REFTABLE= "user" REFFIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan" COMMENT= "Table" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "name" TYPE= "text" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "shortname" TYPE= "text" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "description" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
2023-10-23 21:54:09 +02:00
<FIELD NAME= "descriptionformat" TYPE= "int" LENGTH= "4" NOTNULL= "true" DEFAULT= "1" SEQUENCE= "false" />
2023-08-09 09:48:06 +02:00
<FIELD NAME= "idnumber" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
2023-05-17 21:19:14 +02:00
<FIELD NAME= "aggregation" TYPE= "char" LENGTH= "30" NOTNULL= "true" DEFAULT= "bistate" SEQUENCE= "false" />
<FIELD NAME= "aggregation_config" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "context_id" TYPE= "int" LENGTH= "10" NOTNULL= "false" SEQUENCE= "false" />
2023-06-27 07:33:27 +02:00
<FIELD NAME= "csync_flag" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "1" SEQUENCE= "false" COMMENT= "Flags the studyplan as needing a csync update" />
2024-03-09 23:29:58 +01:00
<FIELD NAME= "suspended" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
2024-04-19 16:46:30 +02:00
<FIELD NAME= "template" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
2023-05-17 21:19:14 +02:00
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_user" COMMENT= "Table" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "user_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "studyplan_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "user_id-id" TYPE= "foreign" FIELDS= "user_id" REFTABLE= "user" REFFIELDS= "id" />
<KEY NAME= "studyplan_id-id" TYPE= "foreign" FIELDS= "studyplan_id" REFTABLE= "local_treestudyplan" REFFIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_cohort" COMMENT= "Table" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "studyplan_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "cohort_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_line" COMMENT= "Table" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
2023-07-19 14:50:05 +02:00
<FIELD NAME= "page_id" TYPE= "int" LENGTH= "20" NOTNULL= "true" SEQUENCE= "false" />
2023-05-17 21:19:14 +02:00
<FIELD NAME= "name" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "shortname" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "color" TYPE= "char" LENGTH= "12" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "sequence" TYPE= "int" LENGTH= "18" NOTNULL= "false" SEQUENCE= "false" />
2024-02-25 23:45:39 +01:00
<FIELD NAME= "enrollable" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" COMMENT= "Let's student enroll in a study plan line, only after which the line is active for this user." />
<FIELD NAME= "enrolrole" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" COMMENT= "Roles allowed to enrol a student in this course (in the studyplan context)" />
2023-05-17 21:19:14 +02:00
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
2023-07-19 14:50:05 +02:00
<KEY NAME= "page_id-id" TYPE= "foreign" FIELDS= "page_id" REFTABLE= "local_treestudyplan_page" REFFIELDS= "id" />
2023-05-17 21:19:14 +02:00
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_item" COMMENT= "Table" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "line_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "type" TYPE= "text" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "conditions" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "slot" TYPE= "int" LENGTH= "9" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "layer" TYPE= "int" LENGTH= "9" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "competency_id" TYPE= "int" LENGTH= "18" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "badge_id" TYPE= "int" LENGTH= "18" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "course_id" TYPE= "int" LENGTH= "18" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "continuation_id" TYPE= "int" LENGTH= "18" NOTNULL= "false" SEQUENCE= "false" />
2023-08-03 22:23:56 +02:00
<FIELD NAME= "span" TYPE= "int" LENGTH= "10" NOTNULL= "true" DEFAULT= "1" SEQUENCE= "false" />
2023-05-17 21:19:14 +02:00
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "competency_id-id" TYPE= "foreign" FIELDS= "competency_id" REFTABLE= "competency" REFFIELDS= "id" />
<KEY NAME= "badge_id-id" TYPE= "foreign" FIELDS= "badge_id" REFTABLE= "badge" REFFIELDS= "id" />
<KEY NAME= "course_id-id" TYPE= "foreign" FIELDS= "course_id" REFTABLE= "course" REFFIELDS= "id" />
<KEY NAME= "line_id-id" TYPE= "foreign" FIELDS= "line_id" REFTABLE= "local_treestudyplan_line" REFFIELDS= "id" />
<KEY NAME= "continuation_id-id" TYPE= "foreign" FIELDS= "continuation_id" REFTABLE= "local_treestudyplan_item" REFFIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_connect" COMMENT= "Table" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "from_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "to_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "from_id-id" TYPE= "foreign" FIELDS= "from_id" REFTABLE= "local_treestudyplan_item" REFFIELDS= "id" />
<KEY NAME= "to_id-id" TYPE= "foreign" FIELDS= "to_id" REFTABLE= "local_treestudyplan_item" REFFIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_gradeinc" COMMENT= "Information about whether or not to include grade_items as goals" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "grade_item_id" TYPE= "int" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "include" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
<FIELD NAME= "studyitem_id" TYPE= "int" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "required" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "grade_item_id-id" TYPE= "foreign" FIELDS= "grade_item_id" REFTABLE= "grade_item" REFFIELDS= "id" />
<KEY NAME= "studyitem_id-id" TYPE= "foreign" FIELDS= "studyitem_id" REFTABLE= "local_treestudyplan_item" REFFIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_gradecfg" COMMENT= "Stores grade configuration for scales et al." >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "scale_id" TYPE= "int" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "grade_points" TYPE= "int" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "min_completed" TYPE= "number" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" DECIMALS= "1" />
<FIELD NAME= "min_progress" TYPE= "number" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" DECIMALS= "1" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "scale_id-id" TYPE= "foreign" FIELDS= "scale_id" REFTABLE= "scale" REFFIELDS= "id" />
</KEYS>
</TABLE>
2023-06-30 13:12:19 +02:00
<TABLE NAME= "local_treestudyplan_teachers" COMMENT= "Caches the links between teachers and studyplans" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "20" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "teacher_id" TYPE= "int" LENGTH= "10" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "studyplan_id" TYPE= "int" LENGTH= "10" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "update_time" TYPE= "int" LENGTH= "10" NOTNULL= "false" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
</KEYS>
</TABLE>
2023-07-18 22:15:02 +02:00
<TABLE NAME= "local_treestudyplan_period" COMMENT= "Stores timing information about the different periods in a study plan page" >
<FIELDS >
2023-07-19 14:50:05 +02:00
<FIELD NAME= "id" TYPE= "int" LENGTH= "20" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "page_id" TYPE= "int" LENGTH= "20" NOTNULL= "false" SEQUENCE= "false" />
2023-07-18 22:15:02 +02:00
<FIELD NAME= "period" TYPE= "int" LENGTH= "10" NOTNULL= "false" SEQUENCE= "false" />
2023-07-19 14:50:05 +02:00
<FIELD NAME= "startdate" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "enddate" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
2023-07-18 22:15:02 +02:00
<FIELD NAME= "shortname" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "fullname" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
</FIELDS>
2023-07-19 14:50:05 +02:00
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "page_id-id" TYPE= "foreign" FIELDS= "page_id" REFTABLE= "local_treestudyplan_page" REFFIELDS= "id" />
</KEYS>
</TABLE>
<TABLE NAME= "local_treestudyplan_page" COMMENT= "Single page in a studyplan" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "20" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "studyplan_id" TYPE= "int" LENGTH= "20" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
<FIELD NAME= "periods" TYPE= "int" LENGTH= "10" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
<FIELD NAME= "fullname" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "shortname" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "description" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
2023-10-23 21:54:09 +02:00
<FIELD NAME= "descriptionformat" TYPE= "int" LENGTH= "4" NOTNULL= "true" DEFAULT= "1" SEQUENCE= "false" />
2023-07-19 14:50:05 +02:00
<FIELD NAME= "startdate" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "enddate" TYPE= "text" NOTNULL= "false" SEQUENCE= "false" />
</FIELDS>
2023-07-18 22:15:02 +02:00
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
</KEYS>
</TABLE>
2024-02-25 23:45:39 +01:00
<TABLE NAME= "local_treestudyplan_lineuser" COMMENT= "Default comment for the table, please edit me" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "line_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "user_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "timeenrolled" TYPE= "int" LENGTH= "12" NOTNULL= "false" SEQUENCE= "false" />
<FIELD NAME= "enrolled" TYPE= "int" LENGTH= "1" NOTNULL= "true" DEFAULT= "0" SEQUENCE= "false" />
<FIELD NAME= "enrolledby" TYPE= "int" LENGTH= "18" NOTNULL= "false" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "line_id-id" TYPE= "foreign" FIELDS= "line_id" REFTABLE= "local_treestudyplan_line" REFFIELDS= "id" />
<KEY NAME= "user_id-id" TYPE= "foreign" FIELDS= "user_id" REFTABLE= "user" REFFIELDS= "id" />
<KEY NAME= "enrolledby-id" TYPE= "foreign" FIELDS= "enrolledby" REFTABLE= "user" REFFIELDS= "id" />
</KEYS>
</TABLE>
2024-03-08 17:05:07 +01:00
<TABLE NAME= "local_treestudyplan_coach" COMMENT= "Default comment for the table, please edit me" >
<FIELDS >
<FIELD NAME= "id" TYPE= "int" LENGTH= "10" NOTNULL= "true" SEQUENCE= "true" />
<FIELD NAME= "user_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
<FIELD NAME= "studyplan_id" TYPE= "int" LENGTH= "18" NOTNULL= "true" SEQUENCE= "false" />
</FIELDS>
<KEYS >
<KEY NAME= "primary" TYPE= "primary" FIELDS= "id" />
<KEY NAME= "user_id-id" TYPE= "foreign" FIELDS= "user_id" REFTABLE= "user" REFFIELDS= "id" />
<KEY NAME= "studyplan_id-id" TYPE= "foreign" FIELDS= "studyplan_id" REFTABLE= "local_treestudyplan" REFFIELDS= "id" />
</KEYS>
</TABLE>
2023-05-17 21:19:14 +02:00
</TABLES>
</XMLDB>