<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/mmogame/type/quiz/db" VERSION="20210814" COMMENT="XMLDB file for Moodle MMOGame Quiz"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd">

  <TABLES>

    <TABLE NAME="mmogame_quiz_attempts" COMMENT="mmogame_quiz_attempts">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="mmogameid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="ginstanceid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="auserid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="numgame" TYPE="int" LENGTH="10" DEFAULT="0" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="numteam" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
        <FIELD NAME="numattempt" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="useranswerid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="useranswer" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="iscorrect" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="layout" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="timestart" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="timeclose" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="timeanswer" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="!=0 means it is finished"/>
        <FIELD NAME="fraction" TYPE="float" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="score" TYPE="float" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="score2" TYPE="float" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="iscorrect2" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="auserid" UNIQUE="false" FIELDS="auserid"/>
        <INDEX NAME="ginstanceidnumattempt" UNIQUE="false" FIELDS="ginstanceid,numattempt"/>
      </INDEXES>
    </TABLE>

  </TABLES>
</XMLDB>
