<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="question/type/rqp/db" VERSION="20060812" COMMENT="XMLDB file for Moodle question/type/rqp">
  <TABLES>
    <TABLE NAME="question_rqp" COMMENT="Options for RQP questions" NEXT="question_rqp_types">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="question"/>
        <FIELD NAME="question" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="type"/>
        <FIELD NAME="type" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="question" NEXT="source"/>
        <FIELD NAME="source" TYPE="binary" LENGTH="big" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="type" NEXT="format"/>
        <FIELD NAME="format" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="source" NEXT="flags"/>
        <FIELD NAME="flags" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="format" NEXT="maxscore"/>
        <FIELD NAME="maxscore" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="flags"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_rqp" NEXT="question"/>
        <KEY NAME="question" TYPE="foreign" FIELDS="question" REFTABLE="questions" REFFIELDS="id" PREVIOUS="primary"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="question_rqp_types" COMMENT="RQP question types" PREVIOUS="question_rqp" NEXT="question_rqp_servers">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="name"/>
        <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_rqp_types"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="name" UNIQUE="true" FIELDS="name"/>
      </INDEXES>
    </TABLE>
    <TABLE NAME="question_rqp_servers" COMMENT="Information about RQP servers" PREVIOUS="question_rqp_types" NEXT="question_rqp_states">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="typeid"/>
        <FIELD NAME="typeid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="url"/>
        <FIELD NAME="url" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="typeid" NEXT="can_render"/>
        <FIELD NAME="can_render" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="url" NEXT="can_author"/>
        <FIELD NAME="can_author" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="can_render"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_rqp_servers" NEXT="typeid"/>
        <KEY NAME="typeid" TYPE="foreign" FIELDS="typeid" REFTABLE="rqp_types" REFFIELDS="id" PREVIOUS="primary"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="question_rqp_states" COMMENT="RQP question type specific state information" PREVIOUS="question_rqp_servers">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="stateid"/>
        <FIELD NAME="stateid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="responses"/>
        <FIELD NAME="responses" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="stateid" NEXT="persistent_data"/>
        <FIELD NAME="persistent_data" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="responses" NEXT="template_vars"/>
        <FIELD NAME="template_vars" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="persistent_data"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for question_rqp_states"/>
      </KEYS>
    </TABLE>
  </TABLES>
</XMLDB>