MDL-22787 The screen with available courses on a remote host in Remote enrolment...
[moodle.git] / mnet / service / enrol / db / install.xml
CommitLineData
481f0e15
DM
1<?xml version="1.0" encoding="UTF-8" ?>
2<XMLDB PATH="mnet/service/enrol/db" VERSION="20100716" COMMENT="XMLDB file for MNet service plugin mnet/service/enrol"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
5>
6 <TABLES>
7 <TABLE NAME="mnetservice_enrol_courses" COMMENT="Caches the information fetched via XML-RPC about courses on remote hosts that are offered for our users" NEXT="mnetservice_enrol_enrolments">
8 <FIELDS>
9 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" COMMENT="Unique remote-course ID" NEXT="hostid"/>
10 <FIELD NAME="hostid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="The id of the remote MNet host" PREVIOUS="id" NEXT="remoteid"/>
11 <FIELD NAME="remoteid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="ID of course on its home server" PREVIOUS="hostid" NEXT="categoryid"/>
12 <FIELD NAME="categoryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="The id of the category on the remote server" PREVIOUS="remoteid" NEXT="categoryname"/>
13 <FIELD NAME="categoryname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="categoryid" NEXT="sortorder"/>
14 <FIELD NAME="sortorder" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="categoryname" NEXT="fullname"/>
15 <FIELD NAME="fullname" TYPE="char" LENGTH="254" NOTNULL="true" SEQUENCE="false" PREVIOUS="sortorder" NEXT="shortname"/>
16 <FIELD NAME="shortname" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" PREVIOUS="fullname" NEXT="idnumber"/>
17 <FIELD NAME="idnumber" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" PREVIOUS="shortname" NEXT="summary"/>
18 <FIELD NAME="summary" TYPE="text" LENGTH="medium" NOTNULL="true" SEQUENCE="false" PREVIOUS="idnumber" NEXT="summaryformat"/>
19 <FIELD NAME="summaryformat" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Format of the summary field" PREVIOUS="summary" NEXT="startdate"/>
20 <FIELD NAME="startdate" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="summaryformat" NEXT="roleid"/>
21 <FIELD NAME="roleid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="The ID of the role at the remote server that our users will get when we enrol them there" PREVIOUS="startdate" NEXT="rolename"/>
22 <FIELD NAME="rolename" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the role at the remote server that our users will get when we enrol them there" PREVIOUS="roleid"/>
23 </FIELDS>
24 <KEYS>
25 <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the mnet_course table"/>
26 </KEYS>
27 <INDEXES>
28 <INDEX NAME="uq_hostid_remoteid" UNIQUE="true" FIELDS="hostid, remoteid" COMMENT="The id of the course on its host must be unique"/>
29 </INDEXES>
30 </TABLE>
31 <TABLE NAME="mnetservice_enrol_enrolments" COMMENT="Caches the information about enrolments of our local users in courses on remote hosts" PREVIOUS="mnetservice_enrol_courses">
32 <FIELDS>
33 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" COMMENT="Unique enrollment ID" NEXT="hostid"/>
34 <FIELD NAME="hostid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="ID of the remote MNet host" PREVIOUS="id" NEXT="userid"/>
35 <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="ID of our local user on this server" PREVIOUS="hostid" NEXT="remotecourseid"/>
36 <FIELD NAME="remotecourseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="ID of the course at the remote server. Note that this may and may not be cached in our mnetservice_enrol_courses table, depends of whether the course is opened for remote enrolments or our student is the enrolled there via other plugin" PREVIOUS="userid" NEXT="rolename"/>
37 <FIELD NAME="rolename" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="remotecourseid" NEXT="enroltime"/>
38 <FIELD NAME="enroltime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="rolename" NEXT="enroltype"/>
39 <FIELD NAME="enroltype" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the enrol plugin at the remote server that was used to enrol our student into their course" PREVIOUS="enroltime"/>
40 </FIELDS>
41 <KEYS>
42 <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the mnet_enrol_assignments table" NEXT="fk_user"/>
43 <KEY NAME="fk_user" TYPE="foreign" FIELDS="userid" REFTABLE="user" REFFIELDS="id" PREVIOUS="primary" NEXT="fk_mnet_host"/>
44 <KEY NAME="fk_mnet_host" TYPE="foreign" FIELDS="hostid" REFTABLE="mnet_host" REFFIELDS="id" PREVIOUS="fk_user"/>
45 </KEYS>
46 </TABLE>
47 </TABLES>
48</XMLDB>