<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<database name="mdl52er_erd" schema="mdl52er_erd" type="MySQL - 5.5.5-10.11.10-MariaDB-ubu2204">
   <tables>
      <table catalog="mdl52er_erd" name="adminpresets" numRows="0" remarks="named sets of site wide configurations e.g. enable/disable features https://www.youtube.com/watch?v=CyNOhbJ76fY" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="comments" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="site" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="author" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="moodleversion" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="moodlerelease" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="iscore" nullable="false" remarks="Whether this is a core preset or not, and which core preset" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timeimported" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_app" numRows="0" remarks="Applied presets" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="adminpresetid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="time" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiapp_adm_ix" unique="false">
            <column ascending="true" name="adminpresetid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_app_it" numRows="0" remarks="Admin presets applied items. To maintain the relation with config_log" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="adminpresetapplyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="configlogid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="config"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiappit_adm_ix" unique="false">
            <column ascending="true" name="adminpresetapplyid"/>
         </index>
         <index name="admiappit_con_ix" unique="false">
            <column ascending="true" name="configlogid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_app_it_a" numRows="0" remarks="Attributes of the applied items" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="adminpresetapplyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="configlogid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="config"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="itemname" nullable="true" remarks="Necessary to rollback" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiappita_adm_ix" unique="false">
            <column ascending="true" name="adminpresetapplyid"/>
         </index>
         <index name="admiappita_con_ix" unique="false">
            <column ascending="true" name="configlogid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_app_plug" numRows="0" remarks="Admin presets plugins applied" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="adminpresetapplyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="plugin" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="value" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="oldvalue" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiappplug_adm_ix" unique="false">
            <column ascending="true" name="adminpresetapplyid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_it" numRows="0" remarks="Table to store settings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="adminpresetid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="plugin" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="value" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiit_adm_ix" unique="false">
            <column ascending="true" name="adminpresetid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_it_a" numRows="0" remarks="Admin presets items attributes. For settings with attributes (extra values like 'advanced')" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiita_ite_ix" unique="false">
            <column ascending="true" name="itemid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="adminpresets_plug" numRows="0" remarks="Admin presets plugins status, to store information about whether they are enabled or not" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="adminpresetid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="plugin" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="enabled" nullable="false" remarks="Whether this plugins is currently enabled." size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="admiplug_adm_ix" unique="false">
            <column ascending="true" name="adminpresetid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_action_explain_text" numRows="0" remarks="Stores specific data about explain text actions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="prompt" nullable="true" remarks="The text from the user that was used to generate the text response" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="responseid" nullable="true" remarks="A unique identifier for the chat completion, returned by the AI." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="fingerprint" nullable="true" remarks="This fingerprint represents the backend configuration that the model runs with." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="generatedcontent" nullable="true" remarks="The contents of the generated message." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="finishreason" nullable="true" remarks="The reason the model stopped generating tokens." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="prompttokens" nullable="true" remarks="Number of tokens in the prompt." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="completiontoken" nullable="true" remarks="Number of tokens in the generated completion." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_action_generate_image" numRows="0" remarks="Stores specific data about generate image actions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="prompt" nullable="true" remarks="The text from the user that was used to generate the image" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="numberimages" nullable="false" remarks="The number of images requested to be generated" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="quality" nullable="false" remarks="The quality of the image, e.g. hd." size="21" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="aspectratio" nullable="true" remarks="The aspect ratio of the generate image, e.g landscape" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="style" nullable="true" remarks="The style of the image, e.g. vivid" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="sourceurl" nullable="true" remarks="URL of the generated response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="revisedprompt" nullable="true" remarks="The actual prompt the AI used to generate the image" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_action_generate_text" numRows="0" remarks="Stores specific data about generate text actions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="prompt" nullable="true" remarks="The text from the user that was used to generate the text response" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="responseid" nullable="true" remarks="A unique identifier for the chat completion, returned by the AI." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="fingerprint" nullable="true" remarks="This fingerprint represents the backend configuration that the model runs with." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="generatedcontent" nullable="true" remarks="The contents of the generated message." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="finishreason" nullable="true" remarks="The reason the model stopped generating tokens." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="prompttokens" nullable="true" remarks="Number of tokens in the prompt." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="completiontoken" nullable="true" remarks="Number of tokens in the generated completion." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_action_register" numRows="0" remarks="Stores information about processed ai actions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="actionname" nullable="false" remarks="Name of the action" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="actionid" nullable="false" remarks="ID in related action table with more details about the action" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="success" nullable="false" remarks="Was the action successful when run" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="The user who made the request to run the action" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="aiactiregi_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="contextid" nullable="false" remarks="The id of the context the action request was made in" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="provider" nullable="false" remarks="The provider plugin name that processed the action" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="errorcode" nullable="true" remarks="If there was an error this was the error code" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="errormessage" nullable="true" remarks="If there was an error this was the message" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timecreated" nullable="false" remarks="Timestamp of when the action was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecompleted" nullable="true" remarks="Timestamp of when the action was completed, as recorded by the manager" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="model" nullable="true" remarks="The model used to generate the response" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="aiactiregi_actact_uix" unique="true">
            <column ascending="true" name="actionname"/>
            <column ascending="true" name="actionid"/>
         </index>
         <index name="aiactiregi_actpro_ix" unique="false">
            <column ascending="true" name="actionname"/>
            <column ascending="true" name="provider"/>
         </index>
         <index name="aiactiregi_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_action_summarise_text" numRows="0" remarks="Stores specific data about summarise text actions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="prompt" nullable="true" remarks="The text from the user that was used to generate the text response" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="responseid" nullable="true" remarks="A unique identifier for the chat completion, returned by the AI." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="fingerprint" nullable="true" remarks="This fingerprint represents the backend configuration that the model runs with." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="generatedcontent" nullable="true" remarks="The contents of the generated message." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="finishreason" nullable="true" remarks="The reason the model stopped generating tokens." size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="prompttokens" nullable="true" remarks="Number of tokens in the prompt." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="completiontoken" nullable="true" remarks="Number of tokens in the generated completion." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_policy_register" numRows="0" remarks="Register of users who have accepted this sites AI usage policy" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="The id of the user that has accepted the policy" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="aipoliregi_use_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="The context id that the policy was accepted in" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timeaccepted" nullable="false" remarks="Timestamp of when the policy was accepted" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="aipoliregi_use_uix" unique="true">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ai_providers" numRows="0" remarks="AI provider instances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="The human readbale name of the provider" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="provider" nullable="false" remarks="The provider class name this provider is an instance of" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="enabled" nullable="false" remarks="Is this plugin enabled" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="config" nullable="false" remarks="Provider specific config in JSON format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="actionconfig" nullable="true" remarks="Stores instance specific action configuration in JSON format." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="aiprov_pro_ix" unique="false">
            <column ascending="true" name="provider"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_indicator_calc" numRows="0" remarks="Stored indicator calculations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="starttime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="endtime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analindicalc_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="sampleorigin" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="sampleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="indicator" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="2" id="7" name="value" nullable="true" remarks="The calculated value, it can be null." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analindicalc_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="analindicalc_staendcon_ix" unique="false">
            <column ascending="true" name="starttime"/>
            <column ascending="true" name="endtime"/>
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_models" numRows="0" remarks="Analytic models." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="modelid" foreignKey="analmodelog_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models_log"/>
            <child catalog="mdl52er_erd" column="modelid" foreignKey="analpredsamp_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_predict_samples"/>
            <child catalog="mdl52er_erd" column="modelid" foreignKey="analpred_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_predictions"/>
            <child catalog="mdl52er_erd" column="modelid" foreignKey="analtraisamp_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_train_samples"/>
            <child catalog="mdl52er_erd" column="modelid" foreignKey="analusedanal_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_used_analysables"/>
            <child catalog="mdl52er_erd" column="modelid" foreignKey="analusedfile_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_used_files"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="trained" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="name" nullable="true" remarks="Explicit name of the model, the localised target name is used when left empty" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="target" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="indicators" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timesplitting" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="predictionsprocessor" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="version" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="contextids" nullable="true" remarks="The model will be restricted to this contexts" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analmode_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analmode_enatra_ix" unique="false">
            <column ascending="true" name="enabled"/>
            <column ascending="true" name="trained"/>
         </index>
         <index name="analmode_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_models_log" numRows="0" remarks="Analytic models changes during evaluation." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="modelid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analmodelog_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="version" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="evaluationmode" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="target" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="indicators" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timesplitting" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="7" name="score" nullable="false" remarks="" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="info" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="dir" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analmodelog_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analmodelog_mod_ix" unique="false">
            <column ascending="true" name="modelid"/>
         </index>
         <index name="analmodelog_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_predict_samples" numRows="0" remarks="Samples already used for predictions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="modelid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analpredsamp_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="analysableid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="timesplitting" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="rangeindex" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="sampleids" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analpredsamp_mod_ix" unique="false">
            <column ascending="true" name="modelid"/>
         </index>
         <index name="analpredsamp_modanatimran_ix" unique="false">
            <column ascending="true" name="modelid"/>
            <column ascending="true" name="analysableid"/>
            <column ascending="true" name="timesplitting"/>
            <column ascending="true" name="rangeindex"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_prediction_actions" numRows="0" remarks="Register of user actions over predictions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="predictionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analpredacti_pre2_fk" implied="false" onDeleteCascade="false" table="analytics_predictions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analpredacti_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="actionname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analpredacti_pre_ix" unique="false">
            <column ascending="true" name="predictionid"/>
         </index>
         <index name="analpredacti_preuseact_ix" unique="false">
            <column ascending="true" name="predictionid"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="actionname"/>
         </index>
         <index name="analpredacti_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_predictions" numRows="0" remarks="Predictions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="predictionid" foreignKey="analpredacti_pre2_fk" implied="false" onDeleteCascade="false" table="analytics_prediction_actions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="modelid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analpred_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analpred_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="sampleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="rangeindex" nullable="false" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="2" id="5" name="prediction" nullable="false" remarks="" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="6" name="predictionscore" nullable="false" remarks="" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="calculations" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timestart" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timeend" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analpred_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="analpred_mod_ix" unique="false">
            <column ascending="true" name="modelid"/>
         </index>
         <index name="analpred_modcon_ix" unique="false">
            <column ascending="true" name="modelid"/>
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_train_samples" numRows="0" remarks="Samples used for training" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="modelid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analtraisamp_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="analysableid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="timesplitting" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sampleids" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analtraisamp_mod_ix" unique="false">
            <column ascending="true" name="modelid"/>
         </index>
         <index name="analtraisamp_modanatim_ix" unique="false">
            <column ascending="true" name="modelid"/>
            <column ascending="true" name="analysableid"/>
            <column ascending="true" name="timesplitting"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_used_analysables" numRows="0" remarks="List of analysables used by each model" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="modelid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analusedanal_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="action" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="analysableid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="firstanalysis" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timeanalysed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analusedanal_ana_ix" unique="false">
            <column ascending="true" name="analysableid"/>
         </index>
         <index name="analusedanal_mod_ix" unique="false">
            <column ascending="true" name="modelid"/>
         </index>
         <index name="analusedanal_modact_ix" unique="false">
            <column ascending="true" name="modelid"/>
            <column ascending="true" name="action"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="analytics_used_files" numRows="0" remarks="Files that have already been used for training and prediction." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="modelid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analusedfile_mod2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="fileid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="analusedfile_fil2_fk" implied="false" onDeleteCascade="false" table="files"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="action" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="time" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="analusedfile_fil_ix" unique="false">
            <column ascending="true" name="fileid"/>
         </index>
         <index name="analusedfile_mod_ix" unique="false">
            <column ascending="true" name="modelid"/>
         </index>
         <index name="analusedfile_modactfil_ix" unique="false">
            <column ascending="true" name="modelid"/>
            <column ascending="true" name="action"/>
            <column ascending="true" name="fileid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign" numRows="0" remarks="This table saves information about an instance of mod_assign in a course. For sample reports see https://docs.moodle.org/401/en/ad-hoc_contributed_reports#Assignment_Activity" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assiallomark_ass2_fk" implied="false" onDeleteCascade="false" table="assign_allocated_marker"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assigrad_ass2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assimark_ass2_fk" implied="false" onDeleteCascade="false" table="assign_mark"/>
            <child catalog="mdl52er_erd" column="assignid" foreignKey="assiover_ass2_fk" implied="false" onDeleteCascade="false" table="assign_overrides"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assiplugconf_ass2_fk" implied="false" onDeleteCascade="false" table="assign_plugin_config"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assisubm_ass2_fk" implied="false" onDeleteCascade="false" table="assign_submission"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assiuserflag_ass2_fk" implied="false" onDeleteCascade="false" table="assign_user_flags"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assiusermapp_ass2_fk" implied="false" onDeleteCascade="false" table="assign_user_mapping"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assicomm_ass2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_comments"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assifile_ass2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_file"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assifile_ass5_fk" implied="false" onDeleteCascade="false" table="assignsubmission_file"/>
            <child catalog="mdl52er_erd" column="assignment" foreignKey="assionli_ass2_fk" implied="false" onDeleteCascade="false" table="assignsubmission_onlinetext"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="The name of the instance of the assignment. Displayed at the top of each page." size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="The description of the assignment. This field is used by feature MOD_INTRO." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="The format of the description field of the assignment. This field is used by feature MOD_INTRO." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="alwaysshowdescription" nullable="false" remarks="If false the assignment intro will only be displayed after the allowsubmissionsfrom date. If true it will always be displayed." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="nosubmissions" nullable="false" remarks="This field is a cache for is_any_submission_plugin_enabled() which allows Moodle pages to distinguish offline assignment types without loading the assignment class." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="submissiondrafts" nullable="false" remarks="If true, assignment submissions will be considered drafts until the student clicks on the submit assignmnet button." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="sendnotifications" nullable="false" remarks="Allows the disabling of email notifications in the assign module." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="sendlatenotifications" nullable="false" remarks="Allows separate enabling of notifications for late assignment submissions." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="duedate" nullable="false" remarks="The due date for the assignment. Displayed to students." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="allowsubmissionsfromdate" nullable="false" remarks="If set, submissions will only be accepted after this date." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="grade" nullable="false" remarks="The maximum grade for this assignment. Can be negative to indicate the use of a scale." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timemodified" nullable="false" remarks="The time the settings for this assign module instance were last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="requiresubmissionstatement" nullable="false" remarks="Forces the student to accept a submission statement when submitting an assignment" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="completionsubmit" nullable="false" remarks="If this field is set to 1, then the activity will be automatically marked as &amp;#039;complete&amp;#039; once the user submits their assignment." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="cutoffdate" nullable="false" remarks="The final date after which submissions will no longer be accepted for this assignment without an extensions." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="gradingduedate" nullable="false" remarks="The expected date for marking the submissions." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="teamsubmission" nullable="false" remarks="Do students submit in teams?" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="requireallteammemberssubmit" nullable="false" remarks="If enabled, a submission will not be accepted until all team members have submitted it." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="teamsubmissiongroupingid" nullable="false" remarks="A grouping id to get groups for team submissions" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="blindmarking" nullable="false" remarks="Hide student/grader identities until the reveal identities action is performed" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="hidegrader" nullable="false" remarks="Hide the grader&amp;#039;s identity from students. The opposite of blind marking." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="revealidentities" nullable="false" remarks="Show identities for a blind marking assignment" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="untilpass" digits="0" id="24" name="attemptreopenmethod" nullable="false" remarks="How to determine when students are allowed to open a new submission. Valid options are manual and untilpass." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="25" name="maxattempts" nullable="false" remarks="What is the maximum number of student attempts allowed for this assignment? -1 means unlimited." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="markingworkflow" nullable="false" remarks="If enabled, marking workflow features will be used in this assignment." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="markingallocation" nullable="false" remarks="If enabled, marking allocation features will be used in this assignment" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="28" name="markercount" nullable="false" remarks="Number of markers for this assignment, for example, 2 for double marking" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="29" name="multimarkmethod" nullable="true" remarks="How to calculate grade when markercount greater than 1" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="30" name="multimarkrounding" nullable="true" remarks="How to round the grade calculation if using an average of marks" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="markinganonymous" nullable="false" remarks="If enabled, marking anonymous features will be used in this assignment" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="32" name="sendstudentnotifications" nullable="false" remarks="Default for send student notifications checkbox when grading." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="preventsubmissionnotingroup" nullable="false" remarks="If enabled a user will be unable to make a submission unless they are a member of a group." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="34" name="activity" nullable="true" remarks="Actions required to complete assignment, shown on submission page" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="35" name="activityformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="timelimit" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="37" name="submissionattachments" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="38" name="gradepenalty" nullable="false" remarks="If enabled, penalties will be applied." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assi_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="assi_gra_ix" unique="false">
            <column ascending="true" name="gradepenalty"/>
         </index>
         <index name="assi_tea_ix" unique="false">
            <column ascending="true" name="teamsubmissiongroupingid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_allocated_marker" numRows="0" remarks="One or more teachers allocated to mark individual submissions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="student" nullable="false" remarks="User ID of student this marker is allocated to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiallomark_stu2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="assignment" nullable="false" remarks="The id of the assignment this marker is allocated to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiallomark_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="marker" nullable="false" remarks="User ID of teacher allocated to mark this student" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiallomark_mar2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assiallomark_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assiallomark_mar_ix" unique="false">
            <column ascending="true" name="marker"/>
         </index>
         <index name="assiallomark_stu_ix" unique="false">
            <column ascending="true" name="student"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_grades" numRows="0" remarks="Grading information about a single assignment submission." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="gradeid" foreignKey="assimark_gra2_fk" implied="false" onDeleteCascade="false" table="assign_mark"/>
            <child catalog="mdl52er_erd" column="grade" foreignKey="assicomm_gra2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_comments"/>
            <child catalog="mdl52er_erd" column="gradeid" foreignKey="assieditanno_gra2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_editpdf_annot"/>
            <child catalog="mdl52er_erd" column="gradeid" foreignKey="assieditcmnt_gra2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_editpdf_cmnt"/>
            <child catalog="mdl52er_erd" column="gradeid" foreignKey="assieditrot_gra2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_editpdf_rot"/>
            <child catalog="mdl52er_erd" column="grade" foreignKey="assifile_gra2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_file"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assigrad_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timecreated" nullable="false" remarks="The time the assignment submission was first modified by a grader." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="The most recent modification time for the assignment submission by a grader." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="grader" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="6" name="grade" nullable="true" remarks="The numerical grade for this assignment submission. Can be determined by scales/advancedgradingforms etc but will always be converted back to a floating point number." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="7" name="penalty" nullable="false" remarks="The percentage should be deducted from final grade" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="attemptnumber" nullable="false" remarks="The attempt number that this grade relates to" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assigrad_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assigrad_assuseatt_uix" unique="true">
            <column ascending="true" name="assignment"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="attemptnumber"/>
         </index>
         <index name="assigrad_att_ix" unique="false">
            <column ascending="true" name="attemptnumber"/>
         </index>
         <index name="assigrad_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_mark" numRows="0" remarks="Marks from multiple markers for a single submission" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="The ID of the assignment this mark applies to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assimark_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="gradeid" nullable="false" remarks="The ID of an assign_grades row" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assimark_gra2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timecreated" nullable="false" remarks="The time this mark was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="The time this mark was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="marker" nullable="false" remarks="The user ID of the marker" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assimark_mar2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="6" name="mark" nullable="true" remarks="Mark given by marker" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="workflowstate" nullable="true" remarks="The current workflow state of the mark" size="20" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assimark_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assimark_gra_ix" unique="false">
            <column ascending="true" name="gradeid"/>
         </index>
         <index name="assimark_mar_ix" unique="false">
            <column ascending="true" name="marker"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_overrides" numRows="0" remarks="The overrides to assign settings." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignid" nullable="false" remarks="Foreign key references assign.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiover_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="groupid" nullable="true" remarks="Foreign key references groups.id.  Can be null if this is a per-user override." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiover_gro2_fk" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="true" remarks="Foreign key references user.id.  Can be null if this is a per-group override." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiover_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sortorder" nullable="true" remarks="Rank for sorting overrides." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="allowsubmissionsfromdate" nullable="true" remarks="Time at which students may start attempting this assign. Can be null, in which case the assign default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="duedate" nullable="true" remarks="Time by which students must have completed their attempt.  Can be null, in which case the assign default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="cutoffdate" nullable="true" remarks="Time by which students must have completed their attempt.  Can be null, in which case the assign default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timelimit" nullable="true" remarks="Time limit in seconds. Can be null, in which case the quiz default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="reason" nullable="true" remarks="An optional reason explaining why this override was granted." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="reasonformat" nullable="false" remarks="The internal format for the override reason." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assiover_ass_ix" unique="false">
            <column ascending="true" name="assignid"/>
         </index>
         <index name="assiover_gro_ix" unique="false">
            <column ascending="true" name="groupid"/>
         </index>
         <index name="assiover_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_plugin_config" numRows="0" remarks="Config data for an instance of a plugin in an assignment." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiplugconf_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="plugin" nullable="false" remarks="" size="28" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="subtype" nullable="false" remarks="" size="28" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="name" nullable="false" remarks="" size="28" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="value" nullable="true" remarks="The value of the config setting. Stored as text but can be interpreted by the plugin however it likes." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assiplugconf_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assiplugconf_nam_ix" unique="false">
            <column ascending="true" name="name"/>
         </index>
         <index name="assiplugconf_plu_ix" unique="false">
            <column ascending="true" name="plugin"/>
         </index>
         <index name="assiplugconf_sub_ix" unique="false">
            <column ascending="true" name="subtype"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_submission" numRows="0" remarks="This table keeps information about student interactions with the mod/assign. This is limited to metadata about a student submission but does not include the submission itself which is stored by plugins." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="submission" foreignKey="assifile_sub2_fk" implied="false" onDeleteCascade="false" table="assignsubmission_file"/>
            <child catalog="mdl52er_erd" column="submission" foreignKey="assionli_sub2_fk" implied="false" onDeleteCascade="false" table="assignsubmission_onlinetext"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assisubm_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timecreated" nullable="false" remarks="The time of the first student submission to this assignment." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="The last time this assignment submission was modified by a student." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timestarted" nullable="true" remarks="The time when the student stared the submission." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="status" nullable="true" remarks="The status of this assignment submission. The current statuses are DRAFT and SUBMITTED." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="groupid" nullable="false" remarks="The group id for team submissions" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="attemptnumber" nullable="false" remarks="Used to track attempts for an assignment" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="latest" nullable="false" remarks="Greatly simplifies queries wanting to know information about only the latest attempt." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assisubm_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assisubm_assusegroatt_uix" unique="true">
            <column ascending="true" name="assignment"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="groupid"/>
            <column ascending="true" name="attemptnumber"/>
         </index>
         <index name="assisubm_assusegrolat_ix" unique="false">
            <column ascending="true" name="assignment"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="groupid"/>
            <column ascending="true" name="latest"/>
         </index>
         <index name="assisubm_att_ix" unique="false">
            <column ascending="true" name="attemptnumber"/>
         </index>
         <index name="assisubm_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_user_flags" numRows="0" remarks="List of flags that can be set for a single user in a single assignment." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="The id of the user these flags apply to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiuserflag_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="assignment" nullable="false" remarks="The assignment these flags apply to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiuserflag_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="locked" nullable="false" remarks="Student cannot make any changes to their submission if this flag is set." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="mailed" nullable="false" remarks="Has the student been sent a notification about this grade update?" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="extensionduedate" nullable="false" remarks="An extension date assigned to an individual student." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="workflowstate" nullable="true" remarks="The current workflow state of the grade" size="20" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assiuserflag_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assiuserflag_mai_ix" unique="false">
            <column ascending="true" name="mailed"/>
         </index>
         <index name="assiuserflag_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assign_user_mapping" numRows="0" remarks="Map an assignment specific id number to a user" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiusermapp_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assiusermapp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assiusermapp_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assiusermapp_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignfeedback_comments" numRows="0" remarks="Text feedback for submitted assignments" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assicomm_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="grade" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assicomm_gra2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="commenttext" nullable="true" remarks="The feedback text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="commentformat" nullable="false" remarks="The feedback text format" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assicomm_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assicomm_gra_ix" unique="false">
            <column ascending="true" name="grade"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignfeedback_editpdf_annot" numRows="0" remarks="stores annotations added to pdfs submitted by students" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="gradeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assieditanno_gra2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pageno" nullable="false" remarks="The page in the PDF that this annotation appears on" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="x" nullable="true" remarks="x-position of the start of the annotation (in pixels - image resolution is set to 100 pixels per inch)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="y" nullable="true" remarks="y-position of the start of the annotation (in pixels - image resolution is set to 100 pixels per inch)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="endx" nullable="true" remarks="x-position of the end of the annotation" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="endy" nullable="true" remarks="y-position of the end of the annotation" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="path" nullable="true" remarks="SVG path describing the freehand line" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="line" digits="0" id="8" name="type" nullable="true" remarks="line, oval, rect, etc." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="black" digits="0" id="9" name="colour" nullable="true" remarks="Can be red, yellow, green, blue, white, black" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="draft" nullable="false" remarks="Is this a draft annotation?" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assieditanno_gra_ix" unique="false">
            <column ascending="true" name="gradeid"/>
         </index>
         <index name="assieditanno_grapag_ix" unique="false">
            <column ascending="true" name="gradeid"/>
            <column ascending="true" name="pageno"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignfeedback_editpdf_cmnt" numRows="0" remarks="Stores comments added to pdfs" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="gradeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assieditcmnt_gra2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="x" nullable="true" remarks="x-position of the top-left corner of the comment (in pixels - image resolution is set to 100 pixels per inch)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="y" nullable="true" remarks="y-position of the top-left corner of the comment (in pixels - image resolution is set to 100 pixels per inch)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="120" digits="0" id="4" name="width" nullable="true" remarks="width, in pixels, of the comment box" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="rawtext" nullable="true" remarks="Raw text of the comment" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="pageno" nullable="false" remarks="The page in the PDF that this comment appears on" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="black" digits="0" id="7" name="colour" nullable="true" remarks="Can be red, yellow, green, blue, white, black" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="draft" nullable="false" remarks="Is this a draft comment?" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assieditcmnt_gra_ix" unique="false">
            <column ascending="true" name="gradeid"/>
         </index>
         <index name="assieditcmnt_grapag_ix" unique="false">
            <column ascending="true" name="gradeid"/>
            <column ascending="true" name="pageno"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignfeedback_editpdf_queue" numRows="0" remarks="" schema="mdl52er_erd" type="TABLE"/>
      <table catalog="mdl52er_erd" name="assignfeedback_editpdf_quick" numRows="0" remarks="Stores teacher specified quicklist comments" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assieditquic_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="rawtext" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="120" digits="0" id="3" name="width" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="yellow" digits="0" id="4" name="colour" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assieditquic_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignfeedback_editpdf_rot" numRows="0" remarks="Stores rotation information of a page." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="gradeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assieditrot_gra2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pageno" nullable="false" remarks="Page number" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="pathnamehash" nullable="false" remarks="File path hash of the rotated page" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="isrotated" nullable="false" remarks="Whether the page is rotated or not" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="degree" nullable="false" remarks="Rotation degree" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assieditrot_gra_ix" unique="false">
            <column ascending="true" name="gradeid"/>
         </index>
         <index name="assieditrot_grapag_uix" unique="true">
            <column ascending="true" name="gradeid"/>
            <column ascending="true" name="pageno"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignfeedback_file" numRows="0" remarks="Stores info about the number of files submitted by a student." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assifile_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="grade" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assifile_gra2_fk" implied="false" onDeleteCascade="false" table="assign_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="numfiles" nullable="false" remarks="The number of files uploaded by a grader." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assifile_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assifile_gra_ix" unique="false">
            <column ascending="true" name="grade"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignsubmission_file" numRows="0" remarks="Info about file submissions for assignments" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assifile_ass5_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="submission" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assifile_sub2_fk" implied="false" onDeleteCascade="false" table="assign_submission"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="numfiles" nullable="false" remarks="The number of files the student submitted." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assifile_ass2_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assifile_sub_ix" unique="false">
            <column ascending="true" name="submission"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="assignsubmission_onlinetext" numRows="0" remarks="Info about onlinetext submission" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="assignment" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assionli_ass2_fk" implied="false" onDeleteCascade="false" table="assign"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="submission" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="assionli_sub2_fk" implied="false" onDeleteCascade="false" table="assign_submission"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="onlinetext" nullable="true" remarks="The text for this online text submission." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="onlineformat" nullable="false" remarks="The format for this online text submission." size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assionli_ass_ix" unique="false">
            <column ascending="true" name="assignment"/>
         </index>
         <index name="assionli_sub_ix" unique="false">
            <column ascending="true" name="submission"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="auth_lti_linked_login" numRows="0" remarks="Accounts linked to a users Moodle account." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="The user account the LTI user is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="authltilinklogi_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="issuer" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="issuer256" nullable="false" remarks="SHA256 hash of the issuer from which the platform user originates." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="sub" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="sub256" nullable="false" remarks="SHA256 hash of the subject identifying the user for the issuer." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="authltilinklogi_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="authltilinklogi_useisssub_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="issuer256"/>
            <column ascending="true" name="sub256"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="auth_oauth2_linked_login" numRows="0" remarks="Accounts linked to a users Moodle account." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="authoautlinklogi_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="The user account this oauth login is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="authoautlinklogi_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="issuerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="authoautlinklogi_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="username" nullable="false" remarks="The external username to map to this moodle account" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="email" nullable="false" remarks="The external email to map to this moodle account" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="confirmtoken" nullable="false" remarks="If this is not empty - the user has not confirmed their email to create the link." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="confirmtokenexpires" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="authoautlinklogi_iss_ix" unique="false">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="authoautlinklogi_issuse_ix" unique="false">
            <column ascending="true" name="issuerid"/>
            <column ascending="true" name="username"/>
         </index>
         <index name="authoautlinklogi_use2_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="authoautlinklogi_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="authoautlinklogi_useissuse_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="issuerid"/>
            <column ascending="true" name="username"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="backup_controllers" numRows="0" remarks="To store the backup_controllers as they are used" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="backupid" nullable="false" remarks="unique id of the backup" size="32" type="VARCHAR" typeCode="12">
            <child catalog="mdl52er_erd" column="backupid" foreignKey="backlogs_bac2_fk" implied="false" onDeleteCascade="false" table="backup_logs"/>
         </column>
         <column autoUpdated="false" defaultValue="backup" digits="0" id="2" name="operation" nullable="false" remarks="Type of operation (backup/restore)" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="type" nullable="false" remarks="Type of the backup (activity/section/course)" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="itemid" nullable="false" remarks="id of the module/section/activity being backup" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="format" nullable="false" remarks="format of the backup (moodle/imscc...)" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="interactive" nullable="false" remarks="is the backup interactive (1-yes/0-no)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="purpose" nullable="false" remarks="purpose (target) of the backup (general, import, hub...)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="userid" nullable="false" remarks="user that owns/performs the backup" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="backcont_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="status" nullable="false" remarks="current status of the backup (configured, ui, running...)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="execution" nullable="false" remarks="type of execution (immediate/delayed)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="executiontime" nullable="false" remarks="epoch secs when the backup should be executed (for delayed backups only)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="12" name="checksum" nullable="false" remarks="checksum of the backup_controller object" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="timecreated" nullable="false" remarks="time the controller was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="timemodified" nullable="false" remarks="last time the controller was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.00000000000000" digits="14" id="15" name="progress" nullable="false" remarks="The backup or restore progress as a floating point number" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="controller" nullable="false" remarks="serialised backup_controller object" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="backcont_bac_uix" unique="true">
            <column ascending="true" name="backupid"/>
         </index>
         <index name="backcont_typite_ix" unique="false">
            <column ascending="true" name="type"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="backcont_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="backcont_useite_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="itemid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="backup_courses" numRows="0" remarks="To store every course backup status" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="backup_courses_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="laststarttime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="lastendtime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="5" digits="0" id="4" name="laststatus" nullable="false" remarks="" size="1" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="nextstarttime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="backcour_cou_uix" unique="true">
            <column ascending="true" name="courseid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="backup_logs" numRows="0" remarks="To store all the logs from backup and restore operations (by db logger)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="backupid" nullable="false" remarks="backupid the log record belongs to" size="32" type="VARCHAR" typeCode="12">
            <parent catalog="mdl52er_erd" column="backupid" foreignKey="backlogs_bac2_fk" implied="false" onDeleteCascade="false" table="backup_controllers"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="loglevel" nullable="false" remarks="level of the log (debug...error)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="message" nullable="false" remarks="text logged" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="timestamp this log entry was created" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="backlogs_bac_ix" unique="false">
            <column ascending="true" name="backupid"/>
         </index>
         <index name="backlogs_bacid_uix" unique="true">
            <column ascending="true" name="backupid"/>
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge" numRows="0" remarks="Defines badge" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="badgeid" foreignKey="badgalig_bad2_fk" implied="false" onDeleteCascade="false" table="badge_alignment"/>
            <child catalog="mdl52er_erd" column="badgeid" foreignKey="badgcrit_bad2_fk" implied="false" onDeleteCascade="false" table="badge_criteria"/>
            <child catalog="mdl52er_erd" column="badgeid" foreignKey="badgendo_bad2_fk" implied="false" onDeleteCascade="false" table="badge_endorsement"/>
            <child catalog="mdl52er_erd" column="badgeid" foreignKey="badgissu_bad2_fk" implied="false" onDeleteCascade="false" table="badge_issued"/>
            <child catalog="mdl52er_erd" column="badgeid" foreignKey="badgmanuawar_bad2_fk" implied="false" onDeleteCascade="false" table="badge_manual_award"/>
            <child catalog="mdl52er_erd" column="badgeid" foreignKey="badgrela_bad2_fk" implied="false" onDeleteCascade="false" table="badge_related"/>
            <child catalog="mdl52er_erd" column="relatedbadgeid" foreignKey="badgrela_rel2_fk" implied="false" onDeleteCascade="false" table="badge_related"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badg_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badg_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="issuername" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="issuerurl" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="issuercontact" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="expiredate" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="expireperiod" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="12" name="type" nullable="false" remarks="1 = site, 2 = course" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="courseid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badg_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="message" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="messagesubject" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="attachment" nullable="false" remarks="Attach baked badge for download" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="17" name="notification" nullable="false" remarks="Message when badge is awarded" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="status" nullable="false" remarks="Badge status: 0 = inactive, 1 = active, 2 = active+locked, 3 = inactive+locked, 4 = archived" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="nextcron" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="version" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="language" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="imagecaption" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badg_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="badg_typ_ix" unique="false">
            <column ascending="true" name="type"/>
         </index>
         <index name="badg_use2_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
         <index name="badg_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_alignment" numRows="0" remarks="Defines alignment for badges" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="badgeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgalig_bad2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="targetname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="targeturl" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="targetdescription" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="targetframework" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="targetcode" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgalig_bad_ix" unique="false">
            <column ascending="true" name="badgeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_backpack" numRows="0" remarks="Defines settings for connecting external backpack" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="backpackid" foreignKey="badgexte_bac2_fk" implied="false" onDeleteCascade="false" table="badge_external"/>
            <child catalog="mdl52er_erd" column="sitebackpackid" foreignKey="badgexteiden_sit2_fk" implied="false" onDeleteCascade="false" table="badge_external_identifier"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgback_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="email" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="backpackuid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="autosync" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="password" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="externalbackpackid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgback_ext2_fk" implied="false" onDeleteCascade="false" table="badge_external_backpack"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgback_ext_ix" unique="false">
            <column ascending="true" name="externalbackpackid"/>
         </index>
         <index name="badgback_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="badgback_useext_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="externalbackpackid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_backpack_oauth2" numRows="0" remarks="Default comment for the table, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgbackoaut_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgbackoaut_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="issuerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgbackoaut_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="externalbackpackid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgbackoaut_ext2_fk" implied="false" onDeleteCascade="false" table="badge_external_backpack"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="token" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="refreshtoken" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="expires" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="scope" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgbackoaut_ext_ix" unique="false">
            <column ascending="true" name="externalbackpackid"/>
         </index>
         <index name="badgbackoaut_iss_ix" unique="false">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="badgbackoaut_use2_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="badgbackoaut_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_criteria" numRows="0" remarks="Defines criteria for issuing badges" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="critid" foreignKey="badgcritmet_cri2_fk" implied="false" onDeleteCascade="false" table="badge_criteria_met"/>
            <child catalog="mdl52er_erd" column="critid" foreignKey="badgcritpara_cri2_fk" implied="false" onDeleteCascade="false" table="badge_criteria_param"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="badgeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgcrit_bad2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="criteriatype" nullable="true" remarks="The criteria type we are aggregating" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="method" nullable="false" remarks="1 = all, 2 = any" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgcrit_bad_ix" unique="false">
            <column ascending="true" name="badgeid"/>
         </index>
         <index name="badgcrit_badcri_uix" unique="true">
            <column ascending="true" name="badgeid"/>
            <column ascending="true" name="criteriatype"/>
         </index>
         <index name="badgcrit_cri_ix" unique="false">
            <column ascending="true" name="criteriatype"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_criteria_met" numRows="0" remarks="Defines criteria that were met for an issued badge" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="issuedid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgcritmet_iss2_fk" implied="false" onDeleteCascade="false" table="badge_issued"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="critid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgcritmet_cri2_fk" implied="false" onDeleteCascade="false" table="badge_criteria"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgcritmet_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="datemet" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgcritmet_cri_ix" unique="false">
            <column ascending="true" name="critid"/>
         </index>
         <index name="badgcritmet_iss_ix" unique="false">
            <column ascending="true" name="issuedid"/>
         </index>
         <index name="badgcritmet_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_criteria_param" numRows="0" remarks="Defines parameters for badges criteria" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="critid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgcritpara_cri2_fk" implied="false" onDeleteCascade="false" table="badge_criteria"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgcritpara_cri_ix" unique="false">
            <column ascending="true" name="critid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_endorsement" numRows="0" remarks="Defines endorsement for badge" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="badgeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgendo_bad2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="issuername" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="issuerurl" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="issueremail" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="claimid" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="claimcomment" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="dateissued" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgendo_bad_ix" unique="false">
            <column ascending="true" name="badgeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_external" numRows="0" remarks="Setting for external badges display" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="backpackid" nullable="false" remarks="ID of a backpack" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgexte_bac2_fk" implied="false" onDeleteCascade="false" table="badge_backpack"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="collectionid" nullable="false" remarks="Badge collection id in the backpack" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="entityid" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="assertion" nullable="true" remarks="Assertion of external badge" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgexte_bac_ix" unique="false">
            <column ascending="true" name="backpackid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_external_backpack" numRows="0" remarks="Defines settings for site level backpacks that a user can connect to." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="externalbackpackid" foreignKey="badgback_ext2_fk" implied="false" onDeleteCascade="false" table="badge_backpack"/>
            <child catalog="mdl52er_erd" column="externalbackpackid" foreignKey="badgbackoaut_ext2_fk" implied="false" onDeleteCascade="false" table="badge_backpack_oauth2"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="backpackapiurl" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="backpackweburl" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="apiversion" nullable="false" remarks="" size="12" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="oauth2_issuerid" nullable="true" remarks="OAuth 2 Issuer" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgexteback_oau2_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgexteback_bac2_uix" unique="true">
            <column ascending="true" name="backpackweburl"/>
         </index>
         <index name="badgexteback_bac_uix" unique="true">
            <column ascending="true" name="backpackapiurl"/>
         </index>
         <index name="badgexteback_oau_ix" unique="false">
            <column ascending="true" name="oauth2_issuerid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_external_identifier" numRows="0" remarks="Setting for external badges mappings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="sitebackpackid" nullable="false" remarks="ID of a site backpack" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgexteiden_sit2_fk" implied="false" onDeleteCascade="false" table="badge_backpack"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="internalid" nullable="false" remarks="" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="externalid" nullable="false" remarks="" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="type" nullable="false" remarks="" size="16" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgexteiden_sit_ix" unique="false">
            <column ascending="true" name="sitebackpackid"/>
         </index>
         <index name="badgexteiden_sitintexttyp_uix" unique="true">
            <column ascending="true" name="sitebackpackid"/>
            <column ascending="true" name="internalid"/>
            <column ascending="true" name="externalid"/>
            <column ascending="true" name="type"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_issued" numRows="0" remarks="Defines issued badges" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="issuedid" foreignKey="badgcritmet_iss2_fk" implied="false" onDeleteCascade="false" table="badge_criteria_met"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="badgeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgissu_bad2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgissu_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="uniquehash" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="dateissued" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="dateexpire" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="issuernotified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgissu_bad_ix" unique="false">
            <column ascending="true" name="badgeid"/>
         </index>
         <index name="badgissu_baduse_uix" unique="true">
            <column ascending="true" name="badgeid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="badgissu_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_manual_award" numRows="0" remarks="Track manual award criteria for badges" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="badgeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgmanuawar_bad2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="recipientid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgmanuawar_rec2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="issuerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgmanuawar_iss3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="issuerrole" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgmanuawar_iss4_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="datemet" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgmanuawar_bad_ix" unique="false">
            <column ascending="true" name="badgeid"/>
         </index>
         <index name="badgmanuawar_iss2_ix" unique="false">
            <column ascending="true" name="issuerrole"/>
         </index>
         <index name="badgmanuawar_iss_ix" unique="false">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="badgmanuawar_rec_ix" unique="false">
            <column ascending="true" name="recipientid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="badge_related" numRows="0" remarks="Defines badge related for badges" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="badgeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgrela_bad2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="relatedbadgeid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="badgrela_rel2_fk" implied="false" onDeleteCascade="false" table="badge"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="badgrela_bad_ix" unique="false">
            <column ascending="true" name="badgeid"/>
         </index>
         <index name="badgrela_badrel_uix" unique="true">
            <column ascending="true" name="badgeid"/>
            <column ascending="true" name="relatedbadgeid"/>
         </index>
         <index name="badgrela_rel_ix" unique="false">
            <column ascending="true" name="relatedbadgeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="bbbext_complex" numRows="0" remarks="Default comment for bbbext_complex, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="bbbext_simple" numRows="0" remarks="Default comment for bbbext_simple, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="bigbluebuttonbnid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="bbbesimp_big_fk" implied="false" onDeleteCascade="false" table="bigbluebuttonbn"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="newfield" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="completionextraisehandtwice" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="meetingevents" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bbbesimp_big_uix" unique="true">
            <column ascending="true" name="bigbluebuttonbnid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="bigbluebuttonbn" numRows="0" remarks="The bigbluebuttonbn table to store information about a meeting activities." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="bigbluebuttonbnid" foreignKey="bbbesimp_big_fk" implied="false" onDeleteCascade="false" table="bbbext_simple"/>
            <child catalog="mdl52er_erd" column="bigbluebuttonbnid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="bigbluebuttonbn_logs"/>
            <child catalog="mdl52er_erd" column="bigbluebuttonbnid" foreignKey="bigbreco_big2_fk" implied="false" onDeleteCascade="false" table="bigbluebuttonbn_recordings"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="type" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="meetingid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="moderatorpass" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="viewerpass" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="wait" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="record" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="recordallfromstart" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="recordhidebutton" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="welcome" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="voicebridge" nullable="false" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="openingtime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="closingtime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="presentation" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="participants" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="userlimit" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="recordings_html" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="23" name="recordings_deleted" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="recordings_imported" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="recordings_preview" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="clienttype" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="muteonstart" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="disablecam" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="disablemic" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="disableprivatechat" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="disablepublicchat" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="32" name="disablenote" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="hideuserlist" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="completionattendance" nullable="false" remarks="Nonzero if a certain number of minutes in the meeting are required to mark an activity completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="35" name="completionengagementchats" nullable="false" remarks="Nonzero if chat during the meeting is required to mark an activity completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="completionengagementtalks" nullable="false" remarks="Nonzero if talking during the meeting is required to mark an activity completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="37" name="completionengagementraisehand" nullable="false" remarks="Nonzero if raising hand during the meeting is required to mark an activity completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="38" name="completionengagementpollvotes" nullable="false" remarks="Nonzero if poll voting during the meeting is required to mark an activity completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="39" name="completionengagementemojis" nullable="false" remarks="Nonzero if the use of emojis during the meeting is required to mark an activity completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="40" name="guestallowed" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="41" name="mustapproveuser" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="42" name="guestlinkuid" nullable="true" remarks="" size="1024" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="43" name="guestpassword" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="44" name="showpresentation" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="45" name="grade" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="bigbluebuttonbn_logs" numRows="0" remarks="The bigbluebuttonbn table to store meeting activity events" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="bigbluebuttonbnid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="bigbluebuttonbn"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="meetingid" nullable="false" remarks="" size="256" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="log" nullable="false" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="meta" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bigblogs_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="bigblogs_coubig_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="bigbluebuttonbnid"/>
         </index>
         <index name="bigblogs_coubiguselog_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="bigbluebuttonbnid"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="log"/>
         </index>
         <index name="bigblogs_log_ix" unique="false">
            <column ascending="true" name="log"/>
         </index>
         <index name="bigblogs_uselog_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="log"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="bigbluebuttonbn_recordings" numRows="0" remarks="The bigbluebuttonbn table to store references to recordings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="bigbluebuttonbnid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="bigbreco_big2_fk" implied="false" onDeleteCascade="false" table="bigbluebuttonbn"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="groupid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="recordingid" nullable="false" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="headless" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="imported" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="status" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="importeddata" nullable="true" remarks="This is the remote recording data stored as json and kept for future reference." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="bigbreco_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bigbreco_big_ix" unique="false">
            <column ascending="true" name="bigbluebuttonbnid"/>
         </index>
         <index name="bigbreco_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="bigbreco_rec_ix" unique="false">
            <column ascending="true" name="recordingid"/>
         </index>
         <index name="bigbreco_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="block" numRows="0" remarks="contains all installed blocks" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12">
            <child catalog="mdl52er_erd" column="blockname" foreignKey="block_instances_erd_block_name" implied="false" onDeleteCascade="false" table="block_instances"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="cron" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="lastcron" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bloc_nam_uix" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="block_instances" numRows="0" remarks="This table stores block instances. The type of block this is is given by the blockname column. The places this block instance appears is controlled by the parentcontexid, showinsubcontexts, pagetypepattern and subpagepattern fields. Where the block appears on the page (by default) is controlled by the defaultposition and defaultweight columns. The block's own configuration is stored serialized in configdata." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="blockinstanceid" foreignKey="blocposi_blo2_fk" implied="false" onDeleteCascade="false" table="block_positions"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="blockname" nullable="false" remarks="The type of block this is. Foreign key, references block.name." size="40" type="VARCHAR" typeCode="12">
            <parent catalog="mdl52er_erd" column="name" foreignKey="block_instances_erd_block_name" implied="false" onDeleteCascade="false" table="block"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="parentcontextid" nullable="false" remarks="The context within which this block appears. Foreign key, references context.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blocinst_par2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="showinsubcontexts" nullable="false" remarks="If 1, this block appears on all matching pages in subcontexts of parentcontextid, as well in pages belonging to parentcontextid." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="requiredbytheme" nullable="false" remarks="If 1, this block was created because it was required by the theme and did not exist." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="pagetypepattern" nullable="false" remarks="The types of page this block appears on. Either an exact page type like mod-quiz-view, or a pattern like mod-quiz-* or course-view-*. Note that course-view-* will match course-view." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="subpagepattern" nullable="true" remarks="Further restrictions on where this block appears. In some places, e.g. during a quiz or lesson attempt, different pages have different subpage ids. If this field is not null, the block only appears on that particular subpage." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="defaultregion" nullable="false" remarks="Which block region this block should appear in on each page, in the absence of a specific position in the block_positions table." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="defaultweight" nullable="false" remarks="Used to order the blocks within a block region. Again, may be overridden by the block_positions table for a specific page where this block appears." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="configdata" nullable="true" remarks="A serialized blob of configuration data for this block instance." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="Time at which this block instance was originally created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timemodified" nullable="false" remarks="Time at which block instance was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="blocinst_blo_ix" unique="false">
            <column ascending="true" name="blockname"/>
         </index>
         <index name="blocinst_par_ix" unique="false">
            <column ascending="true" name="parentcontextid"/>
         </index>
         <index name="blocinst_parshopagsub_ix" unique="false">
            <column ascending="true" name="parentcontextid"/>
            <column ascending="true" name="showinsubcontexts"/>
            <column ascending="true" name="pagetypepattern"/>
            <column ascending="true" name="subpagepattern"/>
         </index>
         <index name="blocinst_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="block_positions" numRows="0" remarks="Stores the position of a sticky block_instance on a another page than the one where it was added." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="blockinstanceid" nullable="false" remarks="The block_instance this position relates to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blocposi_blo2_fk" implied="false" onDeleteCascade="false" table="block_instances"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="With pagetype and subpage, defines the page we are setting the position for." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blocposi_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="pagetype" nullable="false" remarks="With contextid and subpage, defines the page we are setting the position for." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="subpage" nullable="false" remarks="With contextid and pagetype, defines the page we are setting the position for." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="visible" nullable="false" remarks="Whether this block instance is visible on this page." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="region" nullable="false" remarks="Which block region on this page this block should appear in." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="weight" nullable="false" remarks="Used to order the blocks within a block region." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="blocposi_blo_ix" unique="false">
            <column ascending="true" name="blockinstanceid"/>
         </index>
         <index name="blocposi_bloconpagsub_uix" unique="true">
            <column ascending="true" name="blockinstanceid"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="pagetype"/>
            <column ascending="true" name="subpage"/>
         </index>
         <index name="blocposi_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="block_recent_activity" numRows="0" remarks="Recent activity block" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="Course id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="cmid" nullable="false" remarks="Course module id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="User performing the action" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="block_recent_activity_erd_user_id" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="action" nullable="false" remarks="0 created, 1 updated, 2 deleted" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modname" nullable="true" remarks="module type name (for delete action)" size="20" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="block_recent_activity_erd_user_id" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="blocreceacti_coutim_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="timecreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="block_recentlyaccesseditems" numRows="0" remarks="Most recently accessed items accessed by a user" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="Course id the item belongs to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blocrece_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="cmid" nullable="false" remarks="Item course module id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blocrece_cmi2_fk" implied="false" onDeleteCascade="false" table="course_modules"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="User id that accessed the item" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blocrece_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timeaccess" nullable="false" remarks="Time the user accessed the last time an item" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="blocrece_cmi_ix" unique="false">
            <column ascending="true" name="cmid"/>
         </index>
         <index name="blocrece_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="blocrece_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="blocrece_usecoucmi_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="cmid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="block_rss_client" numRows="0" remarks="Remote news feed information. Contains the news feed id, the userid of the user who added the feed, the title of the feed itself and a description of the feed contents along with the url used to access the remote feed. Preferredtitle is a field for future use - intended to allow for custom titles rather than those found in the feed" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="block_rss_client_erd_userid" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="title" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="preferredtitle" nullable="false" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="shared" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="url" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="skiptime" nullable="false" remarks="How many seconds skip this feed for (increases every time it fails, resets to 0 when it succeeds)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="skipuntil" nullable="false" remarks="Do not query this RSS feed again until this time" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="block_rss_client_erd_userid" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="blog_association" numRows="0" remarks="Associations of blog entries with courses and module instances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blogasso_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="blogid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blogasso_blo2_fk" implied="false" onDeleteCascade="false" table="post"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="blogasso_blo_ix" unique="false">
            <column ascending="true" name="blogid"/>
         </index>
         <index name="blogasso_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="blog_external" numRows="0" remarks="External blog links used for RSS copying of blog entries to Moodle user blogs" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="blogexte_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="url" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="filtertags" nullable="true" remarks="Comma-separated list of tags that will be used to filter which entries are copied over from the external blog. They refer to existing tags in the external blog." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="failedlastsync" nullable="false" remarks="Whether or not the last sync failed for some reason" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timefetched" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="blogexte_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="book" numRows="0" remarks="Defines book" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="bookid" foreignKey="book_chapters_erd_book_id" implied="false" onDeleteCascade="false" table="book_chapters"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="book_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="numbering" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="navstyle" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="customtitles" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="revision" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="book_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="book_chapters" numRows="0" remarks="Defines book_chapters" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="bookid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="book_chapters_erd_book_id" implied="false" onDeleteCascade="false" table="book"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pagenum" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="subchapter" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="title" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="content" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="contentformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="hidden" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="importsrc" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="bookchap_boo_ix" unique="false">
            <column ascending="true" name="bookid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="cache_filters" numRows="0" remarks="For keeping information about cached data" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="filter" nullable="false" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="version" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="md5key" nullable="false" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="rawtext" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cachfilt_filmd5_ix" unique="false">
            <column ascending="true" name="filter"/>
            <column ascending="true" name="md5key"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="cache_flags" numRows="0" remarks="Cache of time-sensitive flags" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="flagtype" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="expiry" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cachflag_fla_ix" unique="false">
            <column ascending="true" name="flagtype"/>
         </index>
         <index name="cachflag_nam_ix" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="capabilities" numRows="0" remarks="this defines all capabilities" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12">
            <child catalog="mdl52er_erd" column="capability" foreignKey="rolecapa_cap2_fk" implied="false" onDeleteCascade="false" table="role_capabilities"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="captype" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="contextlevel" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="riskbitmask" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="capa_nam_uix" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="choice" numRows="0" remarks="Available choices are stored here" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="choiceid" foreignKey="choiansw_cho2_fk" implied="false" onDeleteCascade="false" table="choice_answers"/>
            <child catalog="mdl52er_erd" column="choiceid" foreignKey="choiopti_cho2_fk" implied="false" onDeleteCascade="false" table="choice_options"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="publish" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="showresults" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="display" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="allowupdate" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="allowmultiple" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="showunanswered" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="includeinactive" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="limitanswers" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timeopen" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="timeclose" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="showpreview" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="completionsubmit" nullable="false" remarks="If this field is set to 1, then the activity will be automatically marked as &amp;#039;complete&amp;#039; once the user submits their choice." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="showavailable" nullable="false" remarks="If this field is set to 1, then the the number of available space on choice options will be shown, given limitanswers is set to 1." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="choi_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="choice_answers" numRows="0" remarks="choices performed by users" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="choiceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="choiansw_cho2_fk" implied="false" onDeleteCascade="false" table="choice"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="optionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="choiansw_opt2_fk" implied="false" onDeleteCascade="false" table="choice_options"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="choiansw_cho_ix" unique="false">
            <column ascending="true" name="choiceid"/>
         </index>
         <index name="choiansw_opt_ix" unique="false">
            <column ascending="true" name="optionid"/>
         </index>
         <index name="choiansw_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="choice_options" numRows="0" remarks="available options to choice" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="optionid" foreignKey="choiansw_opt2_fk" implied="false" onDeleteCascade="false" table="choice_answers"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="choiceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="choiopti_cho2_fk" implied="false" onDeleteCascade="false" table="choice"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="text" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="maxanswers" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="choiopti_cho_ix" unique="false">
            <column ascending="true" name="choiceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="cohort" numRows="0" remarks="Each record represents one cohort (aka site-wide group)." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="cohortid" foreignKey="cohomemb_coh2_fk" implied="false" onDeleteCascade="false" table="cohort_members"/>
            <child catalog="mdl52er_erd" column="cohortid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="competency_templatecohort"/>
            <child catalog="mdl52er_erd" column="cohortid" foreignKey="tool_cohortroles_erd_cohort" implied="false" onDeleteCascade="false" table="tool_cohortroles"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="Context is usually ignored in sync operations so that the cohorts may be moved freely around in the context tree without any side affects." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="coho_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="Short human readable name for the cohort, does not have to be unique" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="idnumber" nullable="true" remarks="Unique identifier of a cohort, useful especially for mapping to external entities" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="Standard description text box" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="visible" nullable="false" remarks="Visibility to teachers" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="component" nullable="false" remarks="Component (plugintype_pluignname) that manages the cohort, manual modifications are allowed only when set to NULL" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="theme" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="coho_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="cohort_members" numRows="0" remarks="Link a user to a cohort." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="cohortid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="cohomemb_coh2_fk" implied="false" onDeleteCascade="false" table="cohort"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="cohomemb_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timeadded" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cohomemb_coh_ix" unique="false">
            <column ascending="true" name="cohortid"/>
         </index>
         <index name="cohomemb_cohuse_uix" unique="true">
            <column ascending="true" name="cohortid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="cohomemb_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="comments" numRows="0" remarks="moodle comments module" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="component" nullable="true" remarks="The plugin this comment belongs to." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="commentarea" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="content" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="format" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comm_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comm_concomite_ix" unique="false">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="commentarea"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="comm_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="communication" numRows="0" remarks="Communication records" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="commid" foreignKey="commcust_com2_fk" implied="false" onDeleteCascade="false" table="communication_customlink"/>
            <child catalog="mdl52er_erd" column="commid" foreignKey="commuser_com2_fk" implied="false" onDeleteCascade="false" table="communication_user"/>
            <child catalog="mdl52er_erd" column="commid" foreignKey="matrroom_com2_fk" implied="false" onDeleteCascade="false" table="matrix_room"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="The id of the context that this communication instance relates to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comm_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="instanceid" nullable="false" remarks="ID of the instance where the communication is a part of" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="component" nullable="false" remarks="Component of the instance where the communication room is a part of" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="instancetype" nullable="false" remarks="The type of the instance for the given component" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="provider" nullable="false" remarks="Name of the selected communication provider" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="roomname" nullable="true" remarks="Name of the communication room" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="avatarfilename" nullable="true" remarks="Name of the avatar file name for the communication instance" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="active" nullable="false" remarks="The communication instance is active or not" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="avatarsynced" nullable="false" remarks="Indicate if the avatar has been synced with the provider" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comm_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="communication_customlink" numRows="0" remarks="Stores the link associated with a custom link communication instance." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="commid" nullable="false" remarks="ID of the communication record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="commcust_com2_fk" implied="false" onDeleteCascade="false" table="communication"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="url" nullable="true" remarks="URL being linked to by the provider" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="commcust_com_ix" unique="false">
            <column ascending="true" name="commid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="communication_user" numRows="0" remarks="Communication user records mapping" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="commid" nullable="false" remarks="ID of the communication instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="commuser_com2_fk" implied="false" onDeleteCascade="false" table="communication"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="ID of the moodle user to map with communication instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="commuser_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="synced" nullable="false" remarks="The user is synced or not" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="deleted" nullable="false" remarks="The user need to be deleted or not" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="commuser_com_ix" unique="false">
            <column ascending="true" name="commid"/>
         </index>
         <index name="commuser_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency" numRows="0" remarks="This table contains the master record of each competency in a framework" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="compcour_com2_fk" implied="false" onDeleteCascade="false" table="competency_coursecomp"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="compmodu_com2_fk" implied="false" onDeleteCascade="false" table="competency_modulecomp"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="competency_plancomp_erd_competency" implied="false" onDeleteCascade="false" table="competency_plancomp"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="comprela_com2_fk" implied="false" onDeleteCascade="false" table="competency_relatedcomp"/>
            <child catalog="mdl52er_erd" column="relatedcompetencyid" foreignKey="comprela_rel2_fk" implied="false" onDeleteCascade="false" table="competency_relatedcomp"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="comptemp_com2_fk" implied="false" onDeleteCascade="false" table="competency_templatecomp"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="competency_usercomp_erd_competency" implied="false" onDeleteCascade="false" table="competency_usercomp"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="competency_usercompcourse_erd_competency" implied="false" onDeleteCascade="false" table="competency_usercompcourse"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="competency_usercompplan_erd_competency" implied="false" onDeleteCascade="false" table="competency_usercompplan"/>
            <child catalog="mdl52er_erd" column="competencyid" foreignKey="competency_userevidencecomp_erd_competency" implied="false" onDeleteCascade="false" table="competency_userevidencecomp"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="shortname" nullable="true" remarks="Shortname of a competency" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="Description of a single competency" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="descriptionformat" nullable="false" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="idnumber" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="competencyframeworkid" nullable="false" remarks="The framework this competency relates to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_erd_competency_framework" implied="false" onDeleteCascade="false" table="competency_framework"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="parentid" nullable="false" remarks="The parent competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="path" nullable="false" remarks="Used to speed up queries that use an entire branch of the tree. Looks like /5/34/54." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="sortorder" nullable="false" remarks="Relative sort order within the branch" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="ruletype" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="ruleoutcome" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="ruleconfig" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="scaleid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comp_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="scaleconfiguration" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="timecreated" nullable="false" remarks="The time this competency was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="timemodified" nullable="false" remarks="The time this competency was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="usermodified" nullable="true" remarks="The user who last modified this competency" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comp_comidn_uix" unique="true">
            <column ascending="true" name="competencyframeworkid"/>
            <column ascending="true" name="idnumber"/>
         </index>
         <index name="comp_rul_ix" unique="false">
            <column ascending="true" name="ruleoutcome"/>
         </index>
         <index name="comp_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
         <index name="comp_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_coursecomp" numRows="0" remarks="Link a competency to a course." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="The course this competency is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compcour_cou3_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="competencyid" nullable="false" remarks="The competency that is linked to this course." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compcour_com2_fk" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="ruleoutcome" nullable="false" remarks="The rule that applies to the competency when the course is completed." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="The time this link was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="false" remarks="The time this link was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="usermodified" nullable="false" remarks="The user who modified this link." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compcour_use5_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="sortorder" nullable="false" remarks="The display order for this link." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compcour_com_ix" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compcour_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="compcour_coucom_uix" unique="true">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compcour_courul_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="ruleoutcome"/>
         </index>
         <index name="compcour_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_coursecompsetting" numRows="0" remarks="This table contains the course specific settings for competencies." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="The course this setting is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compcour_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pushratingstouserplans" nullable="true" remarks="Does this course push ratings to user plans?" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="The time this setting was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="false" remarks="The time this setting was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="true" remarks="The user who last modified this setting" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compcour_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compcour_cou_uix" unique="true">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="compcour_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_evidence" numRows="0" remarks="The evidence linked to a user competency" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="usercompetencyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_evidence_erd_competency_usercomp" implied="false" onDeleteCascade="false" table="competency_usercomp"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compevid_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="action" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="actionuserid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compevid_act2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="descidentifier" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="desccomponent" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="desca" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="url" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="grade" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="note" nullable="true" remarks="A non-localised text to attach to the evidence." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compevid_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compevid_act_ix" unique="false">
            <column ascending="true" name="actionuserid"/>
         </index>
         <index name="compevid_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="compevid_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="compevid_use_ix" unique="false">
            <column ascending="true" name="usercompetencyid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_framework" numRows="0" remarks="List of competency frameworks." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="competencyframeworkid" foreignKey="competency_erd_competency_framework" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="shortname" nullable="true" remarks="Short name for the competency framework." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compfram_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="idnumber" nullable="true" remarks="Unique idnumber for this competency framework." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="Description of this competency framework" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="descriptionformat" nullable="false" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="scaleid" nullable="true" remarks="Scale used to define competency." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compfram_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="scaleconfiguration" nullable="false" remarks="Scale information." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="visible" nullable="false" remarks="Used to show/hide this competency framework." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="taxonomies" nullable="false" remarks="Sequence of terms to use for each competency level." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="The time this competency framework was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timemodified" nullable="false" remarks="The time this competency framework was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="usermodified" nullable="true" remarks="The user who last modified this framework" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compfram_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compfram_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="compfram_idn_uix" unique="true">
            <column ascending="true" name="idnumber"/>
         </index>
         <index name="compfram_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
         <index name="compfram_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_modulecomp" numRows="0" remarks="Link a competency to a module." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="cmid" nullable="false" remarks="ID of the record in the course_modules table." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compmodu_cmi2_fk" implied="false" onDeleteCascade="false" table="course_modules"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timecreated" nullable="false" remarks="The time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timemodified" nullable="false" remarks="The time this record was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="usermodified" nullable="false" remarks="The user who last modified this field." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compmodu_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="sortorder" nullable="false" remarks="The field used to naturally sort this link." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="competencyid" nullable="false" remarks="The course competency this activity is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compmodu_com2_fk" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="ruleoutcome" nullable="false" remarks="The outcome when an activity is completed." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="overridegrade" nullable="false" remarks="Enables the ability to override an existing competencys grade." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compmodu_cmi_ix" unique="false">
            <column ascending="true" name="cmid"/>
         </index>
         <index name="compmodu_cmicom_uix" unique="true">
            <column ascending="true" name="cmid"/>
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compmodu_cmirul_ix" unique="false">
            <column ascending="true" name="cmid"/>
            <column ascending="true" name="ruleoutcome"/>
         </index>
         <index name="compmodu_com_ix" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compmodu_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_plan" numRows="0" remarks="Learning plans" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="descriptionformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="templateid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_plan_erd_competency_template" implied="false" onDeleteCascade="false" table="competency_template"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="origtemplateid" nullable="true" remarks="The template ID this plan was based on originally" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="status" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="duedate" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="reviewerid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compplan_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compplan_stadue_ix" unique="false">
            <column ascending="true" name="status"/>
            <column ascending="true" name="duedate"/>
         </index>
         <index name="compplan_tem_ix" unique="false">
            <column ascending="true" name="templateid"/>
         </index>
         <index name="compplan_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="compplan_usesta_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_plancomp" numRows="0" remarks="Plan competencies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="competencyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_plancomp_erd_competency" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="sortorder" nullable="true" remarks="Relative sort order" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compplan_use5_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="competency_plancomp_erd_competency" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compplan_placom_uix" unique="true">
            <column ascending="true" name="planid"/>
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compplan_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_relatedcomp" numRows="0" remarks="Related competencies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="competencyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comprela_com2_fk" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="relatedcompetencyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comprela_rel2_fk" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comprela_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comprela_com_ix" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="comprela_rel_ix" unique="false">
            <column ascending="true" name="relatedcompetencyid"/>
         </index>
         <index name="comprela_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_template" numRows="0" remarks="Learning plan templates." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="templateid" foreignKey="competency_plan_erd_competency_template" implied="false" onDeleteCascade="false" table="competency_plan"/>
            <child catalog="mdl52er_erd" column="templateid" foreignKey="competency_templatecohort_erd_competency_template" implied="false" onDeleteCascade="false" table="competency_templatecohort"/>
            <child catalog="mdl52er_erd" column="templateid" foreignKey="comptemp_tem2_fk" implied="false" onDeleteCascade="false" table="competency_templatecomp"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="shortname" nullable="true" remarks="Short name for the learning plan template." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comptemp_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="Description of this learning plan template" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="descriptionformat" nullable="false" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="visible" nullable="false" remarks="Used to show/hide this learning plan template." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="duedate" nullable="true" remarks="The default due date for instances of this plan." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="The time this learning plan template was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="false" remarks="The time this learning plan template was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="usermodified" nullable="true" remarks="The user who last modified this learning plan template" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comptemp_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comptemp_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="comptemp_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_templatecohort" numRows="0" remarks="Default comment for the table, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="templateid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_templatecohort_erd_competency_template" implied="false" onDeleteCascade="false" table="competency_template"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="cohortid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="cohort"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comptemp_use8_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comptemp_tem2_ix" unique="false">
            <column ascending="true" name="templateid"/>
         </index>
         <index name="comptemp_temcoh_uix" unique="true">
            <column ascending="true" name="templateid"/>
            <column ascending="true" name="cohortid"/>
         </index>
         <index name="comptemp_use3_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_templatecomp" numRows="0" remarks="Link a competency to a learning plan template." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="templateid" nullable="false" remarks="The template this competency is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comptemp_tem2_fk" implied="false" onDeleteCascade="false" table="competency_template"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="competencyid" nullable="false" remarks="The competency that is linked to this course." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comptemp_com2_fk" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="The time this link was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="false" remarks="The time this link was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="false" remarks="The user who modified this link." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="comptemp_use6_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="sortorder" nullable="true" remarks="Relative sort order" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="comptemp_com_ix" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="comptemp_tem_ix" unique="false">
            <column ascending="true" name="templateid"/>
         </index>
         <index name="comptemp_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_usercomp" numRows="0" remarks="User competencies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="usercompetencyid" foreignKey="competency_evidence_erd_competency_usercomp" implied="false" onDeleteCascade="false" table="competency_evidence"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="User associated to the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="competencyid" nullable="false" remarks="Competency associated to the user." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_usercomp_erd_competency" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="status" nullable="false" remarks="Competency status." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="reviewerid" nullable="true" remarks="User that reviewed the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="proficiency" nullable="true" remarks="Indicate if the competency is proficient not." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="grade" nullable="true" remarks="Grade assigned to the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compuser_use6_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="competency_usercomp_erd_competency" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compuser_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="compuser_usecom_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="competencyid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_usercompcourse" numRows="0" remarks="User competencies in a course" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="User associated to the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="courseid" nullable="false" remarks="The course this competency is linked to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="competencyid" nullable="false" remarks="Competency associated to the user." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_usercompcourse_erd_competency" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="proficiency" nullable="true" remarks="Indicate if the competency is proficient not." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="grade" nullable="true" remarks="The course grade assigned for the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compuser_use8_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="competency_usercompcourse_erd_competency" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compuser_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="compuser_usecoucom_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="competencyid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_usercompplan" numRows="0" remarks="User competencies plans" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="User associated to the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="competencyid" nullable="false" remarks="Competency associated to the user." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_usercompplan_erd_competency" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="planid" nullable="false" remarks="Plan associated to the user." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="proficiency" nullable="true" remarks="Indicate if the competency is proficient not." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="grade" nullable="true" remarks="Grade assigned to the competency." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="sortorder" nullable="true" remarks="Relative sort order" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compuser_use10_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="competency_usercompplan_erd_competency" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compuser_use3_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="compuser_usecompla_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="competencyid"/>
            <column ascending="true" name="planid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_userevidence" numRows="0" remarks="The evidence of prior learning" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_userevidence_erd_competency_usercomp" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="descriptionformat" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="url" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compuser_use12_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="compuser_use4_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="compuser_use5_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="competency_userevidencecomp" numRows="0" remarks="Relationship between user evidence and competencies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userevidenceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="competencyid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="competency_userevidencecomp_erd_competency" implied="false" onDeleteCascade="false" table="competency"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="compuser_use14_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="competency_userevidencecomp_erd_competency" unique="false">
            <column ascending="true" name="competencyid"/>
         </index>
         <index name="compuser_use6_ix" unique="false">
            <column ascending="true" name="userevidenceid"/>
         </index>
         <index name="compuser_use7_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="compuser_usecom2_uix" unique="true">
            <column ascending="true" name="userevidenceid"/>
            <column ascending="true" name="competencyid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="config" numRows="0" remarks="Moodle configuration variables" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="configlogid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="adminpresets_app_it"/>
            <child catalog="mdl52er_erd" column="configlogid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="adminpresets_app_it_a"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="conf_nam_uix" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="config_log" numRows="0" remarks="Changes done in server configuration through admin UI" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="conflog_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="plugin" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="value" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="oldvalue" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="conflog_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="conflog_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="config_plugins" numRows="0" remarks="Moodle modules and plugins configuration variables" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="core" digits="0" id="1" name="plugin" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="confplug_plunam_uix" unique="true">
            <column ascending="true" name="plugin"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="contentbank_content" numRows="0" remarks="This table stores content data in the content bank." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="contenttype" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextid" nullable="false" remarks="References context.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="contcont_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="visibility" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="instanceid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="configdata" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="usercreated" nullable="false" remarks="The original author of the content" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="contcont_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="usermodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="contcont_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="contcont_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="contcont_conconins_ix" unique="false">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="contenttype"/>
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="contcont_nam_ix" unique="false">
            <column ascending="true" name="name"/>
         </index>
         <index name="contcont_use2_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
         <index name="contcont_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="context" numRows="0" remarks="one of these must be set" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="ai_action_register"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="ai_policy_register"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="analindicalc_con2_fk" implied="false" onDeleteCascade="false" table="analytics_indicator_calc"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="analpred_con2_fk" implied="false" onDeleteCascade="false" table="analytics_predictions"/>
            <child catalog="mdl52er_erd" column="parentcontextid" foreignKey="blocinst_par2_fk" implied="false" onDeleteCascade="false" table="block_instances"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="blocposi_con2_fk" implied="false" onDeleteCascade="false" table="block_positions"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="blogasso_con2_fk" implied="false" onDeleteCascade="false" table="blog_association"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="coho_con2_fk" implied="false" onDeleteCascade="false" table="cohort"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="comments"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="comm_con2_fk" implied="false" onDeleteCascade="false" table="communication"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="compevid_con2_fk" implied="false" onDeleteCascade="false" table="competency_evidence"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="compfram_con2_fk" implied="false" onDeleteCascade="false" table="competency_framework"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="comptemp_con2_fk" implied="false" onDeleteCascade="false" table="competency_template"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="contcont_con2_fk" implied="false" onDeleteCascade="false" table="contentbank_content"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="custcate_con2_fk" implied="false" onDeleteCascade="false" table="customfield_category"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="custdata_con2_fk" implied="false" onDeleteCascade="false" table="customfield_data"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="enroltitool_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_tools"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="extetoke_con2_fk" implied="false" onDeleteCascade="false" table="external_tokens"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="favo_con2_fk" implied="false" onDeleteCascade="false" table="favourite"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="file_con2_fk" implied="false" onDeleteCascade="false" table="files"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="filtacti_con2_fk" implied="false" onDeleteCascade="false" table="filter_active"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="filtconf_con2_fk" implied="false" onDeleteCascade="false" table="filter_config"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="grade_letters_erd_context" implied="false" onDeleteCascade="false" table="grade_letters"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="gradepenalty_duedate_rule"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="gradarea_con2_fk" implied="false" onDeleteCascade="false" table="grading_areas"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="logsstanlog_con2_fk" implied="false" onDeleteCascade="false" table="logstore_standard_log"/>
            <child catalog="mdl52er_erd" column="contextinstanceid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="logstore_standard_log"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="messconv_con2_fk" implied="false" onDeleteCascade="false" table="message_conversations"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="paymacco_con2_fk" implied="false" onDeleteCascade="false" table="payment_accounts"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="question_categories"/>
            <child catalog="mdl52er_erd" column="usingcontextid" foreignKey="quesrefe_usi2_fk" implied="false" onDeleteCascade="false" table="question_references"/>
            <child catalog="mdl52er_erd" column="questionscontextid" foreignKey="quessetrefe_que2_fk" implied="false" onDeleteCascade="false" table="question_set_references"/>
            <child catalog="mdl52er_erd" column="usingcontextid" foreignKey="quessetrefe_usi2_fk" implied="false" onDeleteCascade="false" table="question_set_references"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="quesusag_con2_fk" implied="false" onDeleteCascade="false" table="question_usages"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="rati_con2_fk" implied="false" onDeleteCascade="false" table="rating"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="reporepo_con2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="repoinst_con2_fk" implied="false" onDeleteCascade="false" table="repository_instances"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="roleassi_con2_fk" implied="false" onDeleteCascade="false" table="role_assignments"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="rolecapa_con2_fk" implied="false" onDeleteCascade="false" table="role_capabilities"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="rolename_con2_fk" implied="false" onDeleteCascade="false" table="role_names"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="searinderequ_con2_fk" implied="false" onDeleteCascade="false" table="search_index_requests"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="search_simpledb_index"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="taginst_con2_fk" implied="false" onDeleteCascade="false" table="tag_instance"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tiny_autosave"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="toolbricarea_con2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_areas"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_brickfield_process"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_brickfield_schedule"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="tooldatactxe_con_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxexpired"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="tooldatactxi_con_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxinstance"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_dataprivacy_ctxlst_ctx"/>
            <child catalog="mdl52er_erd" column="contextid" foreignKey="toolmonieven_con3_fk" implied="false" onDeleteCascade="false" table="tool_monitor_events"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="contextlevel" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="instanceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="contextinstanceid" foreignKey="toolmonieven_con4_fk" implied="false" onDeleteCascade="false" table="tool_monitor_events"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="path" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="depth" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="locked" nullable="false" remarks="Whether this context and its children are locked" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cont_conins_uix" unique="true">
            <column ascending="true" name="contextlevel"/>
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="cont_ins_ix" unique="false">
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="cont_pat_ix" unique="false">
            <column ascending="true" name="path"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="context_temp" numRows="0" remarks="Used by build_context_path() in upgrade and cron to keep context depths and paths in sync." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="This id isn&amp;#039;t autonumeric/sequence. It&amp;#039;s the context-&amp;gt;id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="path" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="depth" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="locked" nullable="false" remarks="Whether this context and its children are locked" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course" numRows="0" remarks="Central course table. For reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#COURSE_REPORTS" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="courseid" foreignKey="backup_courses_erd_courseid" implied="false" onDeleteCascade="false" table="backup_courses"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="badg_cou2_fk" implied="false" onDeleteCascade="false" table="badge"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="bigbluebuttonbn_logs"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="bigbluebuttonbn_recordings"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="block_recent_activity"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="blocrece_cou2_fk" implied="false" onDeleteCascade="false" table="block_recentlyaccesseditems"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="book_cou2_fk" implied="false" onDeleteCascade="false" table="book"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="compcour_cou3_fk" implied="false" onDeleteCascade="false" table="competency_coursecomp"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="compcour_cou2_fk" implied="false" onDeleteCascade="false" table="competency_coursecompsetting"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="competency_usercompcourse"/>
            <child catalog="mdl52er_erd" column="originalcourseid" foreignKey="cour_ori2_fk" implied="false" onDeleteCascade="false" table="course"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="course_completion_aggr_methd_erd_course_id" implied="false" onDeleteCascade="false" table="course_completion_aggr_methd"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="course_completion_crit_compl_erd_course_id" implied="false" onDeleteCascade="false" table="course_completion_crit_compl"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="course_completion_criteria_erd_course_id" implied="false" onDeleteCascade="false" table="course_completion_criteria"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="courcompdefa_cou2_fk" implied="false" onDeleteCascade="false" table="course_completion_defaults"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="course_completions_erd_course_id" implied="false" onDeleteCascade="false" table="course_completions"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="courformopti_cou2_fk" implied="false" onDeleteCascade="false" table="course_format_options"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="course_modules_erd_course_id" implied="false" onDeleteCascade="false" table="course_modules"/>
            <child catalog="mdl52er_erd" column="coursemoduleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course_modules_viewed"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="course_published_erd_course_id" implied="false" onDeleteCascade="false" table="course_published"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="course_sections_erd_course_id" implied="false" onDeleteCascade="false" table="course_sections"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="enro_cou2_fk" implied="false" onDeleteCascade="false" table="enrol"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="enroflat_cou2_fk" implied="false" onDeleteCascade="false" table="enrol_flatfile"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="enropayp_cou2_fk" implied="false" onDeleteCascade="false" table="enrol_paypal"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="event"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="evensubs_cou2_fk" implied="false" onDeleteCascade="false" table="event_subscriptions"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="feedcomp_cou2_fk" implied="false" onDeleteCascade="false" table="feedback_completed"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="feedback_completedtmp"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="feedback_sitecourse_map"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="folder_erd_courseid" implied="false" onDeleteCascade="false" table="folder"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="gradcate_cou2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="gradcatehist_cou2_fk" implied="false" onDeleteCascade="false" table="grade_categories_history"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="graditem_cou2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="graditemhist_cou2_fk" implied="false" onDeleteCascade="false" table="grade_items_history"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="gradoutc_cou2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="gradoutccour_cou2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes_courses"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="gradoutchist_cou2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes_history"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="gradsett_cou2_fk" implied="false" onDeleteCascade="false" table="grade_settings"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="grou_cou5_fk" implied="false" onDeleteCascade="false" table="groupings"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="grou_cou3_fk" implied="false" onDeleteCascade="false" table="groups"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="h5pa_cou2_fk" implied="false" onDeleteCascade="false" table="h5pactivity"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="imscp_erd_courseid" implied="false" onDeleteCascade="false" table="imscp"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="label_erd_courseid" implied="false" onDeleteCascade="false" table="label"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="logsstanlog_cou2_fk" implied="false" onDeleteCascade="false" table="logstore_standard_log"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="lti_coursevisible"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="ltitoolsett_cou3_fk" implied="false" onDeleteCascade="false" table="lti_tool_settings"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="ltiservice_gradebookservices"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="page_erd_courseid" implied="false" onDeleteCascade="false" table="page"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="post_cou3_fk" implied="false" onDeleteCascade="false" table="post"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="qban_cou2_fk" implied="false" onDeleteCascade="false" table="qbank"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="resource_erd_courseid" implied="false" onDeleteCascade="false" table="resource"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="resource_old"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="scale"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="scalhist_cou2_fk" implied="false" onDeleteCascade="false" table="scale_history"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="search_simpledb_index"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="stats_daily_erd_courseid" implied="false" onDeleteCascade="false" table="stats_daily"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="stats_monthly_erd_courseid" implied="false" onDeleteCascade="false" table="stats_monthly"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="stats_user_daily_erd_courseid" implied="false" onDeleteCascade="false" table="stats_user_daily"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="stats_user_monthly_erd_courseid" implied="false" onDeleteCascade="false" table="stats_user_monthly"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="stats_user_weekly_erd_courseid" implied="false" onDeleteCascade="false" table="stats_user_weekly"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="stats_weekly_erd_courseid" implied="false" onDeleteCascade="false" table="stats_weekly"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="subs_cou2_fk" implied="false" onDeleteCascade="false" table="subsection"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="toolbricarea_cou2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_areas"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="toolbriccachacts_cou2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_cache_acts"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="toolbriccachchec_cou2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_cache_check"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_brickfield_process"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="toolbricsumm_cou2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_summary"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="toolmonieven_cou2_fk" implied="false" onDeleteCascade="false" table="tool_monitor_events"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_monitor_rules"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_monitor_subscriptions"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="toolrecycour_cou2_fk" implied="false" onDeleteCascade="false" table="tool_recyclebin_course"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="url_erd_courseid" implied="false" onDeleteCascade="false" table="url"/>
            <child catalog="mdl52er_erd" column="courseid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="user_lastaccess"/>
            <child catalog="mdl52er_erd" column="course" foreignKey="work_cou2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="category" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_erd_category_id" implied="false" onDeleteCascade="false" table="course_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="fullname" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="shortname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="idnumber" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="summary" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="summaryformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="topics" digits="0" id="8" name="format" nullable="false" remarks="" size="21" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="showgrades" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="newsitems" nullable="false" remarks="count of announcements in latest announcments block" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="startdate" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="enddate" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="relativedatesmode" nullable="false" remarks="Whether to let this course display course- or activity-related dates relative to the user&amp;#039;s enrolment date in this course." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="marker" nullable="false" remarks="marks a topic as highlighted, only one topic can be highlighted at a time" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="maxbytes" nullable="false" remarks="largest file that can be uploaded to the course" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="legacyfiles" nullable="false" remarks="course files are not necessary any more: 0 no legacy files, 1 legacy files disabled, 2 legacy files enabled" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="showreports" nullable="false" remarks="can a student view their own activity reports via their profile page" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="18" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="19" name="visibleold" nullable="false" remarks="the state of visible field when hiding parent category, this helps us to recover hidden states when unhiding the parent category later" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="downloadcontent" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="groupmode" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="groupmodeforce" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="defaultgroupingid" nullable="false" remarks="default grouping used in course modules, does not have key intentionally" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="24" name="lang" nullable="false" remarks="Forced language for this course. Null or &amp;#039;&amp;#039; means &amp;#039;Do not force&amp;#039;. Otherwise a Moodle lang pack name like &amp;#039;fr&amp;#039; or &amp;#039;en_us&amp;#039;." size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="25" name="calendartype" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="26" name="theme" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="requested" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="enablecompletion" nullable="false" remarks="1 = allow use of &amp;#039;completion&amp;#039; progress-tracking on this course. 0 = disable completion tracking on this course." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="completionnotify" nullable="false" remarks="Notify users when they complete this course" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="32" name="cacherev" nullable="false" remarks="Incrementing revision for validating the course content cache" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="33" name="originalcourseid" nullable="true" remarks="the id of the source course when a new course originates from a restore of another course on the same site." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="cour_ori2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="34" name="showactivitydates" nullable="false" remarks="Whether to display activity dates to user. 0 = do not display, 1 = display activity dates" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="35" name="showcompletionconditions" nullable="true" remarks="Whether to display completion conditions to user. 0 = do not display, 1 = display conditions" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="36" name="pdfexportfont" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="37" name="enableaitools" nullable="true" remarks="Whether to allow the use of AI tools in this course. 1 = enabled, 0 = disabled." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="cour_cat_ix" unique="false">
            <column ascending="true" name="category"/>
         </index>
         <index name="cour_idn_ix" unique="false">
            <column ascending="true" name="idnumber"/>
         </index>
         <index name="cour_ori_ix" unique="false">
            <column ascending="true" name="originalcourseid"/>
         </index>
         <index name="cour_sho_ix" unique="false">
            <column ascending="true" name="shortname"/>
         </index>
         <index name="cour_sor_ix" unique="false">
            <column ascending="true" name="sortorder"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_categories" numRows="0" remarks="Course categories" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="category" foreignKey="course_erd_category_id" implied="false" onDeleteCascade="false" table="course"/>
            <child catalog="mdl52er_erd" column="parent" foreignKey="course_categories_erd_course_id" implied="false" onDeleteCascade="false" table="course_categories"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="even_cat2_fk" implied="false" onDeleteCascade="false" table="event"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="ltitypecate_cat2_fk" implied="false" onDeleteCascade="false" table="lti_types_categories"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="toolbricarea_cat2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_areas"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="toolrecycate_cat2_fk" implied="false" onDeleteCascade="false" table="tool_recyclebin_category"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="idnumber" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="parent" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_categories_erd_course_id" implied="false" onDeleteCascade="false" table="course_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="coursecount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="visibleold" nullable="false" remarks="the state of visible field when hiding parent category, this helps us to recover hidden states when unhiding the parent category later" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="depth" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="12" name="path" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="theme" nullable="true" remarks="Theme for the category" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courcate_par_ix" unique="false">
            <column ascending="true" name="parent"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_completion_aggr_methd" numRows="0" remarks="Course completion aggregation methods for criteria" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_completion_aggr_methd_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="criteriatype" nullable="true" remarks="The criteria type we are aggregating, or NULL if complete course aggregation" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="method" nullable="false" remarks="1 = all, 2 = any, 3 = fraction, 4 = unit" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="value" nullable="true" remarks="NULL = all/any, 0..1 for method &amp;#039;fraction&amp;#039;, &amp;gt; 0 for method &amp;#039;unit&amp;#039;" size="10" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courcompaggrmeth_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="courcompaggrmeth_coucri_uix" unique="true">
            <column ascending="true" name="course"/>
            <column ascending="true" name="criteriatype"/>
         </index>
         <index name="courcompaggrmeth_cri_ix" unique="false">
            <column ascending="true" name="criteriatype"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_completion_crit_compl" numRows="0" remarks="Course completion user records" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_completion_crit_compl_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="criteriaid" nullable="false" remarks="Completion criteria this references" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="gradefinal" nullable="true" remarks="The final grade for the course (included regardless of whether a passing grade was required)" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="unenroled" nullable="true" remarks="Timestamp when the user was unenroled" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecompleted" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courcompcritcomp_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="courcompcritcomp_cri_ix" unique="false">
            <column ascending="true" name="criteriaid"/>
         </index>
         <index name="courcompcritcomp_tim_ix" unique="false">
            <column ascending="true" name="timecompleted"/>
         </index>
         <index name="courcompcritcomp_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="courcompcritcomp_usecoucri_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="course"/>
            <column ascending="true" name="criteriaid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_completion_criteria" numRows="0" remarks="Course completion criteria" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_completion_criteria_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="criteriatype" nullable="false" remarks="Type of criteria" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="module" nullable="true" remarks="Type of module (if using module criteria type)" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="moduleinstance" nullable="true" remarks="Course module id (if using module criteria type)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="courseinstance" nullable="true" remarks="Course instance id (if using course criteria type)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="enrolperiod" nullable="true" remarks="Number of days after enrolment the course is completed (if using enrolperiod criteria type)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timeend" nullable="true" remarks="Timestamp of the date for course completion (if using date criteria type)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="gradepass" nullable="true" remarks="The minimum grade needed to pass the course (if passing grade criteria enabled)" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="role" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courcompcrit_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_completion_defaults" numRows="0" remarks="Default settings for activities completion" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="courcompdefa_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="module" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="courcompdefa_mod2_fk" implied="false" onDeleteCascade="false" table="modules"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="completion" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="completionview" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="completionusegrade" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="completionpassgrade" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="completionexpected" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="customrules" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courcompdefa_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="courcompdefa_coumod_uix" unique="true">
            <column ascending="true" name="course"/>
            <column ascending="true" name="module"/>
         </index>
         <index name="courcompdefa_mod_ix" unique="false">
            <column ascending="true" name="module"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_completions" numRows="0" remarks="Course completion records" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_completions_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timeenrolled" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timestarted" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecompleted" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="reaggregate" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courcomp_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="courcomp_tim_ix" unique="false">
            <column ascending="true" name="timecompleted"/>
         </index>
         <index name="courcomp_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="courcomp_usecou_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_format_options" numRows="0" remarks="Stores format-specific options for the course or course section" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="Id of the course" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="courformopti_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="format" nullable="false" remarks="Format this option is for" size="21" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="sectionid" nullable="false" remarks="Null if this is a course option, otherwise id of the section this option is for" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="name" nullable="false" remarks="Name of the format option" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="value" nullable="true" remarks="Value of the format option" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courformopti_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="courformopti_couforsecnam_uix" unique="true">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="format"/>
            <column ascending="true" name="sectionid"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_modules" numRows="0" remarks="course_modules table retrofitted from MySQL" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="cmid" foreignKey="blocrece_cmi2_fk" implied="false" onDeleteCascade="false" table="block_recentlyaccesseditems"/>
            <child catalog="mdl52er_erd" column="cmid" foreignKey="compmodu_cmi2_fk" implied="false" onDeleteCascade="false" table="competency_modulecomp"/>
            <child catalog="mdl52er_erd" column="coursemoduleid" foreignKey="course_modules_completion_erd_course_modules" implied="false" onDeleteCascade="false" table="course_modules_completion"/>
            <child catalog="mdl52er_erd" column="coursemoduleid" foreignKey="post_cou4_fk" implied="false" onDeleteCascade="false" table="post"/>
            <child catalog="mdl52er_erd" column="cmid" foreignKey="quizsebquiz_cmi_fk" implied="false" onDeleteCascade="false" table="quizaccess_seb_quizsettings"/>
            <child catalog="mdl52er_erd" column="cmid" foreignKey="toolbricarea_cmi2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_areas"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_modules_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="module" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="instance" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="section" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="idnumber" nullable="true" remarks="customizable idnumber" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="added" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="score" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="indent" nullable="false" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="visibleoncoursepage" nullable="false" remarks="If stealth visibility is allowed for the course, this controls whether activity is visible on course page" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="visibleold" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="groupmode" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="groupingid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="courmodu_gro2_fk" implied="false" onDeleteCascade="false" table="groupings"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="completion" nullable="false" remarks="Whether the completion-tracking facilities are enabled for this activity. 0 = not enabled (database default) 1 = manual tracking, user can tick this activity off (UI default for most activity types) 2 = automatic tracking, system should mark completion according to rules specified in course_moduleS_completion" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="completiongradeitemnumber" nullable="true" remarks="Grade-item number used to track automatic completion, if applicable." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="completionview" nullable="false" remarks="Controls whether a page view is part of the automatic completion requirements for this activity. 0 = view not required 1 = view required" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="completionexpected" nullable="false" remarks="Date at which students are expected to complete this activity. This field is used when displaying student progress." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="completionpassgrade" nullable="false" remarks="Enable completion check on passing grade." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="showdescription" nullable="false" remarks="Some module types support a &amp;#039;description&amp;#039; which shows within the module pages. This option controls whether it also displays on the course main page. 0 = does not display (default), 1 = displays" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="availability" nullable="true" remarks="Availability restrictions for viewing this activity, in JSON format. Null if no restrictions." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="deletioninprogress" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="22" name="downloadcontent" nullable="true" remarks="Whether the ability to download course module content is enabled for this activity" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="lang" nullable="true" remarks="Forced language for this activity. Null or &amp;#039;&amp;#039; means &amp;#039;Do not force&amp;#039;. Otherwise a Moodle lang pack name like &amp;#039;fr&amp;#039; or &amp;#039;en_us&amp;#039;." size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="24" name="enableaitools" nullable="true" remarks="Whether to allow the use of AI tools in this course module. 1 = enabled, 0 = disabled." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="25" name="enabledaiactions" nullable="true" remarks="List of enabled AI actions on this course module" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courmodu_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="courmodu_gro_ix" unique="false">
            <column ascending="true" name="groupingid"/>
         </index>
         <index name="courmodu_idncou_ix" unique="false">
            <column ascending="true" name="idnumber"/>
            <column ascending="true" name="course"/>
         </index>
         <index name="courmodu_ins_ix" unique="false">
            <column ascending="true" name="instance"/>
         </index>
         <index name="courmodu_mod_ix" unique="false">
            <column ascending="true" name="module"/>
         </index>
         <index name="courmodu_vis_ix" unique="false">
            <column ascending="true" name="visible"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_modules_completion" numRows="0" remarks="Stores the completion state (completed or not completed, etc) of each user on each activity." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="coursemoduleid" nullable="false" remarks="Activity that has been completed (or not)." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_modules_completion_erd_course_modules" implied="false" onDeleteCascade="false" table="course_modules"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="ID of user who has (or hasn&amp;#039;t) completed the activity." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="completionstate" nullable="false" remarks="Whether or not the user has completed the activity. Available states: 0 = not completed [if there&amp;#039;s no row in this table, that also counts as 0] 1 = completed 2 = completed, show passed 3 = completed, show failed" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="overrideby" nullable="true" remarks="Tracks whether this completion state has been set manually to override a previous state." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="false" remarks="Time at which the completion state last changed." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courmoducomp_cou_ix" unique="false">
            <column ascending="true" name="coursemoduleid"/>
         </index>
         <index name="courmoducomp_usecou_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="coursemoduleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_modules_viewed" numRows="0" remarks="Tracks the completion viewed (viewed with cmid/userid and otherwise no row) of each user on each activity." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="coursemoduleid" nullable="false" remarks="Activity that has been viewed (or not)." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="ID of user who has (or hasn&amp;#039;t) viewed the activity." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="Time at which the completion viewed created." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courmoduview_cou_ix" unique="false">
            <column ascending="true" name="coursemoduleid"/>
         </index>
         <index name="courmoduview_usecou_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="coursemoduleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_published" numRows="0" remarks="Information about how and when an local courses were published to hubs" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="huburl" nullable="true" remarks="the url of the &amp;quot;registered on&amp;quot; hub" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="courseid" nullable="false" remarks="the id of the published course" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_published_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timepublished" nullable="false" remarks="The time when the publication occurred" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="enrollable" nullable="false" remarks="1 = enrollable, 0 = downloadable" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="hubcourseid" nullable="false" remarks="the course id on the hub server" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="status" nullable="true" remarks="is the publication published or not" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timechecked" nullable="true" remarks="the last time the status has been checked" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courpubl_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="courpubl_hub_ix" unique="false">
            <column ascending="true" name="hubcourseid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_request" numRows="0" remarks="course requests" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="fullname" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="shortname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="summary" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="summaryformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="category" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="reason" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="requester" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="password" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="courrequ_sho_ix" unique="false">
            <column ascending="true" name="shortname"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="course_sections" numRows="0" remarks="to define the sections for each course" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="course_sections_erd_course_id" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="section" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="name" nullable="true" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="summary" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="summaryformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="sequence" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="availability" nullable="true" remarks="Availability restrictions for viewing this section, in JSON format. Null if no restrictions." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="component" nullable="true" remarks="The delegate component of this section if any" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="itemid" nullable="true" remarks="The optional item id delegate component can use to identify its instance" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timemodified" nullable="false" remarks="Time at which the course section was last changed." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="coursect_comite_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="coursect_cousec_uix" unique="true">
            <column ascending="true" name="course"/>
            <column ascending="true" name="section"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="customfield_category" numRows="0" remarks="core_customfield category table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="custfiel_cat2_fk" implied="false" onDeleteCascade="false" table="customfield_field"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="custshar_cat2_fk" implied="false" onDeleteCascade="false" table="customfield_shared"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="descriptionformat" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sortorder" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="area" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="contextid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="custcate_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="shared" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="custcate_comareitesor_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="area"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="sortorder"/>
         </index>
         <index name="custcate_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="customfield_data" numRows="0" remarks="core_customfield data table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="fieldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="custdata_fie2_fk" implied="false" onDeleteCascade="false" table="customfield_field"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="instanceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intvalue" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="decvalue" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="shortcharvalue" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="charvalue" nullable="true" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="valueformat" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="valuetrust" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="contextid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="custdata_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="13" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="14" name="area" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="custdata_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="custdata_fie_ix" unique="false">
            <column ascending="true" name="fieldid"/>
         </index>
         <index name="custdata_fiedec_ix" unique="false">
            <column ascending="true" name="fieldid"/>
            <column ascending="true" name="decvalue"/>
         </index>
         <index name="custdata_fieint_ix" unique="false">
            <column ascending="true" name="fieldid"/>
            <column ascending="true" name="intvalue"/>
         </index>
         <index name="custdata_fiesho_ix" unique="false">
            <column ascending="true" name="fieldid"/>
            <column ascending="true" name="shortcharvalue"/>
         </index>
         <index name="custdata_insfiecomareite_uix" unique="true">
            <column ascending="true" name="instanceid"/>
            <column ascending="true" name="fieldid"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="area"/>
            <column ascending="true" name="itemid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="customfield_field" numRows="0" remarks="core_customfield field table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="fieldid" foreignKey="custdata_fie2_fk" implied="false" onDeleteCascade="false" table="customfield_data"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="shortname" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="type" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="descriptionformat" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="sortorder" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="categoryid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="custfiel_cat2_fk" implied="false" onDeleteCascade="false" table="customfield_category"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="configdata" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="custfiel_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="custfiel_catsor_ix" unique="false">
            <column ascending="true" name="categoryid"/>
            <column ascending="true" name="sortorder"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="customfield_shared" numRows="0" remarks="core_customfield shared category table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="categoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="custshar_cat2_fk" implied="false" onDeleteCascade="false" table="customfield_category"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="area" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="custshar_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="custshar_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="custshar_catcomareite_uix" unique="true">
            <column ascending="true" name="categoryid"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="area"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="custshar_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="data" numRows="0" remarks="all database activities" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="dataid" foreignKey="datafiel_dat2_fk" implied="false" onDeleteCascade="false" table="data_fields"/>
            <child catalog="mdl52er_erd" column="dataid" foreignKey="datareco_dat2_fk" implied="false" onDeleteCascade="false" table="data_records"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="comments" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timeavailablefrom" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timeavailableto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timeviewfrom" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timeviewto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="requiredentries" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="requiredentriestoview" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="maxentries" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="rssarticles" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="singletemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="listtemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="listtemplateheader" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="listtemplatefooter" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="addtemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="rsstemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="rsstitletemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="csstemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="jstemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="asearchtemplate" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="approval" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="25" name="manageapproved" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="scale" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="assessed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="assesstimestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="assesstimefinish" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="defaultsort" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="defaultsortdir" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="32" name="editany" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="notification" nullable="false" remarks="Notify people when things change" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="timemodified" nullable="false" remarks="The time the settings for this database module instance were last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="35" name="config" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="completionentries" nullable="true" remarks="Number of entries required for completion" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="data_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="data_content" numRows="0" remarks="the content introduced in each record/fields" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="fieldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="datacont_fie2_fk" implied="false" onDeleteCascade="false" table="data_fields"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="recordid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="datacont_rec2_fk" implied="false" onDeleteCascade="false" table="data_records"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="content" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="content1" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="content2" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="content3" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="content4" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="datacont_fie_ix" unique="false">
            <column ascending="true" name="fieldid"/>
         </index>
         <index name="datacont_rec_ix" unique="false">
            <column ascending="true" name="recordid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="data_fields" numRows="0" remarks="every field available" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="fieldid" foreignKey="datacont_fie2_fk" implied="false" onDeleteCascade="false" table="data_content"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="dataid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="datafiel_dat2_fk" implied="false" onDeleteCascade="false" table="data"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="type" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="required" nullable="false" remarks="Required fields must have a value when inserted by a user" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="param1" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="param2" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="param3" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="param4" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="param5" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="param6" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="param7" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="param8" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="param9" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="param10" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="datafiel_dat_ix" unique="false">
            <column ascending="true" name="dataid"/>
         </index>
         <index name="datafiel_typdat_ix" unique="false">
            <column ascending="true" name="type"/>
            <column ascending="true" name="dataid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="data_records" numRows="0" remarks="every record introduced" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="recordid" foreignKey="datacont_rec2_fk" implied="false" onDeleteCascade="false" table="data_content"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="datareco_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="dataid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="datareco_dat2_fk" implied="false" onDeleteCascade="false" table="data"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="approved" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="datareco_dat_ix" unique="false">
            <column ascending="true" name="dataid"/>
         </index>
         <index name="datareco_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol" numRows="0" remarks="Instances of enrolment plugins used in courses, fields marked as custom have a plugin defined meaning, core does not touch them. Create a new linked table if you need even more custom fields." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="enrolid" foreignKey="enroltitool_enr2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_tools"/>
            <child catalog="mdl52er_erd" column="instanceid" foreignKey="enropayp_ins2_fk" implied="false" onDeleteCascade="false" table="enrol_paypal"/>
            <child catalog="mdl52er_erd" column="enrolid" foreignKey="userenro_enr2_fk" implied="false" onDeleteCascade="false" table="user_enrolments"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="enrol" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="status" nullable="false" remarks="0..9 are system constants, 0 means active enrolment, see ENROL_STATUS_* constants, plugins may define own status greater than 10" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enro_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="sortorder" nullable="false" remarks="order of enrol plugins in each course" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="name" nullable="true" remarks="Optional instance name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="enrolperiod" nullable="true" remarks="Custom - enrolment duration" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="enrolstartdate" nullable="true" remarks="Custom - start of self enrolment" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="enrolenddate" nullable="true" remarks="Custom - end of enrolment" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="expirynotify" nullable="true" remarks="Custom - notify users before expiration" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="expirythreshold" nullable="true" remarks="Custom - when should be the participants notified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="notifyall" nullable="true" remarks="Custom - Notify both participant and person responsible for enrolments" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="password" nullable="true" remarks="Custom - enrolment or access password" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="cost" nullable="true" remarks="Custom - enrolment cost" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="currency" nullable="true" remarks="Custom - cost currency" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="roleid" nullable="true" remarks="Custom - the default role given to participants who self-enrol" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enro_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="customint1" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="customint2" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="customint3" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="customint4" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="customint5" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="customint6" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="customint7" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="customint8" nullable="true" remarks="Custom - general int" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="24" name="customchar1" nullable="true" remarks="Custom - general short name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="25" name="customchar2" nullable="true" remarks="Custom - general short name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="26" name="customchar3" nullable="true" remarks="Custom - general short name" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="27" name="customdec1" nullable="true" remarks="Custom - general decimal" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="28" name="customdec2" nullable="true" remarks="Custom - general decimal" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="29" name="customtext1" nullable="true" remarks="Custom - general text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="30" name="customtext2" nullable="true" remarks="Custom - general text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="31" name="customtext3" nullable="true" remarks="Custom - general text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="32" name="customtext4" nullable="true" remarks="Custom - general text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enro_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="enro_enr_ix" unique="false">
            <column ascending="true" name="enrol"/>
         </index>
         <index name="enro_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_flatfile" numRows="0" remarks="enrol_flatfile table retrofitted from MySQL" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="action" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroflat_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroflat_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroflat_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroflat_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="enroflat_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="enroflat_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_app_registration" numRows="0" remarks="Details of each application that has been registered with the tool" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="platformid" foreignKey="enroltidepl_pla2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_deployment"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Common name to identify this platform to users" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="platformid" nullable="true" remarks="The issuer URL" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="clientid" nullable="true" remarks="The clientid string, generated by the platform when setting up the tool." size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="uniqueid" nullable="false" remarks="A unique local id, which can be used in the initiate login URI to provide {iss, clientid} uniqueness in the absence of the optional client_id claim." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="platformclienthash" nullable="true" remarks="SHA256 hash of the platformid (issuer) and clientid" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="platformuniqueidhash" nullable="true" remarks="SHA256 hash of the platformid (issuer) and uniqueid" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="authenticationrequesturl" nullable="true" remarks="The authorisation endpoint of the platform" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="jwksurl" nullable="true" remarks="The JSON Web Key Set URL for the platform" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="accesstokenurl" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="status" nullable="false" remarks="Status of the registration, used to denote draft (incomplete) or active (complete)" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltiappregi_pla2_uix" unique="true">
            <column ascending="true" name="platformuniqueidhash"/>
         </index>
         <index name="enroltiappregi_pla_uix" unique="true">
            <column ascending="true" name="platformclienthash"/>
         </index>
         <index name="enroltiappregi_uni_uix" unique="true">
            <column ascending="true" name="uniqueid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_context" numRows="0" remarks="Each row represents a context in the platform, where resource links are added within a deployment." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="lticontextid" foreignKey="enroltiresolink_lti4_fk" implied="false" onDeleteCascade="false" table="enrol_lti_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="contextid" nullable="false" remarks="The id of the context on the platform" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="ltideploymentid" nullable="false" remarks="The id of the enrol_lti_deployment record containing the deployment information." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enrolticont_lti2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_deployment"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="type" nullable="true" remarks="The type of the context on the platform" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enrolticont_lti_ix" unique="false">
            <column ascending="true" name="ltideploymentid"/>
         </index>
         <index name="enrolticont_lticon_uix" unique="true">
            <column ascending="true" name="ltideploymentid"/>
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_deployment" numRows="0" remarks="Each row represents a deployment of a tool within a platform." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="ltideploymentid" foreignKey="enrolticont_lti2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_context"/>
            <child catalog="mdl52er_erd" column="ltideploymentid" foreignKey="enroltiresolink_lti3_fk" implied="false" onDeleteCascade="false" table="enrol_lti_resource_link"/>
            <child catalog="mdl52er_erd" column="ltideploymentid" foreignKey="enroltiuser_lti2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_users"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="A short name identifying the tool deployment to users" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="deploymentid" nullable="false" remarks="The id of the deployment, as defined in the platform" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="platformid" nullable="false" remarks="The platformid to which this deployment belongs" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltidepl_pla2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_app_registration"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="legacyconsumerkey" nullable="true" remarks="The legacy consumer key mapped to this deployment, if the deployment represents a migrated tool." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltidepl_pla_ix" unique="false">
            <column ascending="true" name="platformid"/>
         </index>
         <index name="enroltidepl_pladep_uix" unique="true">
            <column ascending="true" name="platformid"/>
            <column ascending="true" name="deploymentid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_consumer" numRows="0" remarks="LTI consumers interacting with moodle" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="consumerid" foreignKey="enroltilti2cont_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_context"/>
            <child catalog="mdl52er_erd" column="consumerid" foreignKey="enroltilti2nonc_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_nonce"/>
            <child catalog="mdl52er_erd" column="consumerid" foreignKey="enroltilti2resolink_con4_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_resource_link"/>
            <child catalog="mdl52er_erd" column="consumerid" foreignKey="enroltilti2toolprox_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_tool_proxy"/>
            <child catalog="mdl52er_erd" column="consumerid" foreignKey="enroltitoolconsmap_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_tool_consumer_map"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="consumerkey256" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="consumerkey" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="secret" nullable="false" remarks="" size="1024" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="ltiversion" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="consumername" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="consumerversion" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="consumerguid" nullable="true" remarks="" size="1024" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="profile" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="toolproxy" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="settings" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="protected" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="enablefrom" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="enableuntil" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="lastaccess" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="updated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2cons_con_uix" unique="true">
            <column ascending="true" name="consumerkey256"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_context" numRows="0" remarks="Information about a specific LTI contexts from the consumers" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="contextid" foreignKey="enroltilti2resolink_con3_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="consumerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2cont_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_consumer"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="lticontextkey" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="type" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="settings" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="updated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2cont_con_ix" unique="false">
            <column ascending="true" name="consumerid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_nonce" numRows="0" remarks="Nonce used for authentication between moodle and a consumer" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="consumerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2nonc_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_consumer"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="value" nullable="false" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="expires" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2nonc_con_ix" unique="false">
            <column ascending="true" name="consumerid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_resource_link" numRows="0" remarks="Link from the consumer to the tool" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="primaryresourcelinkid" foreignKey="enroltilti2resolink_pri2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_resource_link"/>
            <child catalog="mdl52er_erd" column="resourcelinkid" foreignKey="enroltilti2sharkey_res_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_share_key"/>
            <child catalog="mdl52er_erd" column="resourcelinkid" foreignKey="enroltilti2userresu_res2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_user_result"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2resolink_con3_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="consumerid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2resolink_con4_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_consumer"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="ltiresourcelinkkey" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="settings" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="primaryresourcelinkid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2resolink_pri2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="shareapproved" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="updated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2resolink_con2_ix" unique="false">
            <column ascending="true" name="consumerid"/>
         </index>
         <index name="enroltilti2resolink_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="enroltilti2resolink_pri_ix" unique="false">
            <column ascending="true" name="primaryresourcelinkid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_share_key" numRows="0" remarks="Resource link share key" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="sharekey" nullable="false" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="resourcelinkid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2sharkey_res_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="autoapprove" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="expires" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2sharkey_res_uix" unique="true">
            <column ascending="true" name="resourcelinkid"/>
         </index>
         <index name="enroltilti2sharkey_sha_uix" unique="true">
            <column ascending="true" name="sharekey"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_tool_proxy" numRows="0" remarks="A tool proxy between moodle and a consumer" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="toolproxykey" nullable="false" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="consumerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2toolprox_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_consumer"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="toolproxy" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="updated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2toolprox_con_ix" unique="false">
            <column ascending="true" name="consumerid"/>
         </index>
         <index name="enroltilti2toolprox_too_uix" unique="true">
            <column ascending="true" name="toolproxykey"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_lti2_user_result" numRows="0" remarks="Results for each user for each resource link" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="resourcelinkid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltilti2userresu_res2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="ltiuserkey" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="ltiresultsourcedid" nullable="false" remarks="" size="1024" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="updated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltilti2userresu_res_ix" unique="false">
            <column ascending="true" name="resourcelinkid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_resource_link" numRows="0" remarks="Each row represents a resource link for a platform and deployment" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="resourcelinkid" foreignKey="enroltiuserresolink_res2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_user_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="resourcelinkid" nullable="false" remarks="The platform-and-deployment-unique id of the resource link" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="ltideploymentid" nullable="false" remarks="The id of the enrol_lti_deployment record containing the deployment information." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiresolink_lti3_fk" implied="false" onDeleteCascade="false" table="enrol_lti_deployment"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="resourceid" nullable="false" remarks="The id of the local enrol_lti_tools record containing information about the published resource to which this resource link relates." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="resource"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="lticontextid" nullable="true" remarks="The id of the enrol_lti_context record containing information about the context from which this resource link originates." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiresolink_lti4_fk" implied="false" onDeleteCascade="false" table="enrol_lti_context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="lineitemsservice" nullable="true" remarks="The URL for the line items service for this resource link" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="lineitemservice" nullable="true" remarks="The URL for the line item service (if only one line item present)." size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="lineitemscope" nullable="true" remarks="The ags line items authorization scope" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="resultscope" nullable="true" remarks="The ags result authorization scope" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="scorescope" nullable="true" remarks="The ags score items authorization scope" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="contextmembershipsurl" nullable="true" remarks="The NRPS membership URL" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="nrpsserviceversions" nullable="true" remarks="The NRPS supported service versions" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltiresolink_lti2_ix" unique="false">
            <column ascending="true" name="lticontextid"/>
         </index>
         <index name="enroltiresolink_lti_ix" unique="false">
            <column ascending="true" name="ltideploymentid"/>
         </index>
         <index name="enroltiresolink_reslti_uix" unique="true">
            <column ascending="true" name="resourcelinkid"/>
            <column ascending="true" name="ltideploymentid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_tool_consumer_map" numRows="0" remarks="Table that maps the published tool to tool consumers." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="toolid" nullable="false" remarks="The tool ID." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltitoolconsmap_too2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_tools"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="consumerid" nullable="false" remarks="The consumer ID." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltitoolconsmap_con2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_lti2_consumer"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltitoolconsmap_con_ix" unique="false">
            <column ascending="true" name="consumerid"/>
         </index>
         <index name="enroltitoolconsmap_too_ix" unique="false">
            <column ascending="true" name="toolid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_tools" numRows="0" remarks="List of tools provided to the remote system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="toolid" foreignKey="enroltitoolconsmap_too2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_tool_consumer_map"/>
            <child catalog="mdl52er_erd" column="toolid" foreignKey="enroltiuser_too2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="enrolid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltitool_enr2_fk" implied="false" onDeleteCascade="false" table="enrol"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltitool_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="LTI-1p3" digits="0" id="3" name="ltiversion" nullable="false" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="institution" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="en" digits="0" id="5" name="lang" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="99" digits="0" id="6" name="timezone" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="maxenrolled" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="8" name="maildisplay" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="city" nullable="false" remarks="" size="120" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="country" nullable="false" remarks="" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="gradesync" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="gradesynccompletion" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="membersync" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="membersyncmode" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="roleinstructor" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="rolelearner" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="secret" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="uuid" nullable="true" remarks="" size="36" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="provisioningmodelearner" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="provisioningmodeinstructor" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltitool_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="enroltitool_enr_ix" unique="false">
            <column ascending="true" name="enrolid"/>
         </index>
         <index name="enroltitool_uui_uix" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_user_resource_link" numRows="0" remarks="Join table mapping users to resource links as this is a many:many relationship" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="ltiuserid" nullable="false" remarks="The id of the enrol_lti_users record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiuserresolink_lti2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="resourcelinkid" nullable="false" remarks="The id of the enrol_lti_resource_link record." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiuserresolink_res2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_resource_link"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltiuserresolink_lti_ix" unique="false">
            <column ascending="true" name="ltiuserid"/>
         </index>
         <index name="enroltiuserresolink_ltires_uix" unique="true">
            <column ascending="true" name="ltiuserid"/>
            <column ascending="true" name="resourcelinkid"/>
         </index>
         <index name="enroltiuserresolink_res_ix" unique="false">
            <column ascending="true" name="resourcelinkid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_lti_users" numRows="0" remarks="User access log and gradeback data" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="ltiuserid" foreignKey="enroltiuserresolink_lti2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_user_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiuser_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="toolid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiuser_too2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_tools"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="serviceurl" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sourceid" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="ltideploymentid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enroltiuser_lti2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_deployment"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="consumerkey" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="consumersecret" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="membershipsurl" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="membershipsid" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="10" name="lastgrade" nullable="true" remarks="The last grade that was sent" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="lastaccess" nullable="true" remarks="The time the user last accessed" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timecreated" nullable="true" remarks="The time the user was created" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enroltiuser_lti_ix" unique="false">
            <column ascending="true" name="ltideploymentid"/>
         </index>
         <index name="enroltiuser_too_ix" unique="false">
            <column ascending="true" name="toolid"/>
         </index>
         <index name="enroltiuser_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="enrol_paypal" numRows="0" remarks="Holds all known information about PayPal transactions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="business" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="receiver_email" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="receiver_id" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="item_name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enropayp_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enropayp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="instanceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="enropayp_ins2_fk" implied="false" onDeleteCascade="false" table="enrol"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="memo" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="tax" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="option_name1" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="option_selection1_x" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="12" name="option_name2" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="13" name="option_selection2_x" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="14" name="payment_status" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="15" name="pending_reason" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="16" name="reason_code" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="17" name="txn_id" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="18" name="parent_txn_id" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="19" name="payment_type" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="timeupdated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="enropayp_bus_ix" unique="false">
            <column ascending="true" name="business"/>
         </index>
         <index name="enropayp_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="enropayp_ins_ix" unique="false">
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="enropayp_rec_ix" unique="false">
            <column ascending="true" name="receiver_email"/>
         </index>
         <index name="enropayp_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="event" numRows="0" remarks="For everything with a time associated to it" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="format" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="categoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="even_cat2_fk" implied="false" onDeleteCascade="false" table="course_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="repeatid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="component" nullable="true" remarks="Component that created this event, if specified, only component itself can edit and delete it" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="modulename" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="instance" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="type" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="13" name="eventtype" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="timestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="timeduration" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="timesort" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="17" name="visible" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="18" name="uuid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="19" name="sequence" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="subscriptionid" nullable="true" remarks="The event_subscription id this event is associated with." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="even_sub2_fk" implied="false" onDeleteCascade="false" table="event_subscriptions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="priority" nullable="true" remarks="The event&amp;#039;s display priority. For multiple events with the same module name, instance and eventtype (e.g. for group overrides), the one with the higher priority will be displayed." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="location" nullable="true" remarks="Event Location" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="even_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="even_comeveins_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="eventtype"/>
            <column ascending="true" name="instance"/>
         </index>
         <index name="even_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="even_eve_ix" unique="false">
            <column ascending="true" name="eventtype"/>
         </index>
         <index name="even_grocoucatvisuse_ix" unique="false">
            <column ascending="true" name="groupid"/>
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="categoryid"/>
            <column ascending="true" name="visible"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="even_modinseve_ix" unique="false">
            <column ascending="true" name="modulename"/>
            <column ascending="true" name="instance"/>
            <column ascending="true" name="eventtype"/>
         </index>
         <index name="even_sub_ix" unique="false">
            <column ascending="true" name="subscriptionid"/>
         </index>
         <index name="even_tim2_ix" unique="false">
            <column ascending="true" name="timeduration"/>
         </index>
         <index name="even_tim_ix" unique="false">
            <column ascending="true" name="timestart"/>
         </index>
         <index name="even_typtim_ix" unique="false">
            <column ascending="true" name="type"/>
            <column ascending="true" name="timesort"/>
         </index>
         <index name="even_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="even_uui_ix" unique="false">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="event_subscriptions" numRows="0" remarks="Tracks subscriptions to remote calendars." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="subscriptionid" foreignKey="even_sub2_fk" implied="false" onDeleteCascade="false" table="event"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="url" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="categoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="evensubs_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="evensubs_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="eventtype" nullable="false" remarks="The type of the event" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="pollinterval" nullable="false" remarks="Frequency of checks for new/changed events" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="lastupdated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="evensubs_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="evensubs_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="events_handlers" numRows="0" remarks="This table is for storing which components requests what type of event, and the location of the responsible handlers. For example, the assignment registers 'grade_updated' event with a function assignment_grade_handler() that should be called event time an 'grade_updated' event is triggered by grade_update() function." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="handlerid" foreignKey="evenqueuhand_han2_fk" implied="false" onDeleteCascade="false" table="events_queue_handlers"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="eventname" nullable="false" remarks="name of the event, e.g. &amp;#039;grade_updated&amp;#039;" size="166" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="e.g. moodle, mod_forum, block_rss_client" size="166" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="handlerfile" nullable="false" remarks="path to the file of the function, eg /grade/export/lib.php" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="handlerfunction" nullable="true" remarks="serialized string or array describing function, suitable to be passed to call_user_func()" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="schedule" nullable="true" remarks="&amp;#039;cron&amp;#039; or &amp;#039;instant&amp;#039;." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="status" nullable="false" remarks="number of failed attempts to process this handler" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="internal" nullable="false" remarks="1 means standard plugin handler, 0 indicates if event handler sends data to external systems, this is used for example to prevent immediate sending of events from pending db transactions" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="evenhand_evecom_uix" unique="true">
            <column ascending="true" name="eventname"/>
            <column ascending="true" name="component"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="events_queue" numRows="0" remarks="This table is for storing queued events. It stores only one copy of the eventdata here, and entries from this table are being references by the event_queue_handlers table." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="queuedeventid" foreignKey="evenqueuhand_que2_fk" implied="false" onDeleteCascade="false" table="events_queue_handlers"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="eventdata" nullable="false" remarks="serialized version of the data object passed to the event handler." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="stackdump" nullable="true" remarks="serialized debug_backtrace showing where the event was fired from" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="true" remarks="$USER-&amp;amp;gt;id when the event was fired" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="evenqueu_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="time stamp of the first time this was added" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="evenqueu_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="events_queue_handlers" numRows="0" remarks="This is the list of queued handlers for processing. The event object is retrieved from the events_queue table. When no further reference is made to the event_queues table, the corresponding entry in the events_queue table should be deleted. Entry should get deleted after a successful event processing by the specified handler." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="queuedeventid" nullable="false" remarks="foreign key id corresponding to the id of the event_queues table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="evenqueuhand_que2_fk" implied="false" onDeleteCascade="false" table="events_queue"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="handlerid" nullable="false" remarks="foreign key id corresponding to the id of the event_handlers table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="evenqueuhand_han2_fk" implied="false" onDeleteCascade="false" table="events_handlers"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="status" nullable="true" remarks="number of failed attempts to process this handler" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="errormessage" nullable="true" remarks="if an error happened last time we tried to process this event, record it here." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="false" remarks="time stamp of the last attempt to run this from the queue" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="evenqueuhand_han_ix" unique="false">
            <column ascending="true" name="handlerid"/>
         </index>
         <index name="evenqueuhand_que_ix" unique="false">
            <column ascending="true" name="queuedeventid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="external_functions" numRows="0" remarks="list of all external functions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="200" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="classname" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="methodname" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="classpath" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="capabilities" nullable="true" remarks="all capabilities that are required to be run by the function (separated by comma)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="services" nullable="true" remarks="all the services (by shortname) where this function must be included" size="1333" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="extefunc_nam_uix" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="external_services" numRows="0" remarks="built in and custom external services" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="externalserviceid" foreignKey="exteservfunc_ext2_fk" implied="false" onDeleteCascade="false" table="external_services_functions"/>
            <child catalog="mdl52er_erd" column="externalserviceid" foreignKey="exteservuser_ext2_fk" implied="false" onDeleteCascade="false" table="external_services_users"/>
            <child catalog="mdl52er_erd" column="externalserviceid" foreignKey="extetoke_ext2_fk" implied="false" onDeleteCascade="false" table="external_tokens"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="200" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="requiredcapability" nullable="true" remarks="" size="150" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="restrictedusers" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="component" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="shortname" nullable="true" remarks="a unique shortname" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="downloadfiles" nullable="false" remarks="1 if the service allow people to download file from webservice/plugins.php - 0 if not" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="uploadfiles" nullable="false" remarks="1 if the service allow people to upload files to webservice/upload.php - 0 if not" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="exteserv_nam_uix" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="external_services_functions" numRows="0" remarks="lists functions available in each service group" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="externalserviceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="exteservfunc_ext2_fk" implied="false" onDeleteCascade="false" table="external_services"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="functionname" nullable="false" remarks="" size="200" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="exteservfunc_ext_ix" unique="false">
            <column ascending="true" name="externalserviceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="external_services_users" numRows="0" remarks="users allowed to use services with restricted users flag" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="externalserviceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="exteservuser_ext2_fk" implied="false" onDeleteCascade="false" table="external_services"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="exteservuser_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="iprestriction" nullable="true" remarks="ip restriction" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="validuntil" nullable="true" remarks="timestampt - valid until data" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="true" remarks="created timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="exteservuser_ext_ix" unique="false">
            <column ascending="true" name="externalserviceid"/>
         </index>
         <index name="exteservuser_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="external_tokens" numRows="0" remarks="Security tokens for accessing of external services" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="token" nullable="false" remarks="security token, aka private access key" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="privatetoken" nullable="true" remarks="private token, generated at the same time that the token, must be stored safely by the ws client, to be transmitted only via https" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="tokentype" nullable="false" remarks="type of token: 0=permanent, no session; 1=linked to current browser session via sid; 2=permanent, with emulated session" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="owner of the token" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="extetoke_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="externalserviceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="extetoke_ext2_fk" implied="false" onDeleteCascade="false" table="external_services"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="sid" nullable="true" remarks="link to browser or emulated session" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="contextid" nullable="false" remarks="context id where in token valid" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="extetoke_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="creatorid" nullable="false" remarks="user id of the token creator (useful to know when the administrator created a token and so display the token to a specific administrator)" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="extetoke_cre2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="iprestriction" nullable="true" remarks="ip restriction" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="validuntil" nullable="true" remarks="timestampt - valid until data" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timecreated" nullable="false" remarks="created timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="lastaccess" nullable="true" remarks="last access timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="name" nullable="true" remarks="token name, used to identify the token at the table view" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="extetoke_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="extetoke_cre_ix" unique="false">
            <column ascending="true" name="creatorid"/>
         </index>
         <index name="extetoke_ext_ix" unique="false">
            <column ascending="true" name="externalserviceid"/>
         </index>
         <index name="extetoke_sid_ix" unique="false">
            <column ascending="true" name="sid"/>
         </index>
         <index name="extetoke_tok_ix" unique="false">
            <column ascending="true" name="token"/>
         </index>
         <index name="extetoke_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="favourite" numRows="0" remarks="Stores the relationship between an arbitrary item (itemtype, itemid), and a context area (component, contextid) for a specific user. Used by the favourites subsystem." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="Defines the Moodle component in which the favourite was created." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="itemtype" nullable="false" remarks="The type of the item which is being favourited. Usually a table name, but doesn&amp;#039;t have to be. E.g. &amp;#039;messages&amp;#039; or &amp;#039;message_conversations&amp;#039;." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="itemid" nullable="false" remarks="The identifier of the item which is being favourited." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="contextid" nullable="false" remarks="The context id of the item being favourited" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="favo_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="userid" nullable="false" remarks="The id of the user to whom the favourite belongs" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="favo_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="ordering" nullable="true" remarks="Optional ordering of the favourite within its context area. For example, this allows things like sorting favourite message conversations." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="Creation time" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="false" remarks="Last modification time" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="favo_comiteiteconuse_uix" unique="true">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemtype"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="favo_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="favo_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback" numRows="0" remarks="all feedbacks" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="feedback" foreignKey="feedcomp_fee3_fk" implied="false" onDeleteCascade="false" table="feedback_completed"/>
            <child catalog="mdl52er_erd" column="feedback" foreignKey="feedcomp_fee5_fk" implied="false" onDeleteCascade="false" table="feedback_completedtmp"/>
            <child catalog="mdl52er_erd" column="feedback" foreignKey="feeditem_fee2_fk" implied="false" onDeleteCascade="false" table="feedback_item"/>
            <child catalog="mdl52er_erd" column="feedbackid" foreignKey="feedsitemap_fee2_fk" implied="false" onDeleteCascade="false" table="feedback_sitecourse_map"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="anonymous" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="email_notification" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="multiple_submit" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="autonumbering" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="site_after_submit" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="page_after_submit" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="page_after_submitformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="publish_stats" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timeopen" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="timeclose" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="completionsubmit" nullable="false" remarks="If this field is set to 1, then the activity will be automatically marked as &amp;#039;complete&amp;#039; once the user submits their choice." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feed_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_completed" numRows="0" remarks="filled out feedback" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="feedback" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feedcomp_fee3_fk" implied="false" onDeleteCascade="false" table="feedback"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="random_response" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="anonymous_response" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feedcomp_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feedcomp_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="feedcomp_fee_ix" unique="false">
            <column ascending="true" name="feedback"/>
         </index>
         <index name="feedcomp_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_completedtmp" numRows="0" remarks="filled out feedback" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="feedback" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feedcomp_fee5_fk" implied="false" onDeleteCascade="false" table="feedback"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="guestid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="random_response" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="anonymous_response" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feedcomp_fee2_ix" unique="false">
            <column ascending="true" name="feedback"/>
         </index>
         <index name="feedcomp_use2_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_item" numRows="0" remarks="feedback_items" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="item" foreignKey="feedvalu_ite3_fk" implied="false" onDeleteCascade="false" table="feedback_value"/>
            <child catalog="mdl52er_erd" column="item" foreignKey="feedvalu_ite5_fk" implied="false" onDeleteCascade="false" table="feedback_valuetmp"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="feedback" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feeditem_fee2_fk" implied="false" onDeleteCascade="false" table="feedback"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="template" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feeditem_tem2_fk" implied="false" onDeleteCascade="false" table="feedback_template"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="label" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="presentation" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="typ" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="hasvalue" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="position" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="required" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="dependitem" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="dependvalue" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="12" name="options" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feeditem_fee_ix" unique="false">
            <column ascending="true" name="feedback"/>
         </index>
         <index name="feeditem_tem_ix" unique="false">
            <column ascending="true" name="template"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_sitecourse_map" numRows="0" remarks="feedback sitecourse map" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="feedbackid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feedsitemap_fee2_fk" implied="false" onDeleteCascade="false" table="feedback"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feedsitemap_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="feedsitemap_fee_ix" unique="false">
            <column ascending="true" name="feedbackid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_template" numRows="0" remarks="templates of feedbackstructures" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="template" foreignKey="feeditem_tem2_fk" implied="false" onDeleteCascade="false" table="feedback_item"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="ispublic" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feedtemp_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_value" numRows="0" remarks="values of the completeds" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="item" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feedvalu_ite3_fk" implied="false" onDeleteCascade="false" table="feedback_item"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="completed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="tmp_completed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feedvalu_comitecou_uix" unique="true">
            <column ascending="true" name="completed"/>
            <column ascending="true" name="item"/>
            <column ascending="true" name="course_id"/>
         </index>
         <index name="feedvalu_cou_ix" unique="false">
            <column ascending="true" name="course_id"/>
         </index>
         <index name="feedvalu_ite_ix" unique="false">
            <column ascending="true" name="item"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="feedback_valuetmp" numRows="0" remarks="values of the completedstmp" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="item" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="feedvalu_ite5_fk" implied="false" onDeleteCascade="false" table="feedback_item"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="completed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="tmp_completed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="feedvalu_comitecou2_uix" unique="true">
            <column ascending="true" name="completed"/>
            <column ascending="true" name="item"/>
            <column ascending="true" name="course_id"/>
         </index>
         <index name="feedvalu_cou2_ix" unique="false">
            <column ascending="true" name="course_id"/>
         </index>
         <index name="feedvalu_ite2_ix" unique="false">
            <column ascending="true" name="item"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="file_conversion" numRows="0" remarks="Table to track file conversions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="fileconv_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sourcefileid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="fileconv_sou2_fk" implied="false" onDeleteCascade="false" table="files"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="targetformat" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="status" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="statusmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="converter" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="destfileid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="fileconv_des2_fk" implied="false" onDeleteCascade="false" table="files"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="data" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="fileconv_des_ix" unique="false">
            <column ascending="true" name="destfileid"/>
         </index>
         <index name="fileconv_sou_ix" unique="false">
            <column ascending="true" name="sourcefileid"/>
         </index>
         <index name="fileconv_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="files" numRows="0" remarks="description of files, content is stored in sha1 file pool meaning no duplicate storage https://docs.moodle.org/en/ad-hoc_contributed_reports#List_course_resources_accumulative_file_size_and_count" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="fileid" foreignKey="analusedfile_fil2_fk" implied="false" onDeleteCascade="false" table="analytics_used_files"/>
            <child catalog="mdl52er_erd" column="destfileid" foreignKey="fileconv_des2_fk" implied="false" onDeleteCascade="false" table="file_conversion"/>
            <child catalog="mdl52er_erd" column="sourcefileid" foreignKey="fileconv_sou2_fk" implied="false" onDeleteCascade="false" table="file_conversion"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="contenthash" nullable="false" remarks="sha1 hash of file content" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="pathnamehash" nullable="false" remarks="complete file path sha1 hash - unique for each file" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextid" nullable="false" remarks="The context id defined in context table - identifies the instance of plugin owning the file" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="file_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="component" nullable="false" remarks="Full name of the component owning the area" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="filearea" nullable="false" remarks="Like &amp;quot;coursefiles&amp;quot;. &amp;quot;submission&amp;quot;, &amp;quot;intro&amp;quot; and &amp;quot;content&amp;quot; (images and swf linked from summaries), etc." size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="itemid" nullable="false" remarks="Optional - some plugin specific item id (eg. forum post, blog entry or assignment submission, user id for user files)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="filepath" nullable="false" remarks="Optional - relative path to file from module content root, useful in Scorm and Resource mod - most of the mods do not need this" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="filename" nullable="false" remarks="The full Unicode name of this file (case sensitive) - some chars are not allowed though" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="userid" nullable="true" remarks="Optional - general userid field - meaning depending on plugin" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="file_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="filesize" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="mimetype" nullable="true" remarks="type of file - jpeg image, open document spreadsheet" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="status" nullable="false" remarks="number greater than 0 means something is wrong with this file (virus, missing, etc.)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="source" nullable="true" remarks="contains the reference if the file is imported from external sites" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="author" nullable="true" remarks="The original author of the file" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="license" nullable="true" remarks="license of the file to guide reuse" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="sortorder" nullable="false" remarks="order of files" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="referencefileid" nullable="true" remarks="Use to indicate file is a proxy for repository file" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="file_ref2_fk" implied="false" onDeleteCascade="false" table="files_reference"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="file_comfilconite_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="filearea"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="file_con2_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="file_con_ix" unique="false">
            <column ascending="true" name="contenthash"/>
         </index>
         <index name="file_fil_ix" unique="false">
            <column ascending="true" name="filename"/>
         </index>
         <index name="file_lic_ix" unique="false">
            <column ascending="true" name="license"/>
         </index>
         <index name="file_pat_uix" unique="true">
            <column ascending="true" name="pathnamehash"/>
         </index>
         <index name="file_ref_ix" unique="false">
            <column ascending="true" name="referencefileid"/>
         </index>
         <index name="file_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="files_reference" numRows="0" remarks="Store files references" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="referencefileid" foreignKey="file_ref2_fk" implied="false" onDeleteCascade="false" table="files"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="repositoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="filerefe_rep2_fk" implied="false" onDeleteCascade="false" table="repository_instances"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="lastsync" nullable="true" remarks="Last time the proxy file was synced with repository" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="reference" nullable="true" remarks="Identification of the external file. Repository plugins are interpreting it to locate the external file." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="referencehash" nullable="false" remarks="Internal implementation detail, contains SHA1 hash of the reference field. Can be indexed and used for comparison. Not meant to be used by a non-core code." size="40" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="filerefe_refrep_uix" unique="true">
            <column ascending="true" name="referencehash"/>
            <column ascending="true" name="repositoryid"/>
         </index>
         <index name="filerefe_rep_ix" unique="false">
            <column ascending="true" name="repositoryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="filter_active" numRows="0" remarks="Stores information about which filters are active in which contexts. Also the filter sort order. See get_active_filters in lib/filterlib.php for how this data is used." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="filter" nullable="false" remarks="The filter internal name, like &amp;#039;tex&amp;#039;." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="References context.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="filtacti_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="active" nullable="false" remarks="Whether this filter is active in this context. +1 = On, -1 = Off, no row with this contextid = inherit. As a special case, when contextid points to the system context, -9999 means this filter is completely disabled." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="sortorder" nullable="false" remarks="Only relevant if contextid points to the system context. In other cases this field should contain 0. The order in which the filters should be applied." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="filtacti_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="filtacti_confil_uix" unique="true">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="filter"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="filter_config" numRows="0" remarks="Stores per-context configuration settings for filters which have them." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="filter" nullable="false" remarks="The filter internal name, like &amp;#039;tex&amp;#039;." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="References context.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="filtconf_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="The config variable name." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="value" nullable="true" remarks="The correspoding config variable value." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="filtconf_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="filtconf_confilnam_uix" unique="true">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="filter"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="folder" numRows="0" remarks="each record is one folder resource" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="folder_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="revision" nullable="false" remarks="incremented when after each file changes, solves browser caching issues" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="display" nullable="false" remarks="Display type of folder contents - on a separate page or inline" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="showexpanded" nullable="false" remarks="1 = expanded, 0 = collapsed for sub-folders" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="showdownloadfolder" nullable="false" remarks="1 = show download folder button" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="forcedownload" nullable="false" remarks="1 = force download of individual files" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="fold_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum" numRows="0" remarks="Forum discussion system. For sample reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#Forum_Activity" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="forum" foreignKey="forudige_for2_fk" implied="false" onDeleteCascade="false" table="forum_digests"/>
            <child catalog="mdl52er_erd" column="forum" foreignKey="forudiscsubs_for2_fk" implied="false" onDeleteCascade="false" table="forum_discussion_subs"/>
            <child catalog="mdl52er_erd" column="forum" foreignKey="forudisc_for2_fk" implied="false" onDeleteCascade="false" table="forum_discussions"/>
            <child catalog="mdl52er_erd" column="forum" foreignKey="forugrad_for2_fk" implied="false" onDeleteCascade="false" table="forum_grades"/>
            <child catalog="mdl52er_erd" column="forumid" foreignKey="forum_read_erd_forum_id" implied="false" onDeleteCascade="false" table="forum_read"/>
            <child catalog="mdl52er_erd" column="forum" foreignKey="forusubs_for2_fk" implied="false" onDeleteCascade="false" table="forum_subscriptions"/>
            <child catalog="mdl52er_erd" column="forumid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="forum_track_prefs"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="forum_track_prefs_erd_forum_id" implied="false" onDeleteCascade="false" table="forum_track_prefs"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="general" digits="0" id="2" name="type" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="introformat" nullable="false" remarks="text format of intro field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="duedate" nullable="false" remarks="A due date to show in the calendar. Not used for grading." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="cutoffdate" nullable="false" remarks="The final date after which forum posts will no longer be accepted for this forum." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="assessed" nullable="false" remarks="Rating aggregate type can be: average, count, maximum, minimum, sum. As integers" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="assesstimestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="assesstimefinish" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="scale" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="grade_forum" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="grade_forum_notify" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="maxbytes" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="15" name="maxattachments" nullable="false" remarks="Number of attachments allowed per post" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="forcesubscribe" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="17" name="trackingtype" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="rsstype" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="rssarticles" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="warnafter" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="blockafter" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="blockperiod" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="completiondiscussions" nullable="false" remarks="Nonzero if a certain number of posts are required to mark this forum completed for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="completionreplies" nullable="false" remarks="Nonzero if a certain number of replies are required to mark this forum complete for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="completionposts" nullable="false" remarks="Nonzero if a certain number of posts or replies (total) are required to mark this forum complete for a user." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="displaywordcount" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="lockdiscussionafter" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="showimmediately" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="foru_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_digests" numRows="0" remarks="Keeps track of user mail delivery preferences for each forum" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudige_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="forum" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudige_for2_fk" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <column autoUpdated="false" defaultValue="-1" digits="0" id="3" name="maildigest" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forudige_for_ix" unique="false">
            <column ascending="true" name="forum"/>
         </index>
         <index name="forudige_forusemai_uix" unique="true">
            <column ascending="true" name="forum"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="maildigest"/>
         </index>
         <index name="forudige_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_discussion_subs" numRows="0" remarks="Users may choose to subscribe and unsubscribe from specific discussions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="forum" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudiscsubs_for2_fk" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudiscsubs_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="discussion" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudiscsubs_dis2_fk" implied="false" onDeleteCascade="false" table="forum_discussions"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="preference" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forudiscsubs_dis_ix" unique="false">
            <column ascending="true" name="discussion"/>
         </index>
         <index name="forudiscsubs_for_ix" unique="false">
            <column ascending="true" name="forum"/>
         </index>
         <index name="forudiscsubs_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="forudiscsubs_usedis_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="discussion"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_discussions" numRows="0" remarks="Forums are composed of discussions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="discussion" foreignKey="forudiscsubs_dis2_fk" implied="false" onDeleteCascade="false" table="forum_discussion_subs"/>
            <child catalog="mdl52er_erd" column="discussion" foreignKey="forupost_dis2_fk" implied="false" onDeleteCascade="false" table="forum_posts"/>
            <child catalog="mdl52er_erd" column="discussionid" foreignKey="foruqueu_dis2_fk" implied="false" onDeleteCascade="false" table="forum_queue"/>
            <child catalog="mdl52er_erd" column="discussionid" foreignKey="forum_read_erd_discussions_id" implied="false" onDeleteCascade="false" table="forum_read"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="forum" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudisc_for2_fk" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="firstpost" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="-1" digits="0" id="6" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="assessed" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forudisc_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="pinned" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timelocked" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forudisc_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="forudisc_for_ix" unique="false">
            <column ascending="true" name="forum"/>
         </index>
         <index name="forudisc_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="forudisc_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_grades" numRows="0" remarks="Grading data for forum instances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="forum" nullable="false" remarks="The ID of the forum that this grade relates to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forugrad_for2_fk" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="itemnumber" nullable="false" remarks="The grade itemnumber" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="The user who was graded" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="grade" nullable="true" remarks="The numerical grade for this user&amp;#039;s forum assessment. Can be determined by scales/advancedgradingforms etc but will always be converted back to a floating point number." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forugrad_for_ix" unique="false">
            <column ascending="true" name="forum"/>
         </index>
         <index name="forugrad_foriteuse_uix" unique="true">
            <column ascending="true" name="forum"/>
            <column ascending="true" name="itemnumber"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="forugrad_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_posts" numRows="0" remarks="All posts are stored in this table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="parent" foreignKey="forupost_par2_fk" implied="false" onDeleteCascade="false" table="forum_posts"/>
            <child catalog="mdl52er_erd" column="postid" foreignKey="foruqueu_pos2_fk" implied="false" onDeleteCascade="false" table="forum_queue"/>
            <child catalog="mdl52er_erd" column="postid" foreignKey="forum_read_erd_post_id" implied="false" onDeleteCascade="false" table="forum_read"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="discussion" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forupost_dis2_fk" implied="false" onDeleteCascade="false" table="forum_discussions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="parent" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forupost_par2_fk" implied="false" onDeleteCascade="false" table="forum_posts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="modified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="mailed" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="subject" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="message" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="messageformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="messagetrust" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="attachment" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="totalscore" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="mailnow" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="deleted" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="privatereplyto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="wordcount" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="charcount" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forupost_cre_ix" unique="false">
            <column ascending="true" name="created"/>
         </index>
         <index name="forupost_dis_ix" unique="false">
            <column ascending="true" name="discussion"/>
         </index>
         <index name="forupost_mai_ix" unique="false">
            <column ascending="true" name="mailed"/>
         </index>
         <index name="forupost_par_ix" unique="false">
            <column ascending="true" name="parent"/>
         </index>
         <index name="forupost_pri_ix" unique="false">
            <column ascending="true" name="privatereplyto"/>
         </index>
         <index name="forupost_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_queue" numRows="0" remarks="For keeping track of posts that will be mailed in digest form" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="discussionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="foruqueu_dis2_fk" implied="false" onDeleteCascade="false" table="forum_discussions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="postid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="foruqueu_pos2_fk" implied="false" onDeleteCascade="false" table="forum_posts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="The modified time of the original post" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="foruqueu_dis_ix" unique="false">
            <column ascending="true" name="discussionid"/>
         </index>
         <index name="foruqueu_pos_ix" unique="false">
            <column ascending="true" name="postid"/>
         </index>
         <index name="foruqueu_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_read" numRows="0" remarks="Tracks each users read posts" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="forumid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forum_read_erd_forum_id" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="discussionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forum_read_erd_discussions_id" implied="false" onDeleteCascade="false" table="forum_discussions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="postid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forum_read_erd_post_id" implied="false" onDeleteCascade="false" table="forum_posts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="firstread" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="lastread" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="foruread_disuse_ix" unique="false">
            <column ascending="true" name="discussionid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="foruread_foruse_ix" unique="false">
            <column ascending="true" name="forumid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="foruread_posuse_ix" unique="false">
            <column ascending="true" name="postid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="foruread_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_subscriptions" numRows="0" remarks="Keeps track of who is subscribed to what forum" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="forum" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forusubs_for2_fk" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forusubs_for_ix" unique="false">
            <column ascending="true" name="forum"/>
         </index>
         <index name="forusubs_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="forusubs_usefor_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="forum"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="forum_track_prefs" numRows="0" remarks="Tracks each users untracked forums" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="forum_track_prefs_erd_forum_id" implied="false" onDeleteCascade="false" table="forum"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="forumid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="forum"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="forutracpref_usefor_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="forumid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="glossary" numRows="0" remarks="all glossaries" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="glossaryid" foreignKey="gloscate_glo2_fk" implied="false" onDeleteCascade="false" table="glossary_categories"/>
            <child catalog="mdl52er_erd" column="glossaryid" foreignKey="glosentr_glo2_fk" implied="false" onDeleteCascade="false" table="glossary_entries"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="allowduplicatedentries" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="dictionary" digits="0" id="6" name="displayformat" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="mainglossary" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="showspecial" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="showalphabet" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="showall" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="allowcomments" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="12" name="allowprintview" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="13" name="usedynalink" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="14" name="defaultapproval" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="default" digits="0" id="15" name="approvaldisplayformat" nullable="false" remarks="Display Format when approving entries" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="globalglossary" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="10" digits="0" id="17" name="entbypage" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="editalways" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="rsstype" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="rssarticles" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="assessed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="assesstimestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="assesstimefinish" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="scale" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="completionentries" nullable="false" remarks="Non zero if a certain number of entries are required to mark this glossary complete for a user." size="10" type="INT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="glos_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="glossary_alias" numRows="0" remarks="entries alias" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="entryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="glosalia_ent2_fk" implied="false" onDeleteCascade="false" table="glossary_entries"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="alias" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="glosalia_ent_ix" unique="false">
            <column ascending="true" name="entryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="glossary_categories" numRows="0" remarks="all categories for glossary entries" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="glosentrcate_cat2_fk" implied="false" onDeleteCascade="false" table="glossary_entries_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="glossaryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gloscate_glo2_fk" implied="false" onDeleteCascade="false" table="glossary"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="usedynalink" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gloscate_glo_ix" unique="false">
            <column ascending="true" name="glossaryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="glossary_entries" numRows="0" remarks="all glossary entries" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="entryid" foreignKey="glosalia_ent2_fk" implied="false" onDeleteCascade="false" table="glossary_alias"/>
            <child catalog="mdl52er_erd" column="entryid" foreignKey="glosentrcate_ent2_fk" implied="false" onDeleteCascade="false" table="glossary_entries_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="glossaryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="glosentr_glo2_fk" implied="false" onDeleteCascade="false" table="glossary"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="concept" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="definition" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="definitionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="definitiontrust" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="attachment" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="teacherentry" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="sourceglossaryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="12" name="usedynalink" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="casesensitive" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="14" name="fullmatch" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="15" name="approved" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="glosentr_con_ix" unique="false">
            <column ascending="true" name="concept"/>
         </index>
         <index name="glosentr_glo_ix" unique="false">
            <column ascending="true" name="glossaryid"/>
         </index>
         <index name="glosentr_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="glossary_entries_categories" numRows="0" remarks="categories of each glossary entry" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="categoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="glosentrcate_cat2_fk" implied="false" onDeleteCascade="false" table="glossary_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="entryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="glosentrcate_ent2_fk" implied="false" onDeleteCascade="false" table="glossary_entries"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="glosentrcate_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="glosentrcate_ent_ix" unique="false">
            <column ascending="true" name="entryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="glossary_formats" numRows="0" remarks="Setting of the display formats" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="popupformatname" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="visible" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="showgroup" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="showtabs" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="defaultmode" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="defaulthook" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="sortkey" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="sortorder" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_categories" numRows="0" remarks="This table keeps information about categories, used for grouping items." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="parent" foreignKey="gradcate_par2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
            <child catalog="mdl52er_erd" column="oldid" foreignKey="gradcatehist_old2_fk" implied="false" onDeleteCascade="false" table="grade_categories_history"/>
            <child catalog="mdl52er_erd" column="parent" foreignKey="gradcatehist_par2_fk" implied="false" onDeleteCascade="false" table="grade_categories_history"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="graditem_cat2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="graditemhist_cat2_fk" implied="false" onDeleteCascade="false" table="grade_items_history"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="The course this grade category is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradcate_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="parent" nullable="true" remarks="Categories can be hierarchical" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradcate_par2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="depth" nullable="false" remarks="How many parents does this category have?" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="path" nullable="true" remarks="shows the path as /1/2/3 (like course_categories)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="fullname" nullable="false" remarks="The name of this grade category" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="aggregation" nullable="false" remarks="A constant pointing to one of the predefined aggregation strategies (none, mean,median,sum, etc)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="keephigh" nullable="false" remarks="Keep only the X highest items" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="droplow" nullable="false" remarks="Drop the X lowest items" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="aggregateonlygraded" nullable="false" remarks="aggregate only graded activities" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="aggregateoutcomes" nullable="false" remarks="Aggregate outcomes" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="hidden" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradcate_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="gradcate_par_ix" unique="false">
            <column ascending="true" name="parent"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_categories_history" numRows="0" remarks="History of grade_categories" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="action" nullable="false" remarks="created/modified/deleted constants" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradcatehist_old2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="source" nullable="true" remarks="What caused the modification? manual/module/import/..." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="true" remarks="The last time this grade_item was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="loggeduser" nullable="true" remarks="the userid of the person who last modified this outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradcatehist_log2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="courseid" nullable="false" remarks="The course this grade category is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradcatehist_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="parent" nullable="true" remarks="Categories can be hierarchical" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradcatehist_par2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="depth" nullable="false" remarks="How many parents does this category have?" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="path" nullable="true" remarks="shows the path as /1/2/3 (like course_categories)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="fullname" nullable="false" remarks="The name of this grade category" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="aggregation" nullable="false" remarks="A constant pointing to one of the predefined aggregation strategies (none, mean,median,sum, etc)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="keephigh" nullable="false" remarks="Keep only the X highest items" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="droplow" nullable="false" remarks="Drop the X lowest items" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="aggregateonlygraded" nullable="false" remarks="aggregate only graded items" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="aggregateoutcomes" nullable="false" remarks="Aggregate outcomes" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="aggregatesubcats" nullable="false" remarks="This setting was removed from grade_categories. It is kept here only to preserve history." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="hidden" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradcatehist_act_ix" unique="false">
            <column ascending="true" name="action"/>
         </index>
         <index name="gradcatehist_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="gradcatehist_log_ix" unique="false">
            <column ascending="true" name="loggeduser"/>
         </index>
         <index name="gradcatehist_old_ix" unique="false">
            <column ascending="true" name="oldid"/>
         </index>
         <index name="gradcatehist_par_ix" unique="false">
            <column ascending="true" name="parent"/>
         </index>
         <index name="gradcatehist_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_grades" numRows="0" remarks="grade_grades  This table keeps individual grades for each user and each item, exactly as imported or submitted by modules. The rawgrademax/min and rawscaleid are stored here to record the values at the time the grade was stored, because teachers might change this for an activity! All the results are normalised/resampled for the final grade value." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="oldid" foreignKey="gradgradhist_old2_fk" implied="false" onDeleteCascade="false" table="grade_grades_history"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="itemid" nullable="false" remarks="The item this grade belongs to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgrad_ite2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="The user who this grade is for" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgrad_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="3" name="rawgrade" nullable="true" remarks="If the grade is a float value (or has been converted to one)" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="100.00000" digits="5" id="4" name="rawgrademax" nullable="false" remarks="The maximum allowable grade when this was created" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="5" name="rawgrademin" nullable="false" remarks="The minimum allowable grade when this was created" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="rawscaleid" nullable="true" remarks="If this grade is based on a scale, which one was it?" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgrad_raw2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="usermodified" nullable="true" remarks="the userid of the person who last modified this grade" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgrad_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="finalgrade" nullable="true" remarks="The final grade (cached) after all calculations are made" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="hidden" nullable="false" remarks="show 0, hide 1 or hide until date" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="locked" nullable="false" remarks="not locked 0, locked from date" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="locktime" nullable="false" remarks="automatic locking of final grade, 0 means none, date otherwise" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="exported" nullable="false" remarks="date of last grade export, 0 if none" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="overridden" nullable="false" remarks="indicates grade overridden from gradebook, 0 means none, date means overridden" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="excluded" nullable="false" remarks="grade excluded from aggregation functions, date means when excluded" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="feedback" nullable="true" remarks="grading feedback" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="feedbackformat" nullable="false" remarks="format of feedback text" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="information" nullable="true" remarks="optiona information" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="informationformat" nullable="false" remarks="format of information text" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="timecreated" nullable="true" remarks="the time this grade was first created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="timemodified" nullable="true" remarks="the time this grade was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="unknown" digits="0" id="21" name="aggregationstatus" nullable="false" remarks="One of several values describing how this grade_grade was used when calculating the aggregation. Possible values are &amp;quot;unknown&amp;quot;, &amp;quot;dropped&amp;quot;, &amp;quot;novalue&amp;quot;, &amp;quot;used&amp;quot;" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="22" name="aggregationweight" nullable="true" remarks="If the aggregationstatus == &amp;#039;included&amp;#039;, then this is the percent this item contributed to the aggregation." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="23" name="deductedmark" nullable="false" remarks="The mark deducted from final grade" size="10" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradgrad_ite_ix" unique="false">
            <column ascending="true" name="itemid"/>
         </index>
         <index name="gradgrad_locloc_ix" unique="false">
            <column ascending="true" name="locked"/>
            <column ascending="true" name="locktime"/>
         </index>
         <index name="gradgrad_raw_ix" unique="false">
            <column ascending="true" name="rawscaleid"/>
         </index>
         <index name="gradgrad_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="gradgrad_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="gradgrad_useite_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="itemid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_grades_history" numRows="0" remarks="History table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="action" nullable="false" remarks="created/modified/deleted constants" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgradhist_old2_fk" implied="false" onDeleteCascade="false" table="grade_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="source" nullable="true" remarks="What caused the modification? manual/module/import/..." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="true" remarks="The last time this grade_item was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="loggeduser" nullable="true" remarks="the userid of the person who last modified this outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgradhist_log2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="itemid" nullable="false" remarks="The item this grade belongs to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgradhist_ite2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="userid" nullable="false" remarks="The user who this grade is for" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgradhist_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="rawgrade" nullable="true" remarks="If the grade is a float value (or has been converted to one)" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="100.00000" digits="5" id="9" name="rawgrademax" nullable="false" remarks="The maximum allowable grade when this was created" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="10" name="rawgrademin" nullable="false" remarks="The minimum allowable grade when this was created" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="rawscaleid" nullable="true" remarks="If this grade is based on a scale, which one was it?" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgradhist_raw2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="usermodified" nullable="true" remarks="the userid of the person who last modified this grade" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradgradhist_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="13" name="finalgrade" nullable="true" remarks="The final grade (cached) after all calculations are made" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="hidden" nullable="false" remarks="show 0, hide 1 or hide until date" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="locked" nullable="false" remarks="not locked 0, locked from date" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="locktime" nullable="false" remarks="automatic locking of final grade, 0 means none, date otherwise" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="exported" nullable="false" remarks="date of last grade export, 0 if none" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="overridden" nullable="false" remarks="indicates grade overridden from gradebook, 0 means none, date means overridden" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="excluded" nullable="false" remarks="grade excluded from aggregation functions, date means when excluded" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="feedback" nullable="true" remarks="grading feedback" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="feedbackformat" nullable="false" remarks="format of feedback text" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="information" nullable="true" remarks="optiona information" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="informationformat" nullable="false" remarks="format of information text" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradgradhist_act_ix" unique="false">
            <column ascending="true" name="action"/>
         </index>
         <index name="gradgradhist_ite_ix" unique="false">
            <column ascending="true" name="itemid"/>
         </index>
         <index name="gradgradhist_log_ix" unique="false">
            <column ascending="true" name="loggeduser"/>
         </index>
         <index name="gradgradhist_old_ix" unique="false">
            <column ascending="true" name="oldid"/>
         </index>
         <index name="gradgradhist_raw_ix" unique="false">
            <column ascending="true" name="rawscaleid"/>
         </index>
         <index name="gradgradhist_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="gradgradhist_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="gradgradhist_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="gradgradhist_useitetim_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="timemodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_import_newitem" numRows="0" remarks="temporary table for storing new grade_item names from grade import" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="newgradeitem" foreignKey="gradimpovalu_new2_fk" implied="false" onDeleteCascade="false" table="grade_import_values"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="itemname" nullable="false" remarks="new grade item name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="importcode" nullable="false" remarks="import batch code for identification" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="importer" nullable="false" remarks="user importing the data" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradimponewi_imp2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradimponewi_imp_ix" unique="false">
            <column ascending="true" name="importer"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_import_values" numRows="0" remarks="Temporary table for importing grades" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="itemid" nullable="true" remarks="if set, this points to existing grade_items id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradimpovalu_ite2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="newgradeitem" nullable="true" remarks="if set, points to the id of grade_import_newitem" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradimpovalu_new2_fk" implied="false" onDeleteCascade="false" table="grade_import_newitem"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradimpovalu_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="finalgrade" nullable="true" remarks="raw grade value" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="feedback" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="importcode" nullable="false" remarks="similar to backup_code, a unique batch code for identifying one batch of imports" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="importer" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradimpovalu_imp2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="importonlyfeedback" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradimpovalu_imp_ix" unique="false">
            <column ascending="true" name="importer"/>
         </index>
         <index name="gradimpovalu_ite_ix" unique="false">
            <column ascending="true" name="itemid"/>
         </index>
         <index name="gradimpovalu_new_ix" unique="false">
            <column ascending="true" name="newgradeitem"/>
         </index>
         <index name="gradimpovalu_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_items" numRows="0" remarks="This table keeps information about gradeable items (ie columns). If an activity (eg an assignment or quiz) has multiple grade_items associated with it (eg several outcomes or numerical grades), then there will be a corresponding multiple number of rows in this table." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="itemid" foreignKey="gradgrad_ite2_fk" implied="false" onDeleteCascade="false" table="grade_grades"/>
            <child catalog="mdl52er_erd" column="itemid" foreignKey="gradgradhist_ite2_fk" implied="false" onDeleteCascade="false" table="grade_grades_history"/>
            <child catalog="mdl52er_erd" column="itemid" foreignKey="gradimpovalu_ite2_fk" implied="false" onDeleteCascade="false" table="grade_import_values"/>
            <child catalog="mdl52er_erd" column="oldid" foreignKey="graditemhist_old2_fk" implied="false" onDeleteCascade="false" table="grade_items_history"/>
            <child catalog="mdl52er_erd" column="gradeitemid" foreignKey="ltisgrad_gracou2_fk" implied="false" onDeleteCascade="false" table="ltiservice_gradebookservices"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="true" remarks="The course this item is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditem_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="categoryid" nullable="true" remarks="(optional) the category group this item belongs to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditem_cat2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="itemname" nullable="true" remarks="The name of this item (pushed in by the module)" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="itemtype" nullable="false" remarks="&amp;#039;mod&amp;#039;, &amp;#039;blocks&amp;#039;, &amp;#039;import&amp;#039;, &amp;#039;calculated&amp;#039; etc" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="itemmodule" nullable="true" remarks="&amp;#039;forum&amp;#039;, &amp;#039;quiz&amp;#039;, &amp;#039;csv&amp;#039;, etc" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="iteminstance" nullable="true" remarks="id of the item module" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="itemnumber" nullable="true" remarks="Can be used to distinguish multiple grades for an activity" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="iteminfo" nullable="true" remarks="Info and notes about this item XXX" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="idnumber" nullable="true" remarks="Arbitrary idnumber provided by the module responsible" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="calculation" nullable="true" remarks="Formula describing how to derive this grade from other items, referring to them using giXXX where XXX is grade item id ... eg something like: =sin(square([#gi20#])) + [#gi30#]" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="gradetype" nullable="false" remarks="0 = none, 1 = value, 2 = scale, 3 = text" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="100.00000" digits="5" id="12" name="grademax" nullable="false" remarks="What is the maximum allowable grade?" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="13" name="grademin" nullable="false" remarks="What is the minimum allowable grade?" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="scaleid" nullable="true" remarks="If this grade is based on a scale, which one is it?" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditem_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="outcomeid" nullable="true" remarks="If this grade is related to an outcome, which one is it?" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditem_out2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
         </column>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="16" name="gradepass" nullable="false" remarks="What grade is needed to pass? grademin &amp;amp;lt; gradepass &amp;amp;lt;= grademax" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="1.00000" digits="5" id="17" name="multfactor" nullable="false" remarks="Multiply all grades by this" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="18" name="plusfactor" nullable="false" remarks="Add this to all grades" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="19" name="aggregationcoef" nullable="false" remarks="Aggregation coefficient used for category weights or other aggregation types" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="20" name="aggregationcoef2" nullable="false" remarks="Aggregation coefficient used for weights in aggregation types with both extra credit and weight" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="sortorder" nullable="false" remarks="Sorting order of the columns" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="display" nullable="false" remarks="Display as real grades, percentages (in reference to the minimum and maximum grades) or letters (A, B, C etc..), or course default (0)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="decimals" nullable="true" remarks="Also known as precision, the number of digits after the decimal point symbol." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="hidden" nullable="false" remarks="1 is hidden, &amp;amp;gt; 1 is a date to hide until (prevents viewing)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="locked" nullable="false" remarks="1 is locked, &amp;amp;gt; 1 is a date to lock until (prevents update)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="locktime" nullable="false" remarks="lock all final grades after this date" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="needsupdate" nullable="false" remarks="If this flag is set, then the whole column will be recalculated" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="weightoverride" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="29" name="timecreated" nullable="true" remarks="The first time this grade_item was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="30" name="timemodified" nullable="true" remarks="The last time this grade_item was modified" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="graditem_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="graditem_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="graditem_gra_ix" unique="false">
            <column ascending="true" name="gradetype"/>
         </index>
         <index name="graditem_idncou_ix" unique="false">
            <column ascending="true" name="idnumber"/>
            <column ascending="true" name="courseid"/>
         </index>
         <index name="graditem_iteiteitecou_ix" unique="false">
            <column ascending="true" name="itemtype"/>
            <column ascending="true" name="itemmodule"/>
            <column ascending="true" name="iteminstance"/>
            <column ascending="true" name="courseid"/>
         </index>
         <index name="graditem_itenee_ix" unique="false">
            <column ascending="true" name="itemtype"/>
            <column ascending="true" name="needsupdate"/>
         </index>
         <index name="graditem_locloc_ix" unique="false">
            <column ascending="true" name="locked"/>
            <column ascending="true" name="locktime"/>
         </index>
         <index name="graditem_out_ix" unique="false">
            <column ascending="true" name="outcomeid"/>
         </index>
         <index name="graditem_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_items_history" numRows="0" remarks="History of grade_items" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="action" nullable="false" remarks="created/modified/deleted constants" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditemhist_old2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="source" nullable="true" remarks="What caused the modification? manual/module/import/..." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="true" remarks="The last time this grade_item was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="loggeduser" nullable="true" remarks="the userid of the person who last modified this outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditemhist_log2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="courseid" nullable="true" remarks="The course this item is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditemhist_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="categoryid" nullable="true" remarks="(optional) the category group this item belongs to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditemhist_cat2_fk" implied="false" onDeleteCascade="false" table="grade_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="itemname" nullable="true" remarks="The name of this item (pushed in by the module)" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="itemtype" nullable="false" remarks="&amp;#039;mod&amp;#039;, &amp;#039;blocks&amp;#039;, &amp;#039;import&amp;#039;, &amp;#039;calculated&amp;#039; etc" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="itemmodule" nullable="true" remarks="&amp;#039;forum&amp;#039;, &amp;#039;quiz&amp;#039;, &amp;#039;csv&amp;#039;, etc" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="iteminstance" nullable="true" remarks="id of the item module" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="itemnumber" nullable="true" remarks="Can be used to distinguish multiple grades for an activity" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="iteminfo" nullable="true" remarks="Info and notes about this item XXX" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="idnumber" nullable="true" remarks="Arbitrary idnumber provided by the module responsible" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="calculation" nullable="true" remarks="Formula describing how to derive this grade from other items, referring to them using giXXX where XXX is grade item id ... eg something like: =sin(square([#gi20#])) + [#gi30#]" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="gradetype" nullable="false" remarks="0 = none, 1 = value, 2 = scale, 3 = text" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="100.00000" digits="5" id="17" name="grademax" nullable="false" remarks="What is the maximum allowable grade?" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="18" name="grademin" nullable="false" remarks="What is the minimum allowable grade?" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="scaleid" nullable="true" remarks="If this grade is based on a scale, which one is it?" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditemhist_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="outcomeid" nullable="true" remarks="If this grade is related to an outcome, which one is it?" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graditemhist_out2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
         </column>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="21" name="gradepass" nullable="false" remarks="What grade is needed to pass? grademin &amp;amp;lt; gradepass &amp;amp;lt;= grademax" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="1.00000" digits="5" id="22" name="multfactor" nullable="false" remarks="Multiply all grades by this" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="23" name="plusfactor" nullable="false" remarks="Add this to all grades" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="24" name="aggregationcoef" nullable="false" remarks="Aggregation coefficient used for category weights or other aggregation types" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="25" name="aggregationcoef2" nullable="false" remarks="Aggregation coefficient used for category weights or other aggregation types" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="sortorder" nullable="false" remarks="Sorting order of the columns" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="hidden" nullable="false" remarks="1 is hidden, &amp;amp;gt; 1 is a date to hide until (prevents viewing)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="locked" nullable="false" remarks="1 is locked, &amp;amp;gt; 1 is a date to lock until (prevents update)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="locktime" nullable="false" remarks="lock all final grades after this date" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="needsupdate" nullable="false" remarks="If this flag is set, then the whole column will be recalculated" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="display" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="32" name="decimals" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="weightoverride" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="graditemhist_act_ix" unique="false">
            <column ascending="true" name="action"/>
         </index>
         <index name="graditemhist_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="graditemhist_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="graditemhist_log_ix" unique="false">
            <column ascending="true" name="loggeduser"/>
         </index>
         <index name="graditemhist_old_ix" unique="false">
            <column ascending="true" name="oldid"/>
         </index>
         <index name="graditemhist_out_ix" unique="false">
            <column ascending="true" name="outcomeid"/>
         </index>
         <index name="graditemhist_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
         <index name="graditemhist_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_letters" numRows="0" remarks="Repository for grade letters, for courses and other moodle entities that use grades." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="What contextid does this letter apply to (for now these will always be courses, but later...)" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="grade_letters_erd_context" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="2" name="lowerboundary" nullable="false" remarks="The lower boundary of the letter. Its upper boundary is the lower boundary of the next highest letter, unless there is none above, in which case it&amp;#039;s grademax for that grade_item." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="letter" nullable="false" remarks="The display value of the letter. Can be any character or string of characters (OK, A, 10% etc..)" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradlett_conlowlet_uix" unique="true">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="lowerboundary"/>
            <column ascending="true" name="letter"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_outcomes" numRows="0" remarks="This table describes the outcomes used in the system. An outcome is a statement tied to a rubric scale from low to high, such as âNot met, Borderline, Metâ (stored as 0,1 or 2)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="id of the table" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="outcomeid" foreignKey="graditem_out2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
            <child catalog="mdl52er_erd" column="outcomeid" foreignKey="graditemhist_out2_fk" implied="false" onDeleteCascade="false" table="grade_items_history"/>
            <child catalog="mdl52er_erd" column="outcomeid" foreignKey="gradoutccour_out2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes_courses"/>
            <child catalog="mdl52er_erd" column="oldid" foreignKey="gradoutchist_old2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes_history"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="true" remarks="Mostly these are defined site wide ie NULL" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutc_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="shortname" nullable="false" remarks="The short name or code for this outcome statement" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="fullname" nullable="false" remarks="The full description of the outcome (usually 1 sentence)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="scaleid" nullable="true" remarks="The recommended scale for this outcome." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutc_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="description" nullable="true" remarks="outcome description" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="true" remarks="the time this outcome was first created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="true" remarks="the time this outcome was last updated" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="usermodified" nullable="true" remarks="the userid of the person who last modified this outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutc_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradoutc_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="gradoutc_cousho_uix" unique="true">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="shortname"/>
         </index>
         <index name="gradoutc_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
         <index name="gradoutc_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_outcomes_courses" numRows="0" remarks="stores what outcomes are used in what courses." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="id of the course" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutccour_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="outcomeid" nullable="false" remarks="id of the outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutccour_out2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradoutccour_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="gradoutccour_couout_uix" unique="true">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="outcomeid"/>
         </index>
         <index name="gradoutccour_out_ix" unique="false">
            <column ascending="true" name="outcomeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_outcomes_history" numRows="0" remarks="History table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="action" nullable="false" remarks="created/modified/deleted constants" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutchist_old2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="source" nullable="true" remarks="What caused the modification? manual/module/import/..." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="true" remarks="The last time this grade_item was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="loggeduser" nullable="true" remarks="the userid of the person who last modified this outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutchist_log2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="courseid" nullable="true" remarks="Mostly these are defined site wide ie NULL" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutchist_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="shortname" nullable="false" remarks="The short name or code for this outcome statement" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="fullname" nullable="false" remarks="The full description of the outcome (usually 1 sentence)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="scaleid" nullable="true" remarks="The recommended scale for this outcome." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradoutchist_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="description" nullable="true" remarks="Outcome description" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradoutchist_act_ix" unique="false">
            <column ascending="true" name="action"/>
         </index>
         <index name="gradoutchist_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="gradoutchist_log_ix" unique="false">
            <column ascending="true" name="loggeduser"/>
         </index>
         <index name="gradoutchist_old_ix" unique="false">
            <column ascending="true" name="oldid"/>
         </index>
         <index name="gradoutchist_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
         <index name="gradoutchist_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grade_settings" numRows="0" remarks="gradebook settings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradsett_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradsett_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="gradsett_counam_uix" unique="true">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradepenalty_duedate_rule" numRows="0" remarks="Penalty rules" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="The context where the rule will be applied to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sortorder" nullable="false" remarks="Rule with lower late value will display first" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="overdueby" nullable="false" remarks="Overdue boundary" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="penalty" nullable="false" remarks="The deducted percentage will be applied the late submission" size="10" type="DOUBLE" typeCode="8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradduedrule_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradduedrule_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="gradduedrule_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grading_areas" numRows="0" remarks="Identifies gradable areas where advanced grading can happen. For each area, the current active plugin can be set." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="areaid" foreignKey="graddefi_are2_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="The context of the gradable area, eg module instance context." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradarea_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="Frankenstyle name of the component holding this area" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="areaname" nullable="false" remarks="The name of gradable area" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="activemethod" nullable="true" remarks="The default grading method (plugin) that should be used for this area" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradarea_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="gradarea_concomare_uix" unique="true">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="areaname"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grading_definitions" numRows="0" remarks="Contains the basic information about an advanced grading form defined in the given gradable area" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="definitionid" foreignKey="gradinst_def2_fk" implied="false" onDeleteCascade="false" table="grading_instances"/>
            <child catalog="mdl52er_erd" column="definitionid" foreignKey="gradguidcomm_def2_fk" implied="false" onDeleteCascade="false" table="gradingform_guide_comments"/>
            <child catalog="mdl52er_erd" column="definitionid" foreignKey="gradguidcrit_def2_fk" implied="false" onDeleteCascade="false" table="gradingform_guide_criteria"/>
            <child catalog="mdl52er_erd" column="definitionid" foreignKey="gradrubrcrit_def2_fk" implied="false" onDeleteCascade="false" table="gradingform_rubric_criteria"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="areaid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graddefi_are2_fk" implied="false" onDeleteCascade="false" table="grading_areas"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="method" nullable="false" remarks="The name of the plugin providing this grading form" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="The title of the form that helps users to identify it" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="More detailed description of the form" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="descriptionformat" nullable="true" remarks="Format of the description field" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="status" nullable="false" remarks="Status of the form definition, by default in the under-construction state" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="copiedfromid" nullable="true" remarks="The id of the original definition that this was initially copied from or null if it was from scratch" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="The timestamp of when the form definition was created initially" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="usercreated" nullable="false" remarks="The ID of the user who created this definition and is considered as its owner for access control purposes" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graddefi_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timemodified" nullable="false" remarks="The time stamp of when the form definition was modified recently" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="usermodified" nullable="false" remarks="The ID of the user who did the most recent modification" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="graddefi_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timecopied" nullable="true" remarks="The timestamp of when this form was most recently copied into another area" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="options" nullable="true" remarks="General field to be used by plugins as a general storage place for their own settings" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="graddefi_are_ix" unique="false">
            <column ascending="true" name="areaid"/>
         </index>
         <index name="graddefi_aremet_uix" unique="true">
            <column ascending="true" name="areaid"/>
            <column ascending="true" name="method"/>
         </index>
         <index name="graddefi_use2_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
         <index name="graddefi_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="grading_instances" numRows="0" remarks="Grading form instance is an assessment record for one gradable item assessed by one rater" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="instanceid" foreignKey="gradguidfill_ins2_fk" implied="false" onDeleteCascade="false" table="gradingform_guide_fillings"/>
            <child catalog="mdl52er_erd" column="instanceid" foreignKey="gradrubrfill_ins2_fk" implied="false" onDeleteCascade="false" table="gradingform_rubric_fillings"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="definitionid" nullable="false" remarks="The ID of the form definition this is instance of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradinst_def2_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="raterid" nullable="false" remarks="The ID of the user who did the assessment" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradinst_rat2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="itemid" nullable="true" remarks="This identifies the graded item within the grabable area" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="rawgrade" nullable="true" remarks="The raw normalized grade 0.00000 - 100.00000 as a result of the most recent assessment" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="status" nullable="false" remarks="The status of the assessment. By default the instance is under-assessment state see https://moodledev.io/docs/apis/core/grading#grading-form-instance" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="feedback" nullable="true" remarks="Overall feedback from the rater for the author of the graded item" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="feedbackformat" nullable="true" remarks="The format of the feedback field" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="false" remarks="The timestamp of when the assessment was most recently modified" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradinst_def_ix" unique="false">
            <column ascending="true" name="definitionid"/>
         </index>
         <index name="gradinst_rat_ix" unique="false">
            <column ascending="true" name="raterid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradingform_guide_comments" numRows="0" remarks="frequently used comments used in marking guide" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="definitionid" nullable="false" remarks="The ID of the form definition this faq is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradguidcomm_def2_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sortorder" nullable="false" remarks="Defines the order of the comments" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="The comment description" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="descriptionformat" nullable="true" remarks="The format of the description field" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradguidcomm_def_ix" unique="false">
            <column ascending="true" name="definitionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradingform_guide_criteria" numRows="0" remarks="Stores the rows of the criteria grid." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="criterionid" foreignKey="gradguidfill_cri2_fk" implied="false" onDeleteCascade="false" table="gradingform_guide_fillings"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="definitionid" nullable="false" remarks="The ID of the form definition this criterion is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradguidcrit_def2_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sortorder" nullable="false" remarks="Defines the order of the criterion in the guide" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="shortname" nullable="false" remarks="shortname of this criterion" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="The criterion description for students" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="descriptionformat" nullable="true" remarks="The format of the description field" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="descriptionmarkers" nullable="true" remarks="Description for Markers" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="descriptionmarkersformat" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="maxscore" nullable="false" remarks="maximum grade that can be assigned using this criterion" size="10" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradguidcrit_def_ix" unique="false">
            <column ascending="true" name="definitionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradingform_guide_fillings" numRows="0" remarks="Stores the data of how the guide is filled by a particular rater" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="instanceid" nullable="false" remarks="The ID of the grading form instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradguidfill_ins2_fk" implied="false" onDeleteCascade="false" table="grading_instances"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="criterionid" nullable="false" remarks="The ID of the criterion (row) in the guide" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradguidfill_cri2_fk" implied="false" onDeleteCascade="false" table="gradingform_guide_criteria"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="remark" nullable="true" remarks="Side note feedback regarding this particular criterion" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="remarkformat" nullable="true" remarks="The format of the remark field" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="5" name="score" nullable="false" remarks="The score assigned" size="10" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradguidfill_cri_ix" unique="false">
            <column ascending="true" name="criterionid"/>
         </index>
         <index name="gradguidfill_ins_ix" unique="false">
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="gradguidfill_inscri_uix" unique="true">
            <column ascending="true" name="instanceid"/>
            <column ascending="true" name="criterionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradingform_rubric_criteria" numRows="0" remarks="Stores the rows of the rubric grid." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="criterionid" foreignKey="gradrubrfill_cri2_fk" implied="false" onDeleteCascade="false" table="gradingform_rubric_fillings"/>
            <child catalog="mdl52er_erd" column="criterionid" foreignKey="gradrubrleve_cri2_fk" implied="false" onDeleteCascade="false" table="gradingform_rubric_levels"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="definitionid" nullable="false" remarks="The ID of the form definition this criterion is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradrubrcrit_def2_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sortorder" nullable="false" remarks="Defines the order of the criterion in the rubric" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="The criterion description" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="descriptionformat" nullable="true" remarks="The format of the description field" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradrubrcrit_def_ix" unique="false">
            <column ascending="true" name="definitionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradingform_rubric_fillings" numRows="0" remarks="Stores the data of how the rubric is filled by a particular rater" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="instanceid" nullable="false" remarks="The ID of the grading form instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradrubrfill_ins2_fk" implied="false" onDeleteCascade="false" table="grading_instances"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="criterionid" nullable="false" remarks="The ID of the criterion (row) in the rubric" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradrubrfill_cri2_fk" implied="false" onDeleteCascade="false" table="gradingform_rubric_criteria"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="levelid" nullable="true" remarks="If a particular level was selected during the assessment, its ID is stored here" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="remark" nullable="true" remarks="Side note feedback regarding this particular criterion" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="remarkformat" nullable="true" remarks="The format of the remark field" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradrubrfill_cri_ix" unique="false">
            <column ascending="true" name="criterionid"/>
         </index>
         <index name="gradrubrfill_ins_ix" unique="false">
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="gradrubrfill_inscri_uix" unique="true">
            <column ascending="true" name="instanceid"/>
            <column ascending="true" name="criterionid"/>
         </index>
         <index name="gradrubrfill_lev_ix" unique="false">
            <column ascending="true" name="levelid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="gradingform_rubric_levels" numRows="0" remarks="Stores the columns of the rubric grid." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="criterionid" nullable="false" remarks="The rubric criterion we are level of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="gradrubrleve_cri2_fk" implied="false" onDeleteCascade="false" table="gradingform_rubric_criteria"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="2" name="score" nullable="false" remarks="The score for this level" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="definition" nullable="true" remarks="The optional text describing the level" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="definitionformat" nullable="true" remarks="The format of the definition field" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="gradrubrleve_cri_ix" unique="false">
            <column ascending="true" name="criterionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="groupings" numRows="0" remarks="A grouping is a collection of groups. WAS: groups_groupings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="groupingid" foreignKey="courmodu_gro2_fk" implied="false" onDeleteCascade="false" table="course_modules"/>
            <child catalog="mdl52er_erd" column="groupingid" foreignKey="grougrou_gro3_fk" implied="false" onDeleteCascade="false" table="groupings_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="grou_cou5_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="Short human readable unique name for group." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="idnumber" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="configdata" nullable="true" remarks="extra configuration data - may be used by group IU tools" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="grou_cou2_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="grou_idn2_ix" unique="false">
            <column ascending="true" name="idnumber"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="groupings_groups" numRows="0" remarks="Link a grouping to a group (note, groups can be in multiple groupings ONLY in a course). WAS: groups_groupings_groups" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="groupingid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="grougrou_gro3_fk" implied="false" onDeleteCascade="false" table="groupings"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="grougrou_gro4_fk" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timeadded" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="grougrou_gro2_ix" unique="false">
            <column ascending="true" name="groupid"/>
         </index>
         <index name="grougrou_gro_ix" unique="false">
            <column ascending="true" name="groupingid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="groups" numRows="0" remarks="Each record represents a group." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="groupid" foreignKey="assiover_gro2_fk" implied="false" onDeleteCascade="false" table="assign_overrides"/>
            <child catalog="mdl52er_erd" column="groupid" foreignKey="grougrou_gro4_fk" implied="false" onDeleteCascade="false" table="groupings_groups"/>
            <child catalog="mdl52er_erd" column="groupid" foreignKey="groumemb_gro2_fk" implied="false" onDeleteCascade="false" table="groups_members"/>
            <child catalog="mdl52er_erd" column="groupid" foreignKey="lessover_gro2_fk" implied="false" onDeleteCascade="false" table="lesson_overrides"/>
            <child catalog="mdl52er_erd" column="groupid" foreignKey="quizover_gro2_fk" implied="false" onDeleteCascade="false" table="quiz_overrides"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="grou_cou3_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="idnumber" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="Short human readable unique name for the group." size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="enrolmentkey" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="picture" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="visibility" nullable="false" remarks="Visibility of group membership" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="participation" nullable="false" remarks="Can this group be selected when participating in activities?" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="grou_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="grou_idn_ix" unique="false">
            <column ascending="true" name="idnumber"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="groups_members" numRows="0" remarks="Link a user to a group." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="groumemb_gro2_fk" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="groumemb_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timeadded" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="component" nullable="false" remarks="Defines the Moodle component which added this group membership (e.g. &amp;#039;auth_myplugin&amp;#039;), or blank if it was added manually. (Entries which are created by a Moodle component cannot be removed in the normal user interface.)" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="itemid" nullable="false" remarks="If the &amp;#039;component&amp;#039; field is set, this can be used to define the instance of the component that created the entry. Otherwise should be left as default (0)." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="groumemb_gro_ix" unique="false">
            <column ascending="true" name="groupid"/>
         </index>
         <index name="groumemb_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="groumemb_usegro_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="groupid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5p" numRows="0" remarks="Stores H5P content information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="h5pid" foreignKey="h5pcontlibr_h5p2_fk" implied="false" onDeleteCascade="false" table="h5p_contents_libraries"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="jsoncontent" nullable="false" remarks="The content in json format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="mainlibraryid" nullable="false" remarks="The library we first instanciate for this node" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5p_mai2_fk" implied="false" onDeleteCascade="false" table="h5p_libraries"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="displayoptions" nullable="true" remarks="H5P Button display options" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="pathnamehash" nullable="false" remarks="Defines the complete unique hash for the file path where the H5P content was added." size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="contenthash" nullable="false" remarks="Defines the hash for the file content." size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="filtered" nullable="true" remarks="Filtered version of json_content" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5p_mai_ix" unique="false">
            <column ascending="true" name="mainlibraryid"/>
         </index>
         <index name="h5p_pat_ix" unique="false">
            <column ascending="true" name="pathnamehash"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5p_contents_libraries" numRows="0" remarks="Store which library is used in which content." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="h5pid" nullable="false" remarks="Identifier for the h5p content" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5pcontlibr_h5p2_fk" implied="false" onDeleteCascade="false" table="h5p"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="libraryid" nullable="false" remarks="The identifier of a H5P library this content uses" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5pcontlibr_lib2_fk" implied="false" onDeleteCascade="false" table="h5p_libraries"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="dependencytype" nullable="false" remarks="dynamic, preloaded or editor" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="dropcss" nullable="false" remarks="1 if the preloaded css from the dependency is to be excluded" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="weight" nullable="false" remarks="Determines the order in which the preloaded libraries will be loaded" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5pcontlibr_h5p_ix" unique="false">
            <column ascending="true" name="h5pid"/>
         </index>
         <index name="h5pcontlibr_lib_ix" unique="false">
            <column ascending="true" name="libraryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5p_libraries" numRows="0" remarks="Stores information about libraries used by H5P content." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Primary Key: The id of the library" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="mainlibraryid" foreignKey="h5p_mai2_fk" implied="false" onDeleteCascade="false" table="h5p"/>
            <child catalog="mdl52er_erd" column="libraryid" foreignKey="h5pcontlibr_lib2_fk" implied="false" onDeleteCascade="false" table="h5p_contents_libraries"/>
            <child catalog="mdl52er_erd" column="libraryid" foreignKey="h5plibrcach_lib2_fk" implied="false" onDeleteCascade="false" table="h5p_libraries_cachedassets"/>
            <child catalog="mdl52er_erd" column="libraryid" foreignKey="h5plibrdepe_lib2_fk" implied="false" onDeleteCascade="false" table="h5p_library_dependencies"/>
            <child catalog="mdl52er_erd" column="requiredlibraryid" foreignKey="h5plibrdepe_req2_fk" implied="false" onDeleteCascade="false" table="h5p_library_dependencies"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="machinename" nullable="false" remarks="The library machine name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="title" nullable="false" remarks="The human readable name of this library" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="majorversion" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="minorversion" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="patchversion" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="runnable" nullable="false" remarks="Can this library be started by the module? i.e. not a dependency." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="fullscreen" nullable="false" remarks="Display fullscreen button" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="embedtypes" nullable="false" remarks="List of supported embed types" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="preloadedjs" nullable="true" remarks="Comma separated list of scripts to load." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="preloadedcss" nullable="true" remarks="Comma separated list of stylesheets to load." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="droplibrarycss" nullable="true" remarks="List of libraries that should not have CSS included if this library is used. Comma separated list." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="semantics" nullable="true" remarks="The semantics definition in json format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="addto" nullable="true" remarks="Plugin configuration data" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="coremajor" nullable="true" remarks="H5P core API major version required" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="coreminor" nullable="true" remarks="H5P core API minor version required" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="metadatasettings" nullable="true" remarks="Library metadata settings" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="tutorial" nullable="true" remarks="Tutorial URL" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="example" nullable="true" remarks="Example URL" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="19" name="enabled" nullable="true" remarks="Defines if this library is enabled (1) or not (0)" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5plibr_macmajminpatrun_ix" unique="false">
            <column ascending="true" name="machinename"/>
            <column ascending="true" name="majorversion"/>
            <column ascending="true" name="minorversion"/>
            <column ascending="true" name="patchversion"/>
            <column ascending="true" name="runnable"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5p_libraries_cachedassets" numRows="0" remarks="H5P cached library assets" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="libraryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5plibrcach_lib2_fk" implied="false" onDeleteCascade="false" table="h5p_libraries"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="hash" nullable="false" remarks="Cache hash key that this library is part of." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5plibrcach_lib_ix" unique="false">
            <column ascending="true" name="libraryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5p_library_dependencies" numRows="0" remarks="Stores H5P library dependencies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="libraryid" nullable="false" remarks="The id of a H5P library." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5plibrdepe_lib2_fk" implied="false" onDeleteCascade="false" table="h5p_libraries"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="requiredlibraryid" nullable="false" remarks="The dependent library to load" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5plibrdepe_req2_fk" implied="false" onDeleteCascade="false" table="h5p_libraries"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="dependencytype" nullable="false" remarks="preloaded, dynamic, or editor" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5plibrdepe_lib_ix" unique="false">
            <column ascending="true" name="libraryid"/>
         </index>
         <index name="h5plibrdepe_req_ix" unique="false">
            <column ascending="true" name="requiredlibraryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5pactivity" numRows="0" remarks="Stores the h5pactivity activity module instances." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="h5pactivityid" foreignKey="h5paatte_h5p2_fk" implied="false" onDeleteCascade="false" table="h5pactivity_attempts"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="course" nullable="false" remarks="ID of the course this activity is part of." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5pa_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="The name of the activity module instance" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="Timestamp of when the instance was added to the course." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="false" remarks="Timestamp of when the instance was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="intro" nullable="true" remarks="Activity description." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="introformat" nullable="false" remarks="The format of the intro field." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="grade" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="displayoptions" nullable="false" remarks="H5P Button display options" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="9" name="enabletracking" nullable="false" remarks="Enable xAPI tracking" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="grademethod" nullable="false" remarks="Which H5P attempt is used for grading" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="reviewmode" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5pa_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5pactivity_attempts" numRows="0" remarks="Users attempts inside H5P activities" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="attemptid" foreignKey="h5paatteresu_att2_fk" implied="false" onDeleteCascade="false" table="h5pactivity_attempts_results"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="h5pactivityid" nullable="false" remarks="H5P activity ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5paatte_h5p2_fk" implied="false" onDeleteCascade="false" table="h5pactivity"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="Attempt user ID" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="attempt" nullable="false" remarks="Attempt number" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="rawscore" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="maxscore" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="8" name="scaled" nullable="false" remarks="Number 0..1 that reflects the performance of the learner" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="duration" nullable="true" remarks="Number of second inverted in that attempt (provided by the statement)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="completion" nullable="true" remarks="Store the xAPI tracking completion result." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="success" nullable="true" remarks="Store the xAPI tracking success result." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5paatte_h5p_ix" unique="false">
            <column ascending="true" name="h5pactivityid"/>
         </index>
         <index name="h5paatte_h5ptim_ix" unique="false">
            <column ascending="true" name="h5pactivityid"/>
            <column ascending="true" name="timecreated"/>
         </index>
         <index name="h5paatte_h5puse_ix" unique="false">
            <column ascending="true" name="h5pactivityid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="h5paatte_h5puseatt_uix" unique="true">
            <column ascending="true" name="h5pactivityid"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="attempt"/>
         </index>
         <index name="h5paatte_tim_ix" unique="false">
            <column ascending="true" name="timecreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="h5pactivity_attempts_results" numRows="0" remarks="H5Pactivities_attempts tracking info" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="attemptid" nullable="false" remarks="h5pactivity_attempts ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="h5paatteresu_att2_fk" implied="false" onDeleteCascade="false" table="h5pactivity_attempts"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="subcontent" nullable="true" remarks="" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="interactiontype" nullable="true" remarks="" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="correctpattern" nullable="true" remarks="Correct Pattern in xAPI format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="response" nullable="false" remarks="User response data in xAPI format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="additionals" nullable="true" remarks="Extra subcontent information in JSON format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="rawscore" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="maxscore" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="duration" nullable="true" remarks="Seconds inverted in this result (exctracted directly from statement)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="completion" nullable="true" remarks="Store the xAPI tracking completion result." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="success" nullable="true" remarks="Store the xAPI tracking success result." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="h5paatteresu_att_ix" unique="false">
            <column ascending="true" name="attemptid"/>
         </index>
         <index name="h5paatteresu_atttim_ix" unique="false">
            <column ascending="true" name="attemptid"/>
            <column ascending="true" name="timecreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="imscp" numRows="0" remarks="each record is one imscp resource" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="imscp_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="revision" nullable="false" remarks="incremented when after each file changes, solves browser caching issues" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="-1" digits="0" id="6" name="keepold" nullable="false" remarks="incremented when after each file changes, solves browser caching issues" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="structure" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="imsc_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="infected_files" numRows="0" remarks="Table to store infected file details." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="filename" nullable="false" remarks="Original file name" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="quarantinedfile" nullable="true" remarks="Quarantine zip file" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="The user that uploaded the infected file." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="infefile_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="reason" nullable="false" remarks="The reason for the antivirus failure" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="The time the infected file was uploaded." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="infefile_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="label" numRows="0" remarks="Defines labels" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="label_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="labe_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson" numRows="0" remarks="Defines lesson for reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#Lesson_Activity" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lessansw_les2_fk" implied="false" onDeleteCascade="false" table="lesson_answers"/>
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lessatte_les2_fk" implied="false" onDeleteCascade="false" table="lesson_attempts"/>
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lessbran_les2_fk" implied="false" onDeleteCascade="false" table="lesson_branch"/>
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lessgrad_les2_fk" implied="false" onDeleteCascade="false" table="lesson_grades"/>
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lessover_les2_fk" implied="false" onDeleteCascade="false" table="lesson_overrides"/>
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lesspage_les2_fk" implied="false" onDeleteCascade="false" table="lesson_pages"/>
            <child catalog="mdl52er_erd" column="lessonid" foreignKey="lesstime_les2_fk" implied="false" onDeleteCascade="false" table="lesson_timer"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="practice" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="modattempts" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="usepassword" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="password" nullable="false" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="dependency" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="conditions" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="grade" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="custom" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="ongoing" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="usemaxgrade" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="4" digits="0" id="15" name="maxanswers" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="5" digits="0" id="16" name="maxattempts" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="review" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="nextpagedefault" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="19" name="feedback" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="minquestions" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="maxpages" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="timelimit" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="23" name="retake" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="activitylink" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="25" name="mediafile" nullable="false" remarks="Local file path or full external URL" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="100" digits="0" id="26" name="mediaheight" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="650" digits="0" id="27" name="mediawidth" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="mediaclose" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="slideshow" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="640" digits="0" id="30" name="width" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="480" digits="0" id="31" name="height" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="#FFFFFF" digits="0" id="32" name="bgcolor" nullable="false" remarks="" size="7" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="displayleft" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="displayleftif" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="35" name="progressbar" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="available" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="37" name="deadline" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="38" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="39" name="completionendreached" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="40" name="completiontimespent" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="41" name="allowofflineattempts" nullable="true" remarks="Whether to allow the lesson to be attempted offline in the mobile app" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="less_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_answers" numRows="0" remarks="Defines lesson_answers" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="answerid" foreignKey="lessatte_ans2_fk" implied="false" onDeleteCascade="false" table="lesson_attempts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessansw_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessansw_pag2_fk" implied="false" onDeleteCascade="false" table="lesson_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="jumpto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="grade" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="score" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="flags" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="answer" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="answerformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="response" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="responseformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lessansw_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
         <index name="lessansw_pag_ix" unique="false">
            <column ascending="true" name="pageid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_attempts" numRows="0" remarks="Defines lesson_attempts" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessatte_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessatte_pag2_fk" implied="false" onDeleteCascade="false" table="lesson_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="answerid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessatte_ans2_fk" implied="false" onDeleteCascade="false" table="lesson_answers"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="retry" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="correct" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="useranswer" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timeseen" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lessatte_ans_ix" unique="false">
            <column ascending="true" name="answerid"/>
         </index>
         <index name="lessatte_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
         <index name="lessatte_pag_ix" unique="false">
            <column ascending="true" name="pageid"/>
         </index>
         <index name="lessatte_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_branch" numRows="0" remarks="branches for each lesson/user" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessbran_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="pageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessbran_pag2_fk" implied="false" onDeleteCascade="false" table="lesson_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="retry" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="flag" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timeseen" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="nextpageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lessbran_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
         <index name="lessbran_pag_ix" unique="false">
            <column ascending="true" name="pageid"/>
         </index>
         <index name="lessbran_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_grades" numRows="0" remarks="Defines lesson_grades" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessgrad_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="grade" nullable="false" remarks="" size="22" type="DOUBLE" typeCode="8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="late" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="completed" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lessgrad_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
         <index name="lessgrad_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_overrides" numRows="0" remarks="The overrides to lesson settings." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="Foreign key references lesson.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessover_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="groupid" nullable="true" remarks="Foreign key references groups.id.  Can be null if this is a per-user override." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessover_gro2_fk" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="true" remarks="Foreign key references user.id.  Can be null if this is a per-group override." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lessover_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="available" nullable="true" remarks="Time at which students may start attempting this lesson. Can be null, in which case the lesson default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="deadline" nullable="true" remarks="Time by which students must have completed their attempt.  Can be null, in which case the lesson default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timelimit" nullable="true" remarks="Time limit in seconds.  Can be null, in which case the lesson default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="review" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="maxattempts" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="retake" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="password" nullable="true" remarks="Lesson password.  Can be null, in which case the lesson default is used." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="reason" nullable="true" remarks="An optional reason explaining why this override was granted." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="reasonformat" nullable="false" remarks="The internal format for the override reason." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lessover_gro_ix" unique="false">
            <column ascending="true" name="groupid"/>
         </index>
         <index name="lessover_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
         <index name="lessover_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_pages" numRows="0" remarks="Defines lesson_pages" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="pageid" foreignKey="lessansw_pag2_fk" implied="false" onDeleteCascade="false" table="lesson_answers"/>
            <child catalog="mdl52er_erd" column="pageid" foreignKey="lessatte_pag2_fk" implied="false" onDeleteCascade="false" table="lesson_attempts"/>
            <child catalog="mdl52er_erd" column="pageid" foreignKey="lessbran_pag2_fk" implied="false" onDeleteCascade="false" table="lesson_branch"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lesspage_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="prevpageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="nextpageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="qtype" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="qoption" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="layout" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="display" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="title" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="contents" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="contentsformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lesspage_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lesson_timer" numRows="0" remarks="lesson timer for each lesson" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="lessonid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lesstime_les2_fk" implied="false" onDeleteCascade="false" table="lesson"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="starttime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="lessontime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="completed" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodifiedoffline" nullable="false" remarks="Last modified time via web services (mobile app)." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lesstime_les_ix" unique="false">
            <column ascending="true" name="lessonid"/>
         </index>
         <index name="lesstime_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="license" numRows="0" remarks="store licenses used by moodle" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="shortname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="fullname" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="source" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="version" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="custom" nullable="false" remarks="If this flag is set, license is custom and can be updated or deleted, otherwise license is a core license and cannot be edited." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="sortorder" nullable="false" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lock_db" numRows="0" remarks="Stores active and inactive lock types for db locking method." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="resourcekey" nullable="false" remarks="String identifying the resource to be locked. Should use frankenstyle format." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="expires" nullable="true" remarks="Expiry time for an active lock." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="owner" nullable="true" remarks="uuid indicating the owner of the lock." size="36" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lockdb_exp_ix" unique="false">
            <column ascending="true" name="expires"/>
         </index>
         <index name="lockdb_own_ix" unique="false">
            <column ascending="true" name="owner"/>
         </index>
         <index name="lockdb_res_uix" unique="true">
            <column ascending="true" name="resourcekey"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="log" numRows="0" remarks="Every action is logged as far as possible" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="time" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="log_erd_userid" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="ip" nullable="false" remarks="" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="module" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="cmid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="action" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="url" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="info" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="log_act_ix" unique="false">
            <column ascending="true" name="action"/>
         </index>
         <index name="log_cmi_ix" unique="false">
            <column ascending="true" name="cmid"/>
         </index>
         <index name="log_coumodact_ix" unique="false">
            <column ascending="true" name="course"/>
            <column ascending="true" name="module"/>
            <column ascending="true" name="action"/>
         </index>
         <index name="log_tim_ix" unique="false">
            <column ascending="true" name="time"/>
         </index>
         <index name="log_usecou_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="log_display" numRows="0" remarks="For a particular module/action, specifies a moodle table/field" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="module" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="action" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="mtable" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="field" nullable="false" remarks="" size="200" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="component" nullable="false" remarks="owner of the log action" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="logdisp_modact_uix" unique="true">
            <column ascending="true" name="module"/>
            <column ascending="true" name="action"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="log_queries" numRows="0" remarks="Logged database queries." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="qtype" nullable="false" remarks="query type constant" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sqltext" nullable="false" remarks="query sql" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="sqlparams" nullable="true" remarks="query parameters" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="error" nullable="false" remarks="is error" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="info" nullable="true" remarks="detailed info such as error text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="backtrace" nullable="true" remarks="php execution trace" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="7" name="exectime" nullable="false" remarks="query execution time in seconds as float" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timelogged" nullable="false" remarks="timestamp when log info stored into db" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="logstore_standard_log" numRows="0" remarks="Standard log table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="eventname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="action" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="target" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="objecttable" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="objectid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="crud" nullable="false" remarks="" size="1" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="edulevel" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="logsstanlog_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="contextlevel" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="contextinstanceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="logsstanlog_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="courseid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="logsstanlog_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="relateduserid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="logsstanlog_rel2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="anonymous" nullable="false" remarks="Was this event anonymous at the time of triggering?" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="other" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="origin" nullable="true" remarks="cli, cron, ws, etc." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="ip" nullable="true" remarks="IP address" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="realuserid" nullable="true" remarks="real user id when logged-in-as" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="logsstanlog_rea2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="logsstanlog_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="logsstanlog_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="logsstanlog_couanotim_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="anonymous"/>
            <column ascending="true" name="timecreated"/>
         </index>
         <index name="logsstanlog_rea_ix" unique="false">
            <column ascending="true" name="realuserid"/>
         </index>
         <index name="logsstanlog_rel_ix" unique="false">
            <column ascending="true" name="relateduserid"/>
         </index>
         <index name="logsstanlog_tim_ix" unique="false">
            <column ascending="true" name="timecreated"/>
         </index>
         <index name="logsstanlog_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="logsstanlog_useconconcruedu_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="contextlevel"/>
            <column ascending="true" name="contextinstanceid"/>
            <column ascending="true" name="crud"/>
            <column ascending="true" name="edulevel"/>
            <column ascending="true" name="timecreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti" numRows="0" remarks="This table contains Basic LTI activities instances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="ltiid" foreignKey="lti_submission_erd_lti_id" implied="false" onDeleteCascade="false" table="lti_submission"/>
            <child catalog="mdl52er_erd" column="coursemoduleid" foreignKey="ltitoolsett_cou4_fk" implied="false" onDeleteCascade="false" table="lti_tool_settings"/>
            <child catalog="mdl52er_erd" column="typeid" foreignKey="lti_types_config_erd_ltiid" implied="false" onDeleteCascade="false" table="lti_types_config"/>
            <child catalog="mdl52er_erd" column="ltilinkid" foreignKey="ltisgrad_lti2_fk" implied="false" onDeleteCascade="false" table="ltiservice_gradebookservices"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="Course basiclti activity belongs to" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="name field for moodle instances" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="General introduction of the basiclti activity" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="true" remarks="Format of the intro field (MOODLE, HTML, MARKDOWN...)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="typeid" nullable="true" remarks="Basic LTI type" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lti_erd_lti_types_id" implied="false" onDeleteCascade="false" table="lti_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="toolurl" nullable="false" remarks="Remote tool url" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="securetoolurl" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="instructorchoicesendname" nullable="true" remarks="Send user&amp;#039;s name" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="instructorchoicesendemailaddr" nullable="true" remarks="Send user&amp;#039;s email" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="instructorchoiceallowroster" nullable="true" remarks="Allow the roster to be retrieved" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="instructorchoiceallowsetting" nullable="true" remarks="Allow a tool to store a setting" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="instructorcustomparameters" nullable="true" remarks="Additional custom parameters provided by the instructor" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="instructorchoiceacceptgrades" nullable="true" remarks="Accept grades from tool" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="100" digits="0" id="16" name="grade" nullable="false" remarks="Grade scale" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="17" name="launchcontainer" nullable="false" remarks="Launch external tool in a pop-up" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="resourcekey" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="password" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="debuglaunch" nullable="false" remarks="Enable the debug-style launch which pauses before auto-submit" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="showtitlelaunch" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="showdescriptionlaunch" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="servicesalt" nullable="true" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="24" name="icon" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="25" name="secureicon" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lti_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="lti_erd_lti_types_id" unique="false">
            <column ascending="true" name="typeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_access_tokens" numRows="0" remarks="Security tokens for accessing of LTI services" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="typeid" nullable="false" remarks="Basic LTI type id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltiaccetoke_typ2_fk" implied="false" onDeleteCascade="false" table="lti_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="scope" nullable="false" remarks="Scope values as JSON array" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="token" nullable="false" remarks="security token, aka private access key" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="validuntil" nullable="false" remarks="timestamp - valid until data" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="created timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="lastaccess" nullable="true" remarks="last access timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltiaccetoke_tok_uix" unique="true">
            <column ascending="true" name="token"/>
         </index>
         <index name="ltiaccetoke_typ_ix" unique="false">
            <column ascending="true" name="typeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_coursevisible" numRows="0" remarks="Table to store coursevisible setting for site tool on course level" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="typeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="courseid" nullable="false" remarks="Course ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="coursevisible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lticour_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="lticour_typ_ix" unique="false">
            <column ascending="true" name="typeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_submission" numRows="0" remarks="Keeps track of individual submissions for LTI activities." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="ltiid" nullable="false" remarks="ID of the LTI tool instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lti_submission_erd_lti_id" implied="false" onDeleteCascade="false" table="lti"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="datesubmitted" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="dateupdated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="5" name="gradepercent" nullable="false" remarks="" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="6" name="originalgrade" nullable="false" remarks="" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="launchid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="state" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltisubm_lti_ix" unique="false">
            <column ascending="true" name="ltiid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_tool_proxies" numRows="0" remarks="LTI tool proxy registrations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="toolproxyid" foreignKey="ltitoolsett_too2_fk" implied="false" onDeleteCascade="false" table="lti_tool_settings"/>
         </column>
         <column autoUpdated="false" defaultValue="Tool Provider" digits="0" id="1" name="name" nullable="false" remarks="Tool Provider name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="regurl" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="state" nullable="false" remarks="Configured = 1, Pending = 2, Accepted = 3, Rejected = 4, Cancelled = 5" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="guid" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="secret" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="vendorcode" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="capabilityoffered" nullable="false" remarks="List of capabilities offered, one per line" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="serviceoffered" nullable="false" remarks="List of services offered, one per line" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="toolproxy" nullable="true" remarks="JSON string representing tool proxy returned by tool provider" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="createdby" nullable="false" remarks="ID of user which initiated the registration process" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timecreated" nullable="false" remarks="Date/time at which the record was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timemodified" nullable="false" remarks="Date/time at which the record was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltitoolprox_gui_uix" unique="true">
            <column ascending="true" name="guid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_tool_settings" numRows="0" remarks="LTI tool setting values" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="toolproxyid" nullable="false" remarks="Primary key of related tool proxy" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltitoolsett_too2_fk" implied="false" onDeleteCascade="false" table="lti_tool_proxies"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="typeid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltitoolsett_typ2_fk" implied="false" onDeleteCascade="false" table="lti_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="course" nullable="true" remarks="Primary key of course (null for system-wide settings)" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltitoolsett_cou3_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="coursemoduleid" nullable="true" remarks="Primary key of course module - tool link added to course (null for system-wide and context-wide settings)" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltitoolsett_cou4_fk" implied="false" onDeleteCascade="false" table="lti"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="settings" nullable="false" remarks="Setting values as JSON" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="Date/time at which the record was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="false" remarks="Date/time at which the record was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltitoolsett_cou2_ix" unique="false">
            <column ascending="true" name="coursemoduleid"/>
         </index>
         <index name="ltitoolsett_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="ltitoolsett_too_ix" unique="false">
            <column ascending="true" name="toolproxyid"/>
         </index>
         <index name="ltitoolsett_typ_ix" unique="false">
            <column ascending="true" name="typeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_types" numRows="0" remarks="Basic LTI pre-configured activities" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="typeid" foreignKey="lti_erd_lti_types_id" implied="false" onDeleteCascade="false" table="lti"/>
            <child catalog="mdl52er_erd" column="typeid" foreignKey="ltiaccetoke_typ2_fk" implied="false" onDeleteCascade="false" table="lti_access_tokens"/>
            <child catalog="mdl52er_erd" column="typeid" foreignKey="ltitoolsett_typ2_fk" implied="false" onDeleteCascade="false" table="lti_tool_settings"/>
            <child catalog="mdl52er_erd" column="typeid" foreignKey="ltitypecate_typ2_fk" implied="false" onDeleteCascade="false" table="lti_types_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="basiclti Activity" digits="0" id="1" name="name" nullable="false" remarks="Activity name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="baseurl" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="tooldomain" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="4" name="state" nullable="false" remarks="Active = 1, Pending = 2, Rejected = 3" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="coursevisible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="ltiversion" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="clientid" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="toolproxyid" nullable="true" remarks="Primary key of related tool proxy (null for LTI 1 tools)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="enabledcapability" nullable="true" remarks="Enabled capabilities, one per line (null for LTI 1 tools)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="parameter" nullable="true" remarks="Launch parameters, one per line (null for LTI 1 tools)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="icon" nullable="true" remarks="URL to icon file" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="secureicon" nullable="true" remarks="Secure URL to icon file" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="createdby" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="description" nullable="true" remarks="A description of what this LTI module is." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltitype_cli_uix" unique="true">
            <column ascending="true" name="clientid"/>
         </index>
         <index name="ltitype_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
         <index name="ltitype_too_ix" unique="false">
            <column ascending="true" name="tooldomain"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_types_categories" numRows="0" remarks="Link LTI types to course categories" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="typeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltitypecate_typ2_fk" implied="false" onDeleteCascade="false" table="lti_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="categoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltitypecate_cat2_fk" implied="false" onDeleteCascade="false" table="course_categories"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltitypecate_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="ltitypecate_typ_ix" unique="false">
            <column ascending="true" name="typeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="lti_types_config" numRows="0" remarks="Basic LTI types configuration" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="typeid" nullable="false" remarks="Basic LTI type id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="lti_types_config_erd_ltiid" implied="false" onDeleteCascade="false" table="lti"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="Basic LTI param" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="false" remarks="Param value" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltitypeconf_typ_ix" unique="false">
            <column ascending="true" name="typeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="ltiservice_gradebookservices" numRows="0" remarks="This file records the grade items created by the LTI Gradebook Services service" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="gradeitemid" nullable="false" remarks="ID of the gradeItem related." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltisgrad_gracou2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="courseid" nullable="false" remarks="ID of the course related." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="toolproxyid" nullable="true" remarks="ID of the Tool Proxy instance." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="typeid" nullable="true" remarks="ID of the LTI Type if not Proxy." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="baseurl" nullable="true" remarks="Lineitem URL that will be returned to the Tool provider" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="ltilinkid" nullable="true" remarks="ID of the LTI element related with this lineitem." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ltisgrad_lti2_fk" implied="false" onDeleteCascade="false" table="lti"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="resourceid" nullable="true" remarks="Resource id for the line item" size="512" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="tag" nullable="true" remarks="Tag type specified for the line item" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="subreviewurl" nullable="true" remarks="Submission review URL" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="subreviewparams" nullable="true" remarks="Submission review custom params" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ltisgrad_gracou_ix" unique="false">
            <column ascending="true" name="gradeitemid"/>
            <column ascending="true" name="courseid"/>
         </index>
         <index name="ltisgrad_lti_ix" unique="false">
            <column ascending="true" name="ltilinkid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="matrix_room" numRows="0" remarks="Stores the matrix room information associated with the communication instance." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="commid" nullable="false" remarks="ID of the communication record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="matrroom_com2_fk" implied="false" onDeleteCascade="false" table="communication"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="roomid" nullable="true" remarks="ID of the matrix room instance" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="topic" nullable="true" remarks="Topic of the matrix room instance." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="matrroom_com_ix" unique="false">
            <column ascending="true" name="commid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message" numRows="0" remarks="Stores all unread messages" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="messageid" foreignKey="message_popup_erd_message_id" implied="false" onDeleteCascade="false" table="message_popup"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="useridfrom" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="useridto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="subject" nullable="true" remarks="The message subject" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="fullmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="fullmessageformat" nullable="true" remarks="The format of the full message" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="fullmessagehtml" nullable="true" remarks="html format of message" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="smallmessage" nullable="true" remarks="Smal version of message (eg sms)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="notification" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="contexturl" nullable="true" remarks="If this message is a notification of an event contexturl should contain a link to view this event. For example if its a notification of a forum post contexturl should contain a link to the forum post." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="contexturlname" nullable="true" remarks="Display text for the contexturl" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timeuserfromdeleted" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timeusertodeleted" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="component" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="eventtype" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="customdata" nullable="true" remarks="Custom data to be passed to the message processor. Must be serialisable using json_encode()" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mess_usetimnot2_ix" unique="false">
            <column ascending="true" name="useridto"/>
            <column ascending="true" name="timeusertodeleted"/>
            <column ascending="true" name="notification"/>
         </index>
         <index name="mess_usetimnot_ix" unique="false">
            <column ascending="true" name="useridfrom"/>
            <column ascending="true" name="timeuserfromdeleted"/>
            <column ascending="true" name="notification"/>
         </index>
         <index name="mess_useusetimtim_ix" unique="false">
            <column ascending="true" name="useridfrom"/>
            <column ascending="true" name="useridto"/>
            <column ascending="true" name="timeuserfromdeleted"/>
            <column ascending="true" name="timeusertodeleted"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_airnotifier_devices" numRows="0" remarks="Store information about the devices registered in Airnotifier for PUSH notifications" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userdeviceid" nullable="false" remarks="The user device id in the user_devices table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messairndevi_use_fk" implied="false" onDeleteCascade="false" table="user_devices"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="enable" nullable="false" remarks="The user can enable/disable his devices" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messairndevi_use_uix" unique="true">
            <column ascending="true" name="userdeviceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_contact_requests" numRows="0" remarks="Maintains list of contact requests between users" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messcontrequ_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="requesteduserid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messcontrequ_req2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messcontrequ_req_ix" unique="false">
            <column ascending="true" name="requesteduserid"/>
         </index>
         <index name="messcontrequ_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="messcontrequ_usereq_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="requesteduserid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_contacts" numRows="0" remarks="Maintains lists of contacts between users" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messcont_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contactid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messcont_con2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messcont_con_ix" unique="false">
            <column ascending="true" name="contactid"/>
         </index>
         <index name="messcont_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="messcont_usecon_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="contactid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_conversation_actions" numRows="0" remarks="Stores all per-user actions on individual conversations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messconvacti_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="conversationid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messconvacti_con2_fk" implied="false" onDeleteCascade="false" table="message_conversations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="action" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messconvacti_con_ix" unique="false">
            <column ascending="true" name="conversationid"/>
         </index>
         <index name="messconvacti_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_conversation_members" numRows="0" remarks="Stores all members in a conversations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="conversationid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messconvmemb_con2_fk" implied="false" onDeleteCascade="false" table="message_conversations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messconvmemb_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messconvmemb_con_ix" unique="false">
            <column ascending="true" name="conversationid"/>
         </index>
         <index name="messconvmemb_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_conversations" numRows="0" remarks="Stores all message conversations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="conversationid" foreignKey="messconvacti_con2_fk" implied="false" onDeleteCascade="false" table="message_conversation_actions"/>
            <child catalog="mdl52er_erd" column="conversationid" foreignKey="messconvmemb_con2_fk" implied="false" onDeleteCascade="false" table="message_conversation_members"/>
            <child catalog="mdl52er_erd" column="conversationid" foreignKey="messemaimess_con2_fk" implied="false" onDeleteCascade="false" table="message_email_messages"/>
            <child catalog="mdl52er_erd" column="conversationid" foreignKey="mess_con2_fk" implied="false" onDeleteCascade="false" table="messages"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="type" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="convhash" nullable="true" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="component" nullable="true" remarks="Defines the Moodle component which the area was added to" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="itemtype" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="itemid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="contextid" nullable="true" remarks="The context id of the itemid or course of the itemtype was added" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messconv_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messconv_comiteitecon_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemtype"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="contextid"/>
         </index>
         <index name="messconv_con2_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="messconv_con_ix" unique="false">
            <column ascending="true" name="convhash"/>
         </index>
         <index name="messconv_typ_ix" unique="false">
            <column ascending="true" name="type"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_email_messages" numRows="0" remarks="Keeps track of what emails to send in an email digest" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="useridto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messemaimess_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="conversationid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messemaimess_con2_fk" implied="false" onDeleteCascade="false" table="message_conversations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="messageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messemaimess_mes2_fk" implied="false" onDeleteCascade="false" table="messages"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messemaimess_con_ix" unique="false">
            <column ascending="true" name="conversationid"/>
         </index>
         <index name="messemaimess_mes_ix" unique="false">
            <column ascending="true" name="messageid"/>
         </index>
         <index name="messemaimess_use_ix" unique="false">
            <column ascending="true" name="useridto"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_popup" numRows="0" remarks="Keep state of notifications for the popup message processor" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="messageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="message_popup_erd_message_id" implied="false" onDeleteCascade="false" table="message"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="isread" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messpopu_isr_ix" unique="false">
            <column ascending="true" name="isread"/>
         </index>
         <index name="messpopu_mesisr_uix" unique="true">
            <column ascending="true" name="messageid"/>
            <column ascending="true" name="isread"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_popup_notifications" numRows="0" remarks="List of notifications to display in the message output popup" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="notificationid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messpopunoti_not2_fk" implied="false" onDeleteCascade="false" table="notifications"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messpopunoti_not_ix" unique="false">
            <column ascending="true" name="notificationid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_processors" numRows="0" remarks="List of message output plugins" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Name of the message processor" size="166" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="enabled" nullable="false" remarks="Defines if processor is enabled" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_providers" numRows="0" remarks="This table stores the message providers (modules and core systems)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="id of the table, please edit me" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="The full name of the message provider in standard form" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="The name of the component that produces these messages" size="200" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="capability" nullable="true" remarks="Optional: permission that is required on the user&amp;#039;s setting screen to see this message provider." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messprov_comnam_uix" unique="true">
            <column ascending="true" name="component"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_read" numRows="0" remarks="Stores all messages that have been read" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="useridfrom" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="message_read_erd_from_user_id" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="useridto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="subject" nullable="true" remarks="The message subject" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="fullmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="fullmessageformat" nullable="true" remarks="The format of the full message" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="fullmessagehtml" nullable="true" remarks="html format of message" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="smallmessage" nullable="true" remarks="Smal version of message (eg sms)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="notification" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="contexturl" nullable="true" remarks="If this message is a notification of an event contexturl should contain a link to view this event. For example if its a notification of a forum post contexturl should contain a link to the forum post." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="contexturlname" nullable="true" remarks="Display text for the contexturl" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timeread" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timeuserfromdeleted" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="timeusertodeleted" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="component" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="eventtype" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messread_nottim_ix" unique="false">
            <column ascending="true" name="notification"/>
            <column ascending="true" name="timeread"/>
         </index>
         <index name="messread_usetimnot2_ix" unique="false">
            <column ascending="true" name="useridto"/>
            <column ascending="true" name="timeusertodeleted"/>
            <column ascending="true" name="notification"/>
         </index>
         <index name="messread_usetimnot_ix" unique="false">
            <column ascending="true" name="useridfrom"/>
            <column ascending="true" name="timeuserfromdeleted"/>
            <column ascending="true" name="notification"/>
         </index>
         <index name="messread_useusetimtim_ix" unique="false">
            <column ascending="true" name="useridfrom"/>
            <column ascending="true" name="useridto"/>
            <column ascending="true" name="timeuserfromdeleted"/>
            <column ascending="true" name="timeusertodeleted"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_user_actions" numRows="0" remarks="Stores all per-user actions on individual messages" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messuseracti_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="messageid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messuseracti_mes2_fk" implied="false" onDeleteCascade="false" table="messages"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="action" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messuseracti_mes_ix" unique="false">
            <column ascending="true" name="messageid"/>
         </index>
         <index name="messuseracti_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="messuseracti_usemesact_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="messageid"/>
            <column ascending="true" name="action"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="message_users_blocked" numRows="0" remarks="Maintains lists of blocked users" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messuserbloc_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="blockeduserid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messuserbloc_blo2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messuserbloc_blo_ix" unique="false">
            <column ascending="true" name="blockeduserid"/>
         </index>
         <index name="messuserbloc_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="messuserbloc_useblo_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="blockeduserid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="messageinbound_datakeys" numRows="0" remarks="Inbound Message data item secret keys." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="handler" nullable="false" remarks="The handler that this key belongs to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messdata_han2_fk" implied="false" onDeleteCascade="false" table="messageinbound_handlers"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="datavalue" nullable="false" remarks="The integer value of the data item that this key belongs to." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="datakey" nullable="true" remarks="The secret key for this data item." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="The time that the data key was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="expires" nullable="true" remarks="The expiry time of this key." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messdata_han_ix" unique="false">
            <column ascending="true" name="handler"/>
         </index>
         <index name="messdata_handat_uix" unique="true">
            <column ascending="true" name="handler"/>
            <column ascending="true" name="datavalue"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="messageinbound_handlers" numRows="0" remarks="Inbound Message Handler definitions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="handler" foreignKey="messdata_han2_fk" implied="false" onDeleteCascade="false" table="messageinbound_datakeys"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="The component this handler belongs to." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="classname" nullable="false" remarks="The class defining the Inbound Message handler to be called." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="86400" digits="0" id="3" name="defaultexpiration" nullable="false" remarks="The default expiration period to use when creating a new key" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="validateaddress" nullable="false" remarks="Whether to validate the sender address against the user record." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="enabled" nullable="false" remarks="Whether this handler is currently enabled." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messhand_cla_uix" unique="true">
            <column ascending="true" name="classname"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="messageinbound_messagelist" numRows="0" remarks="A list of message IDs for existing replies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="messageid" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="messmess_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="address" nullable="false" remarks="The Inbound Message address that the message was originally sent to" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="messmess_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="messages" numRows="0" remarks="Stores all messages" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="messageid" foreignKey="messemaimess_mes2_fk" implied="false" onDeleteCascade="false" table="message_email_messages"/>
            <child catalog="mdl52er_erd" column="messageid" foreignKey="messuseracti_mes2_fk" implied="false" onDeleteCascade="false" table="message_user_actions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="useridfrom" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mess_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="conversationid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mess_con2_fk" implied="false" onDeleteCascade="false" table="message_conversations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="subject" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="fullmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="fullmessageformat" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="fullmessagehtml" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="smallmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="fullmessagetrust" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="customdata" nullable="true" remarks="Custom data to be passed to the message processor. Must be serialisable using json_encode()" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mess_con_ix" unique="false">
            <column ascending="true" name="conversationid"/>
         </index>
         <index name="mess_contim_ix" unique="false">
            <column ascending="true" name="conversationid"/>
            <column ascending="true" name="timecreated"/>
         </index>
         <index name="mess_use_ix" unique="false">
            <column ascending="true" name="useridfrom"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_application" numRows="0" remarks="Information about applications on remote hosts" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="applicationid" foreignKey="mnethost_app2_fk" implied="false" onDeleteCascade="false" table="mnet_host"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="display_name" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="xmlrpc_server_url" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="sso_land_url" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="sso_jump_url" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_host" numRows="0" remarks="Information about the local and remote hosts for RPC" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Unique Host ID" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="hostid" foreignKey="mnet_log_erd_mnetid" implied="false" onDeleteCascade="false" table="mnet_log"/>
            <child catalog="mdl52er_erd" column="mnethostid" foreignKey="mnetsess_mne2_fk" implied="false" onDeleteCascade="false" table="mnet_session"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="deleted" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="wwwroot" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="ip_address" nullable="false" remarks="" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="name" nullable="false" remarks="" size="80" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="public_key" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="public_key_expires" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="transport" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="portno" nullable="false" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="last_connect_time" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="last_log_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="force_theme" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="theme" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="13" name="applicationid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mnethost_app2_fk" implied="false" onDeleteCascade="false" table="mnet_application"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="sslverification" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnethost_app_ix" unique="false">
            <column ascending="true" name="applicationid"/>
         </index>
         <index name="mnethost_las_ix" unique="false">
            <column ascending="true" name="last_log_id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_host2service" numRows="0" remarks="Information about the services for a given host" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="hostid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="serviceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="publish" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="subscribe" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnethost_hosser_uix" unique="true">
            <column ascending="true" name="hostid"/>
            <column ascending="true" name="serviceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_log" numRows="0" remarks="Store session data from users migrating to other sites" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="hostid" nullable="false" remarks="Unique host ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mnet_log_erd_mnetid" implied="false" onDeleteCascade="false" table="mnet_host"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="remoteid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="time" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="ip" nullable="false" remarks="" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="coursename" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="module" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="cmid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="action" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="url" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="12" name="info" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnetlog_hosusecou_ix" unique="false">
            <column ascending="true" name="hostid"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_remote_rpc" numRows="0" remarks="This table describes functions that might be called remotely (we have less information about them than local functions)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="functionname" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="xmlrpcpath" nullable="false" remarks="" size="80" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="plugintype" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="pluginname" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_remote_service2rpc" numRows="0" remarks="Group functions or methods under a service" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Required ID field" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="serviceid" nullable="false" remarks="Unique service ID" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="rpcid" nullable="false" remarks="Unique Function ID" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnetremoserv_rpcser_uix" unique="true">
            <column ascending="true" name="rpcid"/>
            <column ascending="true" name="serviceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_rpc" numRows="0" remarks="Functions or methods that we may publish or subscribe to" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Unique Function ID" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="functionname" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="xmlrpcpath" nullable="false" remarks="" size="80" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="plugintype" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="pluginname" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="help" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="profile" nullable="false" remarks="Method signature" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="filename" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="classname" nullable="true" remarks="" size="150" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="static" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnetrpc_enaxml_ix" unique="false">
            <column ascending="true" name="enabled"/>
            <column ascending="true" name="xmlrpcpath"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_service" numRows="0" remarks="A service is a group of functions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Unique Service ID" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="serviceid" foreignKey="mnet_service2rpc_erd_mnet_serviceid" implied="false" onDeleteCascade="false" table="mnet_service2rpc"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="description" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="apiversion" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="offer" nullable="false" remarks="Do we even offer this service?" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_service2rpc" numRows="0" remarks="Group functions or methods under a service" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Required ID field" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="serviceid" nullable="false" remarks="Unique service ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mnet_service2rpc_erd_mnet_serviceid" implied="false" onDeleteCascade="false" table="mnet_service"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="rpcid" nullable="false" remarks="Unique Function ID" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnet_service2rpc_erd_mnet_serviceid" unique="false">
            <column ascending="true" name="serviceid"/>
         </index>
         <index name="mnetserv_rpcser_uix" unique="true">
            <column ascending="true" name="rpcid"/>
            <column ascending="true" name="serviceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_session" numRows="0" remarks="Store session data from users migrating to other sites" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Required ID field" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="Unique user ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mnetsess_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="username" nullable="false" remarks="Unique username" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="token" nullable="false" remarks="Unique SHA1 Token" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="mnethostid" nullable="false" remarks="Unique remote host ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="mnetsess_mne2_fk" implied="false" onDeleteCascade="false" table="mnet_host"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="useragent" nullable="false" remarks="SHA1 hash of User Agent" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="confirm_timeout" nullable="false" remarks="UNIX timestamp for expiry of session" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="session_id" nullable="false" remarks="The PHP Session ID" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="expires" nullable="false" remarks="Expire time of session on peer" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnetsess_mne_ix" unique="false">
            <column ascending="true" name="mnethostid"/>
         </index>
         <index name="mnetsess_tok_uix" unique="true">
            <column ascending="true" name="token"/>
         </index>
         <index name="mnetsess_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="mnet_sso_access_control" numRows="0" remarks="Users by host permitted (or not) to login from a remote provider" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Required ID field" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="username" nullable="false" remarks="Username" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="mdl52er_erd" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="mnet_host_id" nullable="false" remarks="id of mnet host" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="allow" digits="0" id="3" name="accessctrl" nullable="false" remarks="Whether or not this user/host can login" size="20" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mnetssoaccecont_mneuse_uix" unique="true">
            <column ascending="true" name="mnet_host_id"/>
            <column ascending="true" name="username"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="modules" numRows="0" remarks="modules available in the site" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="module" foreignKey="courcompdefa_mod2_fk" implied="false" onDeleteCascade="false" table="course_completion_defaults"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="cron" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="lastcron" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="search" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="visible" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="modu_nam_ix" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="my_pages" numRows="0" remarks="Extra user pages for the My Moodle system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="true" remarks="The user who owns this page or 0 for system defaults" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="my_pages_erd_userid" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="The page name (freeform text)" size="200" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="private" nullable="false" remarks="Whether or not the page is private (dashboard) or public (profile)" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="sortorder" nullable="false" remarks="The order of the pages for a user" size="7" type="MEDIUMINT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mypage_usepri_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="private"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="notifications" numRows="0" remarks="Stores all notifications" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="notificationid" foreignKey="messpopunoti_not2_fk" implied="false" onDeleteCascade="false" table="message_popup_notifications"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="useridfrom" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="useridto" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="noti_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="subject" nullable="true" remarks="The message subject" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="fullmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="fullmessageformat" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="fullmessagehtml" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="smallmessage" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="component" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="eventtype" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="contexturl" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="contexturlname" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timeread" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="customdata" nullable="true" remarks="Custom data to be passed to the message processor. Must be serialisable using json_encode()" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="noti_tim2_ix" unique="false">
            <column ascending="true" name="timeread"/>
         </index>
         <index name="noti_tim_ix" unique="false">
            <column ascending="true" name="timecreated"/>
         </index>
         <index name="noti_use2_ix" unique="false">
            <column ascending="true" name="useridto"/>
         </index>
         <index name="noti_use_ix" unique="false">
            <column ascending="true" name="useridfrom"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="oauth2_access_token" numRows="0" remarks="Stores access tokens for system accounts in order to be able to use a single token across multiple sessions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timecreated" nullable="false" remarks="Time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="Time this record was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="The user who modified this record." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautaccetoke_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="issuerid" nullable="false" remarks="Corresponding oauth2 issuer" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautaccetoke_iss_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="token" nullable="false" remarks="access token" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="expires" nullable="false" remarks="Expiry timestamp (according to the issuer)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="scope" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="oautaccetoke_iss_uix" unique="true">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="oautaccetoke_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="oauth2_endpoint" numRows="0" remarks="Describes the named endpoint for an oauth2 service." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timecreated" nullable="false" remarks="The time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="The time this record was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="The user who modified this record." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautendp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="name" nullable="false" remarks="The service name." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="url" nullable="false" remarks="The url to the endpoint" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="issuerid" nullable="false" remarks="The identity provider this service belongs to." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautendp_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="oautendp_iss_ix" unique="false">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="oautendp_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="oauth2_issuer" numRows="0" remarks="Details for an oauth 2 connect identity issuer." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="authoautlinklogi_iss2_fk" implied="false" onDeleteCascade="false" table="auth_oauth2_linked_login"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="badgbackoaut_iss2_fk" implied="false" onDeleteCascade="false" table="badge_backpack_oauth2"/>
            <child catalog="mdl52er_erd" column="oauth2_issuerid" foreignKey="badgexteback_oau2_fk" implied="false" onDeleteCascade="false" table="badge_external_backpack"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="oautaccetoke_iss_fk" implied="false" onDeleteCascade="false" table="oauth2_access_token"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="oautendp_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_endpoint"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="oautrefrtoke_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_refresh_token"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="oautsystacco_iss_fk" implied="false" onDeleteCascade="false" table="oauth2_system_account"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="oautuserfielmapp_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_user_field_mapping"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timecreated" nullable="false" remarks="Time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="Time this record was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="The user who modified this record" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="name" nullable="false" remarks="The name of this identity issuer" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="image" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="baseurl" nullable="false" remarks="The base url to the issuer" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="clientid" nullable="false" remarks="The client id used to connect to this oauth2 service." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="clientsecret" nullable="false" remarks="The secret used to connect to this oauth2 service." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="loginscopes" nullable="false" remarks="The scopes requested for a normal login attempt." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="loginscopesoffline" nullable="false" remarks="The scopes requested for a login attempt to generate a refresh token." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="loginparams" nullable="false" remarks="Additional parameters sent for a login attempt." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="loginparamsoffline" nullable="false" remarks="Additional parameters sent for a login attempt to generate a refresh token." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="alloweddomains" nullable="false" remarks="Allowed domains for this issuer." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="scopessupported" nullable="true" remarks="The list of scopes this service supports." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="15" name="enabled" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="showonloginpage" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="basicauth" nullable="false" remarks="Use HTTP Basic authentication scheme when sending client ID and password" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="sortorder" nullable="false" remarks="The defined sort order." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="19" name="requireconfirmation" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="servicetype" nullable="true" remarks="Issuer service type, such as &amp;#039;google&amp;#039; or &amp;#039;facebook&amp;#039;." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="loginpagename" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="systememail" nullable="true" remarks="The email that will be used connect system account for sending email via SMTP" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="oauth2_refresh_token" numRows="0" remarks="Stores refresh tokens which can be exchanged for access tokens" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timecreated" nullable="false" remarks="Time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="Time this record was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="The user to whom this refresh token belongs." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautrefrtoke_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="issuerid" nullable="false" remarks="Corresponding oauth2 issuer" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautrefrtoke_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="token" nullable="false" remarks="refresh token" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="scopehash" nullable="false" remarks="sha1 hash of the scopes used when requesting the refresh token" size="40" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="oautrefrtoke_iss_ix" unique="false">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="oautrefrtoke_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="oautrefrtoke_useisssco_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="issuerid"/>
            <column ascending="true" name="scopehash"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="oauth2_system_account" numRows="0" remarks="Stored details used to get an access token as a system user for this oauth2 service." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timecreated" nullable="false" remarks="Time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="Time this record was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="The user who modified this record." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautsystacco_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="issuerid" nullable="false" remarks="The id of the oauth 2 identity issuer" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautsystacco_iss_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="refreshtoken" nullable="false" remarks="The refresh token used to request access tokens." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="grantedscopes" nullable="false" remarks="The scopes that this system account has been granted access to." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="email" nullable="true" remarks="The email that was connected to this issuer." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="username" nullable="false" remarks="The username that was connected as a system account to this issue." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="oautsystacco_iss_uix" unique="true">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="oautsystacco_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="oauth2_user_field_mapping" numRows="0" remarks="Mapping of oauth user fields to moodle fields." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timemodified" nullable="false" remarks="The time this record was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timecreated" nullable="false" remarks="The time this record was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="The user who modified this record." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautuserfielmapp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="issuerid" nullable="false" remarks="The oauth issuer." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="oautuserfielmapp_iss2_fk" implied="false" onDeleteCascade="false" table="oauth2_issuer"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="externalfield" nullable="false" remarks="The fieldname returned by the userinfo endpoint." size="500" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="internalfield" nullable="false" remarks="The name of the Moodle field this user field maps to." size="64" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="oautuserfielmapp_iss_ix" unique="false">
            <column ascending="true" name="issuerid"/>
         </index>
         <index name="oautuserfielmapp_issint_uix" unique="true">
            <column ascending="true" name="issuerid"/>
            <column ascending="true" name="internalfield"/>
         </index>
         <index name="oautuserfielmapp_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="page" numRows="0" remarks="Each record is one page and its config data" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="page_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="content" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="contentformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="legacyfiles" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="legacyfileslast" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="display" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="displayoptions" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="revision" nullable="false" remarks="incremented when after each file changes, solves browser caching issues" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="page_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="paygw_paypal" numRows="0" remarks="Stores PayPal related information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="paymentid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="paygpayp_pay_fk" implied="false" onDeleteCascade="false" table="payments"/>
         </column>
         <column autoUpdated="false" defaultValue="The ID of the order in PayPal" digits="0" id="2" name="pp_orderid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="paygpayp_pay_uix" unique="true">
            <column ascending="true" name="paymentid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="payment_accounts" numRows="0" remarks="Payment accounts" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="accountid" foreignKey="paymgate_acc2_fk" implied="false" onDeleteCascade="false" table="payment_gateways"/>
            <child catalog="mdl52er_erd" column="accountid" foreignKey="paym_acc2_fk" implied="false" onDeleteCascade="false" table="payments"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="idnumber" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="paymacco_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="archived" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="paymacco_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="payment_gateways" numRows="0" remarks="Configuration for one gateway for one payment account" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="accountid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="paymgate_acc2_fk" implied="false" onDeleteCascade="false" table="payment_accounts"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="gateway" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="config" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="paymgate_acc_ix" unique="false">
            <column ascending="true" name="accountid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="payments" numRows="0" remarks="Stores information about payments" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="paymentid" foreignKey="paygpayp_pay_fk" implied="false" onDeleteCascade="false" table="paygw_paypal"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="The plugin this payment belongs to." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="paymentarea" nullable="false" remarks="The name of payable area" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="paym_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="amount" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="currency" nullable="false" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="accountid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="paym_acc2_fk" implied="false" onDeleteCascade="false" table="payment_accounts"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="gateway" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="paym_acc_ix" unique="false">
            <column ascending="true" name="accountid"/>
         </index>
         <index name="paym_compayite_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="paymentarea"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="paym_gat_ix" unique="false">
            <column ascending="true" name="gateway"/>
         </index>
         <index name="paym_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="portfolio_instance" numRows="0" remarks="base table (not including config data) for instances of portfolio plugins." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="instance" foreignKey="portinstconf_ins2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance_config"/>
            <child catalog="mdl52er_erd" column="instance" foreignKey="portinstuser_ins2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance_user"/>
            <child catalog="mdl52er_erd" column="portfolio" foreignKey="portlog_por2_fk" implied="false" onDeleteCascade="false" table="portfolio_log"/>
            <child catalog="mdl52er_erd" column="instance" foreignKey="porttemp_ins2_fk" implied="false" onDeleteCascade="false" table="portfolio_tempdata"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="plugin" nullable="false" remarks="fk to plugin" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="name of plugin instance" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="visible" nullable="false" remarks="whether this instance is visible or not" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="portfolio_instance_config" numRows="0" remarks="config for portfolio plugin instances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="instance" nullable="false" remarks="instance of plugin we&amp;#039;re configurating" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="portinstconf_ins2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="config field" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="true" remarks="config value" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="portinstconf_ins_ix" unique="false">
            <column ascending="true" name="instance"/>
         </index>
         <index name="portinstconf_nam_ix" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="portfolio_instance_user" numRows="0" remarks="user data for portfolio instances." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="instance" nullable="false" remarks="fk to instance table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="portinstuser_ins2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="fk to user table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="portinstuser_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="name of config item" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="value" nullable="true" remarks="value of config item" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="portinstuser_ins_ix" unique="false">
            <column ascending="true" name="instance"/>
         </index>
         <index name="portinstuser_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="portfolio_log" numRows="0" remarks="log of portfolio transfers (used to later check for duplicates)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="user who exported content" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="portlog_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="time" nullable="false" remarks="time of transfer (in the case of a queued transfer this is the time the actual transfer ran, not when the user started)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="portfolio" nullable="false" remarks="fk to portfolio_instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="portlog_por2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="caller_class" nullable="false" remarks="the name of the class used to create the transfer" size="150" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="caller_file" nullable="false" remarks="path to file to include where the class definition lives. (relative to dirroot)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="caller_component" nullable="true" remarks="the component name responsible for exporting" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="caller_sha1" nullable="false" remarks="sha1 of exported content as far as the caller is concerned (before the portfolio plugin gets a hold of it)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="tempdataid" nullable="false" remarks="old id from portfolio_tempdata.  This is so that we can gracefully catch a race condition between an external system requesting a file and causing the tempdata to be deleted, before the user gets the &amp;quot;your transfer is requested&amp;quot; page" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="portlog_tem2_fk" implied="false" onDeleteCascade="false" table="portfolio_tempdata"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="returnurl" nullable="false" remarks="the original &amp;quot;returnurl&amp;quot; of the export - takes us to the moodle page we started from" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="continueurl" nullable="false" remarks="the url the external system has set to view the transfer" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="portlog_por_ix" unique="false">
            <column ascending="true" name="portfolio"/>
         </index>
         <index name="portlog_tem_ix" unique="false">
            <column ascending="true" name="tempdataid"/>
         </index>
         <index name="portlog_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="portfolio_tempdata" numRows="0" remarks="stores temporary data for portfolio exports. the id of this table is used for the itemid for the temporary files area.  cron can clean up stale records (and associated file data) after expirytime." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="tempdataid" foreignKey="portlog_tem2_fk" implied="false" onDeleteCascade="false" table="portfolio_log"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="data" nullable="true" remarks="dumping ground for portfolio callers to store their data in." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="expirytime" nullable="false" remarks="time this record will expire (used for cron cleanups) - the start of export + 24 hours" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="psuedo fk to user.  this is stored in the serialised data structure in the data field, but added here for ease of lookups." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="porttemp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="instance" nullable="true" remarks="which portfolio plugin instance is being used" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="porttemp_ins2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="queued" nullable="false" remarks="Value 1 means the entry should be processed in cron." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="porttemp_ins_ix" unique="false">
            <column ascending="true" name="instance"/>
         </index>
         <index name="porttemp_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="post" numRows="0" remarks="Generic post table to hold data blog entries etc in different modules" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="blogid" foreignKey="blogasso_blo2_fk" implied="false" onDeleteCascade="false" table="blog_association"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="module" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="post_cou3_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="groupid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="moduleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="coursemoduleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="post_cou4_fk" implied="false" onDeleteCascade="false" table="course_modules"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="subject" nullable="false" remarks="" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="summary" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="content" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="uniquehash" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="rating" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="format" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="summaryformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="attachment" nullable="true" remarks="attachment" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="draft" digits="0" id="15" name="publishstate" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="lastmodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="created" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="usermodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="post_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="post_cou2_ix" unique="false">
            <column ascending="true" name="coursemoduleid"/>
         </index>
         <index name="post_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="post_iduse_uix" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="post_las_ix" unique="false">
            <column ascending="true" name="lastmodified"/>
         </index>
         <index name="post_mod_ix" unique="false">
            <column ascending="true" name="module"/>
         </index>
         <index name="post_sub_ix" unique="false">
            <column ascending="true" name="subject"/>
         </index>
         <index name="post_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="profiling" numRows="0" remarks="Stores the results of all the profiling runs" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="runid" nullable="false" remarks="the unique id for this run (as generated by xhprof)" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="url" nullable="false" remarks="the url this profiling record is about (without wwwroot nor query params)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="data" nullable="false" remarks="the raw data gathered by xhprof" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="totalexecutiontime" nullable="false" remarks="time (in microseconds) spent by the run" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="totalcputime" nullable="false" remarks="time (in microseconds) spent by the CPU in this run" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="totalcalls" nullable="false" remarks="Total number of calls performed by the run" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="totalmemory" nullable="false" remarks="Total memory used byt the run" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="runreference" nullable="false" remarks="Is this run a reference one" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="runcomment" nullable="false" remarks="Brief comment for this run" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="unix timestap of the creation of this run" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="prof_run_uix" unique="true">
            <column ascending="true" name="runid"/>
         </index>
         <index name="prof_timrun_ix" unique="false">
            <column ascending="true" name="timecreated"/>
            <column ascending="true" name="runreference"/>
         </index>
         <index name="prof_urlrun_ix" unique="false">
            <column ascending="true" name="url"/>
            <column ascending="true" name="runreference"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qbank" numRows="0" remarks="Stores the qbank activity module instances." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="course" nullable="false" remarks="ID of the course this activity is part of." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qban_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="The name of the activity module instance" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timecreated" nullable="false" remarks="Timestamp of when the instance was added to the course." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="Timestamp of when the instance was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="intro" nullable="true" remarks="Activity description." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="introformat" nullable="false" remarks="The format of the intro field." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="type" nullable="false" remarks="The sub type of the activity module instance, e.g. standard, system, etc" size="40" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qban_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ddimageortext" numRows="0" remarks="Defines drag and drop (text or images onto a background image) questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypddim_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="shuffleanswers" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="shownumcorrect" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="dropzonevisibility" nullable="false" remarks="Whether transparent dropzone or not." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypddim_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ddimageortext_drags" numRows="0" remarks="Images to drag. Actual file names are not stored here we use the file names as found in the file storage area." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypddimdrag_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="no" nullable="false" remarks="drag no" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="draggroup" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="infinite" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="label" nullable="false" remarks="Alt text label for drag-able image." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypddimdrag_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ddimageortext_drops" numRows="0" remarks="Drop boxes" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypddimdrop_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="no" nullable="false" remarks="drop number" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="xleft" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="ytop" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="choice" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="label" nullable="false" remarks="Alt label for drop box" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypddimdrop_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ddmarker" numRows="0" remarks="Defines drag and drop (text or images onto a background image) questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypddma_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="shuffleanswers" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="shownumcorrect" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="showmisplaced" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypddma_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ddmarker_drags" numRows="0" remarks="Labels for markers to drag." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypddmadrag_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="no" nullable="false" remarks="drag no" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="label" nullable="false" remarks="Alt text label for drag-able image." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="infinite" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="noofdrags" nullable="false" remarks="No of drag items, ignored if drag is infinite." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypddmadrag_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ddmarker_drops" numRows="0" remarks="drop regions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypddmadrop_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="no" nullable="false" remarks="drop number" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="shape" nullable="true" remarks="circle, rectangle, polygon" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="coords" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="choice" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypddmadrop_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_essay_options" numRows="0" remarks="Extra options for essay questions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="questionid" nullable="false" remarks="Foreign key linking to the question table." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypessaopti_que_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="editor" digits="0" id="2" name="responseformat" nullable="false" remarks="The type of input area students should be given for their response." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="responserequired" nullable="false" remarks="Nonzero if an online text response is optional" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="15" digits="0" id="4" name="responsefieldlines" nullable="false" remarks="Approximate height, in lines, of the input box the students should be given for their response." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="minwordlimit" nullable="true" remarks="Minimum number of words" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="maxwordlimit" nullable="true" remarks="Maximum number of words" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="attachments" nullable="false" remarks="Whether, and how many, attachments a student is allowed to include with their response. -1 means unlimited." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="attachmentsrequired" nullable="false" remarks="The number of attachments that should be required" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="graderinfo" nullable="true" remarks="Information shown to people with permission to manually grade the question, when they are grading." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="graderinfoformat" nullable="false" remarks="The text format for graderinfo." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="responsetemplate" nullable="true" remarks="The template to pre-populate student&amp;#039;s response field during attempt." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="responsetemplateformat" nullable="false" remarks="The text format for responsetemplate." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="maxbytes" nullable="false" remarks="Maximum size of attached files in bytes." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="filetypeslist" nullable="true" remarks="What attachment file type a student is allowed to include with their response. * or empty means unlimited." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypessaopti_que_uix" unique="true">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_match_options" numRows="0" remarks="Defines the question-type specific options for matching questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="Foreign key link to question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypmatcopti_que_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="shuffleanswers" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="shownumcorrect" nullable="false" remarks="If true, then when the user gets the question partially correct, tell them how many choices they got correct alongside the feedback." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypmatcopti_que_uix" unique="true">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_match_subquestions" numRows="0" remarks="The subquestions that make up a matching question" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="Foreign key link to question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypmatcsubq_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="questiontext" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="questiontextformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="answertext" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypmatcsubq_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_multichoice_options" numRows="0" remarks="Options for multiple choice questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="Foreign key references question.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypmultopti_que_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="layout" nullable="false" remarks="Not used. Was intended for a vertical/horizontal layout option. See MDL-18445." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="single" nullable="false" remarks="If 0 it multiple response (checkboxes). Otherwise it is radio buttons." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="shuffleanswers" nullable="false" remarks="Whether the choices can be randomly shuffled." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="abc" digits="0" id="11" name="answernumbering" nullable="false" remarks="Indicates how and whether the choices should be numbered." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="shownumcorrect" nullable="false" remarks="If true, then when the user gets a multiple-response question partially correct, tell them how many choices they got correct alongside the feedback." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="13" name="showstandardinstruction" nullable="false" remarks="Whether standard instruction (&amp;#039;Select one:&amp;#039; or &amp;#039;Select one or more:&amp;#039;) is displayed" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypmultopti_que_uix" unique="true">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_ordering_options" numRows="0" remarks="Options for ordering questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypordeopti_que_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="layouttype" nullable="false" remarks="Layout type - horizontal or vertical" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="selecttype" nullable="false" remarks="Select type - all, random etc." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="4" name="selectcount" nullable="false" remarks="The number to select." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="gradingtype" nullable="false" remarks="Which grading strategy to use. One of the GRADING_... constants." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="showgrading" nullable="false" remarks="Should details of the grading calculation be shown to students." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="none" digits="0" id="7" name="numberingstyle" nullable="false" remarks="Indicates whether and how choices should be numbered." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="correctfeedback" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="incorrectfeedback" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="partiallycorrectfeedback" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="shownumcorrect" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypordeopti_que_uix" unique="true">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_randomsamatch_options" numRows="0" remarks="Info about a random short-answer matching question" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="Foreign key references question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtyprandopti_que_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="4" digits="0" id="2" name="choose" nullable="false" remarks="Number of subquestions to randomly generate." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="subcats" nullable="false" remarks="Whether to include or not the subcategories." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="shownumcorrect" nullable="false" remarks="If true, then when the user gets the question partially correct, tell them how many choices they got correct alongside the feedback." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtyprandopti_que_uix" unique="true">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="qtype_shortanswer_options" numRows="0" remarks="Options for short answer questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="Foreign key references question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="qtypshoropti_que_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="usecase" nullable="false" remarks="Whether answers are matched case-sensitively." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="qtypshoropti_que_uix" unique="true">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question" numRows="0" remarks="This table stores the definition of one version of a question." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypddim_que2_fk" implied="false" onDeleteCascade="false" table="qtype_ddimageortext"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypddimdrag_que2_fk" implied="false" onDeleteCascade="false" table="qtype_ddimageortext_drags"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypddimdrop_que2_fk" implied="false" onDeleteCascade="false" table="qtype_ddimageortext_drops"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypddma_que2_fk" implied="false" onDeleteCascade="false" table="qtype_ddmarker"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypddmadrag_que2_fk" implied="false" onDeleteCascade="false" table="qtype_ddmarker_drags"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypddmadrop_que2_fk" implied="false" onDeleteCascade="false" table="qtype_ddmarker_drops"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypessaopti_que_fk" implied="false" onDeleteCascade="false" table="qtype_essay_options"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypmatcopti_que_fk" implied="false" onDeleteCascade="false" table="qtype_match_options"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypmatcsubq_que2_fk" implied="false" onDeleteCascade="false" table="qtype_match_subquestions"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypmultopti_que_fk" implied="false" onDeleteCascade="false" table="qtype_multichoice_options"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypordeopti_que_fk" implied="false" onDeleteCascade="false" table="qtype_ordering_options"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtyprandopti_que_fk" implied="false" onDeleteCascade="false" table="qtype_randomsamatch_options"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="qtypshoropti_que_fk" implied="false" onDeleteCascade="false" table="qtype_shortanswer_options"/>
            <child catalog="mdl52er_erd" column="parent" foreignKey="ques_par2_fk" implied="false" onDeleteCascade="false" table="question"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quesansw_que2_fk" implied="false" onDeleteCascade="false" table="question_answers"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="quesatte_que3_fk" implied="false" onDeleteCascade="false" table="question_attempts"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quescalc_que2_fk" implied="false" onDeleteCascade="false" table="question_calculated"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quescalcopti_que2_fk" implied="false" onDeleteCascade="false" table="question_calculated_options"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quesdata_que2_fk" implied="false" onDeleteCascade="false" table="question_datasets"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="quesddwt_que2_fk" implied="false" onDeleteCascade="false" table="question_ddwtos"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="quesgaps_que2_fk" implied="false" onDeleteCascade="false" table="question_gapselect"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="queshint_que2_fk" implied="false" onDeleteCascade="false" table="question_hints"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quesmult_que2_fk" implied="false" onDeleteCascade="false" table="question_multianswer"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quesnume_que2_fk" implied="false" onDeleteCascade="false" table="question_numerical"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quesnumeopti_que2_fk" implied="false" onDeleteCascade="false" table="question_numerical_options"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="quesnumeunit_que2_fk" implied="false" onDeleteCascade="false" table="question_numerical_units"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="quesrespanal_que2_fk" implied="false" onDeleteCascade="false" table="question_response_analysis"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="question_statistics_erd_question_id" implied="false" onDeleteCascade="false" table="question_statistics"/>
            <child catalog="mdl52er_erd" column="question" foreignKey="questrue_que2_fk" implied="false" onDeleteCascade="false" table="question_truefalse"/>
            <child catalog="mdl52er_erd" column="questionid" foreignKey="quesvers_que4_fk" implied="false" onDeleteCascade="false" table="question_versions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="parent" nullable="false" remarks="if bigger than 0 this is a (hidden) subquesiton, used by Cloze" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ques_par2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="questiontext" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="questiontextformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="generalfeedback" nullable="false" remarks="to store the question feedback" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="generalfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1.0000000" digits="7" id="7" name="defaultmark" nullable="false" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.3333333" digits="7" id="8" name="penalty" nullable="false" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="qtype" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="length" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="stamp" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timecreated" nullable="false" remarks="time question was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timemodified" nullable="false" remarks="time that question was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="createdby" nullable="true" remarks="userid of person who created this question" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ques_cre2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="modifiedby" nullable="true" remarks="userid of person who last edited this question" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="ques_mod2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="ques_cre_ix" unique="false">
            <column ascending="true" name="createdby"/>
         </index>
         <index name="ques_mod_ix" unique="false">
            <column ascending="true" name="modifiedby"/>
         </index>
         <index name="ques_par_ix" unique="false">
            <column ascending="true" name="parent"/>
         </index>
         <index name="ques_qty_ix" unique="false">
            <column ascending="true" name="qtype"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_answers" numRows="0" remarks="Answers, with a fractional grade (0-1) and feedback" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesansw_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="answer" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="answerformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0.0000000" digits="7" id="4" name="fraction" nullable="false" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="feedback" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="feedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesansw_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_attempt_step_data" numRows="0" remarks="Each question_attempt_step has an associative array of the data that was submitted by the user in the POST request. It can also contain extra data from the question type or behaviour to avoid re-computation. The convention is that names belonging to the behaviour start with -, and cached values added to the submitted data start with _, or _-" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="attemptstepid" nullable="false" remarks="Foreign key, references question_attempt_steps.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesattestepdata_att2_fk" implied="false" onDeleteCascade="false" table="question_attempt_steps"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="The name of this bit of data." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="true" remarks="The corresponding value" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesattestepdata_att_ix" unique="false">
            <column ascending="true" name="attemptstepid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_attempt_steps" numRows="0" remarks="Stores one step in in a question attempt. As well as the data here, the step will have some data in the question_attempt_step_data table." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="attemptstepid" foreignKey="quesattestepdata_att2_fk" implied="false" onDeleteCascade="false" table="question_attempt_step_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="questionattemptid" nullable="false" remarks="Foreign key, references question_attempt.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesattestep_que2_fk" implied="false" onDeleteCascade="false" table="question_attempts"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sequencenumber" nullable="false" remarks="Numbers the steps in a question attempt sequentially from 0." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="state" nullable="false" remarks="One of the constants defined by the question_state class, giving the state of the question at the end of this step." size="13" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="4" name="fraction" nullable="true" remarks="The grade for this question, when graded out of 1. Needs to be multiplied by question_attempt.maxmark to get the actual mark for the question." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="Time-stamp of the action that lead to this state being created. If this is -1 (quiz_attempt_step::TIMECREATED_ON_FIRST_RENDER), it will be set the first time the question attempt is rendered." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="userid" nullable="true" remarks="The user whose action lead to this state being created." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesattestep_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesattestep_que_ix" unique="false">
            <column ascending="true" name="questionattemptid"/>
         </index>
         <index name="quesattestep_queseq_uix" unique="true">
            <column ascending="true" name="questionattemptid"/>
            <column ascending="true" name="sequencenumber"/>
         </index>
         <index name="quesattestep_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_attempts" numRows="0" remarks="Each row here corresponds to an attempt at one question, as part of a question_usage. A question_attempt will have some question_attempt_steps For documentation https://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="questionattemptid" foreignKey="quesattestep_que2_fk" implied="false" onDeleteCascade="false" table="question_attempt_steps"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="questionusageid" nullable="false" remarks="Foreign key, references question_usages.id" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="questionusageid" foreignKey="quizoverregr_queslo2_fk" implied="false" onDeleteCascade="false" table="quiz_overview_regrades"/>
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesatte_que4_fk" implied="false" onDeleteCascade="false" table="question_usages"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="slot" nullable="false" remarks="Used to number the questions in one attempt sequentially." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="behaviour" nullable="false" remarks="The name of the question behaviour that is managing this question attempt." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="questionid" nullable="false" remarks="The id of the question being attempted. Foreign key references question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesatte_que3_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="variant" nullable="false" remarks="The variant of the qusetion being used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="6" name="maxmark" nullable="false" remarks="The grade this question is marked out of in this attempt." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="7" name="minfraction" nullable="false" remarks="Some questions can award negative marks. This indicates the most negative mark that can be awarded, on the faction scale where the maximum positive mark is 1." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="1.0000000" digits="7" id="8" name="maxfraction" nullable="false" remarks="Some questions can give fractions greater than 1. This indicates the greatest fraction that can be awarded." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="flagged" nullable="false" remarks="Whether this question has been flagged within the attempt." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="questionsummary" nullable="true" remarks="If this question uses randomisation, it should set this field to summarise what random version the student actually saw. This is a human-readable textual summary of the student&amp;#039;s response which might, for example, be used in a report." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="rightanswer" nullable="true" remarks="This is a human-readable textual summary of the right answer to this question. Might be used, for example on the quiz preview, to help people who are testing the question. Or might be used in reports." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="responsesummary" nullable="true" remarks="This is a textual summary of the student&amp;#039;s response (basically what you would expect to in the Quiz responses report)." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="timemodified" nullable="false" remarks="The time this record was last changed." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesatte_beh_ix" unique="false">
            <column ascending="true" name="behaviour"/>
         </index>
         <index name="quesatte_que2_ix" unique="false">
            <column ascending="true" name="questionusageid"/>
         </index>
         <index name="quesatte_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
         <index name="quesatte_queslo_uix" unique="true">
            <column ascending="true" name="questionusageid"/>
            <column ascending="true" name="slot"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_bank_entries" numRows="0" remarks="Each question bank entry. This table has one row for each question that appears in the question bank." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="questionbankentryid" foreignKey="quesrefe_que2_fk" implied="false" onDeleteCascade="false" table="question_references"/>
            <child catalog="mdl52er_erd" column="questionbankentryid" foreignKey="quesvers_que3_fk" implied="false" onDeleteCascade="false" table="question_versions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questioncategoryid" nullable="false" remarks="ID of the category this question is part of." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesbankentr_que2_fk" implied="false" onDeleteCascade="false" table="question_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="idnumber" nullable="true" remarks="Unique identifier, useful especially for mapping to external entities." size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="ownerid" nullable="true" remarks="userid of person who owns this question bank entry." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesbankentr_own2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="nextversion" nullable="true" remarks="The next version number for this question bank entry. This must be incremented each time a new question_version is created." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesbankentr_own_ix" unique="false">
            <column ascending="true" name="ownerid"/>
         </index>
         <index name="quesbankentr_que_ix" unique="false">
            <column ascending="true" name="questioncategoryid"/>
         </index>
         <index name="quesbankentr_queidn_uix" unique="true">
            <column ascending="true" name="questioncategoryid"/>
            <column ascending="true" name="idnumber"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_calculated" numRows="0" remarks="Options for questions of type calculated" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quescalc_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="answer" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.0" digits="0" id="3" name="tolerance" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="tolerancetype" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="5" name="correctanswerlength" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="6" name="correctanswerformat" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quescalc_ans_ix" unique="false">
            <column ascending="true" name="answer"/>
         </index>
         <index name="quescalc_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_calculated_options" numRows="0" remarks="Options for questions of type calculated" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quescalcopti_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="synchronize" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="single" nullable="false" remarks="If 0 it multiple response (checkboxes). Otherwise it is radio buttons." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="shuffleanswers" nullable="false" remarks="Whether the choices can be randomly shuffled." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="correctfeedback" nullable="true" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="partiallycorrectfeedback" nullable="true" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="incorrectfeedback" nullable="true" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="abc" digits="0" id="11" name="answernumbering" nullable="false" remarks="Indicates how and whether the choices should be numbered." size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="shownumcorrect" nullable="false" remarks="If true, then when the user gets a multiple-response question partially correct, tell them how many choices they got correct alongside the feedback." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quescalcopti_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_categories" numRows="0" remarks="Categories are for grouping questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="questioncategoryid" foreignKey="quesbankentr_que2_fk" implied="false" onDeleteCascade="false" table="question_bank_entries"/>
            <child catalog="mdl52er_erd" column="parent" foreignKey="quescate_par2_fk" implied="false" onDeleteCascade="false" table="question_categories"/>
            <child catalog="mdl52er_erd" column="category" foreignKey="quesdatadefi_cat2_fk" implied="false" onDeleteCascade="false" table="question_dataset_definitions"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="contextid" nullable="false" remarks="context that this category is shared in" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="info" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="infoformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="stamp" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="parent" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quescate_par2_fk" implied="false" onDeleteCascade="false" table="question_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="999" digits="0" id="7" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="idnumber" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quescate_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="quescate_conidn_uix" unique="true">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="idnumber"/>
         </index>
         <index name="quescate_consta_uix" unique="true">
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="stamp"/>
         </index>
         <index name="quescate_par_ix" unique="false">
            <column ascending="true" name="parent"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_dataset_definitions" numRows="0" remarks="Organises and stores properties for dataset items" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="datasetdefinition" foreignKey="quesdata_dat2_fk" implied="false" onDeleteCascade="false" table="question_datasets"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="category" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesdatadefi_cat2_fk" implied="false" onDeleteCascade="false" table="question_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="type" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="options" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="itemcount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesdatadefi_cat_ix" unique="false">
            <column ascending="true" name="category"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_dataset_items" numRows="0" remarks="Individual dataset items" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="definition" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="itemnumber" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="value" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesdataitem_def_ix" unique="false">
            <column ascending="true" name="definition"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_datasets" numRows="0" remarks="Many-many relation between questions and dataset definitions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesdata_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="datasetdefinition" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesdata_dat2_fk" implied="false" onDeleteCascade="false" table="question_dataset_definitions"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesdata_dat_ix" unique="false">
            <column ascending="true" name="datasetdefinition"/>
         </index>
         <index name="quesdata_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
         <index name="quesdata_quedat_ix" unique="false">
            <column ascending="true" name="question"/>
            <column ascending="true" name="datasetdefinition"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_ddwtos" numRows="0" remarks="Defines drag and drop (words into sentences) questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesddwt_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="shuffleanswers" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="shownumcorrect" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesddwt_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_gapselect" numRows="0" remarks="Defines select missing words questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesgaps_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="shuffleanswers" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="correctfeedback" nullable="false" remarks="Feedback shown for any correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="correctfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="partiallycorrectfeedback" nullable="false" remarks="Feedback shown for any partially correct response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="partiallycorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="incorrectfeedback" nullable="false" remarks="Feedback shown for any incorrect response." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="incorrectfeedbackformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="shownumcorrect" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesgaps_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_hints" numRows="0" remarks="Stores the the part of the question definition that gives different feedback after each try in interactive and similar behaviours." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="queshint_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="hint" nullable="false" remarks="The text of the feedback to be given." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="hintformat" nullable="false" remarks="The format of the hint." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="shownumcorrect" nullable="true" remarks="Whether the feedback should include a message about how many things the student got right. This is only applicable to certain question types (for example matching or multiple choice multiple-response)." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="clearwrong" nullable="true" remarks="Whether any wrong choices should be cleared before the next try. Whether this is applicable, and what it means, depends on the question type, as with the shownumright option." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="options" nullable="true" remarks="A space for any other question-type specific options." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="queshint_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_multianswer" numRows="0" remarks="Options for multianswer questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesmult_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sequence" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesmult_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_numerical" numRows="0" remarks="Options for numerical questions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="Redundant, because of the answer field. Foreign key references question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesnume_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="answer" nullable="false" remarks="Foreign key references question_answers.id." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.0" digits="0" id="3" name="tolerance" nullable="false" remarks="Allowed error when matching a response to this answer. I don&amp;#039;t know why this is stored as a string." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesnume_ans_ix" unique="false">
            <column ascending="true" name="answer"/>
         </index>
         <index name="quesnume_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_numerical_options" numRows="0" remarks="Options for questions of type numerical This table is also used by the calculated question type" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesnumeopti_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="showunits" nullable="false" remarks="How units are handled: 3) Not used at all, 0) Optional, or 1) must be right or penalty applied." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="unitsleft" nullable="false" remarks="display the unit at left as in $1.00" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="unitgradingtype" nullable="false" remarks="0 no penalty, 1 fraction response grade, 2 fraction total grade" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0.1000000" digits="7" id="5" name="unitpenalty" nullable="false" remarks="Penalty for getting the unit wrong, when they are being graded." size="12" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesnumeopti_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_numerical_units" numRows="0" remarks="Optional unit options for numerical questions. This table is also used by the calculated question type." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="Foreign key references question.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesnumeunit_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="1.0000000000000000000" digits="19" id="2" name="multiplier" nullable="false" remarks="The multiplier for this unit. For example, if the first unit is (1.0, &amp;#039;cm&amp;#039;), another unit might be (0.1, &amp;#039;mm&amp;#039;) or (100.0, &amp;#039;m&amp;#039;)." size="38" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="unit" nullable="false" remarks="The unit. For example &amp;#039;m&amp;#039; or &amp;#039;kg&amp;#039;." size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesnumeunit_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
         <index name="quesnumeunit_queuni_uix" unique="true">
            <column ascending="true" name="question"/>
            <column ascending="true" name="unit"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_references" numRows="0" remarks="Records where a specific question is used." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="usingcontextid" nullable="false" remarks="Context where question is used." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesrefe_usi2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="component" nullable="true" remarks="Component (e.g. mod_quiz or core_question)" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="questionarea" nullable="true" remarks="Depending on the component, which area the question is used in (e.g. slot for quiz)." size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="itemid" nullable="true" remarks="Plugin specific id (e.g. slotid for quiz) where its used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="questionbankentryid" nullable="false" remarks="ID of the question bank entry this question is part of." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesrefe_que2_fk" implied="false" onDeleteCascade="false" table="question_bank_entries"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="version" nullable="true" remarks="Version number for the question where NULL means use the latest non-draft version." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesrefe_que_ix" unique="false">
            <column ascending="true" name="questionbankentryid"/>
         </index>
         <index name="quesrefe_usi_ix" unique="false">
            <column ascending="true" name="usingcontextid"/>
         </index>
         <index name="quesrefe_usicomqueite_uix" unique="true">
            <column ascending="true" name="usingcontextid"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="questionarea"/>
            <column ascending="true" name="itemid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_response_analysis" numRows="0" remarks="Analysis of student responses given to questions." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="analysisid" foreignKey="quesrespcoun_ana2_fk" implied="false" onDeleteCascade="false" table="question_response_count"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="hashcode" nullable="false" remarks="sha1 hash of serialized qubaids_condition class. Unique for every combination of class name and property." size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="whichtries" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesrespanal_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="variant" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="subqid" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="aid" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="response" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="9" name="credit" nullable="false" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesrespanal_has_ix" unique="false">
            <column ascending="true" name="hashcode"/>
         </index>
         <index name="quesrespanal_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_response_count" numRows="0" remarks="Count for each responses for each try at a question." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="analysisid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesrespcoun_ana2_fk" implied="false" onDeleteCascade="false" table="question_response_analysis"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="try" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="rcount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesrespcoun_ana_ix" unique="false">
            <column ascending="true" name="analysisid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_set_references" numRows="0" remarks="Records where groups of questions are used." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="usingcontextid" nullable="false" remarks="Context where question is used." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quessetrefe_usi2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="component" nullable="true" remarks="Component (e.g. mod_quiz)" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="questionarea" nullable="true" remarks="Depending on the component, which area the question is used in (e.g. slot for quiz)." size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="itemid" nullable="true" remarks="Plugin specific id (e.g. slotid for quiz) where its used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="questionscontextid" nullable="false" remarks="Context questions come from." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quessetrefe_que2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="filtercondition" nullable="true" remarks="Filter expression in json format" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quessetrefe_que_ix" unique="false">
            <column ascending="true" name="questionscontextid"/>
         </index>
         <index name="quessetrefe_usi_ix" unique="false">
            <column ascending="true" name="usingcontextid"/>
         </index>
         <index name="quessetrefe_usicomqueite_uix" unique="true">
            <column ascending="true" name="usingcontextid"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="questionarea"/>
            <column ascending="true" name="itemid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_statistics" numRows="0" remarks="Statistics for individual questions used in an activity." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="hashcode" nullable="false" remarks="sha1 hash of serialized qubaids_condition class. Unique for every combination of class name and property." size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="questionid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="question_statistics_erd_question_id" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="slot" nullable="true" remarks="The position in the quiz where this question appears" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="subquestion" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="variant" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="s" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="effectiveweight" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="negcovar" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="10" name="discriminationindex" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="11" name="discriminativeefficiency" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="12" name="sd" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="13" name="facility" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="subquestions" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="15" name="maxmark" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="positions" nullable="true" remarks="positions in which this item appears. Only used for random questions." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="17" name="randomguessscore" nullable="true" remarks="An estimate of the score a student would get by guessing randomly." size="12" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesstat_has_ix" unique="false">
            <column ascending="true" name="hashcode"/>
         </index>
         <index name="quesstat_que_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_truefalse" numRows="0" remarks="Options for True-False questions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="question" nullable="false" remarks="Foreign key references question.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="questrue_que2_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="trueanswer" nullable="false" remarks="Foreign key references question_answers.id. The &amp;#039;True&amp;#039; choice." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="falseanswer" nullable="false" remarks="Foreign key references question_answers.id. The &amp;#039;False&amp;#039; choice." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="showstandardinstruction" nullable="false" remarks="Whether standard instruction (&amp;#039;Select one:&amp;#039;) is displayed" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="questrue_que_ix" unique="false">
            <column ascending="true" name="question"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_usages" numRows="0" remarks="This table's main purpose it to assign a unique id to each attempt at a set of questions by some part of Moodle. A question usage is made up of a number of question_attempts." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="questionusageid" foreignKey="quesatte_que4_fk" implied="false" onDeleteCascade="false" table="question_attempts"/>
            <child catalog="mdl52er_erd" column="uniqueid" foreignKey="quizatte_uni_fk" implied="false" onDeleteCascade="false" table="quiz_attempts"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="Every question usage must be associated with some context." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesusag_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="The plugin this attempt belongs to, e.g. &amp;#039;mod_quiz&amp;#039;, &amp;#039;block_questionoftheday&amp;#039;, &amp;#039;filter_embedquestion&amp;#039;." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="preferredbehaviour" nullable="false" remarks="The archetypal behaviour that should be used for question attempts in this usage." size="32" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesusag_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="question_versions" numRows="0" remarks="A join table linking the different question version definitions in the question table to the question_bank_entires." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="questionbankentryid" nullable="false" remarks="ID of the question bank entry this question version is part of." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesvers_que3_fk" implied="false" onDeleteCascade="false" table="question_bank_entries"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="version" nullable="false" remarks="Version number for the question where the first version is always 1." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="questionid" nullable="false" remarks="The question ID." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quesvers_que4_fk" implied="false" onDeleteCascade="false" table="question"/>
         </column>
         <column autoUpdated="false" defaultValue="ready" digits="0" id="4" name="status" nullable="false" remarks="If the question is ready, hidden or draft" size="10" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quesvers_que2_ix" unique="false">
            <column ascending="true" name="questionid"/>
         </index>
         <index name="quesvers_que_ix" unique="false">
            <column ascending="true" name="questionbankentryid"/>
         </index>
         <index name="quesvers_quever_uix" unique="true">
            <column ascending="true" name="questionbankentryid"/>
            <column ascending="true" name="version"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz" numRows="0" remarks="The settings for each quiz. For reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#Quiz_Activity" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Standard Moodle primary key." size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="quiz" foreignKey="quizatte_qui2_fk" implied="false" onDeleteCascade="false" table="quiz_attempts"/>
            <child catalog="mdl52er_erd" column="quizid" foreignKey="quizfeed_qui2_fk" implied="false" onDeleteCascade="false" table="quiz_feedback"/>
            <child catalog="mdl52er_erd" column="quizid" foreignKey="quizgraditem_qui2_fk" implied="false" onDeleteCascade="false" table="quiz_grade_items"/>
            <child catalog="mdl52er_erd" column="quiz" foreignKey="quizgrad_qui2_fk" implied="false" onDeleteCascade="false" table="quiz_grades"/>
            <child catalog="mdl52er_erd" column="quiz" foreignKey="quizover_qui2_fk" implied="false" onDeleteCascade="false" table="quiz_overrides"/>
            <child catalog="mdl52er_erd" column="quizid" foreignKey="quizsect_qui2_fk" implied="false" onDeleteCascade="false" table="quiz_sections"/>
            <child catalog="mdl52er_erd" column="quizid" foreignKey="quizslot_qui3_fk" implied="false" onDeleteCascade="false" table="quiz_slots"/>
            <child catalog="mdl52er_erd" column="quizid" foreignKey="quizsebquiz_qui_fk" implied="false" onDeleteCascade="false" table="quizaccess_seb_quizsettings"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="Foreign key reference to the course this quiz is part of." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="Quiz name." size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="false" remarks="Quiz introduction text." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="Quiz intro text format." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timeopen" nullable="false" remarks="The time when this quiz opens. (0 = no restriction.)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timeclose" nullable="false" remarks="The time when this quiz closes. (0 = no restriction.)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timelimit" nullable="false" remarks="The time limit for quiz attempts, in seconds." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="autoabandon" digits="0" id="8" name="overduehandling" nullable="false" remarks="The method used to handle overdue attempts. &amp;#039;autosubmit&amp;#039;, &amp;#039;graceperiod&amp;#039; or &amp;#039;autoabandon&amp;#039;." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="graceperiod" nullable="false" remarks="The amount of time (in seconds) after the time limit runs out during which attempts can still be submitted, if overduehandling is set to allow it." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="preferredbehaviour" nullable="false" remarks="The behaviour to ask questions to use." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="canredoquestions" nullable="false" remarks="Allows students to redo any completed question within a quiz attempt." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="attempts" nullable="false" remarks="The maximum number of attempts a student is allowed." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="attemptonlast" nullable="false" remarks="Whether subsequent attempts start from the answer to the previous attempt (1) or start blank (0)." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="14" name="grademethod" nullable="false" remarks="One of the values QUIZ_GRADEHIGHEST, QUIZ_GRADEAVERAGE, QUIZ_ATTEMPTFIRST or QUIZ_ATTEMPTLAST." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="15" name="decimalpoints" nullable="false" remarks="Number of decimal points to use when displaying grades." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="-1" digits="0" id="16" name="questiondecimalpoints" nullable="false" remarks="Number of decimal points to use when displaying question grades. (-1 means use decimalpoints.)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="reviewattempt" nullable="false" remarks="Whether users are allowed to review their quiz attempts at various times. This is a bit field, decoded by the mod_quizquestiondisplay_options class. It is formed by ORing together the constants defined there." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="reviewcorrectness" nullable="false" remarks="Whether users are allowed to review the correctness of the questions in their quiz attempts at various times. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="reviewmaxmarks" nullable="false" remarks="Works with reviewmarks to control whether users can see grades at various times. 0 here means no grade information is shown at all. If 1, student can see the number of marks available for this question, and reviewmarks applies. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="reviewmarks" nullable="false" remarks="Works with reviewmaxmarks to control whether users can see grades at various times. If reviewmaxmarks is 1, then this controls whether students can see the the mark they got for the question, in addition to the max. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="reviewspecificfeedback" nullable="false" remarks="Whether users are allowed to see the specific feedback in their quiz attempts. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="reviewgeneralfeedback" nullable="false" remarks="Whether users are allowed to see the general feedback in their quiz attempts. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="reviewrightanswer" nullable="false" remarks="Whether users are allowed to see the right answer in their quiz attempts. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="reviewoverallfeedback" nullable="false" remarks="Whether users are allowed to see the overall feedback in their quiz attempts. A bit field, like reviewattempt." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="questionsperpage" nullable="false" remarks="How often to insert a page break when editing the quiz, or when shuffling the question order." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="free" digits="0" id="26" name="navmethod" nullable="false" remarks="Any constraints on how the user is allowed to navigate around the quiz. Currently recognised values are &amp;#039;free&amp;#039; and &amp;#039;seq&amp;#039;." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="shuffleanswers" nullable="false" remarks="Whether the parts of the question should be shuffled, in those question types that support it." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="28" name="sumgrades" nullable="false" remarks="The total of all the question instance maxmarks." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="29" name="grade" nullable="false" remarks="The total that the quiz overall grade is scaled to be out of." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="timecreated" nullable="false" remarks="The time when the quiz was added to the course." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="timemodified" nullable="false" remarks="Last modified time." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="32" name="password" nullable="false" remarks="A password that the student must enter before starting or continuing a quiz attempt." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="33" name="subnet" nullable="false" remarks="Used to restrict the IP addresses from which this quiz can be attempted. The format is as requried by the address_in_subnet function." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="34" name="browsersecurity" nullable="false" remarks="Restriciton on the browser the student must use. E.g. &amp;#039;securewindow&amp;#039;." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="35" name="delay1" nullable="false" remarks="Delay that must be left between the first and second attempt, in seconds." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="delay2" nullable="false" remarks="Delay that must be left between the second and subsequent attempt, in seconds." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="37" name="showuserpicture" nullable="false" remarks="Option to show the user&amp;#039;s picture during the attempt and on the review page." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="38" name="showblocks" nullable="false" remarks="Whether blocks should be shown on the attempt.php and review.php pages." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="39" name="completionattemptsexhausted" nullable="true" remarks="complete after available attempts exhausted" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="40" name="completionminattempts" nullable="false" remarks="complete after minimum number of attempts" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="41" name="allowofflineattempts" nullable="true" remarks="Whether to allow the quiz to be attempted offline in the mobile app" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="42" name="precreateattempts" nullable="true" remarks="Pre-create attempts for this quiz? This setting has no effect unless the precreateperiod config setting is set and unlocked." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quiz_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_attempts" numRows="0" remarks="Stores users attempts at quizzes." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Standard Moodle primary key." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="quiz" nullable="false" remarks="Foreign key reference to the quiz that was attempted." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizatte_qui2_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="Foreign key reference to the user whose attempt this is." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizatte_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="attempt" nullable="false" remarks="Sequentially numbers this student&amp;#039;s attempts at this quiz." size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="uniqueid" nullable="false" remarks="Foreign key reference to the question_usage that holds the details of the the question_attempts that make up this quiz attempt." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizatte_uni_fk" implied="false" onDeleteCascade="false" table="question_usages"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="layout" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="currentpage" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="preview" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="inprogress" digits="0" id="8" name="state" nullable="false" remarks="The current state of the attempts. &amp;#039;inprogress&amp;#039;, &amp;#039;overdue&amp;#039;, &amp;#039;finished&amp;#039; or &amp;#039;abandoned&amp;#039;." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timestart" nullable="false" remarks="Time when the attempt was started." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timefinish" nullable="false" remarks="Time when the attempt was submitted. 0 if the attempt has not been submitted yet." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timemodified" nullable="false" remarks="Last modified time." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timemodifiedoffline" nullable="false" remarks="Last modified time via web services." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timecheckstate" nullable="true" remarks="Next time quiz cron should check attempt for state changes.  NULL means never check." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="14" name="sumgrades" nullable="true" remarks="Total marks for this attempt." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="gradednotificationsenttime" nullable="true" remarks="The timestamp when the &amp;#039;graded&amp;#039; notification was sent." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizatte_qui_ix" unique="false">
            <column ascending="true" name="quiz"/>
         </index>
         <index name="quizatte_quiuseatt_uix" unique="true">
            <column ascending="true" name="quiz"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="attempt"/>
         </index>
         <index name="quizatte_statim_ix" unique="false">
            <column ascending="true" name="state"/>
            <column ascending="true" name="timecheckstate"/>
         </index>
         <index name="quizatte_uni_uix" unique="true">
            <column ascending="true" name="uniqueid"/>
         </index>
         <index name="quizatte_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_feedback" numRows="0" remarks="Feedback given to students based on which grade band their overall score lies." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="quizid" nullable="false" remarks="Foreign key references quiz.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizfeed_qui2_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="feedbacktext" nullable="false" remarks="The feedback to show for a attempt where mingrade &amp;lt;= attempt grade &amp;lt; maxgrade. See function quiz_feedback_for_grade in mod/quiz/locallib.php." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="feedbacktextformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="4" name="mingrade" nullable="false" remarks="The lower limit of this grade band. Inclusive." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="5" name="maxgrade" nullable="false" remarks="The upper limit of this grade band. Exclusive." size="10" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizfeed_qui_ix" unique="false">
            <column ascending="true" name="quizid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_grade_items" numRows="0" remarks="Where a quiz supports mulitple grades, this table stores what those grade items are." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="quizgradeitemid" foreignKey="quizslot_qui4_fk" implied="false" onDeleteCascade="false" table="quiz_slots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="quizid" nullable="false" remarks="Foreign key references quiz.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizgraditem_qui2_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sortorder" nullable="false" remarks="Used to control the order of the grade items when they are displayed" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="The name of this grade-item. PARAM_TEXT." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizgraditem_qui_ix" unique="false">
            <column ascending="true" name="quizid"/>
         </index>
         <index name="quizgraditem_quisor_uix" unique="true">
            <column ascending="true" name="quizid"/>
            <column ascending="true" name="sortorder"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_grades" numRows="0" remarks="Stores the overall grade for each user on the quiz, based on their various attempts and the quiz.grademethod setting." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="quiz" nullable="false" remarks="Foreign key references quiz.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizgrad_qui2_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="Foreign key references user.id." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.00000" digits="5" id="3" name="grade" nullable="false" remarks="The overall grade from the quiz. Not affected by overrides in the gradebook." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="The last time this grade changed." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizgrad_qui_ix" unique="false">
            <column ascending="true" name="quiz"/>
         </index>
         <index name="quizgrad_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_overrides" numRows="0" remarks="The overrides to quiz settings on a per-user and per-group basis." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="quiz" nullable="false" remarks="Foreign key references quiz.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizover_qui2_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="groupid" nullable="true" remarks="Foreign key references groups.id.  Can be null if this is a per-user override." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizover_gro2_fk" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="true" remarks="Foreign key references user.id.  Can be null if this is a per-group override." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizover_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timeopen" nullable="true" remarks="Time at which students may start attempting this quiz. Can be null, in which case the quiz default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timeclose" nullable="true" remarks="Time by which students must have completed their attempt.  Can be null, in which case the quiz default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timelimit" nullable="true" remarks="Time limit in seconds.  Can be null, in which case the quiz default is used." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="attempts" nullable="true" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="password" nullable="true" remarks="Quiz password.  Can be null, in which case the quiz default is used." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="reason" nullable="true" remarks="An optional reason explaining why this override was granted." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="reasonformat" nullable="false" remarks="The internal format for the override reason." size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizover_gro_ix" unique="false">
            <column ascending="true" name="groupid"/>
         </index>
         <index name="quizover_qui_ix" unique="false">
            <column ascending="true" name="quiz"/>
         </index>
         <index name="quizover_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_overview_regrades" numRows="0" remarks="This table records which question attempts need regrading and the grade they will be regraded to." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="questionusageid" nullable="false" remarks="Foreign key references question_usages.id, or equivalently quiz_attempt.uniqueid." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="questionusageid" foreignKey="quizoverregr_queslo2_fk" implied="false" onDeleteCascade="false" table="question_attempts"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="slot" nullable="false" remarks="Foreign key, references question_attempts.slot" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="3" name="newfraction" nullable="true" remarks="The new fraction for this question_attempt after regrading." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="7" id="4" name="oldfraction" nullable="true" remarks="The previous fraction for this question_attempt." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="regraded" nullable="false" remarks="set to 0 if element has just been regraded. Set to 1 if element has been marked as needing regrading." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="Timestamp of when this row was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizoverregr_queslo_ix" unique="false">
            <column ascending="true" name="questionusageid"/>
            <column ascending="true" name="slot"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_reports" numRows="0" remarks="Lists all the installed quiz reports and their display order and so on. No need to worry about deleting old records. Only records with an equivalent directory are displayed." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="name of the report, same as the directory name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="displayorder" nullable="false" remarks="display order for report tabs" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="capability" nullable="true" remarks="Capability required to see this report. May be blank which means use the default of mod/quiz:viewreport. This is used when deciding which tabs to render." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizrepo_nam_uix" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_sections" numRows="0" remarks="Stores sections of a quiz with section name (heading), from slot-number N and whether the question order should be shuffled." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="quizid" nullable="false" remarks="Foreign key references quiz.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizsect_qui2_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="firstslot" nullable="false" remarks="Number of the first slot in the section. The section runs from here to the start of the next section, or the end of the quiz." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="heading" nullable="true" remarks="The text of the heading. May be an empty string/null. Multilang format." size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="shufflequestions" nullable="false" remarks="Whether the question order within this section should be shuffled for each attempt." size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizsect_qui_ix" unique="false">
            <column ascending="true" name="quizid"/>
         </index>
         <index name="quizsect_quifir_uix" unique="true">
            <column ascending="true" name="quizid"/>
            <column ascending="true" name="firstslot"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_slots" numRows="0" remarks="Stores the question used in a quiz, with the order, and for each question, which page it appears on, and the maximum mark (weight)." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="slot" nullable="false" remarks="Where this question comes in order in the list of questions in this quiz. Like question_attempts.slot." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="quizid" nullable="false" remarks="Foreign key references quiz.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizslot_qui3_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="page" nullable="false" remarks="The page number that this questions appears on. If the question in slot n appears on page p, then the question in slot n+1 must appear on page p or p+1. Well, except that when a quiz is being created, there may be empty pages, which would cause the page number to jump here." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="displaynumber" nullable="true" remarks="Stores customised question number such as 1.2, A1, B12. If this is null, the default number is used." size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="requireprevious" nullable="false" remarks="Set to 1 when current question requires previous one to be answered first." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0.0000000" digits="7" id="6" name="maxmark" nullable="false" remarks="How many marks this question contributes to quiz.sumgrades." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="quizgradeitemid" nullable="true" remarks="If the quiz suports multiple sub-grades, which one this slot contributes, if any." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizslot_qui4_fk" implied="false" onDeleteCascade="false" table="quiz_grade_items"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizslot_qui2_ix" unique="false">
            <column ascending="true" name="quizgradeitemid"/>
         </index>
         <index name="quizslot_qui_ix" unique="false">
            <column ascending="true" name="quizid"/>
         </index>
         <index name="quizslot_quislo_uix" unique="true">
            <column ascending="true" name="quizid"/>
            <column ascending="true" name="slot"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quiz_statistics" numRows="0" remarks="table to cache results from analysis done in statistics report for quizzes." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="hashcode" nullable="false" remarks="sha1 hash of serialized qubaids_condition class. Unique for every combination of class name and property." size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="whichattempts" nullable="false" remarks="bool used to indicate whether these stats are for all attempts or just for the first." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="firstattemptscount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="highestattemptscount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="lastattemptscount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="allattemptscount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="firstattemptsavg" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="9" name="highestattemptsavg" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="10" name="lastattemptsavg" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="11" name="allattemptsavg" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="12" name="median" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="13" name="standarddeviation" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="14" name="skewness" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="15" name="kurtosis" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="16" name="cic" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="17" name="errorratio" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="18" name="standarderror" nullable="true" remarks="" size="15" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizstat_has_ix" unique="false">
            <column ascending="true" name="hashcode"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quizaccess_seb_quizsettings" numRows="0" remarks="Stores the quiz level Safe Exam Browser configuration." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="quizid" nullable="false" remarks="Foreign key to quiz id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizsebquiz_qui_fk" implied="false" onDeleteCascade="false" table="quiz"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="cmid" nullable="false" remarks="Foreign key to course module id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizsebquiz_cmi_fk" implied="false" onDeleteCascade="false" table="course_modules"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="templateid" nullable="false" remarks="Foreign key to quizaccess_seb_template.id." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizsebquiz_tem2_fk" implied="false" onDeleteCascade="false" table="quizaccess_seb_template"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="requiresafeexambrowser" nullable="false" remarks="Bool whether to require SEB." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="showsebtaskbar" nullable="true" remarks="Bool to show SEB task bar" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="showwificontrol" nullable="true" remarks="Bool to allow user to control networking." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="showreloadbutton" nullable="true" remarks="Bool to show reload button." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="showtime" nullable="true" remarks="Bool to show the clock." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="showkeyboardlayout" nullable="true" remarks="Bool to show keyboard layout." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="allowuserquitseb" nullable="true" remarks="Bool to show quit button." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="quitpassword" nullable="true" remarks="Quit password to exit SEB." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="linkquitseb" nullable="true" remarks="Link to exit SEB." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="userconfirmquit" nullable="true" remarks="Bool whether confirm quit popup should appear." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="enableaudiocontrol" nullable="true" remarks="Bool to show volume and audio controls." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="muteonstartup" nullable="true" remarks="Bool whether browser starts muted." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="allowcapturecamera" nullable="true" remarks="Bool whether SEB may access camera." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="allowcapturemicrophone" nullable="true" remarks="Bool whether SEB may access microphone." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="allowspellchecking" nullable="true" remarks="Bool whether spell checking will happen in SEB." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="allowreloadinexam" nullable="true" remarks="Bool whether user can reload." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="activateurlfiltering" nullable="true" remarks="Bool whether URLs will be filtered." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="filterembeddedcontent" nullable="true" remarks="Bool wither embedded content will be filtered" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="expressionsallowed" nullable="true" remarks="Comma or newline separated list of allowed expressions" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="regexallowed" nullable="true" remarks="Regex of allowed URLs" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="24" name="expressionsblocked" nullable="true" remarks="Comma or newline separated list of blocked expressions" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="25" name="regexblocked" nullable="true" remarks="Regex of blocked URLs" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="26" name="allowedbrowserexamkeys" nullable="true" remarks="List of allowed browser exam keys." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="27" name="showsebdownloadlink" nullable="true" remarks="Bool whether SEB download link should appear" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizsebquiz_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizsebquiz_cmi_uix" unique="true">
            <column ascending="true" name="cmid"/>
         </index>
         <index name="quizsebquiz_qui_uix" unique="true">
            <column ascending="true" name="quizid"/>
         </index>
         <index name="quizsebquiz_tem_ix" unique="false">
            <column ascending="true" name="templateid"/>
         </index>
         <index name="quizsebquiz_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="quizaccess_seb_template" numRows="0" remarks="Templates for Safe Exam Browser configuration." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="templateid" foreignKey="quizsebquiz_tem2_fk" implied="false" onDeleteCascade="false" table="quizaccess_seb_quizsettings"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Name of the template" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="content" nullable="false" remarks="Content of the template" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="quizsebtemp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="quizsebtemp_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="rating" numRows="0" remarks="moodle ratings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rati_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="ratingarea" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="scaleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rati_sca2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="rating" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rati_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rati_comratconite_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="ratingarea"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="rati_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="rati_sca_ix" unique="false">
            <column ascending="true" name="scaleid"/>
         </index>
         <index name="rati_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="registration_hubs" numRows="0" remarks="hub where the site is registered on with their associated token" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="token" nullable="false" remarks="the token to communicate with the hub by web service" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="hubname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="huburl" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="confirmed" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="secret" nullable="true" remarks="the unique site identifier for this hub" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="reportbuilder_audience" numRows="0" remarks="Defines report audience" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="reportid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repoaudi_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="heading" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="classname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="configdata" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repoaudi_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repoaudi_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repoaudi_rep_ix" unique="false">
            <column ascending="true" name="reportid"/>
         </index>
         <index name="repoaudi_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="repoaudi_use_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="reportbuilder_column" numRows="0" remarks="Table to represent a report column" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="reportid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repocolu_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="uniqueidentifier" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="aggregation" nullable="true" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="heading" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="columnorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="sortenabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="sortdirection" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="sortorder" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repocolu_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repocolu_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repocolu_rep_ix" unique="false">
            <column ascending="true" name="reportid"/>
         </index>
         <index name="repocolu_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="repocolu_use_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="reportbuilder_filter" numRows="0" remarks="Table to represent a report filter/condition" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="reportid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repofilt_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="uniqueidentifier" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="heading" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="iscondition" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="filterorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repofilt_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repofilt_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repofilt_rep_ix" unique="false">
            <column ascending="true" name="reportid"/>
         </index>
         <index name="repofilt_repuniisc_uix" unique="true">
            <column ascending="true" name="reportid"/>
            <column ascending="true" name="uniqueidentifier"/>
            <column ascending="true" name="iscondition"/>
         </index>
         <index name="repofilt_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="repofilt_use_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="reportbuilder_report" numRows="0" remarks="Table to represent a report" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="reportid" foreignKey="repoaudi_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_audience"/>
            <child catalog="mdl52er_erd" column="reportid" foreignKey="repocolu_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_column"/>
            <child catalog="mdl52er_erd" column="reportid" foreignKey="repofilt_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_filter"/>
            <child catalog="mdl52er_erd" column="reportid" foreignKey="reposche_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_schedule"/>
            <child catalog="mdl52er_erd" column="reportid" foreignKey="repouserfilt_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_user_filter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="source" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="type" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="uniquerows" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="conditiondata" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="settingsdata" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reporepo_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="area" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reporepo_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reporepo_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="reporepo_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="reporepo_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="reporepo_use_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="reportbuilder_schedule" numRows="0" remarks="Table to represent a report schedule" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="reportid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reposche_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="audiences" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="classname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="configdata" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="format" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="userviewas" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reposche_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timescheduled" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="recurrence" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timelastsent" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timenextsend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reposche_use5_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="reposche_use6_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="reposche_rep_ix" unique="false">
            <column ascending="true" name="reportid"/>
         </index>
         <index name="reposche_use2_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
         <index name="reposche_use3_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="reposche_use_ix" unique="false">
            <column ascending="true" name="userviewas"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="reportbuilder_user_filter" numRows="0" remarks="Defines user report filter" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="reportid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repouserfilt_rep2_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="filterdata" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="usercreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repouserfilt_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repouserfilt_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repouserfilt_rep_ix" unique="false">
            <column ascending="true" name="reportid"/>
         </index>
         <index name="repouserfilt_repuse_uix" unique="true">
            <column ascending="true" name="reportid"/>
            <column ascending="true" name="usercreated"/>
         </index>
         <index name="repouserfilt_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="repouserfilt_use_ix" unique="false">
            <column ascending="true" name="usercreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="repository" numRows="0" remarks="This table contains one entry for every configured external repository instance." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="type" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="visible" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="repository_instance_config" numRows="0" remarks="The config for intances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="instanceid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repository_instance_config_erd_repository_instance" implied="false" onDeleteCascade="false" table="repository_instances"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repository_instance_config_erd_repository_instance" unique="false">
            <column ascending="true" name="instanceid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="repository_instances" numRows="0" remarks="This table contains one entry for every configured external repository instance." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="repositoryid" foreignKey="filerefe_rep2_fk" implied="false" onDeleteCascade="false" table="files_reference"/>
            <child catalog="mdl52er_erd" column="instanceid" foreignKey="repository_instance_config_erd_repository_instance" implied="false" onDeleteCascade="false" table="repository_instance_config"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="typeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repoinst_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repoinst_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="username" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="password" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="readonly" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repoinst_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="repoinst_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="repository_onedrive_access" numRows="0" remarks="List of temporary access grants." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="repoonedacce_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="permissionid" nullable="false" remarks="The permission id in OneDrive." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="itemid" nullable="false" remarks="The item id in OneDrive." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="repoonedacce_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="resource" numRows="0" remarks="Each record is one resource and its config data" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="resourceid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="enrol_lti_resource_link"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="resource_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="tobemigrated" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="legacyfiles" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="legacyfileslast" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="display" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="displayoptions" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="filterfiles" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="revision" nullable="false" remarks="incremented when after each file changes, solves browser caching issues" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="reso_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="resource_old" numRows="0" remarks="backup of all old resource instances from 1.9" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="type" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="reference" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="alltext" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="popup" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="options" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="oldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="cmid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="newmodule" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="newid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="migrated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="resoold_cmi_ix" unique="false">
            <column ascending="true" name="cmid"/>
         </index>
         <index name="resoold_old_uix" unique="true">
            <column ascending="true" name="oldid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role" numRows="0" remarks="moodle roles" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="issuerrole" foreignKey="badgmanuawar_iss4_fk" implied="false" onDeleteCascade="false" table="badge_manual_award"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="enro_rol2_fk" implied="false" onDeleteCascade="false" table="enrol"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="enroflat_rol2_fk" implied="false" onDeleteCascade="false" table="enrol_flatfile"/>
            <child catalog="mdl52er_erd" column="allowassign" foreignKey="rolealloassi_all2_fk" implied="false" onDeleteCascade="false" table="role_allow_assign"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolealloassi_rol2_fk" implied="false" onDeleteCascade="false" table="role_allow_assign"/>
            <child catalog="mdl52er_erd" column="allowoverride" foreignKey="rolealloover_all2_fk" implied="false" onDeleteCascade="false" table="role_allow_override"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolealloover_rol2_fk" implied="false" onDeleteCascade="false" table="role_allow_override"/>
            <child catalog="mdl52er_erd" column="allowswitch" foreignKey="rolealloswit_all2_fk" implied="false" onDeleteCascade="false" table="role_allow_switch"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolealloswit_rol2_fk" implied="false" onDeleteCascade="false" table="role_allow_switch"/>
            <child catalog="mdl52er_erd" column="allowview" foreignKey="rolealloview_all2_fk" implied="false" onDeleteCascade="false" table="role_allow_view"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolealloview_rol2_fk" implied="false" onDeleteCascade="false" table="role_allow_view"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="roleassi_rol2_fk" implied="false" onDeleteCascade="false" table="role_assignments"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolecapa_rol2_fk" implied="false" onDeleteCascade="false" table="role_capabilities"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolecontleve_rol2_fk" implied="false" onDeleteCascade="false" table="role_context_levels"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="rolename_rol2_fk" implied="false" onDeleteCascade="false" table="role_names"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="stats_daily"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="stats_monthly"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="stats_user_daily"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="stats_user_monthly"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="stats_user_weekly"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="stats_weekly"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="tool_cohortroles"/>
            <child catalog="mdl52er_erd" column="roleid" foreignKey="tooldatapurp_rol2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_purposerole"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Empty names are automatically localised" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="shortname" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="false" remarks="Empty descriptions may be automatically localised" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="archetype" nullable="false" remarks="Role archetype is used during install and role reset, marks admin role and helps in site settings" size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="role_sho_uix" unique="true">
            <column ascending="true" name="shortname"/>
         </index>
         <index name="role_sor_uix" unique="true">
            <column ascending="true" name="sortorder"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_allow_assign" numRows="0" remarks="this defines what role can assign what role" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloassi_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="allowassign" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloassi_all2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolealloassi_all_ix" unique="false">
            <column ascending="true" name="allowassign"/>
         </index>
         <index name="rolealloassi_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolealloassi_rolall_uix" unique="true">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="allowassign"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_allow_override" numRows="0" remarks="this defines what role can override what role" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloover_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="allowoverride" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloover_all2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolealloover_all_ix" unique="false">
            <column ascending="true" name="allowoverride"/>
         </index>
         <index name="rolealloover_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolealloover_rolall_uix" unique="true">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="allowoverride"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_allow_switch" numRows="0" remarks="This table stores which which other roles a user is allowed to switch to if they have one role." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="roleid" nullable="false" remarks="The role the user has." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloswit_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="allowswitch" nullable="false" remarks="The id of a role that the user is allowed to switch to as a result of having this role." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloswit_all2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolealloswit_all_ix" unique="false">
            <column ascending="true" name="allowswitch"/>
         </index>
         <index name="rolealloswit_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolealloswit_rolall_uix" unique="true">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="allowswitch"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_allow_view" numRows="0" remarks="This table stores which which other roles a user is allowed to view to if they have one role." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="roleid" nullable="false" remarks="The role the user has." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloview_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="allowview" nullable="false" remarks="The id of a role that the user is allowed to view to as a result of having this role." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolealloview_all2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolealloview_all_ix" unique="false">
            <column ascending="true" name="allowview"/>
         </index>
         <index name="rolealloview_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolealloview_rolall_uix" unique="true">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="allowview"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_assignments" numRows="0" remarks="assigning roles in different context" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="roleassi_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="roleassi_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="roleassi_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="modifierid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="component" nullable="false" remarks="plugin responsible responsible for role assignment, empty when manually assigned" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="itemid" nullable="false" remarks="Id of enrolment/auth instance responsible for this role assignment" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="roleassi_comiteuse_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="roleassi_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="roleassi_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="roleassi_rolcon_ix" unique="false">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="contextid"/>
         </index>
         <index name="roleassi_sor_ix" unique="false">
            <column ascending="true" name="sortorder"/>
         </index>
         <index name="roleassi_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="roleassi_useconrol_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="roleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_capabilities" numRows="0" remarks="permission has to be signed, overriding a capability for a particular role in a particular context" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolecapa_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolecapa_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="capability" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="mdl52er_erd" column="name" foreignKey="rolecapa_cap2_fk" implied="false" onDeleteCascade="false" table="capabilities"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="permission" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="modifierid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolecapa_mod2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolecapa_cap_ix" unique="false">
            <column ascending="true" name="capability"/>
         </index>
         <index name="rolecapa_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="rolecapa_mod_ix" unique="false">
            <column ascending="true" name="modifierid"/>
         </index>
         <index name="rolecapa_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolecapa_rolconcap_uix" unique="true">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="capability"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_context_levels" numRows="0" remarks="Lists which roles can be assigned at which context levels. The assignment is allowed in the corresponding row is present in this table." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolecontleve_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextlevel" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolecontleve_conrol_uix" unique="true">
            <column ascending="true" name="contextlevel"/>
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolecontleve_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="role_names" numRows="0" remarks="role names in native strings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolename_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="rolename_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="rolename_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="rolename_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="rolename_rolcon_uix" unique="true">
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scale" numRows="0" remarks="Defines grading scales" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="comp_sca2_fk" implied="false" onDeleteCascade="false" table="competency"/>
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="compfram_sca2_fk" implied="false" onDeleteCascade="false" table="competency_framework"/>
            <child catalog="mdl52er_erd" column="rawscaleid" foreignKey="gradgrad_raw2_fk" implied="false" onDeleteCascade="false" table="grade_grades"/>
            <child catalog="mdl52er_erd" column="rawscaleid" foreignKey="gradgradhist_raw2_fk" implied="false" onDeleteCascade="false" table="grade_grades_history"/>
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="graditem_sca2_fk" implied="false" onDeleteCascade="false" table="grade_items"/>
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="graditemhist_sca2_fk" implied="false" onDeleteCascade="false" table="grade_items_history"/>
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="gradoutc_sca2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="gradoutchist_sca2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes_history"/>
            <child catalog="mdl52er_erd" column="scaleid" foreignKey="rati_sca2_fk" implied="false" onDeleteCascade="false" table="rating"/>
            <child catalog="mdl52er_erd" column="oldid" foreignKey="scalhist_old2_fk" implied="false" onDeleteCascade="false" table="scale_history"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scal_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="scale" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scal_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="scal_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scale_history" numRows="0" remarks="History table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="action" nullable="false" remarks="created/modified/deleted constants" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oldid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scalhist_old2_fk" implied="false" onDeleteCascade="false" table="scale"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="source" nullable="true" remarks="What caused the modification? manual/module/import/..." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timemodified" nullable="true" remarks="The last time this grade_item was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="loggeduser" nullable="true" remarks="the userid of the person who last modified this outcome" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scalhist_log2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scalhist_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scalhist_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="scale" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="description" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scalhist_act_ix" unique="false">
            <column ascending="true" name="action"/>
         </index>
         <index name="scalhist_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="scalhist_log_ix" unique="false">
            <column ascending="true" name="loggeduser"/>
         </index>
         <index name="scalhist_old_ix" unique="false">
            <column ascending="true" name="oldid"/>
         </index>
         <index name="scalhist_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="scalhist_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm" numRows="0" remarks="each table is one SCORM module and its configuration" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="scormid" foreignKey="scoraiccsess_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_aicc_session"/>
            <child catalog="mdl52er_erd" column="scormid" foreignKey="scoratte_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_attempt"/>
            <child catalog="mdl52er_erd" column="scorm" foreignKey="scorscoe_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="local" digits="0" id="3" name="scormtype" nullable="false" remarks="local, external or repository" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="reference" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="intro" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="version" nullable="false" remarks="" size="9" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="maxgrade" nullable="false" remarks="" size="22" type="DOUBLE" typeCode="8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="grademethod" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="whatgrade" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="maxattempt" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="forcecompleted" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="forcenewattempt" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="lastattemptlock" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="15" name="masteryoverride" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="displayattemptstatus" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="displaycoursestructure" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="updatefreq" nullable="false" remarks="Define when the package must be automatically update" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="sha1hash" nullable="true" remarks="package content or ext path hash" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="20" name="md5hash" nullable="false" remarks="MD5 Hash of package file" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="revision" nullable="false" remarks="revison number" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="launch" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="23" name="skipview" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="hidebrowse" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="hidetoc" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="26" name="nav" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="-100" digits="0" id="27" name="navpositionleft" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="-100" digits="0" id="28" name="navpositiontop" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="auto" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="popup" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="31" name="options" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="100" digits="0" id="32" name="width" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="600" digits="0" id="33" name="height" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="timeopen" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="35" name="timeclose" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="37" name="completionstatusrequired" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="38" name="completionscorerequired" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="39" name="completionstatusallscos" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="40" name="autocommit" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scor_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_aicc_session" numRows="0" remarks="Used by AICC HACP to store session information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="id from user table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scoraiccsess_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="scormid" nullable="false" remarks="id from scorm table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scoraiccsess_sco2_fk" implied="false" onDeleteCascade="false" table="scorm"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="hacpsession" nullable="false" remarks="sessionid used to authenticate AICC HACP communication" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="scoid" nullable="true" remarks="id from scorm_scoes table" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="scormmode" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="scormstatus" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="attempt" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="lessonstatus" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="sessiontime" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="timecreated" nullable="false" remarks="time this session was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="timemodified" nullable="false" remarks="time this session was last used" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scoraiccsess_sco_ix" unique="false">
            <column ascending="true" name="scormid"/>
         </index>
         <index name="scoraiccsess_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_attempt" numRows="0" remarks="List of SCORM attempts made by user." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="attemptid" foreignKey="scorscoevalu_att2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes_value"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scoratte_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="scormid" nullable="false" remarks="The id of the scorm table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scoratte_sco2_fk" implied="false" onDeleteCascade="false" table="scorm"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="attempt" nullable="false" remarks="The attempt number" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scoratte_sco_ix" unique="false">
            <column ascending="true" name="scormid"/>
         </index>
         <index name="scoratte_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_element" numRows="0" remarks="List of scorm elements." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="elementid" foreignKey="scorscoevalu_ele2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes_value"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="element" nullable="false" remarks="Name of SCORM element" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorelem_ele_uix" unique="true">
            <column ascending="true" name="element"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_scoes" numRows="0" remarks="each SCO part of the SCORM module" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorscoedata_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes_data"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorscoevalu_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes_value"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorseqmapi_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_mapinfo"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorseqobje_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_objective"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorseqroll_sco3_fk" implied="false" onDeleteCascade="false" table="scorm_seq_rolluprule"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorseqroll_sco5_fk" implied="false" onDeleteCascade="false" table="scorm_seq_rolluprulecond"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorseqrule_sco5_fk" implied="false" onDeleteCascade="false" table="scorm_seq_rulecond"/>
            <child catalog="mdl52er_erd" column="scoid" foreignKey="scorseqrule_sco3_fk" implied="false" onDeleteCascade="false" table="scorm_seq_ruleconds"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scorm" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorscoe_sco2_fk" implied="false" onDeleteCascade="false" table="scorm"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="manifest" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="organization" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="parent" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="identifier" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="launch" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="scormtype" nullable="false" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="title" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="sortorder" nullable="false" remarks="order of scoes" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorscoe_sco_ix" unique="false">
            <column ascending="true" name="scorm"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_scoes_data" numRows="0" remarks="Contains variable data get from packages" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorscoedata_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorscoedata_sco_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_scoes_value" numRows="0" remarks="Values passed from SCORM package" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="scoid" nullable="false" remarks="The id of the scorm_scoes table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorscoevalu_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="attemptid" nullable="false" remarks="id from scorm_attempt" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorscoevalu_att2_fk" implied="false" onDeleteCascade="false" table="scorm_attempt"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="elementid" nullable="false" remarks="id from scorm_element" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorscoevalu_ele2_fk" implied="false" onDeleteCascade="false" table="scorm_element"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="value" nullable="false" remarks="Value passed from SCORM package" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="Time value last changed." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorscoevalu_att_ix" unique="false">
            <column ascending="true" name="attemptid"/>
         </index>
         <index name="scorscoevalu_ele_ix" unique="false">
            <column ascending="true" name="elementid"/>
         </index>
         <index name="scorscoevalu_sco_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_seq_mapinfo" numRows="0" remarks="SCORM2004 objective mapinfo description" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqmapi_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="objectiveid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqmapi_obj2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_objective"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="targetobjectiveid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="readsatisfiedstatus" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="readnormalizedmeasure" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="writesatisfiedstatus" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="writenormalizedmeasure" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorseqmapi_obj_ix" unique="false">
            <column ascending="true" name="objectiveid"/>
         </index>
         <index name="scorseqmapi_sco_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
         <index name="scorseqmapi_scoidobj_uix" unique="true">
            <column ascending="true" name="scoid"/>
            <column ascending="true" name="id"/>
            <column ascending="true" name="objectiveid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_seq_objective" numRows="0" remarks="SCORM2004 objective description" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="objectiveid" foreignKey="scorseqmapi_obj2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_mapinfo"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqobje_sco2_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="primaryobj" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="objectiveid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="satisfiedbymeasure" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0.0000" digits="4" id="5" name="minnormalizedmeasure" nullable="false" remarks="" size="11" type="FLOAT" typeCode="7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorseqobje_sco_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
         <index name="scorseqobje_scoid_uix" unique="true">
            <column ascending="true" name="scoid"/>
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_seq_rolluprule" numRows="0" remarks="SCORM2004 sequencing rule" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="rollupruleid" foreignKey="scorseqroll_rol2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_rolluprulecond"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqroll_sco3_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="childactivityset" nullable="false" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="minimumcount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.0000" digits="4" id="4" name="minimumpercent" nullable="false" remarks="" size="11" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="all" digits="0" id="5" name="conditioncombination" nullable="false" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="action" nullable="false" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorseqroll_sco_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
         <index name="scorseqroll_scoid_uix" unique="true">
            <column ascending="true" name="scoid"/>
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_seq_rolluprulecond" numRows="0" remarks="SCORM2004 sequencing rule" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqroll_sco5_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="rollupruleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqroll_rol2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_rolluprule"/>
         </column>
         <column autoUpdated="false" defaultValue="noOp" digits="0" id="3" name="operator" nullable="false" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="cond" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorseqroll_rol_ix" unique="false">
            <column ascending="true" name="rollupruleid"/>
         </index>
         <index name="scorseqroll_sco2_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
         <index name="scorseqroll_scorolid_uix" unique="true">
            <column ascending="true" name="scoid"/>
            <column ascending="true" name="rollupruleid"/>
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_seq_rulecond" numRows="0" remarks="SCORM2004 rule condition" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqrule_sco5_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="ruleconditionsid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqrule_rul2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_ruleconds"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="refrencedobjective" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.0000" digits="4" id="4" name="measurethreshold" nullable="false" remarks="" size="11" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="noOp" digits="0" id="5" name="operator" nullable="false" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="always" digits="0" id="6" name="cond" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorseqrule_idscorul_uix" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="scoid"/>
            <column ascending="true" name="ruleconditionsid"/>
         </index>
         <index name="scorseqrule_rul_ix" unique="false">
            <column ascending="true" name="ruleconditionsid"/>
         </index>
         <index name="scorseqrule_sco2_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="scorm_seq_ruleconds" numRows="0" remarks="SCORM2004 rule conditions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="ruleconditionsid" foreignKey="scorseqrule_rul2_fk" implied="false" onDeleteCascade="false" table="scorm_seq_rulecond"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="scoid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="scorseqrule_sco3_fk" implied="false" onDeleteCascade="false" table="scorm_scoes"/>
         </column>
         <column autoUpdated="false" defaultValue="all" digits="0" id="2" name="conditioncombination" nullable="false" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="ruletype" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="action" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scorseqrule_sco_ix" unique="false">
            <column ascending="true" name="scoid"/>
         </index>
         <index name="scorseqrule_scoid_uix" unique="true">
            <column ascending="true" name="scoid"/>
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="search_index_requests" numRows="0" remarks="Records requests for (re)indexing of specific contexts. Entries will be removed from this table when indexing of that context is complete. (This table is not used for normal time-based indexing of new content.)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="Context ID that has been requested for reindexing." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="searinderequ_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="searcharea" nullable="false" remarks="Set (e.g. &amp;#039;forum-post&amp;#039;) if a specific area is to be reindexed. Blank indicates all areas." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timerequested" nullable="false" remarks="Time at which this index update was requested." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="partialarea" nullable="false" remarks="If processing of this context partially completed, set to the area that needs processing next. Blank indicates not processed yet." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="partialtime" nullable="false" remarks="If processing partially completed, set to the timestamp within the next area where processing should start. 0 indicates not processed yet." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="indexpriority" nullable="false" remarks="Priority value so that important requests can be dealt with first; higher numbers are processed first" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="searinderequ_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="searinderequ_indtim_ix" unique="false">
            <column ascending="true" name="indexpriority"/>
            <column ascending="true" name="timerequested"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="search_simpledb_index" numRows="0" remarks="search_simpledb table containing the index data." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="docid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="title" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="content" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="areaid" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="type" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="owneruserid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="modified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="userid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="description1" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="description2" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="searsimpinde_are_ix" unique="false">
            <column ascending="true" name="areaid"/>
         </index>
         <index name="searsimpinde_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="searsimpinde_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="searsimpinde_doc_uix" unique="true">
            <column ascending="true" name="docid"/>
         </index>
         <index name="searsimpinde_owncon_ix" unique="false">
            <column ascending="true" name="owneruserid"/>
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="sessions" numRows="0" remarks="Database based session storage - now recommended" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="state" nullable="false" remarks="0 means normal session" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="sid" nullable="false" remarks="Session id" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="sess_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sessdata" nullable="true" remarks="session content" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="firstip" nullable="true" remarks="" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="lastip" nullable="true" remarks="" size="45" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="sess_sid_uix" unique="true">
            <column ascending="true" name="sid"/>
         </index>
         <index name="sess_sta_ix" unique="false">
            <column ascending="true" name="state"/>
         </index>
         <index name="sess_tim2_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="sess_tim_ix" unique="false">
            <column ascending="true" name="timecreated"/>
         </index>
         <index name="sess_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="shortlink" numRows="0" remarks="Short codes for user short links" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="shortcode" nullable="false" remarks="The shortcode to use for the short link" size="12" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="shor_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="linktype" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="identifier" nullable="false" remarks="An identifier for this component / type combination" size="1333" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="shor_sho_ix" unique="false">
            <column ascending="true" name="shortcode"/>
         </index>
         <index name="shor_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="shor_usesho_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="shortcode"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="sms_gateways" numRows="0" remarks="Instances of SMS gateways" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="gatewayid" foreignKey="smsmess_gat2_fk" implied="false" onDeleteCascade="false" table="sms_messages"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="gateway" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="enabled" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="config" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="sms_messages" numRows="0" remarks="SMS Messages sent via the SMS subsystem" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="recipientnumber" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="content" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="messagetype" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="recipientuserid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="issensitive" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="gatewayid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="smsmess_gat2_fk" implied="false" onDeleteCascade="false" table="sms_gateways"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="status" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="smsmess_gat_ix" unique="false">
            <column ascending="true" name="gatewayid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stats_daily" numRows="0" remarks="to accumulate daily stats" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="stats_daily_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="roleid" nullable="false" remarks="id of role for the aggregates" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="activity" digits="0" id="4" name="stattype" nullable="false" remarks="type of stat" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="stat1" nullable="false" remarks="stat1. usually used for reads" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="stat2" nullable="false" remarks="stat2. usually used for writes." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="statdail_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="statdail_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="statdail_tim_ix" unique="false">
            <column ascending="true" name="timeend"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stats_monthly" numRows="0" remarks="To accumulate monthly stats" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="stats_monthly_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="roleid" nullable="false" remarks="id of role for the aggregates" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="activity" digits="0" id="4" name="stattype" nullable="false" remarks="type of stat" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="stat1" nullable="false" remarks="stat1. usually used for reads" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="stat2" nullable="false" remarks="stat2. usually used for writes." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="statmont_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="statmont_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="statmont_tim_ix" unique="false">
            <column ascending="true" name="timeend"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stats_user_daily" numRows="0" remarks="To accumulate daily stats per course/user" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="stats_user_daily_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="statsreads" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="statswrites" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="stattype" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="statuserdail_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="statuserdail_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="statuserdail_tim_ix" unique="false">
            <column ascending="true" name="timeend"/>
         </index>
         <index name="statuserdail_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stats_user_monthly" numRows="0" remarks="To accumulate monthly stats per course/user" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="stats_user_monthly_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="statsreads" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="statswrites" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="stattype" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="statusermont_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="statusermont_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="statusermont_tim_ix" unique="false">
            <column ascending="true" name="timeend"/>
         </index>
         <index name="statusermont_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stats_user_weekly" numRows="0" remarks="To accumulate weekly stats per course/user" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="stats_user_weekly_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="statsreads" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="statswrites" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="stattype" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="statuserweek_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="statuserweek_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="statuserweek_tim_ix" unique="false">
            <column ascending="true" name="timeend"/>
         </index>
         <index name="statuserweek_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stats_weekly" numRows="0" remarks="To accumulate weekly stats" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="stats_weekly_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="roleid" nullable="false" remarks="id of role for the aggregates" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="activity" digits="0" id="4" name="stattype" nullable="false" remarks="type of stat" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="stat1" nullable="false" remarks="stat1. usually used for reads" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="stat2" nullable="false" remarks="stat2. usually used for writes." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="statweek_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="statweek_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="statweek_tim_ix" unique="false">
            <column ascending="true" name="timeend"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="stored_progress" numRows="0" remarks="Records for any long running tasks we want to poll for progress" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="idnumber" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timestart" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="lastupdate" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="4" name="percentcompleted" nullable="true" remarks="" size="5" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="message" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="haserrored" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="storprog_idn_ix" unique="false">
            <column ascending="true" name="idnumber"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="subsection" numRows="0" remarks="Stores the delegated subsection instances." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="subs_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="subs_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="survey" numRows="0" remarks="Defines badge  for reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#Badges" schema="mdl52er_erd" type="TABLE"/>
      <table catalog="mdl52er_erd" name="tag" numRows="0" remarks="Tag table - this generic table will replace the old &quot;tags&quot; table." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="tagid" foreignKey="tagcorr_tag2_fk" implied="false" onDeleteCascade="false" table="tag_correlation"/>
            <child catalog="mdl52er_erd" column="tagid" foreignKey="taginst_tag2_fk" implied="false" onDeleteCascade="false" table="tag_instance"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tag_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="tagcollid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tag_tag2_fk" implied="false" onDeleteCascade="false" table="tag_coll"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="rawname" nullable="false" remarks="The raw, unnormalised name for the tag as entered by users" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="isstandard" nullable="false" remarks="Whether this tag is standard" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="flag" nullable="true" remarks="a tag can be &amp;#039;flagged&amp;#039; as inappropriate" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tag_tag_ix" unique="false">
            <column ascending="true" name="tagcollid"/>
         </index>
         <index name="tag_tagiss_ix" unique="false">
            <column ascending="true" name="tagcollid"/>
            <column ascending="true" name="isstandard"/>
         </index>
         <index name="tag_tagnam_uix" unique="true">
            <column ascending="true" name="tagcollid"/>
            <column ascending="true" name="name"/>
         </index>
         <index name="tag_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tag_area" numRows="0" remarks="Defines various tag areas, one area is identified by component and itemtype" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="itemtype" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="tagcollid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tagarea_tag2_fk" implied="false" onDeleteCascade="false" table="tag_coll"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="callback" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="callbackfile" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="showstandard" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="multiplecontexts" nullable="false" remarks="Whether the tag area allows tag instances to be created in multiple contexts." size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tagarea_comite_uix" unique="true">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemtype"/>
         </index>
         <index name="tagarea_tag_ix" unique="false">
            <column ascending="true" name="tagcollid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tag_coll" numRows="0" remarks="Defines different set of tags" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="tagcollid" foreignKey="tag_tag2_fk" implied="false" onDeleteCascade="false" table="tag"/>
            <child catalog="mdl52er_erd" column="tagcollid" foreignKey="tagarea_tag2_fk" implied="false" onDeleteCascade="false" table="tag_area"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="isdefault" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="component" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="sortorder" nullable="false" remarks="" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="5" name="searchable" nullable="false" remarks="Whether the tag collection is searchable" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="customurl" nullable="true" remarks="Custom URL for the tag page instead of /tag/index.php" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tag_correlation" numRows="0" remarks="The rationale for the 'tag_correlation' table is performance.   It works as a cache for a potentially heavy load query done at the 'tag_instance' table.   So, the 'tag_correlation' table stores redundant information derived from the 'tag_instance' table" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="tagid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tagcorr_tag2_fk" implied="false" onDeleteCascade="false" table="tag"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="correlatedtags" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tagcorr_tag_ix" unique="false">
            <column ascending="true" name="tagid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tag_instance" numRows="0" remarks="tag_instance table holds the information of associations between tags and other items" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="tagid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="taginst_tag2_fk" implied="false" onDeleteCascade="false" table="tag"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="Defines the Moodle component which the tag was added to" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="itemtype" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="itemid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="contextid" nullable="true" remarks="The context id of the item that was tagged" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="taginst_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="tiuserid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="ordering" nullable="true" remarks="Maintains the order of the tag instances of an item" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timemodified" nullable="false" remarks="timemodified" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="taginst_comiteitecontiutag_uix" unique="true">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemtype"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="tiuserid"/>
            <column ascending="true" name="tagid"/>
         </index>
         <index name="taginst_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="taginst_itecomtagcon_ix" unique="false">
            <column ascending="true" name="itemtype"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="tagid"/>
            <column ascending="true" name="contextid"/>
         </index>
         <index name="taginst_tag_ix" unique="false">
            <column ascending="true" name="tagid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="task_adhoc" numRows="0" remarks="List of adhoc tasks waiting to run." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="The component that triggered this adhoc task." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="classname" nullable="false" remarks="The name of the class extending adhoc_task to run when this task is executed." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="nextruntime" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="faildelay" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="customdata" nullable="true" remarks="Custom data to be passed to the adhoc task. Must be serialisable using json_encode()" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="userid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="taskadho_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="Timestamp of adhoc task creation" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timestarted" nullable="true" remarks="Time when the task was started" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="hostname" nullable="true" remarks="Hostname where the task is running" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="pid" nullable="true" remarks="PHP process ID that is running the task" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="attemptsavailable" nullable="true" remarks="The remaining attempts for this task" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="firststartingtime" nullable="true" remarks="The start time of the first run of the task" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="taskadho_nex_ix" unique="false">
            <column ascending="true" name="nextruntime"/>
         </index>
         <index name="taskadho_nexcla_ix" unique="false">
            <column ascending="true" name="nextruntime"/>
            <column ascending="true" name="classname"/>
         </index>
         <index name="taskadho_tim_ix" unique="false">
            <column ascending="true" name="timestarted"/>
         </index>
         <index name="taskadho_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="task_log" numRows="0" remarks="The log table for all tasks" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="type" nullable="false" remarks="The type of task. Scheduled task = 0; Adhoc task = 1." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="component" nullable="false" remarks="The component that the task belongs to" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="classname" nullable="false" remarks="The class of the task being run" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="The userid that the task was configured to run as (Adhoc tasks only)" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tasklog_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="10" id="5" name="timestart" nullable="false" remarks="The start time of the task" size="20" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="10" id="6" name="timeend" nullable="false" remarks="The end time of the task" size="20" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="dbreads" nullable="false" remarks="The number of DB reads performed during the task." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="dbwrites" nullable="false" remarks="The number of DB writes performed during the task." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="result" nullable="false" remarks="Whether the task was successful or not. 0 = pass; 1 = fail." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="output" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="hostname" nullable="true" remarks="Hostname where the task was executed" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="pid" nullable="true" remarks="PHP process ID that was running the task" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tasklog_cla_ix" unique="false">
            <column ascending="true" name="classname"/>
         </index>
         <index name="tasklog_tim_ix" unique="false">
            <column ascending="true" name="timestart"/>
         </index>
         <index name="tasklog_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="task_scheduled" numRows="0" remarks="List of scheduled tasks to be run by cron." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="The component this scheduled task belongs to." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="classname" nullable="false" remarks="The class extending scheduled_task to be called when running this task." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="lastruntime" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="nextruntime" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="minute" nullable="false" remarks="" size="200" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="hour" nullable="false" remarks="" size="70" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="day" nullable="false" remarks="" size="90" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="month" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="dayofweek" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="faildelay" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="customised" nullable="false" remarks="Used on upgrades to prevent overwriting custom schedules." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="disabled" nullable="false" remarks="1 means do not run from cron" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="timestarted" nullable="true" remarks="Time when the task was started" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="hostname" nullable="true" remarks="Hostname where the task is running" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="pid" nullable="true" remarks="PHP process ID that is running the task" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tasksche_cla_uix" unique="true">
            <column ascending="true" name="classname"/>
         </index>
         <index name="tasksche_lasnex_ix" unique="false">
            <column ascending="true" name="lastruntime"/>
            <column ascending="true" name="nextruntime"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tiny_autosave" numRows="0" remarks="The content of the textarea saved during autosave operations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="elementid" nullable="false" remarks="The unique id for the text editor in the form." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="The contextid that the form was loaded with." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="pagehash" nullable="false" remarks="The HTML DOM id of the page that loaded the form." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="The id of the user that loaded the form." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="drafttext" nullable="false" remarks="The draft text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="draftid" nullable="true" remarks="Optional draft area id containing draft files." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="pageinstance" nullable="false" remarks="The browser tab instance that last saved the draft text. This is to prevent multiple tabs from the same user saving different text alternately." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="Store the last modified time for the auto save text." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tinyauto_eleconusepag_uix" unique="true">
            <column ascending="true" name="elementid"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="pagehash"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_areas" numRows="0" remarks="Areas that have been checked for accessibility problems" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="areaid" foreignKey="toolbriccont_are2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_content"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="type" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricarea_con2_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="component" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="tablename" nullable="true" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="fieldorarea" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="itemid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="filename" nullable="true" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="reftable" nullable="true" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="refid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="cmid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricarea_cmi2_fk" implied="false" onDeleteCascade="false" table="course_modules"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="courseid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricarea_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="categoryid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricarea_cat2_fk" implied="false" onDeleteCascade="false" table="course_categories"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricarea_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="toolbricarea_cmi_ix" unique="false">
            <column ascending="true" name="cmid"/>
         </index>
         <index name="toolbricarea_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="toolbricarea_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="toolbricarea_coucmi_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="cmid"/>
         </index>
         <index name="toolbricarea_refreftyp_ix" unique="false">
            <column ascending="true" name="reftable"/>
            <column ascending="true" name="refid"/>
            <column ascending="true" name="type"/>
         </index>
         <index name="toolbricarea_typconcomfieit_ix" unique="false">
            <column ascending="true" name="type"/>
            <column ascending="true" name="contextid"/>
            <column ascending="true" name="component"/>
            <column ascending="true" name="fieldorarea"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="toolbricarea_typtabitefie_ix" unique="false">
            <column ascending="true" name="type"/>
            <column ascending="true" name="tablename"/>
            <column ascending="true" name="itemid"/>
            <column ascending="true" name="fieldorarea"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_cache_acts" numRows="0" remarks="Contains accessibility summary information per activity." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbriccachacts_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="status" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="component" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="totalactivities" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="failedactivities" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="passedactivities" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="errorcount" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbriccachacts_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="toolbriccachacts_sta_ix" unique="false">
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_cache_check" numRows="0" remarks="Contains accessibility summary information per check." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbriccachchec_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="status" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="checkid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="checkcount" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="errorcount" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbriccachchec_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="toolbriccachchec_err_ix" unique="false">
            <column ascending="true" name="errorcount"/>
         </index>
         <index name="toolbriccachchec_sta_ix" unique="false">
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_checks" numRows="0" remarks="Checks details" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="checkid" foreignKey="toolbricresu_che2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_results"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="checktype" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="shortname" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="checkgroup" nullable="true" remarks="The group category identifier." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="status" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="severity" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricchec_che2_ix" unique="false">
            <column ascending="true" name="checkgroup"/>
         </index>
         <index name="toolbricchec_che_ix" unique="false">
            <column ascending="true" name="checktype"/>
         </index>
         <index name="toolbricchec_sta_ix" unique="false">
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_content" numRows="0" remarks="Content of an area at a particular time (recognised by a hash)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="contentid" foreignKey="toolbricresu_con2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_results"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="areaid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbriccont_are2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_areas"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="contenthash" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="iscurrent" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="status" nullable="false" remarks="0 - needs checking, -1 in progress, 1 checked" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timechecked" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbriccont_are_ix" unique="false">
            <column ascending="true" name="areaid"/>
         </index>
         <index name="toolbriccont_iscare_ix" unique="false">
            <column ascending="true" name="iscurrent"/>
            <column ascending="true" name="areaid"/>
         </index>
         <index name="toolbriccont_sta_ix" unique="false">
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_errors" numRows="0" remarks="Errors during the accessibility checks" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="resultid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricerro_res2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_results"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="linenumber" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="errordata" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="htmlcode" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricerro_res_ix" unique="false">
            <column ascending="true" name="resultid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_process" numRows="0" remarks="Queued records to initiate new processing of specific targets" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="item" nullable="true" remarks="The item for process action." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="innercontextid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecompleted" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricproc_tim_ix" unique="false">
            <column ascending="true" name="timecompleted"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_results" numRows="0" remarks="Results of the accessibility checks" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="resultid" foreignKey="toolbricerro_res2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_errors"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contentid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricresu_con2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_content"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="checkid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricresu_che2_fk" implied="false" onDeleteCascade="false" table="tool_brickfield_checks"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="errorcount" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricresu_che_ix" unique="false">
            <column ascending="true" name="checkid"/>
         </index>
         <index name="toolbricresu_con_ix" unique="false">
            <column ascending="true" name="contentid"/>
         </index>
         <index name="toolbricresu_conche_ix" unique="false">
            <column ascending="true" name="contentid"/>
            <column ascending="true" name="checkid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_schedule" numRows="0" remarks="Keeps the per course content analysis schedule." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="50" digits="0" id="1" name="contextlevel" nullable="false" remarks="The context level for this item. Defaults to CONTEXT_COURSE." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="instanceid" nullable="false" remarks="The id of the specific context instance. Course id for courses." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextid" nullable="true" remarks="Id of the specific context record." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="status" nullable="false" remarks="The schedule status for this item. 0 = not requested; 1 = requested; 2 = analyzed." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timeanalyzed" nullable="true" remarks="The most recent time the item was analyzed by scheduler." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodified" nullable="true" remarks="Time stamp of the last record update." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricsche_conins_uix" unique="true">
            <column ascending="true" name="contextlevel"/>
            <column ascending="true" name="instanceid"/>
         </index>
         <index name="toolbricsche_sta_ix" unique="false">
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_brickfield_summary" numRows="0" remarks="Contains accessibility check results summary information." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolbricsumm_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="status" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="activities" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="activitiespassed" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="activitiesfailed" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="errorschecktype1" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="errorschecktype2" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="errorschecktype3" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="errorschecktype4" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="errorschecktype5" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="errorschecktype6" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="errorschecktype7" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="failedchecktype1" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="failedchecktype2" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="failedchecktype3" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="failedchecktype4" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="failedchecktype5" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="failedchecktype6" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="failedchecktype7" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="percentchecktype1" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="percentchecktype2" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="percentchecktype3" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="percentchecktype4" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="24" name="percentchecktype5" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="25" name="percentchecktype6" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="26" name="percentchecktype7" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolbricsumm_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="toolbricsumm_sta_ix" unique="false">
            <column ascending="true" name="status"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_cohortroles" numRows="0" remarks="Mapping of users to cohort role assignments." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="cohortid" nullable="false" remarks="The cohort to sync" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tool_cohortroles_erd_cohort" implied="false" onDeleteCascade="false" table="cohort"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="roleid" nullable="false" remarks="The role to assign" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="The user to sync" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="The time this record was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="false" remarks="The time this record was modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="usermodified" nullable="true" remarks="Who last modified this record?" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolcoho_cohroluse_uix" unique="true">
            <column ascending="true" name="cohortid"/>
            <column ascending="true" name="roleid"/>
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_customlang" numRows="0" remarks="Contains the working checkout of all strings and their customization" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="lang" nullable="false" remarks="The code of the language this string belongs to. Like en, cs or es" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="componentid" nullable="false" remarks="The id of the component" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolcust_com2_fk" implied="false" onDeleteCascade="false" table="tool_customlang_components"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="stringid" nullable="false" remarks="The identifier of the string" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="original" nullable="false" remarks="English original of the string" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="master" nullable="true" remarks="Master translation of the string as is distributed in the official lang pack, null if not translated" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="local" nullable="true" remarks="Local customization of the string, null if not customized" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="false" remarks="The timestamp of when the original or master was recently modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecustomized" nullable="true" remarks="The timestamp of when the value of the local translation was recently modified, null if not customized yet" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="outdated" nullable="true" remarks="Either the English original or the master translation changed and the customization may be outdated" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="modified" nullable="true" remarks="Has the string been modified via the translator?" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolcust_com_ix" unique="false">
            <column ascending="true" name="componentid"/>
         </index>
         <index name="toolcust_lancomstr_uix" unique="true">
            <column ascending="true" name="lang"/>
            <column ascending="true" name="componentid"/>
            <column ascending="true" name="stringid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_customlang_components" numRows="0" remarks="Contains the list of all installed plugins that provide their own language pack" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="componentid" foreignKey="toolcust_com2_fk" implied="false" onDeleteCascade="false" table="tool_customlang"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="The normalized name of the plugin" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="version" nullable="true" remarks="The checked out version of the plugin, null if the version is unknown" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_category" numRows="0" remarks="Data categories" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="tooldatactxi_cat2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxinstance"/>
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="tooldatactxl_cat2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxlevel"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="descriptionformat" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_contextlist" numRows="0" remarks="List of contexts for a component" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="contextlistid" foreignKey="tooldatactxlctx_con2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxlst_ctx"/>
            <child catalog="mdl52er_erd" column="contextlistid" foreignKey="tooldatarqstctxl_con2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_rqst_ctxlst"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="Frankenstyle component name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_ctxexpired" numRows="0" remarks="Default comment for the table, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxe_con_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="unexpiredroles" nullable="true" remarks="Roles which have explicitly not expired yet." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="expiredroles" nullable="true" remarks="Explicitly expires roles" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="defaultexpired" nullable="false" remarks="The default retention period has passed." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="status" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatactxe_con_uix" unique="true">
            <column ascending="true" name="contextid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_ctxinstance" numRows="0" remarks="Default comment for the table, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxi_con_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="purposeid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxi_pur2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_purpose"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="categoryid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxi_cat2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_category"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatactxi_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="tooldatactxi_con_uix" unique="true">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="tooldatactxi_pur_ix" unique="false">
            <column ascending="true" name="purposeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_ctxlevel" numRows="0" remarks="Default comment for the table, please edit me" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextlevel" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="purposeid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxl_pur2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_purpose"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="categoryid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxl_cat2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_category"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatactxl_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="tooldatactxl_con_uix" unique="true">
            <column ascending="true" name="contextlevel"/>
         </index>
         <index name="tooldatactxl_pur_ix" unique="false">
            <column ascending="true" name="purposeid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_ctxlst_ctx" numRows="0" remarks="A contextlist context item" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contextid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextlistid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatactxlctx_con2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_contextlist"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="status" nullable="false" remarks="Approval status of the context item" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatactxlctx_con_ix" unique="false">
            <column ascending="true" name="contextlistid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_purpose" numRows="0" remarks="Data purposes" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="purposeid" foreignKey="tooldatactxi_pur2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxinstance"/>
            <child catalog="mdl52er_erd" column="purposeid" foreignKey="tooldatactxl_pur2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_ctxlevel"/>
            <child catalog="mdl52er_erd" column="purposeid" foreignKey="tooldatapurp_pur2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_purposerole"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="descriptionformat" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="lawfulbases" nullable="false" remarks="Comma-separated IDs matching records in tool_dataprivacy_lawfulbasis" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="sensitivedatareasons" nullable="true" remarks="Comma-separated IDs matching records in tool_dataprivacy_sensitive" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="retentionperiod" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="protected" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_purposerole" numRows="0" remarks="Data purpose overrides for a specific role" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="purposeid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatapurp_pur2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_purpose"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="roleid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatapurp_rol2_fk" implied="false" onDeleteCascade="false" table="role"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="lawfulbases" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="sensitivedatareasons" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="retentionperiod" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="protected" nullable="true" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="usermodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatapurp_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatapurp_pur_ix" unique="false">
            <column ascending="true" name="purposeid"/>
         </index>
         <index name="tooldatapurp_purrol_uix" unique="true">
            <column ascending="true" name="purposeid"/>
            <column ascending="true" name="roleid"/>
         </index>
         <index name="tooldatapurp_rol_ix" unique="false">
            <column ascending="true" name="roleid"/>
         </index>
         <index name="tooldatapurp_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_request" numRows="0" remarks="Table for data requests" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="requestid" foreignKey="tooldatarqstctxl_req2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_rqst_ctxlst"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="type" nullable="false" remarks="Data request type" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="comments" nullable="true" remarks="More details about the request" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="commentsformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="userid" nullable="false" remarks="The user ID the request is being made for" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatarequ_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="requestedby" nullable="false" remarks="The user ID of the one making the request" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatarequ_req2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="status" nullable="false" remarks="The current status of the data request" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="dpo" nullable="true" remarks="The user ID of the Data Protection Officer who is reviewing th request" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatarequ_dpo2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="dpocomment" nullable="true" remarks="DPO&amp;#039;s comments (e.g. reason for rejecting the request, etc.)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="dpocommentformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="systemapproved" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="usermodified" nullable="false" remarks="The user who created/modified this request object" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatarequ_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="timecreated" nullable="false" remarks="The time this data request was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="timemodified" nullable="false" remarks="The last time this data request was updated" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="creationmethod" nullable="false" remarks="The type of the creation method of the data request" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatarequ_dpo_ix" unique="false">
            <column ascending="true" name="dpo"/>
         </index>
         <index name="tooldatarequ_req_ix" unique="false">
            <column ascending="true" name="requestedby"/>
         </index>
         <index name="tooldatarequ_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="tooldatarequ_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_dataprivacy_rqst_ctxlst" numRows="0" remarks="Association table joining requests and contextlists" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="requestid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatarqstctxl_req2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_request"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextlistid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooldatarqstctxl_con2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_contextlist"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooldatarqstctxl_con_ix" unique="false">
            <column ascending="true" name="contextlistid"/>
         </index>
         <index name="tooldatarqstctxl_req_ix" unique="false">
            <column ascending="true" name="requestid"/>
         </index>
         <index name="tooldatarqstctxl_reqcon_uix" unique="true">
            <column ascending="true" name="requestid"/>
            <column ascending="true" name="contextlistid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_mfa" numRows="0" remarks="Table to store factor configurations for users" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="User ID" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="factor" nullable="false" remarks="Factor type" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="secret" nullable="true" remarks="Any secret data for factor" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="label" nullable="true" remarks="label for factor instance, eg device or email." size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="true" remarks="Time the factor instance was setup" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="createdfromip" nullable="true" remarks="IP that the factor was setup from" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="true" remarks="Time factor was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="lastverified" nullable="true" remarks="Time user was last verified with this factor." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="revoked" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="lockcounter" nullable="false" remarks="Counter of failed attempts" size="7" type="MEDIUMINT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmfa_fac_ix" unique="false">
            <column ascending="true" name="factor"/>
         </index>
         <index name="toolmfa_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="toolmfa_usefacloc_ix" unique="false">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="factor"/>
            <column ascending="true" name="lockcounter"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_mfa_auth" numRows="0" remarks="Stores the last time a successful MFA auth was registered for a userid" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="User id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolmfaauth_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="lastverified" nullable="false" remarks="Timestamp of last MFA verification." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmfaauth_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_mfa_secrets" numRows="0" remarks="Table to store factor secrets" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolmfasecr_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="factor" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="secret" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="expiry" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="revoked" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="sessionid" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmfasecr_exp_ix" unique="false">
            <column ascending="true" name="expiry"/>
         </index>
         <index name="toolmfasecr_fac_ix" unique="false">
            <column ascending="true" name="factor"/>
         </index>
         <index name="toolmfasecr_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_monitor_events" numRows="0" remarks="A table that keeps a log of events related to subscriptions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="eventname" nullable="false" remarks="Event name" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="contextid" nullable="false" remarks="Context id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolmonieven_con3_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="contextlevel" nullable="false" remarks="Context level" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="contextinstanceid" nullable="false" remarks="Context instance id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="instanceid" foreignKey="toolmonieven_con4_fk" implied="false" onDeleteCascade="false" table="context"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="link" nullable="false" remarks="Link to the event location" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="courseid" nullable="false" remarks="course id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolmonieven_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="Time created" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmonieven_con2_ix" unique="false">
            <column ascending="true" name="contextinstanceid"/>
         </index>
         <index name="toolmonieven_con_ix" unique="false">
            <column ascending="true" name="contextid"/>
         </index>
         <index name="toolmonieven_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_monitor_history" numRows="0" remarks="Table to store history of message notifications sent" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="sid" nullable="false" remarks="Subscription id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolmonihist_sid2_fk" implied="false" onDeleteCascade="false" table="tool_monitor_subscriptions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="User to whom this notification was sent" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timesent" nullable="false" remarks="Timestamp of when the message was sent." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmonihist_sid_ix" unique="false">
            <column ascending="true" name="sid"/>
         </index>
         <index name="toolmonihist_sidusetim_uix" unique="true">
            <column ascending="true" name="sid"/>
            <column ascending="true" name="userid"/>
            <column ascending="true" name="timesent"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_monitor_rules" numRows="0" remarks="Table to store rules" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="ruleid" foreignKey="toolmonisubs_rul2_fk" implied="false" onDeleteCascade="false" table="tool_monitor_subscriptions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="description" nullable="true" remarks="Description of the rule" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="descriptionformat" nullable="false" remarks="Description format" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="Name of the rule" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="Id of user who created the rule" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="courseid" nullable="false" remarks="Id of course to which this rule belongs." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="plugin" nullable="false" remarks="Frankenstlye name of the plguin" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="eventname" nullable="false" remarks="Fully qualified name of the event" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="template" nullable="false" remarks="Message template" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="templateformat" nullable="false" remarks="Template format" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="frequency" nullable="false" remarks="Frequency" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timewindow" nullable="false" remarks="Time window in seconds" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="timemodified" nullable="false" remarks="Timestamp when this rule was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="timecreated" nullable="false" remarks="Time stamp of when this rule was created" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmonirule_couuse_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="toolmonirule_eve_ix" unique="false">
            <column ascending="true" name="eventname"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_monitor_subscriptions" numRows="0" remarks="Table to store user subscriptions to various rules" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="sid" foreignKey="toolmonihist_sid2_fk" implied="false" onDeleteCascade="false" table="tool_monitor_history"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="Course id of the subscription" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="ruleid" nullable="false" remarks="Rule id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolmonisubs_rul2_fk" implied="false" onDeleteCascade="false" table="tool_monitor_rules"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="cmid" nullable="false" remarks="Course module id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="userid" nullable="false" remarks="User id of the subscriber" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timecreated" nullable="false" remarks="Timestamp of when this subscription was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="lastnotificationsent" nullable="false" remarks="Timestamp of the time when a notification was last sent for this subscription." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="inactivedate" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolmonisubs_couuse_ix" unique="false">
            <column ascending="true" name="courseid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="toolmonisubs_rul_ix" unique="false">
            <column ascending="true" name="ruleid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_policy" numRows="0" remarks="Contains the list of policy documents defined on the site." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="policyid" foreignKey="toolpolivers_pol2_fk" implied="false" onDeleteCascade="false" table="tool_policy_versions"/>
         </column>
         <column autoUpdated="false" defaultValue="999" digits="0" id="1" name="sortorder" nullable="false" remarks="Defines the order in which policies should be presented to users" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="currentversionid" nullable="true" remarks="ID of the current policy version that applies on the site, NULL if the policy does not apply" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolpoli_cur2_fk" implied="false" onDeleteCascade="false" table="tool_policy_versions"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolpoli_cur_ix" unique="false">
            <column ascending="true" name="currentversionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_policy_acceptances" numRows="0" remarks="Tracks users accepting the policy versions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="policyversionid" nullable="false" remarks="ID of the policy document version" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolpoliacce_pol2_fk" implied="false" onDeleteCascade="false" table="tool_policy_versions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="ID of the user this acceptance is relevant to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolpoliacce_use3_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="status" nullable="true" remarks="Acceptance status: 1 - accepted, 0 - not accepted" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="lang" nullable="false" remarks="Code of the language the user had when the policy document was displayed" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="false" remarks="ID of the user who last modified the acceptance record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolpoliacce_use4_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="Timestamp of when the acceptance record was created" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="false" remarks="Timestamp of when the acceptance record was last modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="note" nullable="true" remarks="Plain text note describing how the actual consent has been obtained if the policy has been accepted on other user&amp;#039;s behalf." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolpoliacce_pol_ix" unique="false">
            <column ascending="true" name="policyversionid"/>
         </index>
         <index name="toolpoliacce_poluse_uix" unique="true">
            <column ascending="true" name="policyversionid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="toolpoliacce_use2_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
         <index name="toolpoliacce_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_policy_versions" numRows="0" remarks="Holds versions of the policy documents" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="currentversionid" foreignKey="toolpoli_cur2_fk" implied="false" onDeleteCascade="false" table="tool_policy"/>
            <child catalog="mdl52er_erd" column="policyversionid" foreignKey="toolpoliacce_pol2_fk" implied="false" onDeleteCascade="false" table="tool_policy_acceptances"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Name of the policy document" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="type" nullable="false" remarks="Type of the policy: 0 - Site policy, 1 - Privacy policy, 2 - Third party policy, 99 - Other" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="audience" nullable="false" remarks="Who is this policy targeted at: 0 - all users, 1 - logged in users only, 2 - guests only" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="archived" nullable="false" remarks="Should the version be considered as archived. All non-archived, non-current versions are considered to be drafts." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="usermodified" nullable="false" remarks="ID of the user who last edited this policy document version." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolpolivers_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="timecreated" nullable="false" remarks="Timestamp of when the policy version was created." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timemodified" nullable="false" remarks="Timestamp of when the policy version was last modified." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="policyid" nullable="false" remarks="ID of the policy document we are version of." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolpolivers_pol2_fk" implied="false" onDeleteCascade="false" table="tool_policy"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="agreementstyle" nullable="false" remarks="How this agreement should flow: 0 - on the consent page, 1 - on a separate page before reaching the consent page." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="optional" nullable="false" remarks="0 - the policy must be accepted to use the site, 1 - accepting the policy is optional" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="revision" nullable="false" remarks="Human readable version of the policy document" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="summary" nullable="false" remarks="Policy text summary" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="summaryformat" nullable="false" remarks="Format of the summary field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="content" nullable="false" remarks="Full policy text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="contentformat" nullable="false" remarks="Format of the content field" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolpolivers_pol_ix" unique="false">
            <column ascending="true" name="policyid"/>
         </index>
         <index name="toolpolivers_use_ix" unique="false">
            <column ascending="true" name="usermodified"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_recyclebin_category" numRows="0" remarks="A list of items in the category recycle bin" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="categoryid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolrecycate_cat2_fk" implied="false" onDeleteCascade="false" table="course_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="shortname" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="fullname" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolrecycate_cat_ix" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
         <index name="toolrecycate_tim_ix" unique="false">
            <column ascending="true" name="timecreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_recyclebin_course" numRows="0" remarks="A list of items in the course recycle bin" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="toolrecycour_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="section" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="module" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="name" nullable="true" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="toolrecycour_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="toolrecycour_tim_ix" unique="false">
            <column ascending="true" name="timecreated"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_usertours_steps" numRows="0" remarks="Steps in an tour" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="tourid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="tooluserstep_tou2_fk" implied="false" onDeleteCascade="false" table="tool_usertours_tours"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="title" nullable="true" remarks="Title of the step" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="content" nullable="true" remarks="Content of the user tour - allow for multilang tags" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="contentformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="targettype" nullable="false" remarks="Type of the target (e.g. block, CSS selector, etc.)" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="targetvalue" nullable="false" remarks="The value for the specified target type." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="configdata" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tooluserstep_tou_ix" unique="false">
            <column ascending="true" name="tourid"/>
         </index>
         <index name="tooluserstep_tousor_ix" unique="false">
            <column ascending="true" name="tourid"/>
            <column ascending="true" name="sortorder"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="tool_usertours_tours" numRows="0" remarks="List of tours" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="tourid" foreignKey="tooluserstep_tou2_fk" implied="false" onDeleteCascade="false" table="tool_usertours_steps"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Name of the user tour" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="pathmatch" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="enabled" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="sortorder" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="endtourlabel" nullable="true" remarks="Custom label for the end tour button" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="configdata" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="displaystepnumbers" nullable="false" remarks="Setting to display step numbers of the tour" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="upgrade_log" numRows="0" remarks="Upgrade logging" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="type" nullable="false" remarks="type: 0==info, 1==notice, 2==error" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="plugin" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="version" nullable="true" remarks="plugin or main version if known" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="targetversion" nullable="true" remarks="version of plugin or core specified in version.php at the time of upgrade loggging" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="info" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="details" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="backtrace" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="upgrlog_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="upgrlog_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="upgrlog_typtim_ix" unique="false">
            <column ascending="true" name="type"/>
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="upgrlog_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="url" numRows="0" remarks="each record is one url resource" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="url_erd_courseid" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="externalurl" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="display" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="displayoptions" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="parameters" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="url_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user" numRows="0" remarks="One record for each person, custom profile fields can be added via /user/profile/index.php for sample reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#USER_and_ENROLMENT_Reports" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="userid" foreignKey="aiactiregi_use2_fk" implied="false" onDeleteCascade="false" table="ai_action_register"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="aipoliregi_use_fk" implied="false" onDeleteCascade="false" table="ai_policy_register"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="analmode_use2_fk" implied="false" onDeleteCascade="false" table="analytics_models"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="analmodelog_use2_fk" implied="false" onDeleteCascade="false" table="analytics_models_log"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="analpredacti_use2_fk" implied="false" onDeleteCascade="false" table="analytics_prediction_actions"/>
            <child catalog="mdl52er_erd" column="marker" foreignKey="assiallomark_mar2_fk" implied="false" onDeleteCascade="false" table="assign_allocated_marker"/>
            <child catalog="mdl52er_erd" column="student" foreignKey="assiallomark_stu2_fk" implied="false" onDeleteCascade="false" table="assign_allocated_marker"/>
            <child catalog="mdl52er_erd" column="marker" foreignKey="assimark_mar2_fk" implied="false" onDeleteCascade="false" table="assign_mark"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="assiover_use2_fk" implied="false" onDeleteCascade="false" table="assign_overrides"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="assiuserflag_use2_fk" implied="false" onDeleteCascade="false" table="assign_user_flags"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="assiusermapp_use2_fk" implied="false" onDeleteCascade="false" table="assign_user_mapping"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="assieditquic_use2_fk" implied="false" onDeleteCascade="false" table="assignfeedback_editpdf_quick"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="authltilinklogi_use2_fk" implied="false" onDeleteCascade="false" table="auth_lti_linked_login"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="authoautlinklogi_use4_fk" implied="false" onDeleteCascade="false" table="auth_oauth2_linked_login"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="authoautlinklogi_use3_fk" implied="false" onDeleteCascade="false" table="auth_oauth2_linked_login"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="backcont_use2_fk" implied="false" onDeleteCascade="false" table="backup_controllers"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="badg_use4_fk" implied="false" onDeleteCascade="false" table="badge"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="badg_use3_fk" implied="false" onDeleteCascade="false" table="badge"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="badgback_use2_fk" implied="false" onDeleteCascade="false" table="badge_backpack"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="badgbackoaut_use4_fk" implied="false" onDeleteCascade="false" table="badge_backpack_oauth2"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="badgbackoaut_use3_fk" implied="false" onDeleteCascade="false" table="badge_backpack_oauth2"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="badgcritmet_use2_fk" implied="false" onDeleteCascade="false" table="badge_criteria_met"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="badgissu_use2_fk" implied="false" onDeleteCascade="false" table="badge_issued"/>
            <child catalog="mdl52er_erd" column="issuerid" foreignKey="badgmanuawar_iss3_fk" implied="false" onDeleteCascade="false" table="badge_manual_award"/>
            <child catalog="mdl52er_erd" column="recipientid" foreignKey="badgmanuawar_rec2_fk" implied="false" onDeleteCascade="false" table="badge_manual_award"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="bigbreco_use2_fk" implied="false" onDeleteCascade="false" table="bigbluebuttonbn_recordings"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="block_recent_activity_erd_user_id" implied="false" onDeleteCascade="false" table="block_recent_activity"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="blocrece_use2_fk" implied="false" onDeleteCascade="false" table="block_recentlyaccesseditems"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="block_rss_client_erd_userid" implied="false" onDeleteCascade="false" table="block_rss_client"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="blogexte_use2_fk" implied="false" onDeleteCascade="false" table="blog_external"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="cohomemb_use2_fk" implied="false" onDeleteCascade="false" table="cohort_members"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="comm_use2_fk" implied="false" onDeleteCascade="false" table="comments"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="commuser_use2_fk" implied="false" onDeleteCascade="false" table="communication_user"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="comp_use2_fk" implied="false" onDeleteCascade="false" table="competency"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compcour_use5_fk" implied="false" onDeleteCascade="false" table="competency_coursecomp"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compcour_use3_fk" implied="false" onDeleteCascade="false" table="competency_coursecompsetting"/>
            <child catalog="mdl52er_erd" column="actionuserid" foreignKey="compevid_act2_fk" implied="false" onDeleteCascade="false" table="competency_evidence"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compevid_use2_fk" implied="false" onDeleteCascade="false" table="competency_evidence"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compfram_use2_fk" implied="false" onDeleteCascade="false" table="competency_framework"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compmodu_use2_fk" implied="false" onDeleteCascade="false" table="competency_modulecomp"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compplan_use3_fk" implied="false" onDeleteCascade="false" table="competency_plan"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compplan_use5_fk" implied="false" onDeleteCascade="false" table="competency_plancomp"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="comprela_use2_fk" implied="false" onDeleteCascade="false" table="competency_relatedcomp"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="comptemp_use4_fk" implied="false" onDeleteCascade="false" table="competency_template"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="comptemp_use8_fk" implied="false" onDeleteCascade="false" table="competency_templatecohort"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="comptemp_use6_fk" implied="false" onDeleteCascade="false" table="competency_templatecomp"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compuser_use6_fk" implied="false" onDeleteCascade="false" table="competency_usercomp"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compuser_use8_fk" implied="false" onDeleteCascade="false" table="competency_usercompcourse"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compuser_use10_fk" implied="false" onDeleteCascade="false" table="competency_usercompplan"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="competency_userevidence_erd_competency_usercomp" implied="false" onDeleteCascade="false" table="competency_userevidence"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compuser_use12_fk" implied="false" onDeleteCascade="false" table="competency_userevidence"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="compuser_use14_fk" implied="false" onDeleteCascade="false" table="competency_userevidencecomp"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="conflog_use2_fk" implied="false" onDeleteCascade="false" table="config_log"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="contcont_use4_fk" implied="false" onDeleteCascade="false" table="contentbank_content"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="contcont_use3_fk" implied="false" onDeleteCascade="false" table="contentbank_content"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="custshar_use2_fk" implied="false" onDeleteCascade="false" table="customfield_shared"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="datareco_use2_fk" implied="false" onDeleteCascade="false" table="data_records"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="enroflat_use2_fk" implied="false" onDeleteCascade="false" table="enrol_flatfile"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="enroltiuser_use2_fk" implied="false" onDeleteCascade="false" table="enrol_lti_users"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="enropayp_use2_fk" implied="false" onDeleteCascade="false" table="enrol_paypal"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="evensubs_use2_fk" implied="false" onDeleteCascade="false" table="event_subscriptions"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="evenqueu_use2_fk" implied="false" onDeleteCascade="false" table="events_queue"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="exteservuser_use2_fk" implied="false" onDeleteCascade="false" table="external_services_users"/>
            <child catalog="mdl52er_erd" column="creatorid" foreignKey="extetoke_cre2_fk" implied="false" onDeleteCascade="false" table="external_tokens"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="extetoke_use2_fk" implied="false" onDeleteCascade="false" table="external_tokens"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="favo_use2_fk" implied="false" onDeleteCascade="false" table="favourite"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="fileconv_use2_fk" implied="false" onDeleteCascade="false" table="file_conversion"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="file_use2_fk" implied="false" onDeleteCascade="false" table="files"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="forudige_use2_fk" implied="false" onDeleteCascade="false" table="forum_digests"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="forudiscsubs_use2_fk" implied="false" onDeleteCascade="false" table="forum_discussion_subs"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="forudisc_use2_fk" implied="false" onDeleteCascade="false" table="forum_discussions"/>
            <child catalog="mdl52er_erd" column="loggeduser" foreignKey="gradcatehist_log2_fk" implied="false" onDeleteCascade="false" table="grade_categories_history"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="gradgrad_use3_fk" implied="false" onDeleteCascade="false" table="grade_grades"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="gradgrad_use4_fk" implied="false" onDeleteCascade="false" table="grade_grades"/>
            <child catalog="mdl52er_erd" column="loggeduser" foreignKey="gradgradhist_log2_fk" implied="false" onDeleteCascade="false" table="grade_grades_history"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="gradgradhist_use3_fk" implied="false" onDeleteCascade="false" table="grade_grades_history"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="gradgradhist_use4_fk" implied="false" onDeleteCascade="false" table="grade_grades_history"/>
            <child catalog="mdl52er_erd" column="importer" foreignKey="gradimponewi_imp2_fk" implied="false" onDeleteCascade="false" table="grade_import_newitem"/>
            <child catalog="mdl52er_erd" column="importer" foreignKey="gradimpovalu_imp2_fk" implied="false" onDeleteCascade="false" table="grade_import_values"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="gradimpovalu_use2_fk" implied="false" onDeleteCascade="false" table="grade_import_values"/>
            <child catalog="mdl52er_erd" column="loggeduser" foreignKey="graditemhist_log2_fk" implied="false" onDeleteCascade="false" table="grade_items_history"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="gradoutc_use2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes"/>
            <child catalog="mdl52er_erd" column="loggeduser" foreignKey="gradoutchist_log2_fk" implied="false" onDeleteCascade="false" table="grade_outcomes_history"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="gradduedrule_use2_fk" implied="false" onDeleteCascade="false" table="gradepenalty_duedate_rule"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="graddefi_use4_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="graddefi_use3_fk" implied="false" onDeleteCascade="false" table="grading_definitions"/>
            <child catalog="mdl52er_erd" column="raterid" foreignKey="gradinst_rat2_fk" implied="false" onDeleteCascade="false" table="grading_instances"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="groumemb_use2_fk" implied="false" onDeleteCascade="false" table="groups_members"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="infefile_use2_fk" implied="false" onDeleteCascade="false" table="infected_files"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="lessover_use2_fk" implied="false" onDeleteCascade="false" table="lesson_overrides"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="log_erd_userid" implied="false" onDeleteCascade="false" table="log"/>
            <child catalog="mdl52er_erd" column="realuserid" foreignKey="logsstanlog_rea2_fk" implied="false" onDeleteCascade="false" table="logstore_standard_log"/>
            <child catalog="mdl52er_erd" column="relateduserid" foreignKey="logsstanlog_rel2_fk" implied="false" onDeleteCascade="false" table="logstore_standard_log"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="logsstanlog_use2_fk" implied="false" onDeleteCascade="false" table="logstore_standard_log"/>
            <child catalog="mdl52er_erd" column="requesteduserid" foreignKey="messcontrequ_req2_fk" implied="false" onDeleteCascade="false" table="message_contact_requests"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messcontrequ_use2_fk" implied="false" onDeleteCascade="false" table="message_contact_requests"/>
            <child catalog="mdl52er_erd" column="contactid" foreignKey="messcont_con2_fk" implied="false" onDeleteCascade="false" table="message_contacts"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messcont_use2_fk" implied="false" onDeleteCascade="false" table="message_contacts"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messconvacti_use2_fk" implied="false" onDeleteCascade="false" table="message_conversation_actions"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messconvmemb_use2_fk" implied="false" onDeleteCascade="false" table="message_conversation_members"/>
            <child catalog="mdl52er_erd" column="useridto" foreignKey="messemaimess_use2_fk" implied="false" onDeleteCascade="false" table="message_email_messages"/>
            <child catalog="mdl52er_erd" column="useridfrom" foreignKey="message_read_erd_from_user_id" implied="false" onDeleteCascade="false" table="message_read"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messuseracti_use2_fk" implied="false" onDeleteCascade="false" table="message_user_actions"/>
            <child catalog="mdl52er_erd" column="blockeduserid" foreignKey="messuserbloc_blo2_fk" implied="false" onDeleteCascade="false" table="message_users_blocked"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messuserbloc_use2_fk" implied="false" onDeleteCascade="false" table="message_users_blocked"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="messmess_use2_fk" implied="false" onDeleteCascade="false" table="messageinbound_messagelist"/>
            <child catalog="mdl52er_erd" column="useridfrom" foreignKey="mess_use2_fk" implied="false" onDeleteCascade="false" table="messages"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="mnetsess_use2_fk" implied="false" onDeleteCascade="false" table="mnet_session"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="my_pages_erd_userid" implied="false" onDeleteCascade="false" table="my_pages"/>
            <child catalog="mdl52er_erd" column="useridto" foreignKey="noti_use2_fk" implied="false" onDeleteCascade="false" table="notifications"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="oautaccetoke_use2_fk" implied="false" onDeleteCascade="false" table="oauth2_access_token"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="oautendp_use2_fk" implied="false" onDeleteCascade="false" table="oauth2_endpoint"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="oautrefrtoke_use2_fk" implied="false" onDeleteCascade="false" table="oauth2_refresh_token"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="oautsystacco_use2_fk" implied="false" onDeleteCascade="false" table="oauth2_system_account"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="oautuserfielmapp_use2_fk" implied="false" onDeleteCascade="false" table="oauth2_user_field_mapping"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="paym_use2_fk" implied="false" onDeleteCascade="false" table="payments"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="portinstuser_use2_fk" implied="false" onDeleteCascade="false" table="portfolio_instance_user"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="portlog_use2_fk" implied="false" onDeleteCascade="false" table="portfolio_log"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="porttemp_use2_fk" implied="false" onDeleteCascade="false" table="portfolio_tempdata"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="post_use2_fk" implied="false" onDeleteCascade="false" table="post"/>
            <child catalog="mdl52er_erd" column="createdby" foreignKey="ques_cre2_fk" implied="false" onDeleteCascade="false" table="question"/>
            <child catalog="mdl52er_erd" column="modifiedby" foreignKey="ques_mod2_fk" implied="false" onDeleteCascade="false" table="question"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="quesattestep_use2_fk" implied="false" onDeleteCascade="false" table="question_attempt_steps"/>
            <child catalog="mdl52er_erd" column="ownerid" foreignKey="quesbankentr_own2_fk" implied="false" onDeleteCascade="false" table="question_bank_entries"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="quizatte_use2_fk" implied="false" onDeleteCascade="false" table="quiz_attempts"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="quizover_use2_fk" implied="false" onDeleteCascade="false" table="quiz_overrides"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="quizsebquiz_use2_fk" implied="false" onDeleteCascade="false" table="quizaccess_seb_quizsettings"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="quizsebtemp_use2_fk" implied="false" onDeleteCascade="false" table="quizaccess_seb_template"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="rati_use2_fk" implied="false" onDeleteCascade="false" table="rating"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="repoaudi_use3_fk" implied="false" onDeleteCascade="false" table="reportbuilder_audience"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="repoaudi_use4_fk" implied="false" onDeleteCascade="false" table="reportbuilder_audience"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="repocolu_use3_fk" implied="false" onDeleteCascade="false" table="reportbuilder_column"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="repocolu_use4_fk" implied="false" onDeleteCascade="false" table="reportbuilder_column"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="repofilt_use3_fk" implied="false" onDeleteCascade="false" table="reportbuilder_filter"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="repofilt_use4_fk" implied="false" onDeleteCascade="false" table="reportbuilder_filter"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="reporepo_use3_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="reporepo_use4_fk" implied="false" onDeleteCascade="false" table="reportbuilder_report"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="reposche_use5_fk" implied="false" onDeleteCascade="false" table="reportbuilder_schedule"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="reposche_use6_fk" implied="false" onDeleteCascade="false" table="reportbuilder_schedule"/>
            <child catalog="mdl52er_erd" column="userviewas" foreignKey="reposche_use4_fk" implied="false" onDeleteCascade="false" table="reportbuilder_schedule"/>
            <child catalog="mdl52er_erd" column="usercreated" foreignKey="repouserfilt_use3_fk" implied="false" onDeleteCascade="false" table="reportbuilder_user_filter"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="repouserfilt_use4_fk" implied="false" onDeleteCascade="false" table="reportbuilder_user_filter"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="repoinst_use2_fk" implied="false" onDeleteCascade="false" table="repository_instances"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="repoonedacce_use2_fk" implied="false" onDeleteCascade="false" table="repository_onedrive_access"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="roleassi_use2_fk" implied="false" onDeleteCascade="false" table="role_assignments"/>
            <child catalog="mdl52er_erd" column="modifierid" foreignKey="rolecapa_mod2_fk" implied="false" onDeleteCascade="false" table="role_capabilities"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="scal_use2_fk" implied="false" onDeleteCascade="false" table="scale"/>
            <child catalog="mdl52er_erd" column="loggeduser" foreignKey="scalhist_log2_fk" implied="false" onDeleteCascade="false" table="scale_history"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="scalhist_use2_fk" implied="false" onDeleteCascade="false" table="scale_history"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="scoraiccsess_use2_fk" implied="false" onDeleteCascade="false" table="scorm_aicc_session"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="scoratte_use2_fk" implied="false" onDeleteCascade="false" table="scorm_attempt"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="sess_use2_fk" implied="false" onDeleteCascade="false" table="sessions"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="shor_use2_fk" implied="false" onDeleteCascade="false" table="shortlink"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="tag_use2_fk" implied="false" onDeleteCascade="false" table="tag"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="taskadho_use2_fk" implied="false" onDeleteCascade="false" table="task_adhoc"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="tasklog_use2_fk" implied="false" onDeleteCascade="false" table="task_log"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="tooldatapurp_use2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_purposerole"/>
            <child catalog="mdl52er_erd" column="dpo" foreignKey="tooldatarequ_dpo2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_request"/>
            <child catalog="mdl52er_erd" column="requestedby" foreignKey="tooldatarequ_req2_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_request"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="tooldatarequ_use3_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_request"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="tooldatarequ_use4_fk" implied="false" onDeleteCascade="false" table="tool_dataprivacy_request"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="toolmfaauth_use2_fk" implied="false" onDeleteCascade="false" table="tool_mfa_auth"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="toolmfasecr_use2_fk" implied="false" onDeleteCascade="false" table="tool_mfa_secrets"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="toolpoliacce_use3_fk" implied="false" onDeleteCascade="false" table="tool_policy_acceptances"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="toolpoliacce_use4_fk" implied="false" onDeleteCascade="false" table="tool_policy_acceptances"/>
            <child catalog="mdl52er_erd" column="usermodified" foreignKey="toolpolivers_use2_fk" implied="false" onDeleteCascade="false" table="tool_policy_versions"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="upgrlog_use2_fk" implied="false" onDeleteCascade="false" table="upgrade_log"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="userdevi_use2_fk" implied="false" onDeleteCascade="false" table="user_devices"/>
            <child catalog="mdl52er_erd" column="modifierid" foreignKey="userenro_mod2_fk" implied="false" onDeleteCascade="false" table="user_enrolments"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="userenro_use2_fk" implied="false" onDeleteCascade="false" table="user_enrolments"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="user_info_data_erd_userid" implied="false" onDeleteCascade="false" table="user_info_data"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="user_lastaccess_erd_userid" implied="false" onDeleteCascade="false" table="user_lastaccess"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="userpasshist_use2_fk" implied="false" onDeleteCascade="false" table="user_password_history"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="userpassrese_use2_fk" implied="false" onDeleteCascade="false" table="user_password_resets"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="user_preferences_erd_userid" implied="false" onDeleteCascade="false" table="user_preferences"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="userprivkey_use2_fk" implied="false" onDeleteCascade="false" table="user_private_key"/>
            <child catalog="mdl52er_erd" column="userid" foreignKey="workaggr_use2_fk" implied="false" onDeleteCascade="false" table="workshop_aggregations"/>
            <child catalog="mdl52er_erd" column="gradinggradeoverby" foreignKey="workasse_gra2_fk" implied="false" onDeleteCascade="false" table="workshop_assessments"/>
            <child catalog="mdl52er_erd" column="reviewerid" foreignKey="workasse_rev2_fk" implied="false" onDeleteCascade="false" table="workshop_assessments"/>
            <child catalog="mdl52er_erd" column="authorid" foreignKey="worksubm_aut2_fk" implied="false" onDeleteCascade="false" table="workshop_submissions"/>
            <child catalog="mdl52er_erd" column="gradeoverby" foreignKey="worksubm_gra2_fk" implied="false" onDeleteCascade="false" table="workshop_submissions"/>
         </column>
         <column autoUpdated="false" defaultValue="manual" digits="0" id="1" name="auth" nullable="false" remarks="The authorisation system used by this account, e.g. Oauth2 or manual https://docs.moodle.org/dev/Authentication_plugins" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="confirmed" nullable="false" remarks="The user has confirmed account https://docs.moodle.org/en/Cleanup#Delete_unconfirmed_users_after" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="policyagreed" nullable="false" remarks="User has agreed to system policies. https://github.com/moodle/moodle/tree/master/admin/tool/policy" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="deleted" nullable="false" remarks="always check for deleted=0 when looking for non deleted accounts" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="firstlogin" nullable="false" remarks="Unix timetamp first time ever this user logged in" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="suspended" nullable="false" remarks="suspended flag prevents users to log in" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="mnethostid" nullable="false" remarks="mainly used for connecting to the Mahara e-portfolio system https://mahara.org/" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="username" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12">
            <child catalog="mdl52er_erd" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="mnet_sso_access_control"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="password" nullable="false" remarks="stored as a hash, for authentication the password is hashed and compared with this" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="9" name="idnumber" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="10" name="firstname" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="11" name="lastname" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="12" name="email" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="emailstop" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="14" name="phone1" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="15" name="phone2" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="16" name="institution" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="17" name="department" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="18" name="address" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="19" name="city" nullable="false" remarks="" size="120" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="20" name="country" nullable="false" remarks="" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="en" digits="0" id="21" name="lang" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="gregorian" digits="0" id="22" name="calendartype" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="23" name="theme" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="99" digits="0" id="24" name="timezone" nullable="false" remarks="https://github.com/moodle/moodle/blob/master/lang/en/timezones.php" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="firstaccess" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="lastaccess" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="lastlogin" nullable="false" remarks="Unix timetamp of last loginlogin" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="currentlogin" nullable="false" remarks="Unix timetamp for start of current login" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="29" name="lastip" nullable="false" remarks="" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="30" name="secret" nullable="false" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="picture" nullable="false" remarks="0 means no image uploaded, positive values are revisions thta prevent caching problems, negative values are reserved for future use" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="32" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="33" name="descriptionformat" nullable="false" remarks="HTML,MOODLE,PLAIN,MARKDOWN https://github.com/moodle/moodle/blob/master/lib/weblib.php" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="34" name="mailformat" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="35" name="maildigest" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="36" name="maildisplay" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="37" name="autosubscribe" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="38" name="trackforums" nullable="false" remarks="" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="39" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="40" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="41" name="trustbitmask" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="42" name="imagealt" nullable="true" remarks="alt tag for user uploaded image" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="43" name="lastnamephonetic" nullable="true" remarks="Last name phonetic" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="44" name="firstnamephonetic" nullable="true" remarks="First name phonetic" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="45" name="middlename" nullable="true" remarks="Middle name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="46" name="alternatename" nullable="true" remarks="Alternate name - Useful for three-name countries." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="username" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="user_alt_ix" unique="false">
            <column ascending="true" name="alternatename"/>
         </index>
         <index name="user_aut_ix" unique="false">
            <column ascending="true" name="auth"/>
         </index>
         <index name="user_cit_ix" unique="false">
            <column ascending="true" name="city"/>
         </index>
         <index name="user_con_ix" unique="false">
            <column ascending="true" name="confirmed"/>
         </index>
         <index name="user_cou_ix" unique="false">
            <column ascending="true" name="country"/>
         </index>
         <index name="user_del_ix" unique="false">
            <column ascending="true" name="deleted"/>
         </index>
         <index name="user_ema_ix" unique="false">
            <column ascending="true" name="email"/>
         </index>
         <index name="user_fir2_ix" unique="false">
            <column ascending="true" name="firstnamephonetic"/>
         </index>
         <index name="user_fir_ix" unique="false">
            <column ascending="true" name="firstname"/>
         </index>
         <index name="user_idn_ix" unique="false">
            <column ascending="true" name="idnumber"/>
         </index>
         <index name="user_las2_ix" unique="false">
            <column ascending="true" name="lastaccess"/>
         </index>
         <index name="user_las3_ix" unique="false">
            <column ascending="true" name="lastnamephonetic"/>
         </index>
         <index name="user_las_ix" unique="false">
            <column ascending="true" name="lastname"/>
         </index>
         <index name="user_mid_ix" unique="false">
            <column ascending="true" name="middlename"/>
         </index>
         <index name="user_mneuse_uix" unique="true">
            <column ascending="true" name="mnethostid"/>
            <column ascending="true" name="username"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_devices" numRows="0" remarks="This table stores user's mobile devices information in order to send PUSH notifications" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="userdeviceid" foreignKey="messairndevi_use_fk" implied="false" onDeleteCascade="false" table="message_airnotifier_devices"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userdevi_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="appid" nullable="false" remarks="the app id, usually something like com.moodle.moodlemobile" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="name" nullable="false" remarks="the device name, occam or iPhone etc.." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="model" nullable="false" remarks="the device model, Nexus 4 or iPad 1,1" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="5" name="platform" nullable="false" remarks="the device platform, Android or iOS etc" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="version" nullable="false" remarks="The device version, 6.1.2, 4.2.2 etc.." size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="7" name="pushid" nullable="false" remarks="the device PUSH token/key/identifier/registration id" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="8" name="uuid" nullable="false" remarks="The device vendor UUID" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="publickey" nullable="true" remarks="The app generated public key" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userdevi_pususe_uix" unique="true">
            <column ascending="true" name="pushid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="userdevi_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="userdevi_uuiuse_ix" unique="false">
            <column ascending="true" name="uuid"/>
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_enrolments" numRows="0" remarks="Users participating in courses (aka enrolled users) - everybody who is participating/visible in course, that means both teachers and students" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="status" nullable="false" remarks="0..9 are system constants, 0 means active participation, see ENROL_PARTICIPATION_* constants, plugins may define own status greater than 10" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="enrolid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userenro_enr2_fk" implied="false" onDeleteCascade="false" table="enrol"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userenro_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timestart" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="2147483647" digits="0" id="5" name="timeend" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="modifierid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userenro_mod2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userenro_enr_ix" unique="false">
            <column ascending="true" name="enrolid"/>
         </index>
         <index name="userenro_enruse_uix" unique="true">
            <column ascending="true" name="enrolid"/>
            <column ascending="true" name="userid"/>
         </index>
         <index name="userenro_mod_ix" unique="false">
            <column ascending="true" name="modifierid"/>
         </index>
         <index name="userenro_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_info_category" numRows="0" remarks="Customisable fields categories" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="categoryid" foreignKey="user_info_field" implied="false" onDeleteCascade="false" table="user_info_field"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="name" nullable="false" remarks="Category name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sortorder" nullable="false" remarks="Display order" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_info_data" numRows="0" remarks="Data for the customisable user fields" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="id from the user table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="user_info_data_erd_userid" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="fieldid" nullable="false" remarks="id from the field table" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="data" nullable="false" remarks="Field data" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="dataformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userinfodata_usefie_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="fieldid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_info_field" numRows="0" remarks="Customisable user profile fields" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="shortname" digits="0" id="1" name="shortname" nullable="false" remarks="short name for each field" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="field name" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="3" name="datatype" nullable="false" remarks="Type of data held in this field" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="Description of field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="descriptionformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="categoryid" nullable="false" remarks="id from category table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="user_info_field" implied="false" onDeleteCascade="false" table="user_info_category"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="sortorder" nullable="false" remarks="order within the category" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="required" nullable="false" remarks="Field required" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="locked" nullable="false" remarks="Field locked" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="visible" nullable="false" remarks="Visibility: private, public, hidden" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="forceunique" nullable="false" remarks="should the field contain unique data" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="signup" nullable="false" remarks="display field on signup page" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="defaultdata" nullable="true" remarks="Default value for this field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="defaultdataformat" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="param1" nullable="true" remarks="General parameter field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="param2" nullable="true" remarks="General parameter field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="param3" nullable="true" remarks="General parameter field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="param4" nullable="true" remarks="General parameter field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="param5" nullable="true" remarks="General parameter field" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="user_info_field" unique="false">
            <column ascending="true" name="categoryid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_lastaccess" numRows="0" remarks="To keep track of course page access times, used in online participants block, and participants list" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="user_lastaccess_erd_userid" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="courseid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timeaccess" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userlast_cou_ix" unique="false">
            <column ascending="true" name="courseid"/>
         </index>
         <index name="userlast_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="userlast_usecou_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="courseid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_password_history" numRows="0" remarks="A rotating log of hashes of previously used passwords for each user." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userpasshist_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="hash" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userpasshist_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_password_resets" numRows="0" remarks="table tracking password reset confirmation tokens" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="userid" nullable="false" remarks="id of the user account which requester claimed to be" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userpassrese_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="timerequested" nullable="false" remarks="The time that the user first requested this password reset" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="timererequested" nullable="false" remarks="The time the user re-requested the password reset." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="token" nullable="false" remarks="secret set and emailed to user" size="32" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userpassrese_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_preferences" numRows="0" remarks="Allows modules to store arbitrary user preferences" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="userid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="user_preferences_erd_userid" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="value" nullable="false" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userpref_nam_ix" unique="false">
            <column ascending="true" name="name"/>
         </index>
         <index name="userpref_usenam_uix" unique="true">
            <column ascending="true" name="userid"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="user_private_key" numRows="0" remarks="access keys used in cookieless scripts - rss, etc." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="script" nullable="false" remarks="plugin, module - unique identifier" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="value" nullable="false" remarks="private access key value" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="userid" nullable="false" remarks="owner" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="userprivkey_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="instance" nullable="true" remarks="optional instance id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="iprestriction" nullable="true" remarks="ip restriction" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="validuntil" nullable="true" remarks="timestampt - valid until data" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="true" remarks="created timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="userprivkey_scrval_ix" unique="false">
            <column ascending="true" name="script"/>
            <column ascending="true" name="value"/>
         </index>
         <index name="userprivkey_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki" numRows="0" remarks="Stores Wiki activity configuration" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="wikiid" foreignKey="wikisubw_wik2_fk" implied="false" onDeleteCascade="false" table="wiki_subwikis"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="course" nullable="false" remarks="Course wiki activity belongs to" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="Wiki" digits="0" id="2" name="name" nullable="false" remarks="name field for moodle instances" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="General introduction of the wiki activity" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="Format of the intro field (MOODLE, HTML, MARKDOWN...)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timemodified" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="First Page" digits="0" id="7" name="firstpagetitle" nullable="false" remarks="Wiki first page&amp;#039;s name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="collaborative" digits="0" id="8" name="wikimode" nullable="false" remarks="Wiki mode (individual, collaborative)" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="creole" digits="0" id="9" name="defaultformat" nullable="false" remarks="Wiki&amp;#039;s default editor" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="forceformat" nullable="false" remarks="Forces the default editor" size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="editbegin" nullable="false" remarks="editbegin" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="editend" nullable="true" remarks="editend" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wiki_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki_links" numRows="0" remarks="Page wiki links" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="subwikiid" nullable="false" remarks="Subwiki instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wikilink_sub2_fk" implied="false" onDeleteCascade="false" table="wiki_subwikis"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="frompageid" nullable="false" remarks="Page id with a link" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wikilink_fro2_fk" implied="false" onDeleteCascade="false" table="wiki_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="topageid" nullable="false" remarks="Page id that recives a link" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="tomissingpage" nullable="true" remarks="link to a nonexistent page" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wikilink_fro_ix" unique="false">
            <column ascending="true" name="frompageid"/>
         </index>
         <index name="wikilink_sub_ix" unique="false">
            <column ascending="true" name="subwikiid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki_locks" numRows="0" remarks="Manages page locks" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="pageid" nullable="false" remarks="Locked page" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wiki_locks_erd_wikipageid" implied="false" onDeleteCascade="false" table="wiki_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sectionname" nullable="true" remarks="locked page section" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="userid" nullable="false" remarks="Locking user" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="lockedat" nullable="false" remarks="timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wiki_locks_erd_wikipageid" unique="false">
            <column ascending="true" name="pageid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki_pages" numRows="0" remarks="Stores wiki pages" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="frompageid" foreignKey="wikilink_fro2_fk" implied="false" onDeleteCascade="false" table="wiki_links"/>
            <child catalog="mdl52er_erd" column="pageid" foreignKey="wiki_locks_erd_wikipageid" implied="false" onDeleteCascade="false" table="wiki_locks"/>
            <child catalog="mdl52er_erd" column="pageid" foreignKey="wiki_synonyms_erd_pageid" implied="false" onDeleteCascade="false" table="wiki_synonyms"/>
            <child catalog="mdl52er_erd" column="pageid" foreignKey="wikivers_pag2_fk" implied="false" onDeleteCascade="false" table="wiki_versions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="subwikiid" nullable="false" remarks="Subwiki instance of this page" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wikipage_sub2_fk" implied="false" onDeleteCascade="false" table="wiki_subwikis"/>
         </column>
         <column autoUpdated="false" defaultValue="title" digits="0" id="2" name="title" nullable="false" remarks="Page name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="cachedcontent" nullable="false" remarks="Cache wiki content" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timecreated" nullable="false" remarks="Wiki page creation timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="false" remarks="page edition timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="timerendered" nullable="false" remarks="Last render timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="userid" nullable="false" remarks="Edition author" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="pageviews" nullable="false" remarks="Number of page views" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="readonly" nullable="false" remarks="Read only flag" size="1" type="BIT" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wikipage_sub_ix" unique="false">
            <column ascending="true" name="subwikiid"/>
         </index>
         <index name="wikipage_subtituse_uix" unique="true">
            <column ascending="true" name="subwikiid"/>
            <column ascending="true" name="title"/>
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki_subwikis" numRows="0" remarks="Stores subwiki instances" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="subwikiid" foreignKey="wikilink_sub2_fk" implied="false" onDeleteCascade="false" table="wiki_links"/>
            <child catalog="mdl52er_erd" column="subwikiid" foreignKey="wikipage_sub2_fk" implied="false" onDeleteCascade="false" table="wiki_pages"/>
            <child catalog="mdl52er_erd" column="subwikiid" foreignKey="wiki_synonyms_erd_subwikiid" implied="false" onDeleteCascade="false" table="wiki_synonyms"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="wikiid" nullable="false" remarks="Wiki activity" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wikisubw_wik2_fk" implied="false" onDeleteCascade="false" table="wiki"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="groupid" nullable="false" remarks="Group that owns this wiki" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="userid" nullable="false" remarks="Owner of that subwiki" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wikisubw_wik_ix" unique="false">
            <column ascending="true" name="wikiid"/>
         </index>
         <index name="wikisubw_wikgrouse_uix" unique="true">
            <column ascending="true" name="wikiid"/>
            <column ascending="true" name="groupid"/>
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki_synonyms" numRows="0" remarks="Stores wiki pages synonyms" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="subwikiid" nullable="false" remarks="Subwiki instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wiki_synonyms_erd_subwikiid" implied="false" onDeleteCascade="false" table="wiki_subwikis"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pageid" nullable="false" remarks="Original page" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wiki_synonyms_erd_pageid" implied="false" onDeleteCascade="false" table="wiki_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="Pagesynonym" digits="0" id="3" name="pagesynonym" nullable="false" remarks="Page name synonym" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wiki_synonyms_erd_subwikiid" unique="false">
            <column ascending="true" name="subwikiid"/>
         </index>
         <index name="wikisyno_pagpag_uix" unique="true">
            <column ascending="true" name="pageid"/>
            <column ascending="true" name="pagesynonym"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="wiki_versions" numRows="0" remarks="Stores wiki page history" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="pageid" nullable="false" remarks="Page id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="wikivers_pag2_fk" implied="false" onDeleteCascade="false" table="wiki_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="content" nullable="false" remarks="Not parsed wiki content" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="creole" digits="0" id="3" name="contentformat" nullable="false" remarks="Markup used to write content" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="version" nullable="false" remarks="Wiki page version" size="7" type="MEDIUMINT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timecreated" nullable="false" remarks="Page edition timestamp" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="userid" nullable="false" remarks="Edition autor" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="wikivers_pag_ix" unique="false">
            <column ascending="true" name="pageid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshop" numRows="0" remarks="This table keeps information about the module instances and their settings" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="workaggr_wor2_fk" implied="false" onDeleteCascade="false" table="workshop_aggregations"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="worksubm_wor2_fk" implied="false" onDeleteCascade="false" table="workshop_submissions"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="worksche_wor_fk" implied="false" onDeleteCascade="false" table="workshopallocation_scheduled"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="workbestsett_wor_fk" implied="false" onDeleteCascade="false" table="workshopeval_best_settings"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="workaccu_wor2_fk" implied="false" onDeleteCascade="false" table="workshopform_accumulative"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="workcomm_wor2_fk" implied="false" onDeleteCascade="false" table="workshopform_comments"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="worknume_wor2_fk" implied="false" onDeleteCascade="false" table="workshopform_numerrors"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="worknumemap_wor2_fk" implied="false" onDeleteCascade="false" table="workshopform_numerrors_map"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="workshopform_rubric_erd_config_workshopid" implied="false" onDeleteCascade="false" table="workshopform_rubric"/>
            <child catalog="mdl52er_erd" column="workshopid" foreignKey="workshopform_rubric_config_erd_workshopid" implied="false" onDeleteCascade="false" table="workshopform_rubric_config"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="course" nullable="false" remarks="ID of the parent course" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="work_cou2_fk" implied="false" onDeleteCascade="false" table="course"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="name" nullable="false" remarks="Name of the activity" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="intro" nullable="true" remarks="The introduction or description of the activity" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="introformat" nullable="false" remarks="The format of the intro field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="instructauthors" nullable="true" remarks="Instructions for the submission phase" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="instructauthorsformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="instructreviewers" nullable="true" remarks="Instructions for the assessment phase" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="instructreviewersformat" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="timemodified" nullable="false" remarks="The timestamp when the module was modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="phase" nullable="true" remarks="The current phase of workshop (0 = not available, 1 = submission, 2 = assessment, 3 = closed)" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="useexamples" nullable="true" remarks="optional feature: students practise evaluating on example submissions from teacher" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="usepeerassessment" nullable="true" remarks="optional feature: students perform peer assessment of others&amp;#039; work" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="useselfassessment" nullable="true" remarks="optional feature: students perform self assessment of their own work" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="80.00000" digits="5" id="14" name="grade" nullable="true" remarks="The maximum grade for submission" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="20.00000" digits="5" id="15" name="gradinggrade" nullable="true" remarks="The maximum grade for assessment" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="16" name="strategy" nullable="false" remarks="The type of the current grading strategy used in this workshop" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="17" name="evaluation" nullable="false" remarks="The recently used grading evaluation method" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="gradedecimals" nullable="true" remarks="Number of digits that should be shown after the decimal point when displaying grades" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="19" name="submissiontypetext" nullable="false" remarks="Can students enter text for their submissions? 0 for no, 1 for optional, 2 for required." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="20" name="submissiontypefile" nullable="false" remarks="Can students attach files for their submissions? 0 for no, 1 for optional, 2 for required." size="1" type="BIT" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="21" name="nattachments" nullable="true" remarks="Maximum number of submission attachments" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="submissionfiletypes" nullable="true" remarks="comma separated list of file extensions" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="latesubmissions" nullable="true" remarks="Allow submitting the work after the deadline" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="100000" digits="0" id="24" name="maxbytes" nullable="true" remarks="Maximum size of the one attached file" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="examplesmode" nullable="true" remarks="0 = example assessments are voluntary, 1 = examples must be assessed before submission, 2 = examples are available after own submission and must be assessed before peer/self assessment phase" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="26" name="submissionstart" nullable="true" remarks="0 = will be started manually, greater than 0 the timestamp of the start of the submission phase" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="submissionend" nullable="true" remarks="0 = will be closed manually, greater than 0 the timestamp of the end of the submission phase" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="assessmentstart" nullable="true" remarks="0 = will be started manually, greater than 0 the timestamp of the start of the assessment phase" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="assessmentend" nullable="true" remarks="0 = will be closed manually, greater than 0 the timestamp of the end of the assessment phase" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="phaseswitchassessment" nullable="false" remarks="Automatically switch to the assessment phase after the submissions deadline" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="31" name="conclusion" nullable="true" remarks="A text to be displayed at the end of the workshop." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="32" name="conclusionformat" nullable="false" remarks="The format of the conclusion field content." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="33" name="overallfeedbackmode" nullable="true" remarks="Mode of the overall feedback support." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="overallfeedbackfiles" nullable="true" remarks="Number of allowed attachments to the overall feedback." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="35" name="overallfeedbackfiletypes" nullable="true" remarks="comma separated list of file extensions" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="100000" digits="0" id="36" name="overallfeedbackmaxbytes" nullable="true" remarks="Maximum size of one file attached to the overall feedback." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="work_cou_ix" unique="false">
            <column ascending="true" name="course"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshop_aggregations" numRows="0" remarks="Aggregated grades for assessment are stored here. The aggregated grade for submission is stored in workshop_submissions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="the id of the workshop instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workaggr_wor2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="false" remarks="The id of the user which aggregated grades are calculated for" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workaggr_use2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="3" name="gradinggrade" nullable="true" remarks="The aggregated grade for all assessments made by this reviewer. The grade is a number from interval 0..100. If NULL then the grade for assessments has not been aggregated yet." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timegraded" nullable="true" remarks="The timestamp of when the participant&amp;#039;s gradinggrade was recently aggregated." size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workaggr_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
         <index name="workaggr_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
         <index name="workaggr_woruse_uix" unique="true">
            <column ascending="true" name="workshopid"/>
            <column ascending="true" name="userid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshop_assessments" numRows="0" remarks="Info about the made assessment and automatically calculated grade for it. The proposed grade can be overridden by teacher." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="assessmentid" foreignKey="workgrad_ass2_fk" implied="false" onDeleteCascade="false" table="workshop_grades"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="submissionid" nullable="false" remarks="The id of the assessed submission" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workasse_sub2_fk" implied="false" onDeleteCascade="false" table="workshop_submissions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="reviewerid" nullable="false" remarks="The id of the reviewer who makes this assessment" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workasse_rev2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="weight" nullable="false" remarks="The weight of the assessment for the purposes of aggregation" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="timecreated" nullable="true" remarks="If 0 then the assessment was allocated but the reviewer has not assessed yet. If greater than 0 then the timestamp of when the reviewer assessed for the first time" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="timemodified" nullable="true" remarks="If 0 then the assessment was allocated but the reviewer has not assessed yet. If greater than 0 then the timestamp of when the reviewer assessed for the last time" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="6" name="grade" nullable="true" remarks="The aggregated grade for submission suggested by the reviewer. The grade 0..100 is computed from the values assigned to the assessment dimensions fields. If NULL then it has not been aggregated yet." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="7" name="gradinggrade" nullable="true" remarks="The computed grade 0..100 for this assessment. If NULL then it has not been computed yet." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="8" name="gradinggradeover" nullable="true" remarks="Grade for the assessment manually overridden by a teacher. Grade is always from interval 0..100. If NULL then the grade is not overriden." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="gradinggradeoverby" nullable="true" remarks="The id of the user who has overridden the grade for submission." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workasse_gra2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="feedbackauthor" nullable="true" remarks="The comment/feedback from the reviewer for the author." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="feedbackauthorformat" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="feedbackauthorattachment" nullable="true" remarks="Are there some files attached to the feedbackauthor field? Sets to 1 by file_postupdate_standard_filemanager()." size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="feedbackreviewer" nullable="true" remarks="The comment/feedback from the teacher for the reviewer. For example the reason why the grade for assessment was overridden" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="feedbackreviewerformat" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workasse_gra_ix" unique="false">
            <column ascending="true" name="gradinggradeoverby"/>
         </index>
         <index name="workasse_rev_ix" unique="false">
            <column ascending="true" name="reviewerid"/>
         </index>
         <index name="workasse_sub_ix" unique="false">
            <column ascending="true" name="submissionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshop_grades" numRows="0" remarks="How the reviewers filled-up the grading forms, given grades and comments" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="assessmentid" nullable="false" remarks="Part of which assessment this grade is of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workgrad_ass2_fk" implied="false" onDeleteCascade="false" table="workshop_assessments"/>
         </column>
         <column autoUpdated="false" defaultValue="" digits="0" id="2" name="strategy" nullable="false" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="dimensionid" nullable="false" remarks="Foreign key. References dimension id in one of the grading strategy tables." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="4" name="grade" nullable="true" remarks="Given grade in the referenced assessment dimension." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="peercomment" nullable="true" remarks="Reviewer&amp;#039;s comment to the grade value." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="peercommentformat" nullable="true" remarks="The format of peercomment field" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workgrad_ass_ix" unique="false">
            <column ascending="true" name="assessmentid"/>
         </index>
         <index name="workgrad_assstrdim_uix" unique="true">
            <column ascending="true" name="assessmentid"/>
            <column ascending="true" name="strategy"/>
            <column ascending="true" name="dimensionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshop_submissions" numRows="0" remarks="Info about the submission and the aggregation of the grade for submission, grade for assessment and final grade. Both grade for submission and grade for assessment can be overridden by teacher. Final grade is always the sum of them. All grades are stored as of 0-100." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="submissionid" foreignKey="workasse_sub2_fk" implied="false" onDeleteCascade="false" table="workshop_assessments"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="the id of the workshop instance" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="worksubm_wor2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="example" nullable="true" remarks="Is this submission an example from teacher" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="authorid" nullable="false" remarks="The author of the submission" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="worksubm_aut2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timecreated" nullable="false" remarks="Timestamp when the work was submitted for the first time" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="timemodified" nullable="false" remarks="Timestamp when the submission has been updated" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="6" name="title" nullable="false" remarks="The submission title" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="content" nullable="true" remarks="Submission text" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="contentformat" nullable="false" remarks="The format of submission text" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="contenttrust" nullable="false" remarks="The trust mode of the data" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="attachment" nullable="true" remarks="Used by File API file_postupdate_standard_filemanager" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="11" name="grade" nullable="true" remarks="Aggregated grade for the submission. The grade is a decimal number from interval 0..100. If NULL then the grade for submission has not been aggregated yet." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="12" name="gradeover" nullable="true" remarks="Grade for the submission manually overridden by a teacher. Grade is always from interval 0..100. If NULL then the grade is not overriden." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="gradeoverby" nullable="true" remarks="The id of the user who has overridden the grade for submission." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="worksubm_gra2_fk" implied="false" onDeleteCascade="false" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="feedbackauthor" nullable="true" remarks="Teacher comment/feedback for the author of the submission, for example describing the reasons for the grade overriding" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="feedbackauthorformat" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="timegraded" nullable="true" remarks="The timestamp when grade or gradeover was recently modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="published" nullable="true" remarks="Shall the submission be available to other when the workshop is closed" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="late" nullable="false" remarks="Has this submission been submitted after the deadline or during the assessment phase?" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="worksubm_aut_ix" unique="false">
            <column ascending="true" name="authorid"/>
         </index>
         <index name="worksubm_gra_ix" unique="false">
            <column ascending="true" name="gradeoverby"/>
         </index>
         <index name="worksubm_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopallocation_scheduled" numRows="0" remarks="Stores the allocation settings for the scheduled allocator" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="workshop id we are part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="worksche_wor_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="enabled" nullable="false" remarks="Is the scheduled allocation enabled" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="submissionend" nullable="false" remarks="What was the workshop&amp;#039;s submissionend when this record was created or modified" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="timeallocated" nullable="true" remarks="When was the last scheduled allocation executed" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="settings" nullable="true" remarks="The pre-defined settings for the underlying random allocation to run it with" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="resultstatus" nullable="true" remarks="The resulting status of the most recent execution" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="resultmessage" nullable="true" remarks="Optional short message describing the resulting status" size="1333" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="resultlog" nullable="true" remarks="The log of the most recent execution" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="worksche_wor_uix" unique="true">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopeval_best_settings" numRows="0" remarks="Settings for the grading evaluation subplugin Comparison with the best assessment." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workbestsett_wor_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="5" digits="0" id="2" name="comparison" nullable="true" remarks="Here we store the recently set factor of comparison of assessment in the given workshop. Reasonable values are from 1 to 10 or so. Default to 5." size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workbestsett_wor_uix" unique="true">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_accumulative" numRows="0" remarks="The assessment dimensions definitions of Accumulative grading strategy forms" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="Workshop ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workaccu_wor2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sort" nullable="true" remarks="Defines the dimension order within the assessment form" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="The description of the dimension" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="descriptionformat" nullable="true" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="grade" nullable="false" remarks="If greater than 0, then the value is maximum grade on a scale 0..grade. If lesser than 0, then its absolute value is the id of a record in scale table. If equals 0, then no grading is possible for this dimension, just commenting." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="weight" nullable="true" remarks="The weigh of the dimension" size="7" type="MEDIUMINT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workaccu_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_comments" numRows="0" remarks="The assessment dimensions definitions of Comments strategy forms" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="Workshop ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workcomm_wor2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sort" nullable="true" remarks="Defines the dimension order within the assessment form" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="The description of the dimension" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="descriptionformat" nullable="true" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workcomm_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_numerrors" numRows="0" remarks="The assessment dimensions definitions of Number of errors grading strategy forms" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="Workshop ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="worknume_wor2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sort" nullable="true" remarks="Defines the dimension order within the assessment form" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="The description of the dimension" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="descriptionformat" nullable="true" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="descriptiontrust" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="grade0" nullable="true" remarks="The word describing the negative evaluation (like Poor, Missing, Absent, etc.). If NULL, it defaults to a translated string False" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="grade1" nullable="true" remarks="A word for possitive evaluation (like Good, Present, OK etc). If NULL, it defaults to a translated string True" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="weight" nullable="true" remarks="Weight of this dimension" size="7" type="MEDIUMINT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="worknume_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_numerrors_map" numRows="0" remarks="This maps the number of errors to a percentual grade for submission" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="The id of the workshop" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="worknumemap_wor2_fk" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="nonegative" nullable="false" remarks="Number of negative responses given by the reviewer" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="5" id="3" name="grade" nullable="false" remarks="Percentual grade 0..100 for this number of negative responses" size="10" type="DECIMAL" typeCode="3"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="worknumemap_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
         <index name="worknumemap_wornon_uix" unique="true">
            <column ascending="true" name="workshopid"/>
            <column ascending="true" name="nonegative"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_rubric" numRows="0" remarks="The assessment dimensions definitions of Rubric grading strategy forms" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="mdl52er_erd" column="dimensionid" foreignKey="workrubrleve_dim2_fk" implied="false" onDeleteCascade="false" table="workshopform_rubric_levels"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="Workshop ID" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workshopform_rubric_erd_config_workshopid" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="sort" nullable="true" remarks="Defines the dimension order within the assessment form" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="The description of the dimension" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="descriptionformat" nullable="true" remarks="The format of the description field" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workrubr_wor_ix" unique="false">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_rubric_config" numRows="0" remarks="Configuration table for the Rubric grading strategy" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="workshopid" nullable="false" remarks="The id of workshop this configuartion applies for" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workshopform_rubric_config_erd_workshopid" implied="false" onDeleteCascade="false" table="workshop"/>
         </column>
         <column autoUpdated="false" defaultValue="list" digits="0" id="2" name="layout" nullable="true" remarks="How should the rubric be displayed for reviewers" size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workrubrconf_wor_uix" unique="true">
            <column ascending="true" name="workshopid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="workshopform_rubric_levels" numRows="0" remarks="The definition of rubric rating scales" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="dimensionid" nullable="false" remarks="Which criterion this level is part of" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="mdl52er_erd" column="id" foreignKey="workrubrleve_dim2_fk" implied="false" onDeleteCascade="false" table="workshopform_rubric"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="5" id="2" name="grade" nullable="false" remarks="Grade representing this level." size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="definition" nullable="true" remarks="The definition of this level" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="definitionformat" nullable="true" remarks="The format of the definition field" size="5" type="SMALLINT" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="workrubrleve_dim_ix" unique="false">
            <column ascending="true" name="dimensionid"/>
         </index>
      </table>
      <table catalog="mdl52er_erd" name="xapi_states" numRows="0" remarks="The stored xAPI states" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="1" name="component" nullable="false" remarks="The component name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="userid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="itemid" nullable="false" remarks="The Agent Id (usually the plugin instance)" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="" digits="0" id="4" name="stateid" nullable="false" remarks="Component identified for the state data" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="statedata" nullable="true" remarks="JSON state data" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="registration" nullable="true" remarks="Optional registration identifier" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="timecreated" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="timemodified" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="xapistat_comite_ix" unique="false">
            <column ascending="true" name="component"/>
            <column ascending="true" name="itemid"/>
         </index>
         <index name="xapistat_tim_ix" unique="false">
            <column ascending="true" name="timemodified"/>
         </index>
         <index name="xapistat_use_ix" unique="false">
            <column ascending="true" name="userid"/>
         </index>
      </table>
   </tables>
</database>
