<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="admin/tool/driprelease/db" VERSION="20230214" COMMENT="XMLDB file for Moodle mod_driprelease"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="tool_driprelease" COMMENT="Stores the driprelease activity course instances.">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the course this activity is part of."/>
        <FIELD NAME="modtype" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" COMMENT="the module or other activity type"/>
        <FIELD NAME="schedulestart" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="datetime when activity becomes available"/>
        <FIELD NAME="schedulefinish" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="datetime when last set of activities will be available"/>
        <FIELD NAME="sessionlength" TYPE="int" LENGTH="10" NOTNULL="false" DEFAULT="1" SEQUENCE="false" COMMENT="Number of days over which to add new activiti/ies"/>
        <FIELD NAME="coursegroup" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" COMMENT="coursegroup to additionally restrict by"/>
        <FIELD NAME="activitiespersession" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="Activities per repeated session, e.g. 5 quizzes per week"/>
        <FIELD NAME="stayavailable" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false" COMMENT="Don't set a until value in restrictions. Activities will stay available at the end of sessions."/>
        <FIELD NAME="hideunselected" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false" COMMENT="If a course module is not selected then hide it."/>
        <FIELD NAME="resetunselected" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false" COMMENT="Clear the availability settings for any item not selected."/>
        <FIELD NAME="displaydisabled" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false" COMMENT="Where an item is not available, display it disabled, i.e. without a clickable link"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
        <KEY NAME="fk_course" TYPE="foreign" FIELDS="courseid" REFTABLE="course" REFFIELDS="id"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="tool_driprelease_cmids" COMMENT="When content will be available">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="driprelease" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="id of the driprelease"/>
        <FIELD NAME="coursemoduleid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="course module ids that have been selected"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
        <KEY NAME="tool_driprel_selections_driprel" TYPE="foreign" FIELDS="driprelease" REFTABLE="driprelease" REFFIELDS="id"/>
      </KEYS>
    </TABLE>
  </TABLES>
</XMLDB>
