<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/survey/db" VERSION="20060812" COMMENT="XMLDB file for Moodle mod/survey">
  <TABLES>
    <TABLE NAME="survey" COMMENT="Each record is one SURVEY module with its configuration" NEXT="survey_questions">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="course"/>
        <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="template"/>
        <FIELD NAME="template" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="days"/>
        <FIELD NAME="days" TYPE="int" LENGTH="6" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="template" NEXT="timecreated"/>
        <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="days" NEXT="timemodified"/>
        <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="name"/>
        <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="intro"/>
        <FIELD NAME="intro" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="questions"/>
        <FIELD NAME="questions" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="intro"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for survey"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
      </INDEXES>
    </TABLE>
    <TABLE NAME="survey_questions" COMMENT="the questions conforming one survey" PREVIOUS="survey" NEXT="survey_answers">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="text"/>
        <FIELD NAME="text" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="shorttext"/>
        <FIELD NAME="shorttext" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="text" NEXT="multi"/>
        <FIELD NAME="multi" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="shorttext" NEXT="intro"/>
        <FIELD NAME="intro" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="multi" NEXT="type"/>
        <FIELD NAME="type" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="intro" NEXT="options"/>
        <FIELD NAME="options" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="type"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for survey_questions"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="survey_answers" COMMENT="the answers to each questions filled by the users" PREVIOUS="survey_questions" NEXT="survey_analysis">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="userid"/>
        <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="survey"/>
        <FIELD NAME="survey" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="question"/>
        <FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="survey" NEXT="time"/>
        <FIELD NAME="time" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="question" NEXT="answer1"/>
        <FIELD NAME="answer1" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="time" NEXT="answer2"/>
        <FIELD NAME="answer2" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="answer1"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for survey_answers" NEXT="survey"/>
        <KEY NAME="survey" TYPE="foreign" FIELDS="survey" REFTABLE="survey" REFFIELDS="id" PREVIOUS="primary" NEXT="question"/>
        <KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="survey_questions" REFFIELDS="id" PREVIOUS="survey"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
      </INDEXES>
    </TABLE>
    <TABLE NAME="survey_analysis" COMMENT="text about each survey submission" PREVIOUS="survey_answers">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="survey"/>
        <FIELD NAME="survey" 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="survey" NEXT="notes"/>
        <FIELD NAME="notes" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for survey_analysis" NEXT="survey"/>
        <KEY NAME="survey" TYPE="foreign" FIELDS="survey" REFTABLE="survey" REFFIELDS="id" PREVIOUS="primary"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
      </INDEXES>
    </TABLE>
  </TABLES>
  <STATEMENTS>
    <STATEMENT NAME="insert survey" TYPE="insert" TABLE="survey" COMMENT="Initial insert of records on table survey" NEXT="insert survey_questions">
      <SENTENCES>
        <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')" />
        <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')" />
        <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')" />
        <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'attlsname', 'attlsintro', '65,67,68')" />
        <SENTENCE TEXT="(course, template, days, timecreated, timemodified, name, intro, questions) VALUES (0, 0, 0, 985017600, 985017600, 'ciqname', 'ciqintro', '69,70,71,72,73')" />
      </SENTENCES>
    </STATEMENT>
    <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">
      <SENTENCES>
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles1', 'colles1short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles2', 'colles2short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles3', 'colles3short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles4', 'colles4short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles5', 'colles5short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles6', 'colles6short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles7', 'colles7short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles8', 'colles8short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles9', 'colles9short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles10', 'colles10short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles11', 'colles11short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles12', 'colles12short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles13', 'colles13short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles14', 'colles14short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles15', 'colles15short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles16', 'colles16short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles17', 'colles17short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles18', 'colles18short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles19', 'colles19short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles20', 'colles20short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles21', 'colles21short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles22', 'colles22short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles23', 'colles23short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('colles24', 'colles24short', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 1, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 2, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 2, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 2, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 2, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 2, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 2, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm1', 'collesm1short', '1,2,3,4', 'collesmintro', 3, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm2', 'collesm2short', '5,6,7,8', 'collesmintro', 3, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm3', 'collesm3short', '9,10,11,12', 'collesmintro', 3, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm4', 'collesm4short', '13,14,15,16', 'collesmintro', 3, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm5', 'collesm5short', '17,18,19,20', 'collesmintro', 3, 'scaletimes5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('collesm6', 'collesm6short', '21,22,23,24', 'collesmintro', 3, 'scaletimes5')" />
        <SENTENCE TEXT="(text, type, options) VALUES ('howlong', 1, 'howlongoptions')" />
        <SENTENCE TEXT="(text, type) VALUES ('othercomments', 0)" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls1', 'attls1short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls2', 'attls2short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls3', 'attls3short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls4', 'attls4short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls5', 'attls5short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls6', 'attls6short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls7', 'attls7short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls8', 'attls8short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls9', 'attls9short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls10', 'attls10short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls11', 'attls11short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls12', 'attls12short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls13', 'attls13short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls14', 'attls14short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls15', 'attls15short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls16', 'attls16short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls17', 'attls17short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls18', 'attls18short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls19', 'attls19short', 1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type, options) VALUES ('attls20', 'attls20short', 1, 'scaleagree5')" />
        <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')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('-', '-', '-', '-', 0, '-')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('attlsm2', 'attlsm2', '63,62,59,57,55,49,52,50,48,47', 'attlsmintro', -1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, multi, intro, type, options) VALUES ('attlsm3', 'attlsm3', '46,54,45,51,60,53,56,58,61,64', 'attlsmintro', -1, 'scaleagree5')" />
        <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq1', 'ciq1short', 0)" />
        <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq2', 'ciq2short', 0)" />
        <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq3', 'ciq3short', 0)" />
        <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq4', 'ciq4short', 0)" />
        <SENTENCE TEXT="(text, shorttext, type) VALUES ('ciq5', 'ciq5short', 0)" />
      </SENTENCES>
    </STATEMENT>
    <STATEMENT NAME="insert log_display" TYPE="insert" TABLE="log_display" COMMENT="Initial insert of records on table log_display" PREVIOUS="insert survey_questions">
      <SENTENCES>
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'add', 'survey', 'name')" />
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'update', 'survey', 'name')" />
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'download', 'survey', 'name')" />
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'view form', 'survey', 'name')" />
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'view graph', 'survey', 'name')" />
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'view report', 'survey', 'name')" />
        <SENTENCE TEXT="(module, action, mtable, field) VALUES ('survey', 'submit', 'survey', 'name')" />
      </SENTENCES>
    </STATEMENT>
  </STATEMENTS>
</XMLDB>
