1 <?xml version=
"1.0" encoding=
"UTF-8" ?>
2 <XMLDB PATH=
"mod/attendance/db" VERSION=
"20170620" COMMENT=
"XMLDB file for Moodle mod/attendance"
3 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance"
4 xsi:
noNamespaceSchemaLocation=
"../../../lib/xmldb/xmldb.xsd"
7 <TABLE NAME=
"attendance" COMMENT=
"Attendance module table">
9 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true" COMMENT=
"id of the table, please edit me"/>
10 <FIELD NAME=
"course" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
11 <FIELD NAME=
"name" TYPE=
"char" LENGTH=
"255" NOTNULL=
"false" SEQUENCE=
"false"/>
12 <FIELD NAME=
"grade" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"100" SEQUENCE=
"false" COMMENT=
"This is maximum grade for instance"/>
13 <FIELD NAME=
"timemodified" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" COMMENT=
"The time the settings for this attendance instance were last modified."/>
14 <FIELD NAME=
"intro" TYPE=
"text" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"This field is a requirement for activity modules."/>
15 <FIELD NAME=
"introformat" TYPE=
"int" LENGTH=
"4" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" COMMENT=
"This field is a requirement for activity modules."/>
16 <FIELD NAME=
"subnet" TYPE=
"char" LENGTH=
"255" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"Default subnet used when creating sessions."/>
17 <FIELD NAME=
"sessiondetailspos" TYPE=
"char" LENGTH=
"5" NOTNULL=
"true" DEFAULT=
"left" SEQUENCE=
"false" COMMENT=
"Position for the session detail columns related to summary columns."/>
18 <FIELD NAME=
"showsessiondetails" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"1" SEQUENCE=
"false" COMMENT=
"Define if session details should be shown in reports."/>
19 <FIELD NAME=
"showextrauserdetails" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"1" SEQUENCE=
"false" COMMENT=
"Define if extra user details should be shown in reports."/>
22 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id" COMMENT=
"Primary key for attendance"/>
25 <INDEX NAME=
"course" UNIQUE=
"false" FIELDS=
"course"/>
28 <TABLE NAME=
"attendance_sessions" COMMENT=
"attendance_sessions table">
30 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true"/>
31 <FIELD NAME=
"attendanceid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
32 <FIELD NAME=
"groupid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
33 <FIELD NAME=
"sessdate" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
34 <FIELD NAME=
"duration" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
35 <FIELD NAME=
"lasttaken" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false"/>
36 <FIELD NAME=
"lasttakenby" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
37 <FIELD NAME=
"timemodified" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false"/>
38 <FIELD NAME=
"description" TYPE=
"text" NOTNULL=
"true" SEQUENCE=
"false"/>
39 <FIELD NAME=
"descriptionformat" TYPE=
"int" LENGTH=
"2" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
40 <FIELD NAME=
"studentscanmark" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
41 <FIELD NAME=
"autoassignstatus" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
42 <FIELD NAME=
"studentpassword" TYPE=
"char" LENGTH=
"50" NOTNULL=
"false" DEFAULT=
"" SEQUENCE=
"false"/>
43 <FIELD NAME=
"subnet" TYPE=
"char" LENGTH=
"255" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"Restrict ability for students to mark by subnet."/>
44 <FIELD NAME=
"automark" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
45 <FIELD NAME=
"automarkcompleted" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
46 <FIELD NAME=
"statusset" TYPE=
"int" LENGTH=
"5" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" COMMENT=
"Which set of statuses to use"/>
47 <FIELD NAME=
"absenteereport" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"1" SEQUENCE=
"false"/>
48 <FIELD NAME=
"preventsharedip" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"1" SEQUENCE=
"false"/>
49 <FIELD NAME=
"preventsharediptime" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false"/>
50 <FIELD NAME=
"caleventid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
53 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id" COMMENT=
"Primary key for attendance_sessions"/>
56 <INDEX NAME=
"attendanceid" UNIQUE=
"false" FIELDS=
"attendanceid"/>
57 <INDEX NAME=
"groupid" UNIQUE=
"false" FIELDS=
"groupid"/>
58 <INDEX NAME=
"sessdate" UNIQUE=
"false" FIELDS=
"sessdate"/>
59 <INDEX NAME=
"caleventid" UNIQUE=
"false" FIELDS=
"caleventid"/>
62 <TABLE NAME=
"attendance_log" COMMENT=
"attendance_log table retrofitted from MySQL">
64 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true"/>
65 <FIELD NAME=
"sessionid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
66 <FIELD NAME=
"studentid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
67 <FIELD NAME=
"statusid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" COMMENT=
"link with attendance_status table"/>
68 <FIELD NAME=
"statusset" TYPE=
"char" LENGTH=
"100" NOTNULL=
"false" SEQUENCE=
"false"/>
69 <FIELD NAME=
"timetaken" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" COMMENT=
"When attendance of this student was taken"/>
70 <FIELD NAME=
"takenby" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
71 <FIELD NAME=
"remarks" TYPE=
"char" LENGTH=
"255" NOTNULL=
"false" SEQUENCE=
"false"/>
72 <FIELD NAME=
"ipaddress" TYPE=
"char" LENGTH=
"45" NOTNULL=
"false" SEQUENCE=
"false"/>
75 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id" COMMENT=
"Primary key for attendance_log"/>
78 <INDEX NAME=
"sessionid" UNIQUE=
"false" FIELDS=
"sessionid"/>
79 <INDEX NAME=
"studentid" UNIQUE=
"false" FIELDS=
"studentid"/>
80 <INDEX NAME=
"statusid" UNIQUE=
"false" FIELDS=
"statusid"/>
83 <TABLE NAME=
"attendance_statuses" COMMENT=
"attendance_statuses table retrofitted from MySQL">
85 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true"/>
86 <FIELD NAME=
"attendanceid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
87 <FIELD NAME=
"acronym" TYPE=
"char" LENGTH=
"2" NOTNULL=
"true" SEQUENCE=
"false"/>
88 <FIELD NAME=
"description" TYPE=
"char" LENGTH=
"30" NOTNULL=
"true" SEQUENCE=
"false"/>
89 <FIELD NAME=
"grade" TYPE=
"number" LENGTH=
"5" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" DECIMALS=
"2"/>
90 <FIELD NAME=
"studentavailability" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"How many minutes this status is available when self marking is enabled."/>
91 <FIELD NAME=
"setunmarked" TYPE=
"int" LENGTH=
"2" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"Set this status if unmarked at end of session."/>
92 <FIELD NAME=
"visible" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"1" SEQUENCE=
"false"/>
93 <FIELD NAME=
"deleted" TYPE=
"int" LENGTH=
"1" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false"/>
94 <FIELD NAME=
"setnumber" TYPE=
"int" LENGTH=
"5" NOTNULL=
"true" DEFAULT=
"0" SEQUENCE=
"false" COMMENT=
"Allows different sets of statuses to be allocated to different sessions"/>
97 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id" COMMENT=
"Primary key for attendance_settings"/>
100 <INDEX NAME=
"attendanceid" UNIQUE=
"false" FIELDS=
"attendanceid"/>
101 <INDEX NAME=
"visible" UNIQUE=
"false" FIELDS=
"visible"/>
102 <INDEX NAME=
"deleted" UNIQUE=
"false" FIELDS=
"deleted"/>
105 <TABLE NAME=
"attendance_tempusers" COMMENT=
"Stores temporary users details">
107 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true"/>
108 <FIELD NAME=
"studentid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"student id"/>
109 <FIELD NAME=
"courseid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"course id"/>
110 <FIELD NAME=
"fullname" TYPE=
"char" LENGTH=
"100" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"temp user fullname"/>
111 <FIELD NAME=
"email" TYPE=
"char" LENGTH=
"100" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"temporary user email"/>
112 <FIELD NAME=
"created" TYPE=
"int" LENGTH=
"10" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"unix timestamp for temp user creation"/>
115 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id"/>
118 <INDEX NAME=
"courseid" UNIQUE=
"false" FIELDS=
"courseid"/>
119 <INDEX NAME=
"studentid" UNIQUE=
"true" FIELDS=
"studentid"/>
122 <TABLE NAME=
"attendance_warning" COMMENT=
"Warning configuration">
124 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true"/>
125 <FIELD NAME=
"idnumber" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"attendance id or other id relating to this warning."/>
126 <FIELD NAME=
"warningpercent" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Percentage that triggers this warning."/>
127 <FIELD NAME=
"warnafter" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Start warning after this number of taken sessions."/>
128 <FIELD NAME=
"maxwarn" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Maximum number of warnings to send."/>
129 <FIELD NAME=
"emailuser" TYPE=
"int" LENGTH=
"4" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Should the user be notified at this level."/>
130 <FIELD NAME=
"emailsubject" TYPE=
"char" LENGTH=
"255" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Email subject line for emails going to user"/>
131 <FIELD NAME=
"emailcontent" TYPE=
"text" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"The html-formatted text that should be sent to the user"/>
132 <FIELD NAME=
"emailcontentformat" TYPE=
"int" LENGTH=
"4" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Format of the emailcontent field"/>
133 <FIELD NAME=
"thirdpartyemails" TYPE=
"text" NOTNULL=
"false" SEQUENCE=
"false" COMMENT=
"list of extra users to receive warnings"/>
136 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id"/>
137 <KEY NAME=
"level_id" TYPE=
"unique" FIELDS=
"idnumber, warningpercent, warnafter"/>
140 <TABLE NAME=
"attendance_warning_done" COMMENT=
"Warnings processed">
142 <FIELD NAME=
"id" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"true"/>
143 <FIELD NAME=
"notifyid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"id of warning"/>
144 <FIELD NAME=
"userid" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"user id of user"/>
145 <FIELD NAME=
"timesent" TYPE=
"int" LENGTH=
"10" NOTNULL=
"true" SEQUENCE=
"false" COMMENT=
"Time warning sent to user."/>
148 <KEY NAME=
"primary" TYPE=
"primary" FIELDS=
"id"/>
151 <INDEX NAME=
"notifyid_userid" UNIQUE=
"false" FIELDS=
"notifyid, userid"/>