1 <?xml version="1.0" encoding="UTF-8" ?>
2 <XMLDB PATH="mod/survey/db" VERSION="20060812" COMMENT="XMLDB file for Moodle mod/survey">
4 <TABLE NAME="survey" COMMENT="Each record is one SURVEY module with its configuration" NEXT="survey_questions">
6 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="course"/>
7 <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="template"/>
8 <FIELD NAME="template" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="days"/>
9 <FIELD NAME="days" TYPE="int" LENGTH="6" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="template" NEXT="timecreated"/>
10 <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="days" NEXT="timemodified"/>
11 <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="name"/>
12 <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="intro"/>
13 <FIELD NAME="intro" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="questions"/>
14 <FIELD NAME="questions" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="intro"/>
17 <KEY NAME="primary" TYPE="primary" FIELDS="id" />
20 <INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
23 <TABLE NAME="survey_questions" COMMENT="the questions conforming one survey" PREVIOUS="survey" NEXT="survey_answers">
25 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="text"/>
26 <FIELD NAME="text" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="shorttext"/>
27 <FIELD NAME="shorttext" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="text" NEXT="multi"/>
28 <FIELD NAME="multi" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="shorttext" NEXT="intro"/>
29 <FIELD NAME="intro" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="multi" NEXT="type"/>
30 <FIELD NAME="type" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="intro" NEXT="options"/>
31 <FIELD NAME="options" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="type"/>
34 <KEY NAME="primary" TYPE="primary" FIELDS="id" />
37 <TABLE NAME="survey_answers" COMMENT="the answers to each questions filled by the users" PREVIOUS="survey_questions" NEXT="survey_analysis">
39 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="userid"/>
40 <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="survey"/>
41 <FIELD NAME="survey" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="question"/>
42 <FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="survey" NEXT="time"/>
43 <FIELD NAME="time" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="question" NEXT="answer1"/>
44 <FIELD NAME="answer1" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="time" NEXT="answer2"/>
45 <FIELD NAME="answer2" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="answer1"/>
48 <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="survey"/>
49 <KEY NAME="survey" TYPE="foreign" FIELDS="survey" REFTABLE="survey" REFFIELDS="id" PREVIOUS="primary" NEXT="question"/>
50 <KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="survey_questions" REFFIELDS="id" PREVIOUS="survey"/>
53 <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
56 <TABLE NAME="survey_analysis" COMMENT="text about each survey submission" PREVIOUS="survey_answers">
58 <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="survey"/>
59 <FIELD NAME="survey" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/>
60 <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="survey" NEXT="notes"/>
61 <FIELD NAME="notes" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid"/>
64 <KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="survey"/>
65 <KEY NAME="survey" TYPE="foreign" FIELDS="survey" REFTABLE="survey" REFFIELDS="id" PREVIOUS="primary"/>
68 <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
73 <STATEMENT NAME="insert survey" TYPE="insert" TABLE="survey" COMMENT="Initial insert of records on table survey" NEXT="insert survey_questions">
75 <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'collesaname', 'collesaintro', '25,26,27,28,29,30,43,44')" />
76 <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'collespname', 'collespintro', '31,32,33,34,35,36,43,44')" />
77 <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'collesapname', 'collesapintro', '37,38,39,40,41,42,43,44')" />
78 <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'attlsname', 'attlsintro', '65,67,68')" />
79 <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73')" />
82 <STATEMENT NAME="insert survey_questions" TYPE="insert" TABLE="survey_questions" COMMENT="Initial insert of records on table survey_questions" PREVIOUS="insert survey" NEXT="insert log_display">
84 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles1', 'colles1short', 1, 'scaletimes5')" />
85 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles2', 'colles2short', 1, 'scaletimes5')" />
86 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles3', 'colles3short', 1, 'scaletimes5')" />
87 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles4', 'colles4short', 1, 'scaletimes5')" />
88 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles5', 'colles5short', 1, 'scaletimes5')" />
89 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles6', 'colles6short', 1, 'scaletimes5')" />
90 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles7', 'colles7short', 1, 'scaletimes5')" />
91 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles8', 'colles8short', 1, 'scaletimes5')" />
92 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles9', 'colles9short', 1, 'scaletimes5')" />
93 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles10', 'colles10short', 1, 'scaletimes5')" />
94 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles11', 'colles11short', 1, 'scaletimes5')" />
95 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles12', 'colles12short', 1, 'scaletimes5')" />
96 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles13', 'colles13short', 1, 'scaletimes5')" />
97 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles14', 'colles14short', 1, 'scaletimes5')" />
98 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles15', 'colles15short', 1, 'scaletimes5')" />
99 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles16', 'colles16short', 1, 'scaletimes5')" />
100 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles17', 'colles17short', 1, 'scaletimes5')" />
101 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles18', 'colles18short', 1, 'scaletimes5')" />
102 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles19', 'colles19short', 1, 'scaletimes5')" />
103 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles20', 'colles20short', 1, 'scaletimes5')" />
104 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles21', 'colles21short', 1, 'scaletimes5')" />
105 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles22', 'colles22short', 1, 'scaletimes5')" />
106 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles23', 'colles23short', 1, 'scaletimes5')" />
107 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles24', 'colles24short', 1, 'scaletimes5')" />
108 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 1, 'scaletimes5')" />
109 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 1, 'scaletimes5')" />
110 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 1, 'scaletimes5')" />
111 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 1, 'scaletimes5')" />
112 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 1, 'scaletimes5')" />
113 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 1, 'scaletimes5')" />
114 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 2, 'scaletimes5')" />
115 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 2, 'scaletimes5')" />
116 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 2, 'scaletimes5')" />
117 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 2, 'scaletimes5')" />
118 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 2, 'scaletimes5')" />
119 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 2, 'scaletimes5')" />
120 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 3, 'scaletimes5')" />
121 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 3, 'scaletimes5')" />
122 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 3, 'scaletimes5')" />
123 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 3, 'scaletimes5')" />
124 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 3, 'scaletimes5')" />
125 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 3, 'scaletimes5')" />
126 <SENTENCE TEXT="(text, type, options) VALUES ('howlong', 1, 'howlongoptions')" />
127 <SENTENCE TEXT="(text, type) VALUES ('othercomments', 0)" />
128 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls1', 'attls1short', 1, 'scaleagree5')" />
129 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls2', 'attls2short', 1, 'scaleagree5')" />
130 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls3', 'attls3short', 1, 'scaleagree5')" />
131 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls4', 'attls4short', 1, 'scaleagree5')" />
132 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls5', 'attls5short', 1, 'scaleagree5')" />
133 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls6', 'attls6short', 1, 'scaleagree5')" />
134 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls7', 'attls7short', 1, 'scaleagree5')" />
135 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls8', 'attls8short', 1, 'scaleagree5')" />
136 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls9', 'attls9short', 1, 'scaleagree5')" />
137 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls10', 'attls10short', 1, 'scaleagree5')" />
138 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls11', 'attls11short', 1, 'scaleagree5')" />
139 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls12', 'attls12short', 1, 'scaleagree5')" />
140 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls13', 'attls13short', 1, 'scaleagree5')" />
141 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls14', 'attls14short', 1, 'scaleagree5')" />
142 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls15', 'attls15short', 1, 'scaleagree5')" />
143 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls16', 'attls16short', 1, 'scaleagree5')" />
144 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls17', 'attls17short', 1, 'scaleagree5')" />
145 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls18', 'attls18short', 1, 'scaleagree5')" />
146 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls19', 'attls19short', 1, 'scaleagree5')" />
147 <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls20', 'attls20short', 1, 'scaleagree5')" />
148 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('attlsm1', 'attlsm1', '45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64', 'attlsmintro', 1, 'scaleagree5')" />
149 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('-', '-', '-', '-', 0, '-')" />
150 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('attlsm2', 'attlsm2', '63,62,59,57,55,49,52,50,48,47', 'attlsmintro', -1, 'scaleagree5')" />
151 <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('attlsm3', 'attlsm3', '46,54,45,51,60,53,56,58,61,64', 'attlsmintro', -1, 'scaleagree5')" />
152 <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq1', 'ciq1short', 0)" />
153 <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq2', 'ciq2short', 0)" />
154 <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq3', 'ciq3short', 0)" />
155 <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq4', 'ciq4short', 0)" />
156 <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq5', 'ciq5short', 0)" />
159 <STATEMENT NAME="insert log_display" TYPE="insert" TABLE="log_display" COMMENT="Initial insert of records on table log_display" PREVIOUS="insert survey_questions">
161 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'add', 'survey', 'name')" />
162 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'update', 'survey', 'name')" />
163 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'download', 'survey', 'name')" />
164 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'view form', 'survey', 'name')" />
165 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'view graph', 'survey', 'name')" />
166 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'view report', 'survey', 'name')" />
167 <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'submit', 'survey', 'name')" />