-- Table structure for table `[[dbprefix]]external_services_users`
--

CREATE TABLE `[[dbprefix]]external_services_users` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `externalserviceid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `iprestriction` varchar(255) DEFAULT NULL,
  `validuntil` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]exteservuser_ext_ix` (`externalserviceid`),
  KEY `[[dbprefix]]exteservuser_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='users allowed to use services with restricted users flag' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]external_tokens`
--

CREATE TABLE `[[dbprefix]]external_tokens` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `token` varchar(128) NOT NULL DEFAULT '',
  `privatetoken` varchar(64) DEFAULT NULL,
  `tokentype` smallint(4) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `externalserviceid` bigint(10) NOT NULL,
  `sid` varchar(128) DEFAULT NULL,
  `contextid` bigint(10) NOT NULL,
  `creatorid` bigint(10) NOT NULL DEFAULT '1',
  `iprestriction` varchar(255) DEFAULT NULL,
  `validuntil` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `lastaccess` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]extetoke_tok_ix` (`token`),
  KEY `[[dbprefix]]extetoke_use_ix` (`userid`),
  KEY `[[dbprefix]]extetoke_ext_ix` (`externalserviceid`),
  KEY `[[dbprefix]]extetoke_con_ix` (`contextid`),
  KEY `[[dbprefix]]extetoke_cre_ix` (`creatorid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Security tokens for accessing of external services' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]favourite`
--

CREATE TABLE `[[dbprefix]]favourite` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `component` varchar(100) NOT NULL DEFAULT '',
  `itemtype` varchar(100) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `contextid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `ordering` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]favo_comiteiteconus_uix` (`component`,`itemtype`,`itemid`,`contextid`,`userid`),
  KEY `[[dbprefix]]favo_con_ix` (`contextid`),
  KEY `[[dbprefix]]favo_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the relationship between an arbitrary item (itemtype,' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback`
--

CREATE TABLE `[[dbprefix]]feedback` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `anonymous` tinyint(1) NOT NULL DEFAULT '1',
  `email_notification` tinyint(1) NOT NULL DEFAULT '1',
  `multiple_submit` tinyint(1) NOT NULL DEFAULT '1',
  `autonumbering` tinyint(1) NOT NULL DEFAULT '1',
  `site_after_submit` varchar(255) NOT NULL DEFAULT '',
  `page_after_submit` longtext NOT NULL,
  `page_after_submitformat` tinyint(2) NOT NULL DEFAULT '0',
  `publish_stats` tinyint(1) NOT NULL DEFAULT '0',
  `timeopen` bigint(10) NOT NULL DEFAULT '0',
  `timeclose` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `completionsubmit` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]feed_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='all feedbacks' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_completed`
--

CREATE TABLE `[[dbprefix]]feedback_completed` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedback` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `random_response` bigint(10) NOT NULL DEFAULT '0',
  `anonymous_response` tinyint(1) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]feedcomp_use_ix` (`userid`),
  KEY `[[dbprefix]]feedcomp_fee_ix` (`feedback`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='filled out feedback' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_completedtmp`
--

CREATE TABLE `[[dbprefix]]feedback_completedtmp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedback` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `guestid` varchar(255) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `random_response` bigint(10) NOT NULL DEFAULT '0',
  `anonymous_response` tinyint(1) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]feedcomp_use2_ix` (`userid`),
  KEY `[[dbprefix]]feedcomp_fee2_ix` (`feedback`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='filled out feedback' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_item`
--

CREATE TABLE `[[dbprefix]]feedback_item` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedback` bigint(10) NOT NULL DEFAULT '0',
  `template` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `label` varchar(255) NOT NULL DEFAULT '',
  `presentation` longtext NOT NULL,
  `typ` varchar(255) NOT NULL DEFAULT '',
  `hasvalue` tinyint(1) NOT NULL DEFAULT '0',
  `position` smallint(3) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `dependitem` bigint(10) NOT NULL DEFAULT '0',
  `dependvalue` varchar(255) NOT NULL DEFAULT '',
  `options` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]feeditem_fee_ix` (`feedback`),
  KEY `[[dbprefix]]feeditem_tem_ix` (`template`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='feedback_items' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_sitecourse_map`
--

CREATE TABLE `[[dbprefix]]feedback_sitecourse_map` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedbackid` bigint(10) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]feedsitemap_cou_ix` (`courseid`),
  KEY `[[dbprefix]]feedsitemap_fee_ix` (`feedbackid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='feedback sitecourse map' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_template`
--

CREATE TABLE `[[dbprefix]]feedback_template` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `ispublic` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]feedtemp_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='templates of feedbackstructures' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_value`
--

CREATE TABLE `[[dbprefix]]feedback_value` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course_id` bigint(10) NOT NULL DEFAULT '0',
  `item` bigint(10) NOT NULL DEFAULT '0',
  `completed` bigint(10) NOT NULL DEFAULT '0',
  `tmp_completed` bigint(10) NOT NULL DEFAULT '0',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]feedvalu_comitecou_uix` (`completed`,`item`,`course_id`),
  KEY `[[dbprefix]]feedvalu_cou_ix` (`course_id`),
  KEY `[[dbprefix]]feedvalu_ite_ix` (`item`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='values of the completeds' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]feedback_valuetmp`
--

CREATE TABLE `[[dbprefix]]feedback_valuetmp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course_id` bigint(10) NOT NULL DEFAULT '0',
  `item` bigint(10) NOT NULL DEFAULT '0',
  `completed` bigint(10) NOT NULL DEFAULT '0',
  `tmp_completed` bigint(10) NOT NULL DEFAULT '0',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]feedvalu_comitecou2_uix` (`completed`,`item`,`course_id`),
  KEY `[[dbprefix]]feedvalu_cou2_ix` (`course_id`),
  KEY `[[dbprefix]]feedvalu_ite2_ix` (`item`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='values of the completedstmp' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]files`
--

CREATE TABLE `[[dbprefix]]files` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contenthash` varchar(40) NOT NULL DEFAULT '',
  `pathnamehash` varchar(40) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `filearea` varchar(50) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `filepath` varchar(255) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `userid` bigint(10) DEFAULT NULL,
  `filesize` bigint(10) NOT NULL,
  `mimetype` varchar(100) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `source` longtext,
  `author` varchar(255) DEFAULT NULL,
  `license` varchar(255) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `referencefileid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]file_pat_uix` (`pathnamehash`),
  KEY `[[dbprefix]]file_comfilconite_ix` (`component`,`filearea`,`contextid`,`itemid`),
  KEY `[[dbprefix]]file_con_ix` (`contenthash`),
  KEY `[[dbprefix]]file_lic_ix` (`license`),
  KEY `[[dbprefix]]file_con2_ix` (`contextid`),
  KEY `[[dbprefix]]file_use_ix` (`userid`),
  KEY `[[dbprefix]]file_ref_ix` (`referencefileid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='description of files, content is stored in sha1 file pool' AUTO_INCREMENT=6 ;

--
-- Dumping data for table `[[dbprefix]]files`
--

INSERT INTO `[[dbprefix]]files` VALUES
(1, '5f8e911d0da441e36f47c5c46f4393269211ca56', '508e674d49c30d4fde325fe6c7f6fd3d56b247e1', 1, 'assignfeedback_editpdf', 'stamps', 0, '/', 'smile.png', 2, 1085, 'image/png', 0, NULL, NULL, NULL, [[timestamp]], [[timestamp]], 0, NULL),
(2, 'da39a3ee5e6b4b0d3255bfef95601890afd80709', '70b7cdade7b4e27d4e83f0cdaad10d6a3c0cccb5', 1, 'assignfeedback_editpdf', 'stamps', 0, '/', '.', 2, 0, NULL, 0, NULL, NULL, NULL, [[timestamp]], [[timestamp]], 0, NULL),
(3, '75c101cb8cb34ea573cd25ac38f8157b1de901b8', '68317eab56c67d32aeaee5acf509a0c4aa828b6b', 1, 'assignfeedback_editpdf', 'stamps', 0, '/', 'sad.png', 2, 966, 'image/png', 0, NULL, NULL, NULL, [[timestamp]], [[timestamp]], 0, NULL),
(4, '0c5190a24c3943966541401c883eacaa20ca20cb', '695a55ff780e61c9e59428aa425430b0d6bde53b', 1, 'assignfeedback_editpdf', 'stamps', 0, '/', 'tick.png', 2, 1039, 'image/png', 0, NULL, NULL, NULL, [[timestamp]], [[timestamp]], 0, NULL),
(5, '8c96a486d5801e0f4ab8c411f561f1c687e1f865', '373e63af262a9b8466ba8632551520be793c37ff', 1, 'assignfeedback_editpdf', 'stamps', 0, '/', 'cross.png', 2, 861, 'image/png', 0, NULL, NULL, NULL, [[timestamp]], [[timestamp]], 0, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]files_reference`
--

CREATE TABLE `[[dbprefix]]files_reference` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `repositoryid` bigint(10) NOT NULL,
  `lastsync` bigint(10) DEFAULT NULL,
  `reference` longtext,
  `referencehash` varchar(40) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]filerefe_refrep_uix` (`referencehash`,`repositoryid`),
  KEY `[[dbprefix]]filerefe_rep_ix` (`repositoryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Store files references' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]file_conversion`
--

CREATE TABLE `[[dbprefix]]file_conversion` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `usermodified` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `sourcefileid` bigint(10) NOT NULL,
  `targetformat` varchar(100) NOT NULL DEFAULT '',
  `status` bigint(10) DEFAULT '0',
  `statusmessage` longtext,
  `converter` varchar(255) DEFAULT NULL,
  `destfileid` bigint(10) DEFAULT NULL,
  `data` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]fileconv_sou_ix` (`sourcefileid`),
  KEY `[[dbprefix]]fileconv_des_ix` (`destfileid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Table to track file conversions.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]filter_active`
--

CREATE TABLE `[[dbprefix]]filter_active` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `active` smallint(4) NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]filtacti_confil_uix` (`contextid`,`filter`),
  KEY `[[dbprefix]]filtacti_con_ix` (`contextid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores information about which filters are active in which c' AUTO_INCREMENT=7 ;

--
-- Dumping data for table `[[dbprefix]]filter_active`
--

INSERT INTO `[[dbprefix]]filter_active` VALUES
(1, 'activitynames', 1, 1, 2),
(2, 'displayh5p', 1, 1, 1),
(3, 'emoticon', 1, 1, 4),
(4, 'mathjaxloader', 1, 1, 3),
(5, 'mediaplugin', 1, 1, 6),
(6, 'urltolink', 1, 1, 5);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]filter_config`
--

CREATE TABLE `[[dbprefix]]filter_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]filtconf_confilnam_uix` (`contextid`,`filter`,`name`),
  KEY `[[dbprefix]]filtconf_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores per-context configuration settings for filters which ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]folder`
--

CREATE TABLE `[[dbprefix]]folder` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `revision` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `display` smallint(4) NOT NULL DEFAULT '0',
  `showexpanded` tinyint(1) NOT NULL DEFAULT '1',
  `showdownloadfolder` tinyint(1) NOT NULL DEFAULT '1',
  `forcedownload` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]fold_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='each record is one folder resource' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum`
--

CREATE TABLE `[[dbprefix]]forum` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `type` varchar(20) NOT NULL DEFAULT 'general',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `duedate` bigint(10) NOT NULL DEFAULT '0',
  `cutoffdate` bigint(10) NOT NULL DEFAULT '0',
  `assessed` bigint(10) NOT NULL DEFAULT '0',
  `assesstimestart` bigint(10) NOT NULL DEFAULT '0',
  `assesstimefinish` bigint(10) NOT NULL DEFAULT '0',
  `scale` bigint(10) NOT NULL DEFAULT '0',
  `grade_forum` bigint(10) NOT NULL DEFAULT '0',
  `grade_forum_notify` smallint(4) NOT NULL DEFAULT '0',
  `maxbytes` bigint(10) NOT NULL DEFAULT '0',
  `maxattachments` bigint(10) NOT NULL DEFAULT '1',
  `forcesubscribe` tinyint(1) NOT NULL DEFAULT '0',
  `trackingtype` tinyint(2) NOT NULL DEFAULT '1',
  `rsstype` tinyint(2) NOT NULL DEFAULT '0',
  `rssarticles` tinyint(2) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `warnafter` bigint(10) NOT NULL DEFAULT '0',
  `blockafter` bigint(10) NOT NULL DEFAULT '0',
  `blockperiod` bigint(10) NOT NULL DEFAULT '0',
  `completiondiscussions` int(9) NOT NULL DEFAULT '0',
  `completionreplies` int(9) NOT NULL DEFAULT '0',
  `completionposts` int(9) NOT NULL DEFAULT '0',
  `displaywordcount` tinyint(1) NOT NULL DEFAULT '0',
  `lockdiscussionafter` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]foru_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Forums contain and structure discussion' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_digests`
--

CREATE TABLE `[[dbprefix]]forum_digests` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `forum` bigint(10) NOT NULL,
  `maildigest` tinyint(1) NOT NULL DEFAULT '-1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]forudige_forusemai_uix` (`forum`,`userid`,`maildigest`),
  KEY `[[dbprefix]]forudige_use_ix` (`userid`),
  KEY `[[dbprefix]]forudige_for_ix` (`forum`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Keeps track of user mail delivery preferences for each forum' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_discussions`
--

CREATE TABLE `[[dbprefix]]forum_discussions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `forum` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `firstpost` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '-1',
  `assessed` tinyint(1) NOT NULL DEFAULT '1',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `usermodified` bigint(10) NOT NULL DEFAULT '0',
  `timestart` bigint(10) NOT NULL DEFAULT '0',
  `timeend` bigint(10) NOT NULL DEFAULT '0',
  `pinned` tinyint(1) NOT NULL DEFAULT '0',
  `timelocked` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]forudisc_use_ix` (`userid`),
  KEY `[[dbprefix]]forudisc_cou_ix` (`course`),
  KEY `[[dbprefix]]forudisc_for_ix` (`forum`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Forums are composed of discussions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_discussion_subs`
--

CREATE TABLE `[[dbprefix]]forum_discussion_subs` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `forum` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `discussion` bigint(10) NOT NULL,
  `preference` bigint(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]forudiscsubs_usedis_uix` (`userid`,`discussion`),
  KEY `[[dbprefix]]forudiscsubs_for_ix` (`forum`),
  KEY `[[dbprefix]]forudiscsubs_use_ix` (`userid`),
  KEY `[[dbprefix]]forudiscsubs_dis_ix` (`discussion`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Users may choose to subscribe and unsubscribe from specific ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_grades`
--

CREATE TABLE `[[dbprefix]]forum_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `forum` bigint(10) NOT NULL,
  `itemnumber` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `grade` decimal(10,5) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]forugrad_foriteuse_uix` (`forum`,`itemnumber`,`userid`),
  KEY `[[dbprefix]]forugrad_use_ix` (`userid`),
  KEY `[[dbprefix]]forugrad_for_ix` (`forum`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Grading data for forum instances' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_posts`
--

CREATE TABLE `[[dbprefix]]forum_posts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `discussion` bigint(10) NOT NULL DEFAULT '0',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `created` bigint(10) NOT NULL DEFAULT '0',
  `modified` bigint(10) NOT NULL DEFAULT '0',
  `mailed` tinyint(2) NOT NULL DEFAULT '0',
  `subject` varchar(255) NOT NULL DEFAULT '',
  `message` longtext NOT NULL,
  `messageformat` tinyint(2) NOT NULL DEFAULT '0',
  `messagetrust` tinyint(2) NOT NULL DEFAULT '0',
  `attachment` varchar(100) NOT NULL DEFAULT '',
  `totalscore` smallint(4) NOT NULL DEFAULT '0',
  `mailnow` bigint(10) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `privatereplyto` bigint(10) NOT NULL DEFAULT '0',
  `wordcount` bigint(20) DEFAULT NULL,
  `charcount` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]forupost_use_ix` (`userid`),
  KEY `[[dbprefix]]forupost_cre_ix` (`created`),
  KEY `[[dbprefix]]forupost_mai_ix` (`mailed`),
  KEY `[[dbprefix]]forupost_pri_ix` (`privatereplyto`),
  KEY `[[dbprefix]]forupost_dis_ix` (`discussion`),
  KEY `[[dbprefix]]forupost_par_ix` (`parent`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='All posts are stored in this table' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_queue`
--

CREATE TABLE `[[dbprefix]]forum_queue` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `discussionid` bigint(10) NOT NULL DEFAULT '0',
  `postid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]foruqueu_use_ix` (`userid`),
  KEY `[[dbprefix]]foruqueu_dis_ix` (`discussionid`),
  KEY `[[dbprefix]]foruqueu_pos_ix` (`postid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='For keeping track of posts that will be mailed in digest for' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_read`
--

CREATE TABLE `[[dbprefix]]forum_read` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `forumid` bigint(10) NOT NULL DEFAULT '0',
  `discussionid` bigint(10) NOT NULL DEFAULT '0',
  `postid` bigint(10) NOT NULL DEFAULT '0',
  `firstread` bigint(10) NOT NULL DEFAULT '0',
  `lastread` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]foruread_usefor_ix` (`userid`,`forumid`),
  KEY `[[dbprefix]]foruread_usedis_ix` (`userid`,`discussionid`),
  KEY `[[dbprefix]]foruread_posuse_ix` (`postid`,`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Tracks each users read posts' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_subscriptions`
--

CREATE TABLE `[[dbprefix]]forum_subscriptions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `forum` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]forusubs_usefor_uix` (`userid`,`forum`),
  KEY `[[dbprefix]]forusubs_use_ix` (`userid`),
  KEY `[[dbprefix]]forusubs_for_ix` (`forum`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Keeps track of who is subscribed to what forum' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]forum_track_prefs`
--

CREATE TABLE `[[dbprefix]]forum_track_prefs` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `forumid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]forutracpref_usefor_ix` (`userid`,`forumid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Tracks each users untracked forums' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]glossary`
--

CREATE TABLE `[[dbprefix]]glossary` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `allowduplicatedentries` tinyint(2) NOT NULL DEFAULT '0',
  `displayformat` varchar(50) NOT NULL DEFAULT 'dictionary',
  `mainglossary` tinyint(2) NOT NULL DEFAULT '0',
  `showspecial` tinyint(2) NOT NULL DEFAULT '1',
  `showalphabet` tinyint(2) NOT NULL DEFAULT '1',
  `showall` tinyint(2) NOT NULL DEFAULT '1',
  `allowcomments` tinyint(2) NOT NULL DEFAULT '0',
  `allowprintview` tinyint(2) NOT NULL DEFAULT '1',
  `usedynalink` tinyint(2) NOT NULL DEFAULT '1',
  `defaultapproval` tinyint(2) NOT NULL DEFAULT '1',
  `approvaldisplayformat` varchar(50) NOT NULL DEFAULT 'default',
  `globalglossary` tinyint(2) NOT NULL DEFAULT '0',
  `entbypage` smallint(3) NOT NULL DEFAULT '10',
  `editalways` tinyint(2) NOT NULL DEFAULT '0',
  `rsstype` tinyint(2) NOT NULL DEFAULT '0',
  `rssarticles` tinyint(2) NOT NULL DEFAULT '0',
  `assessed` bigint(10) NOT NULL DEFAULT '0',
  `assesstimestart` bigint(10) NOT NULL DEFAULT '0',
  `assesstimefinish` bigint(10) NOT NULL DEFAULT '0',
  `scale` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `completionentries` int(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]glos_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='all glossaries' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]glossary_alias`
--

CREATE TABLE `[[dbprefix]]glossary_alias` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `entryid` bigint(10) NOT NULL DEFAULT '0',
  `alias` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]glosalia_ent_ix` (`entryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='entries alias' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]glossary_categories`
--

CREATE TABLE `[[dbprefix]]glossary_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `glossaryid` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `usedynalink` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gloscate_glo_ix` (`glossaryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='all categories for glossary entries' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]glossary_entries`
--

CREATE TABLE `[[dbprefix]]glossary_entries` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `glossaryid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `concept` varchar(255) NOT NULL DEFAULT '',
  `definition` longtext NOT NULL,
  `definitionformat` tinyint(2) NOT NULL DEFAULT '0',
  `definitiontrust` tinyint(2) NOT NULL DEFAULT '0',
  `attachment` varchar(100) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `teacherentry` tinyint(2) NOT NULL DEFAULT '0',
  `sourceglossaryid` bigint(10) NOT NULL DEFAULT '0',
  `usedynalink` tinyint(2) NOT NULL DEFAULT '1',
  `casesensitive` tinyint(2) NOT NULL DEFAULT '0',
  `fullmatch` tinyint(2) NOT NULL DEFAULT '1',
  `approved` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]glosentr_use_ix` (`userid`),
  KEY `[[dbprefix]]glosentr_con_ix` (`concept`),
  KEY `[[dbprefix]]glosentr_glo_ix` (`glossaryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='all glossary entries' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]glossary_entries_categories`
--

CREATE TABLE `[[dbprefix]]glossary_entries_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `categoryid` bigint(10) NOT NULL DEFAULT '0',
  `entryid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]glosentrcate_cat_ix` (`categoryid`),
  KEY `[[dbprefix]]glosentrcate_ent_ix` (`entryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='categories of each glossary entry' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]glossary_formats`
--

CREATE TABLE `[[dbprefix]]glossary_formats` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `popupformatname` varchar(50) NOT NULL DEFAULT '',
  `visible` tinyint(2) NOT NULL DEFAULT '1',
  `showgroup` tinyint(2) NOT NULL DEFAULT '1',
  `showtabs` varchar(100) DEFAULT NULL,
  `defaultmode` varchar(50) NOT NULL DEFAULT '',
  `defaulthook` varchar(50) NOT NULL DEFAULT '',
  `sortkey` varchar(50) NOT NULL DEFAULT '',
  `sortorder` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Setting of the display formats' AUTO_INCREMENT=8 ;

--
-- Dumping data for table `[[dbprefix]]glossary_formats`
--

INSERT INTO `[[dbprefix]]glossary_formats` VALUES
(1, 'continuous', 'continuous', 1, 1, 'standard,category,date', '', '', '', ''),
(2, 'dictionary', 'dictionary', 1, 1, 'standard', '', '', '', ''),
(3, 'encyclopedia', 'encyclopedia', 1, 1, 'standard,category,date,author', '', '', '', ''),
(4, 'entrylist', 'entrylist', 1, 1, 'standard,category,date,author', '', '', '', ''),
(5, 'faq', 'faq', 1, 1, 'standard,category,date,author', '', '', '', ''),
(6, 'fullwithauthor', 'fullwithauthor', 1, 1, 'standard,category,date,author', '', '', '', ''),
(7, 'fullwithoutauthor', 'fullwithoutauthor', 1, 1, 'standard,category,date', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_categories`
--

CREATE TABLE `[[dbprefix]]grade_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `parent` bigint(10) DEFAULT NULL,
  `depth` bigint(10) NOT NULL DEFAULT '0',
  `path` varchar(255) DEFAULT NULL,
  `fullname` varchar(255) NOT NULL DEFAULT '',
  `aggregation` bigint(10) NOT NULL DEFAULT '0',
  `keephigh` bigint(10) NOT NULL DEFAULT '0',
  `droplow` bigint(10) NOT NULL DEFAULT '0',
  `aggregateonlygraded` tinyint(1) NOT NULL DEFAULT '0',
  `aggregateoutcomes` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradcate_cou_ix` (`courseid`),
  KEY `[[dbprefix]]gradcate_par_ix` (`parent`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table keeps information about categories, used for grou' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_categories_history`
--

CREATE TABLE `[[dbprefix]]grade_categories_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) NOT NULL,
  `parent` bigint(10) DEFAULT NULL,
  `depth` bigint(10) NOT NULL DEFAULT '0',
  `path` varchar(255) DEFAULT NULL,
  `fullname` varchar(255) NOT NULL DEFAULT '',
  `aggregation` bigint(10) NOT NULL DEFAULT '0',
  `keephigh` bigint(10) NOT NULL DEFAULT '0',
  `droplow` bigint(10) NOT NULL DEFAULT '0',
  `aggregateonlygraded` tinyint(1) NOT NULL DEFAULT '0',
  `aggregateoutcomes` tinyint(1) NOT NULL DEFAULT '0',
  `aggregatesubcats` tinyint(1) NOT NULL DEFAULT '0',
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradcatehist_act_ix` (`action`),
  KEY `[[dbprefix]]gradcatehist_tim_ix` (`timemodified`),
  KEY `[[dbprefix]]gradcatehist_old_ix` (`oldid`),
  KEY `[[dbprefix]]gradcatehist_cou_ix` (`courseid`),
  KEY `[[dbprefix]]gradcatehist_par_ix` (`parent`),
  KEY `[[dbprefix]]gradcatehist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='History of grade_categories' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_grades`
--

CREATE TABLE `[[dbprefix]]grade_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `itemid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `rawgrademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `rawgrademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `rawscaleid` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `exported` bigint(10) NOT NULL DEFAULT '0',
  `overridden` bigint(10) NOT NULL DEFAULT '0',
  `excluded` bigint(10) NOT NULL DEFAULT '0',
  `feedback` longtext,
  `feedbackformat` bigint(10) NOT NULL DEFAULT '0',
  `information` longtext,
  `informationformat` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `aggregationstatus` varchar(10) NOT NULL DEFAULT 'unknown',
  `aggregationweight` decimal(10,5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradgrad_useite_uix` (`userid`,`itemid`),
  KEY `[[dbprefix]]gradgrad_locloc_ix` (`locked`,`locktime`),
  KEY `[[dbprefix]]gradgrad_ite_ix` (`itemid`),
  KEY `[[dbprefix]]gradgrad_use_ix` (`userid`),
  KEY `[[dbprefix]]gradgrad_raw_ix` (`rawscaleid`),
  KEY `[[dbprefix]]gradgrad_use2_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='grade_grades  This table keeps individual grades for each us' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_grades_history`
--

CREATE TABLE `[[dbprefix]]grade_grades_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `itemid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `rawgrademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `rawgrademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `rawscaleid` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `exported` bigint(10) NOT NULL DEFAULT '0',
  `overridden` bigint(10) NOT NULL DEFAULT '0',
  `excluded` bigint(10) NOT NULL DEFAULT '0',
  `feedback` longtext,
  `feedbackformat` bigint(10) NOT NULL DEFAULT '0',
  `information` longtext,
  `informationformat` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradgradhist_act_ix` (`action`),
  KEY `[[dbprefix]]gradgradhist_tim_ix` (`timemodified`),
  KEY `[[dbprefix]]gradgradhist_useitet_ix` (`userid`,`itemid`,`timemodified`),
  KEY `[[dbprefix]]gradgradhist_old_ix` (`oldid`),
  KEY `[[dbprefix]]gradgradhist_ite_ix` (`itemid`),
  KEY `[[dbprefix]]gradgradhist_use_ix` (`userid`),
  KEY `[[dbprefix]]gradgradhist_raw_ix` (`rawscaleid`),
  KEY `[[dbprefix]]gradgradhist_use2_ix` (`usermodified`),
  KEY `[[dbprefix]]gradgradhist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='History table' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_import_newitem`
--

CREATE TABLE `[[dbprefix]]grade_import_newitem` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `itemname` varchar(255) NOT NULL DEFAULT '',
  `importcode` bigint(10) NOT NULL,
  `importer` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradimponewi_imp_ix` (`importer`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='temporary table for storing new grade_item names from grade ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_import_values`
--

CREATE TABLE `[[dbprefix]]grade_import_values` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `itemid` bigint(10) DEFAULT NULL,
  `newgradeitem` bigint(10) DEFAULT NULL,
  `userid` bigint(10) NOT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `feedback` longtext,
  `importcode` bigint(10) NOT NULL,
  `importer` bigint(10) DEFAULT NULL,
  `importonlyfeedback` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradimpovalu_ite_ix` (`itemid`),
  KEY `[[dbprefix]]gradimpovalu_new_ix` (`newgradeitem`),
  KEY `[[dbprefix]]gradimpovalu_imp_ix` (`importer`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Temporary table for importing grades' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_items`
--

CREATE TABLE `[[dbprefix]]grade_items` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) DEFAULT NULL,
  `categoryid` bigint(10) DEFAULT NULL,
  `itemname` varchar(255) DEFAULT NULL,
  `itemtype` varchar(30) NOT NULL DEFAULT '',
  `itemmodule` varchar(30) DEFAULT NULL,
  `iteminstance` bigint(10) DEFAULT NULL,
  `itemnumber` bigint(10) DEFAULT NULL,
  `iteminfo` longtext,
  `idnumber` varchar(255) DEFAULT NULL,
  `calculation` longtext,
  `gradetype` smallint(4) NOT NULL DEFAULT '1',
  `grademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `grademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `scaleid` bigint(10) DEFAULT NULL,
  `outcomeid` bigint(10) DEFAULT NULL,
  `gradepass` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `multfactor` decimal(10,5) NOT NULL DEFAULT '1.00000',
  `plusfactor` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef2` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `display` bigint(10) NOT NULL DEFAULT '0',
  `decimals` tinyint(1) DEFAULT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `needsupdate` bigint(10) NOT NULL DEFAULT '0',
  `weightoverride` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]graditem_locloc_ix` (`locked`,`locktime`),
  KEY `[[dbprefix]]graditem_itenee_ix` (`itemtype`,`needsupdate`),
  KEY `[[dbprefix]]graditem_gra_ix` (`gradetype`),
  KEY `[[dbprefix]]graditem_idncou_ix` (`idnumber`,`courseid`),
  KEY `[[dbprefix]]graditem_cou_ix` (`courseid`),
  KEY `[[dbprefix]]graditem_cat_ix` (`categoryid`),
  KEY `[[dbprefix]]graditem_sca_ix` (`scaleid`),
  KEY `[[dbprefix]]graditem_out_ix` (`outcomeid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table keeps information about gradeable items (ie colum' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_items_history`
--

CREATE TABLE `[[dbprefix]]grade_items_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `categoryid` bigint(10) DEFAULT NULL,
  `itemname` varchar(255) DEFAULT NULL,
  `itemtype` varchar(30) NOT NULL DEFAULT '',
  `itemmodule` varchar(30) DEFAULT NULL,
  `iteminstance` bigint(10) DEFAULT NULL,
  `itemnumber` bigint(10) DEFAULT NULL,
  `iteminfo` longtext,
  `idnumber` varchar(255) DEFAULT NULL,
  `calculation` longtext,
  `gradetype` smallint(4) NOT NULL DEFAULT '1',
  `grademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `grademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `scaleid` bigint(10) DEFAULT NULL,
  `outcomeid` bigint(10) DEFAULT NULL,
  `gradepass` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `multfactor` decimal(10,5) NOT NULL DEFAULT '1.00000',
  `plusfactor` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef2` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `needsupdate` bigint(10) NOT NULL DEFAULT '0',
  `display` bigint(10) NOT NULL DEFAULT '0',
  `decimals` tinyint(1) DEFAULT NULL,
  `weightoverride` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]graditemhist_act_ix` (`action`),
  KEY `[[dbprefix]]graditemhist_tim_ix` (`timemodified`),
  KEY `[[dbprefix]]graditemhist_old_ix` (`oldid`),
  KEY `[[dbprefix]]graditemhist_cou_ix` (`courseid`),
  KEY `[[dbprefix]]graditemhist_cat_ix` (`categoryid`),
  KEY `[[dbprefix]]graditemhist_sca_ix` (`scaleid`),
  KEY `[[dbprefix]]graditemhist_out_ix` (`outcomeid`),
  KEY `[[dbprefix]]graditemhist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='History of grade_items' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_letters`
--

CREATE TABLE `[[dbprefix]]grade_letters` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `lowerboundary` decimal(10,5) NOT NULL,
  `letter` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradlett_conlowlet_uix` (`contextid`,`lowerboundary`,`letter`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Repository for grade letters, for courses and other moodle e' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_outcomes`
--

CREATE TABLE `[[dbprefix]]grade_outcomes` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) DEFAULT NULL,
  `shortname` varchar(255) NOT NULL DEFAULT '',
  `fullname` longtext NOT NULL,
  `scaleid` bigint(10) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradoutc_cousho_uix` (`courseid`,`shortname`),
  KEY `[[dbprefix]]gradoutc_cou_ix` (`courseid`),
  KEY `[[dbprefix]]gradoutc_sca_ix` (`scaleid`),
  KEY `[[dbprefix]]gradoutc_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table describes the outcomes used in the system. An out' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_outcomes_courses`
--

CREATE TABLE `[[dbprefix]]grade_outcomes_courses` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `outcomeid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradoutccour_couout_uix` (`courseid`,`outcomeid`),
  KEY `[[dbprefix]]gradoutccour_cou_ix` (`courseid`),
  KEY `[[dbprefix]]gradoutccour_out_ix` (`outcomeid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='stores what outcomes are used in what courses.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_outcomes_history`
--

CREATE TABLE `[[dbprefix]]grade_outcomes_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `shortname` varchar(255) NOT NULL DEFAULT '',
  `fullname` longtext NOT NULL,
  `scaleid` bigint(10) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradoutchist_act_ix` (`action`),
  KEY `[[dbprefix]]gradoutchist_tim_ix` (`timemodified`),
  KEY `[[dbprefix]]gradoutchist_old_ix` (`oldid`),
  KEY `[[dbprefix]]gradoutchist_cou_ix` (`courseid`),
  KEY `[[dbprefix]]gradoutchist_sca_ix` (`scaleid`),
  KEY `[[dbprefix]]gradoutchist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='History table' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grade_settings`
--

CREATE TABLE `[[dbprefix]]grade_settings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradsett_counam_uix` (`courseid`,`name`),
  KEY `[[dbprefix]]gradsett_cou_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='gradebook settings' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]gradingform_guide_comments`
--

CREATE TABLE `[[dbprefix]]gradingform_guide_comments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradguidcomm_def_ix` (`definitionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='frequently used comments used in marking guide' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]gradingform_guide_criteria`
--

CREATE TABLE `[[dbprefix]]gradingform_guide_criteria` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `shortname` varchar(255) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  `descriptionmarkers` longtext,
  `descriptionmarkersformat` tinyint(2) DEFAULT NULL,
  `maxscore` decimal(10,5) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradguidcrit_def_ix` (`definitionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the rows of the criteria grid.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]gradingform_guide_fillings`
--

CREATE TABLE `[[dbprefix]]gradingform_guide_fillings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instanceid` bigint(10) NOT NULL,
  `criterionid` bigint(10) NOT NULL,
  `remark` longtext,
  `remarkformat` tinyint(2) DEFAULT NULL,
  `score` decimal(10,5) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradguidfill_inscri_uix` (`instanceid`,`criterionid`),
  KEY `[[dbprefix]]gradguidfill_ins_ix` (`instanceid`),
  KEY `[[dbprefix]]gradguidfill_cri_ix` (`criterionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the data of how the guide is filled by a particular r' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]gradingform_rubric_criteria`
--

CREATE TABLE `[[dbprefix]]gradingform_rubric_criteria` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradrubrcrit_def_ix` (`definitionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the rows of the rubric grid.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]gradingform_rubric_fillings`
--

CREATE TABLE `[[dbprefix]]gradingform_rubric_fillings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instanceid` bigint(10) NOT NULL,
  `criterionid` bigint(10) NOT NULL,
  `levelid` bigint(10) DEFAULT NULL,
  `remark` longtext,
  `remarkformat` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradrubrfill_inscri_uix` (`instanceid`,`criterionid`),
  KEY `[[dbprefix]]gradrubrfill_lev_ix` (`levelid`),
  KEY `[[dbprefix]]gradrubrfill_ins_ix` (`instanceid`),
  KEY `[[dbprefix]]gradrubrfill_cri_ix` (`criterionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the data of how the rubric is filled by a particular ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]gradingform_rubric_levels`
--

CREATE TABLE `[[dbprefix]]gradingform_rubric_levels` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `criterionid` bigint(10) NOT NULL,
  `score` decimal(10,5) NOT NULL,
  `definition` longtext,
  `definitionformat` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradrubrleve_cri_ix` (`criterionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the columns of the rubric grid.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grading_areas`
--

CREATE TABLE `[[dbprefix]]grading_areas` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `areaname` varchar(100) NOT NULL DEFAULT '',
  `activemethod` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]gradarea_concomare_uix` (`contextid`,`component`,`areaname`),
  KEY `[[dbprefix]]gradarea_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Identifies gradable areas where advanced grading can happen.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grading_definitions`
--

CREATE TABLE `[[dbprefix]]grading_definitions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `areaid` bigint(10) NOT NULL,
  `method` varchar(100) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `copiedfromid` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `usercreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `timecopied` bigint(10) DEFAULT '0',
  `options` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]graddefi_aremet_uix` (`areaid`,`method`),
  KEY `[[dbprefix]]graddefi_are_ix` (`areaid`),
  KEY `[[dbprefix]]graddefi_use_ix` (`usermodified`),
  KEY `[[dbprefix]]graddefi_use2_ix` (`usercreated`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Contains the basic information about an advanced grading for' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]grading_instances`
--

CREATE TABLE `[[dbprefix]]grading_instances` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `raterid` bigint(10) NOT NULL,
  `itemid` bigint(10) DEFAULT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `feedback` longtext,
  `feedbackformat` tinyint(2) DEFAULT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradinst_def_ix` (`definitionid`),
  KEY `[[dbprefix]]gradinst_rat_ix` (`raterid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Grading form instance is an assessment record for one gradab' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]groupings`
--

CREATE TABLE `[[dbprefix]]groupings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `idnumber` varchar(100) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `configdata` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]grou_idn2_ix` (`idnumber`),
  KEY `[[dbprefix]]grou_cou2_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='A grouping is a collection of groups. WAS: groups_groupings' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]groupings_groups`
--

CREATE TABLE `[[dbprefix]]groupings_groups` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `groupingid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `timeadded` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]grougrou_gro_ix` (`groupingid`),
  KEY `[[dbprefix]]grougrou_gro2_ix` (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Link a grouping to a group (note, groups can be in multiple ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]groups`
--

CREATE TABLE `[[dbprefix]]groups` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `idnumber` varchar(100) NOT NULL DEFAULT '',
  `name` varchar(254) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `enrolmentkey` varchar(50) DEFAULT NULL,
  `picture` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]grou_idn_ix` (`idnumber`),
  KEY `[[dbprefix]]grou_cou_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each record represents a group.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]groups_members`
--

CREATE TABLE `[[dbprefix]]groups_members` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timeadded` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]groumemb_usegro_uix` (`userid`,`groupid`),
  KEY `[[dbprefix]]groumemb_gro_ix` (`groupid`),
  KEY `[[dbprefix]]groumemb_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Link a user to a group.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5p`
--

CREATE TABLE `[[dbprefix]]h5p` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `jsoncontent` longtext NOT NULL,
  `mainlibraryid` bigint(10) NOT NULL,
  `displayoptions` smallint(4) DEFAULT NULL,
  `pathnamehash` varchar(40) NOT NULL DEFAULT '',
  `contenthash` varchar(40) NOT NULL DEFAULT '',
  `filtered` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5p_pat_ix` (`pathnamehash`),
  KEY `[[dbprefix]]h5p_mai_ix` (`mainlibraryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores H5P content information' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5pactivity`
--

CREATE TABLE `[[dbprefix]]h5pactivity` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `grade` bigint(10) DEFAULT '0',
  `displayoptions` smallint(4) NOT NULL DEFAULT '0',
  `enabletracking` tinyint(1) NOT NULL DEFAULT '1',
  `grademethod` smallint(4) NOT NULL DEFAULT '1',
  `reviewmode` smallint(4) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5pa_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the h5pactivity activity module instances.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5pactivity_attempts`
--

CREATE TABLE `[[dbprefix]]h5pactivity_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `h5pactivityid` bigint(10) NOT NULL,
  `userid` bigint(20) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `attempt` mediumint(6) NOT NULL DEFAULT '1',
  `rawscore` bigint(10) DEFAULT '0',
  `maxscore` bigint(10) DEFAULT '0',
  `scaled` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `duration` bigint(10) DEFAULT '0',
  `completion` tinyint(1) DEFAULT NULL,
  `success` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]h5paatte_h5puseatt_uix` (`h5pactivityid`,`userid`,`attempt`),
  KEY `[[dbprefix]]h5paatte_tim_ix` (`timecreated`),
  KEY `[[dbprefix]]h5paatte_h5ptim_ix` (`h5pactivityid`,`timecreated`),
  KEY `[[dbprefix]]h5paatte_h5puse_ix` (`h5pactivityid`,`userid`),
  KEY `[[dbprefix]]h5paatte_h5p_ix` (`h5pactivityid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Users attempts inside H5P activities' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5pactivity_attempts_results`
--

CREATE TABLE `[[dbprefix]]h5pactivity_attempts_results` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `attemptid` bigint(10) NOT NULL,
  `subcontent` varchar(128) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `interactiontype` varchar(128) DEFAULT NULL,
  `description` longtext,
  `correctpattern` longtext,
  `response` longtext NOT NULL,
  `additionals` longtext,
  `rawscore` bigint(10) NOT NULL DEFAULT '0',
  `maxscore` bigint(10) NOT NULL DEFAULT '0',
  `duration` bigint(10) DEFAULT '0',
  `completion` tinyint(1) DEFAULT NULL,
  `success` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5paatteresu_atttim_ix` (`attemptid`,`timecreated`),
  KEY `[[dbprefix]]h5paatteresu_att_ix` (`attemptid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='H5Pactivities_attempts tracking info' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5p_contents_libraries`
--

CREATE TABLE `[[dbprefix]]h5p_contents_libraries` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `h5pid` bigint(10) NOT NULL,
  `libraryid` bigint(10) NOT NULL,
  `dependencytype` varchar(10) NOT NULL DEFAULT '',
  `dropcss` tinyint(1) NOT NULL,
  `weight` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5pcontlibr_h5p_ix` (`h5pid`),
  KEY `[[dbprefix]]h5pcontlibr_lib_ix` (`libraryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Store which library is used in which content.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5p_libraries`
--

CREATE TABLE `[[dbprefix]]h5p_libraries` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `machinename` varchar(255) NOT NULL DEFAULT '',
  `title` varchar(255) NOT NULL DEFAULT '',
  `majorversion` smallint(4) NOT NULL,
  `minorversion` smallint(4) NOT NULL,
  `patchversion` smallint(4) NOT NULL,
  `runnable` tinyint(1) NOT NULL,
  `fullscreen` tinyint(1) NOT NULL DEFAULT '0',
  `embedtypes` varchar(255) NOT NULL DEFAULT '',
  `preloadedjs` longtext,
  `preloadedcss` longtext,
  `droplibrarycss` longtext,
  `semantics` longtext,
  `addto` longtext,
  `coremajor` smallint(4) DEFAULT NULL,
  `coreminor` smallint(4) DEFAULT NULL,
  `metadatasettings` longtext,
  `tutorial` longtext,
  `example` longtext,
  `enabled` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5plibr_macmajminpat_ix` (`machinename`,`majorversion`,`minorversion`,`patchversion`,`runnable`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores information about libraries used by H5P content.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5p_libraries_cachedassets`
--

CREATE TABLE `[[dbprefix]]h5p_libraries_cachedassets` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `libraryid` bigint(10) NOT NULL,
  `hash` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5plibrcach_lib_ix` (`libraryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='H5P cached library assets' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]h5p_library_dependencies`
--

CREATE TABLE `[[dbprefix]]h5p_library_dependencies` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `libraryid` bigint(10) NOT NULL,
  `requiredlibraryid` bigint(10) NOT NULL,
  `dependencytype` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]h5plibrdepe_lib_ix` (`libraryid`),
  KEY `[[dbprefix]]h5plibrdepe_req_ix` (`requiredlibraryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores H5P library dependencies' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]imscp`
--

CREATE TABLE `[[dbprefix]]imscp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `revision` bigint(10) NOT NULL DEFAULT '0',
  `keepold` bigint(10) NOT NULL DEFAULT '-1',
  `structure` longtext,
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]imsc_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='each record is one imscp resource' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]infected_files`
--

CREATE TABLE `[[dbprefix]]infected_files` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `filename` longtext NOT NULL,
  `quarantinedfile` longtext,
  `userid` bigint(10) NOT NULL,
  `reason` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]infefile_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Table to store infected file details.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]label`
--

CREATE TABLE `[[dbprefix]]label` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]labe_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines labels' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson`
--

CREATE TABLE `[[dbprefix]]lesson` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `practice` smallint(3) NOT NULL DEFAULT '0',
  `modattempts` smallint(3) NOT NULL DEFAULT '0',
  `usepassword` smallint(3) NOT NULL DEFAULT '0',
  `password` varchar(32) NOT NULL DEFAULT '',
  `dependency` bigint(10) NOT NULL DEFAULT '0',
  `conditions` longtext NOT NULL,
  `grade` bigint(10) NOT NULL DEFAULT '0',
  `custom` smallint(3) NOT NULL DEFAULT '0',
  `ongoing` smallint(3) NOT NULL DEFAULT '0',
  `usemaxgrade` smallint(3) NOT NULL DEFAULT '0',
  `maxanswers` smallint(3) NOT NULL DEFAULT '4',
  `maxattempts` smallint(3) NOT NULL DEFAULT '5',
  `review` smallint(3) NOT NULL DEFAULT '0',
  `nextpagedefault` smallint(3) NOT NULL DEFAULT '0',
  `feedback` smallint(3) NOT NULL DEFAULT '1',
  `minquestions` smallint(3) NOT NULL DEFAULT '0',
  `maxpages` smallint(3) NOT NULL DEFAULT '0',
  `timelimit` bigint(10) NOT NULL DEFAULT '0',
  `retake` smallint(3) NOT NULL DEFAULT '1',
  `activitylink` bigint(10) NOT NULL DEFAULT '0',
  `mediafile` varchar(255) NOT NULL DEFAULT '',
  `mediaheight` bigint(10) NOT NULL DEFAULT '100',
  `mediawidth` bigint(10) NOT NULL DEFAULT '650',
  `mediaclose` smallint(3) NOT NULL DEFAULT '0',
  `slideshow` smallint(3) NOT NULL DEFAULT '0',
  `width` bigint(10) NOT NULL DEFAULT '640',
  `height` bigint(10) NOT NULL DEFAULT '480',
  `bgcolor` varchar(7) NOT NULL DEFAULT '#FFFFFF',
  `displayleft` smallint(3) NOT NULL DEFAULT '0',
  `displayleftif` smallint(3) NOT NULL DEFAULT '0',
  `progressbar` smallint(3) NOT NULL DEFAULT '0',
  `available` bigint(10) NOT NULL DEFAULT '0',
  `deadline` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `completionendreached` tinyint(1) DEFAULT '0',
  `completiontimespent` bigint(11) DEFAULT '0',
  `allowofflineattempts` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]less_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines lesson' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_answers`
--

CREATE TABLE `[[dbprefix]]lesson_answers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `pageid` bigint(10) NOT NULL DEFAULT '0',
  `jumpto` bigint(11) NOT NULL DEFAULT '0',
  `grade` smallint(4) NOT NULL DEFAULT '0',
  `score` bigint(10) NOT NULL DEFAULT '0',
  `flags` smallint(3) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `answer` longtext,
  `answerformat` tinyint(2) NOT NULL DEFAULT '0',
  `response` longtext,
  `responseformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lessansw_les_ix` (`lessonid`),
  KEY `[[dbprefix]]lessansw_pag_ix` (`pageid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines lesson_answers' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_attempts`
--

CREATE TABLE `[[dbprefix]]lesson_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `pageid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `answerid` bigint(10) NOT NULL DEFAULT '0',
  `retry` smallint(3) NOT NULL DEFAULT '0',
  `correct` bigint(10) NOT NULL DEFAULT '0',
  `useranswer` longtext,
  `timeseen` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lessatte_use_ix` (`userid`),
  KEY `[[dbprefix]]lessatte_les_ix` (`lessonid`),
  KEY `[[dbprefix]]lessatte_pag_ix` (`pageid`),
  KEY `[[dbprefix]]lessatte_ans_ix` (`answerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines lesson_attempts' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_branch`
--

CREATE TABLE `[[dbprefix]]lesson_branch` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `pageid` bigint(10) NOT NULL DEFAULT '0',
  `retry` bigint(10) NOT NULL DEFAULT '0',
  `flag` smallint(3) NOT NULL DEFAULT '0',
  `timeseen` bigint(10) NOT NULL DEFAULT '0',
  `nextpageid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lessbran_use_ix` (`userid`),
  KEY `[[dbprefix]]lessbran_les_ix` (`lessonid`),
  KEY `[[dbprefix]]lessbran_pag_ix` (`pageid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='branches for each lesson/user' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_grades`
--

CREATE TABLE `[[dbprefix]]lesson_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `grade` double NOT NULL DEFAULT '0',
  `late` smallint(3) NOT NULL DEFAULT '0',
  `completed` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lessgrad_use_ix` (`userid`),
  KEY `[[dbprefix]]lessgrad_les_ix` (`lessonid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines lesson_grades' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_overrides`
--

CREATE TABLE `[[dbprefix]]lesson_overrides` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) DEFAULT NULL,
  `userid` bigint(10) DEFAULT NULL,
  `available` bigint(10) DEFAULT NULL,
  `deadline` bigint(10) DEFAULT NULL,
  `timelimit` bigint(10) DEFAULT NULL,
  `review` smallint(3) DEFAULT NULL,
  `maxattempts` smallint(3) DEFAULT NULL,
  `retake` smallint(3) DEFAULT NULL,
  `password` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lessover_les_ix` (`lessonid`),
  KEY `[[dbprefix]]lessover_gro_ix` (`groupid`),
  KEY `[[dbprefix]]lessover_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='The overrides to lesson settings.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_pages`
--

CREATE TABLE `[[dbprefix]]lesson_pages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `prevpageid` bigint(10) NOT NULL DEFAULT '0',
  `nextpageid` bigint(10) NOT NULL DEFAULT '0',
  `qtype` smallint(3) NOT NULL DEFAULT '0',
  `qoption` smallint(3) NOT NULL DEFAULT '0',
  `layout` smallint(3) NOT NULL DEFAULT '1',
  `display` smallint(3) NOT NULL DEFAULT '1',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL DEFAULT '',
  `contents` longtext NOT NULL,
  `contentsformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lesspage_les_ix` (`lessonid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines lesson_pages' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lesson_timer`
--

CREATE TABLE `[[dbprefix]]lesson_timer` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `starttime` bigint(10) NOT NULL DEFAULT '0',
  `lessontime` bigint(10) NOT NULL DEFAULT '0',
  `completed` tinyint(1) DEFAULT '0',
  `timemodifiedoffline` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lesstime_use_ix` (`userid`),
  KEY `[[dbprefix]]lesstime_les_ix` (`lessonid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='lesson timer for each lesson' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]license`
--

CREATE TABLE `[[dbprefix]]license` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `shortname` varchar(255) DEFAULT NULL,
  `fullname` longtext,
  `source` varchar(255) DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `version` bigint(10) NOT NULL DEFAULT '0',
  `custom` tinyint(1) NOT NULL DEFAULT '0',
  `sortorder` mediumint(5) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='store licenses used by moodle' AUTO_INCREMENT=10 ;

--
-- Dumping data for table `[[dbprefix]]license`
--

INSERT INTO `[[dbprefix]]license` VALUES
(1, 'unknown', 'Licence not specified', '', 1, 2010033100, 0, 1),
(2, 'allrightsreserved', 'All rights reserved', 'https://en.wikipedia.org/wiki/All_rights_reserved', 1, 2010033100, 0, 2),
(3, 'public', 'Public domain', 'https://en.wikipedia.org/wiki/Public_domain', 1, 2010033100, 0, 3),
(4, 'cc', 'Creative Commons', 'https://creativecommons.org/licenses/by/3.0/', 1, 2010033100, 0, 4),
(5, 'cc-nd', 'Creative Commons - NoDerivs', 'https://creativecommons.org/licenses/by-nd/3.0/', 1, 2010033100, 0, 5),
(6, 'cc-nc-nd', 'Creative Commons - No Commercial NoDerivs', 'https://creativecommons.org/licenses/by-nc-nd/3.0/', 1, 2010033100, 0, 6),
(7, 'cc-nc', 'Creative Commons - No Commercial', 'https://creativecommons.org/licenses/by-nc/3.0/', 1, 2010033100, 0, 7),
(8, 'cc-nc-sa', 'Creative Commons - No Commercial ShareAlike', 'https://creativecommons.org/licenses/by-nc-sa/3.0/', 1, 2010033100, 0, 8),
(9, 'cc-sa', 'Creative Commons - ShareAlike', 'https://creativecommons.org/licenses/by-sa/3.0/', 1, 2010033100, 0, 9);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lock_db`
--

CREATE TABLE `[[dbprefix]]lock_db` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `resourcekey` varchar(255) NOT NULL DEFAULT '',
  `expires` bigint(10) DEFAULT NULL,
  `owner` varchar(36) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]lockdb_res_uix` (`resourcekey`),
  KEY `[[dbprefix]]lockdb_exp_ix` (`expires`),
  KEY `[[dbprefix]]lockdb_own_ix` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores active and inactive lock types for db locking method.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]log`
--

CREATE TABLE `[[dbprefix]]log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `time` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `ip` varchar(45) NOT NULL DEFAULT '',
  `course` bigint(10) NOT NULL DEFAULT '0',
  `module` varchar(20) NOT NULL DEFAULT '',
  `cmid` bigint(10) NOT NULL DEFAULT '0',
  `action` varchar(40) NOT NULL DEFAULT '',
  `url` varchar(100) NOT NULL DEFAULT '',
  `info` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]log_coumodact_ix` (`course`,`module`,`action`),
  KEY `[[dbprefix]]log_tim_ix` (`time`),
  KEY `[[dbprefix]]log_act_ix` (`action`),
  KEY `[[dbprefix]]log_usecou_ix` (`userid`,`course`),
  KEY `[[dbprefix]]log_cmi_ix` (`cmid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Every action is logged as far as possible' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]logstore_standard_log`
--

CREATE TABLE `[[dbprefix]]logstore_standard_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `eventname` varchar(255) NOT NULL DEFAULT '',
  `component` varchar(100) NOT NULL DEFAULT '',
  `action` varchar(100) NOT NULL DEFAULT '',
  `target` varchar(100) NOT NULL DEFAULT '',
  `objecttable` varchar(50) DEFAULT NULL,
  `objectid` bigint(10) DEFAULT NULL,
  `crud` varchar(1) NOT NULL DEFAULT '',
  `edulevel` tinyint(1) NOT NULL,
  `contextid` bigint(10) NOT NULL,
  `contextlevel` bigint(10) NOT NULL,
  `contextinstanceid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `relateduserid` bigint(10) DEFAULT NULL,
  `anonymous` tinyint(1) NOT NULL DEFAULT '0',
  `other` longtext,
  `timecreated` bigint(10) NOT NULL,
  `origin` varchar(10) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `realuserid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]logsstanlog_tim_ix` (`timecreated`),
  KEY `[[dbprefix]]logsstanlog_couanoti_ix` (`courseid`,`anonymous`,`timecreated`),
  KEY `[[dbprefix]]logsstanlog_useconco_ix` (`userid`,`contextlevel`,`contextinstanceid`,`crud`,`edulevel`,`timecreated`),
  KEY `[[dbprefix]]logsstanlog_con_ix` (`contextid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Standard log table' AUTO_INCREMENT=1 ;

--
-- Dumping data for table `[[dbprefix]]logstore_standard_log`
--


-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]log_display`
--

CREATE TABLE `[[dbprefix]]log_display` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `module` varchar(20) NOT NULL DEFAULT '',
  `action` varchar(40) NOT NULL DEFAULT '',
  `mtable` varchar(30) NOT NULL DEFAULT '',
  `field` varchar(200) NOT NULL DEFAULT '',
  `component` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]logdisp_modact_uix` (`module`,`action`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='For a particular module/action, specifies a moodle table/fie' AUTO_INCREMENT=190 ;

--
-- Dumping data for table `[[dbprefix]]log_display`
--

INSERT INTO `[[dbprefix]]log_display` VALUES
(1, 'course', 'user report', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(2, 'course', 'view', 'course', 'fullname', 'moodle'),
(3, 'course', 'view section', 'course_sections', 'name', 'moodle'),
(4, 'course', 'update', 'course', 'fullname', 'moodle'),
(5, 'course', 'hide', 'course', 'fullname', 'moodle'),
(6, 'course', 'show', 'course', 'fullname', 'moodle'),
(7, 'course', 'move', 'course', 'fullname', 'moodle'),
(8, 'course', 'enrol', 'course', 'fullname', 'moodle'),
(9, 'course', 'unenrol', 'course', 'fullname', 'moodle'),
(10, 'course', 'report log', 'course', 'fullname', 'moodle'),
(11, 'course', 'report live', 'course', 'fullname', 'moodle'),
(12, 'course', 'report outline', 'course', 'fullname', 'moodle'),
(13, 'course', 'report participation', 'course', 'fullname', 'moodle'),
(14, 'course', 'report stats', 'course', 'fullname', 'moodle'),
(15, 'category', 'add', 'course_categories', 'name', 'moodle'),
(16, 'category', 'hide', 'course_categories', 'name', 'moodle'),
(17, 'category', 'move', 'course_categories', 'name', 'moodle'),
(18, 'category', 'show', 'course_categories', 'name', 'moodle'),
(19, 'category', 'update', 'course_categories', 'name', 'moodle'),
(20, 'message', 'write', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(21, 'message', 'read', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(22, 'message', 'add contact', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(23, 'message', 'remove contact', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(24, 'message', 'block contact', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(25, 'message', 'unblock contact', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(26, 'group', 'view', 'groups', 'name', 'moodle'),
(27, 'tag', 'update', 'tag', 'name', 'moodle'),
(28, 'tag', 'flag', 'tag', 'name', 'moodle'),
(29, 'user', 'view', 'user', 'CONCAT(firstname, '' '', lastname)', 'moodle'),
(30, 'assign', 'add', 'assign', 'name', 'mod_assign'),
(31, 'assign', 'delete mod', 'assign', 'name', 'mod_assign'),
(32, 'assign', 'download all submissions', 'assign', 'name', 'mod_assign'),
(33, 'assign', 'grade submission', 'assign', 'name', 'mod_assign'),
(34, 'assign', 'lock submission', 'assign', 'name', 'mod_assign'),
(35, 'assign', 'reveal identities', 'assign', 'name', 'mod_assign'),
(36, 'assign', 'revert submission to draft', 'assign', 'name', 'mod_assign'),
(37, 'assign', 'set marking workflow state', 'assign', 'name', 'mod_assign'),
(38, 'assign', 'submission statement accepted', 'assign', 'name', 'mod_assign'),
(39, 'assign', 'submit', 'assign', 'name', 'mod_assign'),
(40, 'assign', 'submit for grading', 'assign', 'name', 'mod_assign'),
(41, 'assign', 'unlock submission', 'assign', 'name', 'mod_assign'),
(42, 'assign', 'update', 'assign', 'name', 'mod_assign'),
(43, 'assign', 'upload', 'assign', 'name', 'mod_assign'),
(44, 'assign', 'view', 'assign', 'name', 'mod_assign'),
(45, 'assign', 'view all', 'course', 'fullname', 'mod_assign'),
(46, 'assign', 'view confirm submit assignment form', 'assign', 'name', 'mod_assign'),
(47, 'assign', 'view grading form', 'assign', 'name', 'mod_assign'),
(48, 'assign', 'view submission', 'assign', 'name', 'mod_assign'),
(49, 'assign', 'view submission grading table', 'assign', 'name', 'mod_assign'),
(50, 'assign', 'view submit assignment form', 'assign', 'name', 'mod_assign'),
(51, 'assign', 'view feedback', 'assign', 'name', 'mod_assign'),
(52, 'assign', 'view batch set marking workflow state', 'assign', 'name', 'mod_assign'),
(53, 'assignment', 'view', 'assignment', 'name', 'mod_assignment'),
(54, 'assignment', 'add', 'assignment', 'name', 'mod_assignment'),
(55, 'assignment', 'update', 'assignment', 'name', 'mod_assignment'),
(56, 'assignment', 'view submission', 'assignment', 'name', 'mod_assignment'),
(57, 'assignment', 'upload', 'assignment', 'name', 'mod_assignment'),
(58, 'book', 'add', 'book', 'name', 'mod_book'),
(59, 'book', 'update', 'book', 'name', 'mod_book'),
(60, 'book', 'view', 'book', 'name', 'mod_book'),
(61, 'book', 'add chapter', 'book_chapters', 'title', 'mod_book'),
(62, 'book', 'update chapter', 'book_chapters', 'title', 'mod_book'),
(63, 'book', 'view chapter', 'book_chapters', 'title', 'mod_book'),
(64, 'chat', 'view', 'chat', 'name', 'mod_chat'),
(65, 'chat', 'add', 'chat', 'name', 'mod_chat'),
(66, 'chat', 'update', 'chat', 'name', 'mod_chat'),
(67, 'chat', 'report', 'chat', 'name', 'mod_chat'),
(68, 'chat', 'talk', 'chat', 'name', 'mod_chat'),
(69, 'choice', 'view', 'choice', 'name', 'mod_choice'),
(70, 'choice', 'update', 'choice', 'name', 'mod_choice'),
(71, 'choice', 'add', 'choice', 'name', 'mod_choice'),
(72, 'choice', 'report', 'choice', 'name', 'mod_choice'),
(73, 'choice', 'choose', 'choice', 'name', 'mod_choice'),
(74, 'choice', 'choose again', 'choice', 'name', 'mod_choice'),
(75, 'data', 'view', 'data', 'name', 'mod_data'),
(76, 'data', 'add', 'data', 'name', 'mod_data'),
(77, 'data', 'update', 'data', 'name', 'mod_data'),
(78, 'data', 'record delete', 'data', 'name', 'mod_data'),
(79, 'data', 'fields add', 'data_fields', 'name', 'mod_data'),
(80, 'data', 'fields update', 'data_fields', 'name', 'mod_data'),
(81, 'data', 'templates saved', 'data', 'name', 'mod_data'),
(82, 'data', 'templates def', 'data', 'name', 'mod_data'),
(83, 'feedback', 'startcomplete', 'feedback', 'name', 'mod_feedback'),
(84, 'feedback', 'submit', 'feedback', 'name', 'mod_feedback'),
(85, 'feedback', 'delete', 'feedback', 'name', 'mod_feedback'),
(86, 'feedback', 'view', 'feedback', 'name', 'mod_feedback'),
(87, 'feedback', 'view all', 'course', 'shortname', 'mod_feedback'),
(88, 'folder', 'view', 'folder', 'name', 'mod_folder'),
(89, 'folder', 'view all', 'folder', 'name', 'mod_folder'),
(90, 'folder', 'update', 'folder', 'name', 'mod_folder'),
(91, 'folder', 'add', 'folder', 'name', 'mod_folder'),
(92, 'forum', 'add', 'forum', 'name', 'mod_forum'),
(93, 'forum', 'update', 'forum', 'name', 'mod_forum'),
(94, 'forum', 'add discussion', 'forum_discussions', 'name', 'mod_forum'),
(95, 'forum', 'add post', 'forum_posts', 'subject', 'mod_forum'),
(96, 'forum', 'update post', 'forum_posts', 'subject', 'mod_forum'),
(97, 'forum', 'user report', 'user', 'CONCAT(firstname, '' '', lastname)', 'mod_forum'),
(98, 'forum', 'move discussion', 'forum_discussions', 'name', 'mod_forum'),
(99, 'forum', 'view subscribers', 'forum', 'name', 'mod_forum'),
(100, 'forum', 'view discussion', 'forum_discussions', 'name', 'mod_forum'),
(101, 'forum', 'view forum', 'forum', 'name', 'mod_forum'),
(102, 'forum', 'subscribe', 'forum', 'name', 'mod_forum'),
(103, 'forum', 'unsubscribe', 'forum', 'name', 'mod_forum'),
(104, 'forum', 'pin discussion', 'forum_discussions', 'name', 'mod_forum'),
(105, 'forum', 'unpin discussion', 'forum_discussions', 'name', 'mod_forum'),
(106, 'glossary', 'add', 'glossary', 'name', 'mod_glossary'),
(107, 'glossary', 'update', 'glossary', 'name', 'mod_glossary'),
(108, 'glossary', 'view', 'glossary', 'name', 'mod_glossary'),
(109, 'glossary', 'view all', 'glossary', 'name', 'mod_glossary'),
(110, 'glossary', 'add entry', 'glossary', 'name', 'mod_glossary'),
(111, 'glossary', 'update entry', 'glossary', 'name', 'mod_glossary'),
(112, 'glossary', 'add category', 'glossary', 'name', 'mod_glossary'),
(113, 'glossary', 'update category', 'glossary', 'name', 'mod_glossary'),
(114, 'glossary', 'delete category', 'glossary', 'name', 'mod_glossary'),
(115, 'glossary', 'approve entry', 'glossary', 'name', 'mod_glossary'),
(116, 'glossary', 'disapprove entry', 'glossary', 'name', 'mod_glossary'),
(117, 'glossary', 'view entry', 'glossary_entries', 'concept', 'mod_glossary'),
(118, 'imscp', 'view', 'imscp', 'name', 'mod_imscp'),
(119, 'imscp', 'view all', 'imscp', 'name', 'mod_imscp'),
(120, 'imscp', 'update', 'imscp', 'name', 'mod_imscp'),
(121, 'imscp', 'add', 'imscp', 'name', 'mod_imscp'),
(122, 'label', 'add', 'label', 'name', 'mod_label'),
(123, 'label', 'update', 'label', 'name', 'mod_label'),
(124, 'lesson', 'start', 'lesson', 'name', 'mod_lesson'),
(125, 'lesson', 'end', 'lesson', 'name', 'mod_lesson'),
(126, 'lesson', 'view', 'lesson_pages', 'title', 'mod_lesson'),
(127, 'lti', 'view', 'lti', 'name', 'mod_lti'),
(128, 'lti', 'launch', 'lti', 'name', 'mod_lti'),
(129, 'lti', 'view all', 'lti', 'name', 'mod_lti'),
(130, 'page', 'view', 'page', 'name', 'mod_page'),
(131, 'page', 'view all', 'page', 'name', 'mod_page'),
(132, 'page', 'update', 'page', 'name', 'mod_page'),
(133, 'page', 'add', 'page', 'name', 'mod_page'),
(134, 'quiz', 'add', 'quiz', 'name', 'mod_quiz'),
(135, 'quiz', 'update', 'quiz', 'name', 'mod_quiz'),
(136, 'quiz', 'view', 'quiz', 'name', 'mod_quiz'),
(137, 'quiz', 'report', 'quiz', 'name', 'mod_quiz'),
(138, 'quiz', 'attempt', 'quiz', 'name', 'mod_quiz'),
(139, 'quiz', 'submit', 'quiz', 'name', 'mod_quiz'),
(140, 'quiz', 'review', 'quiz', 'name', 'mod_quiz'),
(141, 'quiz', 'editquestions', 'quiz', 'name', 'mod_quiz'),
(142, 'quiz', 'preview', 'quiz', 'name', 'mod_quiz'),
(143, 'quiz', 'start attempt', 'quiz', 'name', 'mod_quiz'),
(144, 'quiz', 'close attempt', 'quiz', 'name', 'mod_quiz'),
(145, 'quiz', 'continue attempt', 'quiz', 'name', 'mod_quiz'),
(146, 'quiz', 'edit override', 'quiz', 'name', 'mod_quiz'),
(147, 'quiz', 'delete override', 'quiz', 'name', 'mod_quiz'),
(148, 'quiz', 'view summary', 'quiz', 'name', 'mod_quiz'),
(149, 'resource', 'view', 'resource', 'name', 'mod_resource'),
(150, 'resource', 'view all', 'resource', 'name', 'mod_resource'),
(151, 'resource', 'update', 'resource', 'name', 'mod_resource'),
(152, 'resource', 'add', 'resource', 'name', 'mod_resource'),
(153, 'scorm', 'view', 'scorm', 'name', 'mod_scorm'),
(154, 'scorm', 'review', 'scorm', 'name', 'mod_scorm'),
(155, 'scorm', 'update', 'scorm', 'name', 'mod_scorm'),
(156, 'scorm', 'add', 'scorm', 'name', 'mod_scorm'),
(157, 'survey', 'add', 'survey', 'name', 'mod_survey'),
(158, 'survey', 'update', 'survey', 'name', 'mod_survey'),
(159, 'survey', 'download', 'survey', 'name', 'mod_survey'),
(160, 'survey', 'view form', 'survey', 'name', 'mod_survey'),
(161, 'survey', 'view graph', 'survey', 'name', 'mod_survey'),
(162, 'survey', 'view report', 'survey', 'name', 'mod_survey'),
(163, 'survey', 'submit', 'survey', 'name', 'mod_survey'),
(164, 'url', 'view', 'url', 'name', 'mod_url'),
(165, 'url', 'view all', 'url', 'name', 'mod_url'),
(166, 'url', 'update', 'url', 'name', 'mod_url'),
(167, 'url', 'add', 'url', 'name', 'mod_url'),
(168, 'workshop', 'add', 'workshop', 'name', 'mod_workshop'),
(169, 'workshop', 'update', 'workshop', 'name', 'mod_workshop'),
(170, 'workshop', 'view', 'workshop', 'name', 'mod_workshop'),
(171, 'workshop', 'view all', 'workshop', 'name', 'mod_workshop'),
(172, 'workshop', 'add submission', 'workshop_submissions', 'title', 'mod_workshop'),
(173, 'workshop', 'update submission', 'workshop_submissions', 'title', 'mod_workshop'),
(174, 'workshop', 'view submission', 'workshop_submissions', 'title', 'mod_workshop'),
(175, 'workshop', 'add assessment', 'workshop_submissions', 'title', 'mod_workshop'),
(176, 'workshop', 'update assessment', 'workshop_submissions', 'title', 'mod_workshop'),
(177, 'workshop', 'add example', 'workshop_submissions', 'title', 'mod_workshop'),
(178, 'workshop', 'update example', 'workshop_submissions', 'title', 'mod_workshop'),
(179, 'workshop', 'view example', 'workshop_submissions', 'title', 'mod_workshop'),
(180, 'workshop', 'add reference assessment', 'workshop_submissions', 'title', 'mod_workshop'),
(181, 'workshop', 'update reference assessment', 'workshop_submissions', 'title', 'mod_workshop'),
(182, 'workshop', 'add example assessment', 'workshop_submissions', 'title', 'mod_workshop'),
(183, 'workshop', 'update example assessment', 'workshop_submissions', 'title', 'mod_workshop'),
(184, 'workshop', 'update aggregate grades', 'workshop', 'name', 'mod_workshop'),
(185, 'workshop', 'update clear aggregated grades', 'workshop', 'name', 'mod_workshop'),
(186, 'workshop', 'update clear assessments', 'workshop', 'name', 'mod_workshop'),
(187, 'book', 'exportimscp', 'book', 'name', 'booktool_exportimscp'),
(188, 'book', 'print', 'book', 'name', 'booktool_print'),
(189, 'book', 'print chapter', 'book_chapters', 'title', 'booktool_print');

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]log_queries`
--

CREATE TABLE `[[dbprefix]]log_queries` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `qtype` mediumint(5) NOT NULL,
  `sqltext` longtext NOT NULL,
  `sqlparams` longtext,
  `error` mediumint(5) NOT NULL DEFAULT '0',
  `info` longtext,
  `backtrace` longtext,
  `exectime` decimal(10,5) NOT NULL,
  `timelogged` bigint(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Logged database queries.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti`
--

CREATE TABLE `[[dbprefix]]lti` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `typeid` bigint(10) DEFAULT NULL,
  `toolurl` longtext NOT NULL,
  `securetoolurl` longtext,
  `instructorchoicesendname` tinyint(1) DEFAULT NULL,
  `instructorchoicesendemailaddr` tinyint(1) DEFAULT NULL,
  `instructorchoiceallowroster` tinyint(1) DEFAULT NULL,
  `instructorchoiceallowsetting` tinyint(1) DEFAULT NULL,
  `instructorcustomparameters` longtext,
  `instructorchoiceacceptgrades` tinyint(1) DEFAULT NULL,
  `grade` bigint(10) NOT NULL DEFAULT '100',
  `launchcontainer` tinyint(2) NOT NULL DEFAULT '1',
  `resourcekey` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `debuglaunch` tinyint(1) NOT NULL DEFAULT '0',
  `showtitlelaunch` tinyint(1) NOT NULL DEFAULT '0',
  `showdescriptionlaunch` tinyint(1) NOT NULL DEFAULT '0',
  `servicesalt` varchar(40) DEFAULT NULL,
  `icon` longtext,
  `secureicon` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]lti_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table contains Basic LTI activities instances' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]ltiservice_gradebookservices`
--

CREATE TABLE `[[dbprefix]]ltiservice_gradebookservices` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `gradeitemid` bigint(10) NOT NULL,
  `courseid` bigint(10) NOT NULL,
  `toolproxyid` bigint(10) DEFAULT NULL,
  `typeid` bigint(10) DEFAULT NULL,
  `baseurl` longtext,
  `ltilinkid` bigint(10) DEFAULT NULL,
  `resourceid` varchar(512) DEFAULT NULL,
  `tag` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]ltisgrad_lti_ix` (`ltilinkid`),
  KEY `[[dbprefix]]ltisgrad_gracou_ix` (`gradeitemid`,`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This file records the grade items created by the LTI Gradebo' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti_access_tokens`
--

CREATE TABLE `[[dbprefix]]lti_access_tokens` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `typeid` bigint(10) NOT NULL,
  `scope` longtext NOT NULL,
  `token` varchar(128) NOT NULL DEFAULT '',
  `validuntil` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `lastaccess` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]ltiaccetoke_tok_uix` (`token`),
  KEY `[[dbprefix]]ltiaccetoke_typ_ix` (`typeid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Security tokens for accessing of LTI services' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti_submission`
--

CREATE TABLE `[[dbprefix]]lti_submission` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `ltiid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `datesubmitted` bigint(10) NOT NULL,
  `dateupdated` bigint(10) NOT NULL,
  `gradepercent` decimal(10,5) NOT NULL,
  `originalgrade` decimal(10,5) NOT NULL,
  `launchid` bigint(10) NOT NULL,
  `state` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]ltisubm_lti_ix` (`ltiid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Keeps track of individual submissions for LTI activities.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti_tool_proxies`
--

CREATE TABLE `[[dbprefix]]lti_tool_proxies` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT 'Tool Provider',
  `regurl` longtext,
  `state` tinyint(2) NOT NULL DEFAULT '1',
  `guid` varchar(255) DEFAULT NULL,
  `secret` varchar(255) DEFAULT NULL,
  `vendorcode` varchar(255) DEFAULT NULL,
  `capabilityoffered` longtext NOT NULL,
  `serviceoffered` longtext NOT NULL,
  `toolproxy` longtext,
  `createdby` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]ltitoolprox_gui_uix` (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='LTI tool proxy registrations' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti_tool_settings`
--

CREATE TABLE `[[dbprefix]]lti_tool_settings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `toolproxyid` bigint(10) NOT NULL,
  `typeid` bigint(10) DEFAULT NULL,
  `course` bigint(10) DEFAULT NULL,
  `coursemoduleid` bigint(10) DEFAULT NULL,
  `settings` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]ltitoolsett_too_ix` (`toolproxyid`),
  KEY `[[dbprefix]]ltitoolsett_typ_ix` (`typeid`),
  KEY `[[dbprefix]]ltitoolsett_cou_ix` (`course`),
  KEY `[[dbprefix]]ltitoolsett_cou2_ix` (`coursemoduleid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='LTI tool setting values' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti_types`
--

CREATE TABLE `[[dbprefix]]lti_types` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT 'basiclti Activity',
  `baseurl` longtext NOT NULL,
  `tooldomain` varchar(255) NOT NULL DEFAULT '',
  `state` tinyint(2) NOT NULL DEFAULT '2',
  `course` bigint(10) NOT NULL,
  `coursevisible` tinyint(1) NOT NULL DEFAULT '0',
  `ltiversion` varchar(10) NOT NULL DEFAULT '',
  `clientid` varchar(255) DEFAULT NULL,
  `toolproxyid` bigint(10) DEFAULT NULL,
  `enabledcapability` longtext,
  `parameter` longtext,
  `icon` longtext,
  `secureicon` longtext,
  `createdby` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `description` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]ltitype_cli_uix` (`clientid`),
  KEY `[[dbprefix]]ltitype_cou_ix` (`course`),
  KEY `[[dbprefix]]ltitype_too_ix` (`tooldomain`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Basic LTI pre-configured activities' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]lti_types_config`
--

CREATE TABLE `[[dbprefix]]lti_types_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `typeid` bigint(10) NOT NULL,
  `name` varchar(100) NOT NULL DEFAULT '',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]ltitypeconf_typ_ix` (`typeid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Basic LTI types configuration' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message`
--

CREATE TABLE `[[dbprefix]]message` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridfrom` bigint(10) NOT NULL DEFAULT '0',
  `useridto` bigint(10) NOT NULL DEFAULT '0',
  `subject` longtext,
  `fullmessage` longtext,
  `fullmessageformat` smallint(4) DEFAULT '0',
  `fullmessagehtml` longtext,
  `smallmessage` longtext,
  `notification` tinyint(1) DEFAULT '0',
  `contexturl` longtext,
  `contexturlname` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timeuserfromdeleted` bigint(10) NOT NULL DEFAULT '0',
  `timeusertodeleted` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) DEFAULT NULL,
  `eventtype` varchar(100) DEFAULT NULL,
  `customdata` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mess_useusetimtim_ix` (`useridfrom`,`useridto`,`timeuserfromdeleted`,`timeusertodeleted`),
  KEY `[[dbprefix]]mess_usetimnot_ix` (`useridfrom`,`timeuserfromdeleted`,`notification`),
  KEY `[[dbprefix]]mess_usetimnot2_ix` (`useridto`,`timeusertodeleted`,`notification`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all unread messages' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]messageinbound_datakeys`
--

CREATE TABLE `[[dbprefix]]messageinbound_datakeys` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `handler` bigint(10) NOT NULL,
  `datavalue` bigint(10) NOT NULL,
  `datakey` varchar(64) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `expires` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messdata_handat_uix` (`handler`,`datavalue`),
  KEY `[[dbprefix]]messdata_han_ix` (`handler`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Inbound Message data item secret keys.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]messageinbound_handlers`
--

CREATE TABLE `[[dbprefix]]messageinbound_handlers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `component` varchar(100) NOT NULL DEFAULT '',
  `classname` varchar(255) NOT NULL DEFAULT '',
  `defaultexpiration` bigint(10) NOT NULL DEFAULT '86400',
  `validateaddress` tinyint(1) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messhand_cla_uix` (`classname`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Inbound Message Handler definitions.' AUTO_INCREMENT=4 ;

--
-- Dumping data for table `[[dbprefix]]messageinbound_handlers`
--

INSERT INTO `[[dbprefix]]messageinbound_handlers` VALUES
(1, 'core', '\\core\\message\\inbound\\private_files_handler', 0, 1, 0),
(2, 'mod_forum', '\\mod_forum\\message\\inbound\\reply_handler', 604800, 1, 0),
(3, 'tool_messageinbound', '\\tool_messageinbound\\message\\inbound\\invalid_recipient_handler', 604800, 0, 1);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]messageinbound_messagelist`
--

CREATE TABLE `[[dbprefix]]messageinbound_messagelist` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `messageid` longtext NOT NULL,
  `userid` bigint(10) NOT NULL,
  `address` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messmess_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='A list of message IDs for existing replies' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]messages`
--

CREATE TABLE `[[dbprefix]]messages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridfrom` bigint(10) NOT NULL,
  `conversationid` bigint(10) NOT NULL,
  `subject` longtext,
  `fullmessage` longtext,
  `fullmessageformat` tinyint(1) NOT NULL DEFAULT '0',
  `fullmessagehtml` longtext,
  `smallmessage` longtext,
  `timecreated` bigint(10) NOT NULL,
  `fullmessagetrust` tinyint(2) NOT NULL DEFAULT '0',
  `customdata` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mess_contim_ix` (`conversationid`,`timecreated`),
  KEY `[[dbprefix]]mess_use_ix` (`useridfrom`),
  KEY `[[dbprefix]]mess_con_ix` (`conversationid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all messages' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_airnotifier_devices`
--

CREATE TABLE `[[dbprefix]]message_airnotifier_devices` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userdeviceid` bigint(10) NOT NULL,
  `enable` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messairndevi_use_uix` (`userdeviceid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Store information about the devices registered in Airnotifie' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_contacts`
--

CREATE TABLE `[[dbprefix]]message_contacts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `contactid` bigint(10) NOT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messcont_usecon_uix` (`userid`,`contactid`),
  KEY `[[dbprefix]]messcont_use_ix` (`userid`),
  KEY `[[dbprefix]]messcont_con_ix` (`contactid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Maintains lists of contacts between users' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_contact_requests`
--

CREATE TABLE `[[dbprefix]]message_contact_requests` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `requesteduserid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messcontrequ_usereq_uix` (`userid`,`requesteduserid`),
  KEY `[[dbprefix]]messcontrequ_use_ix` (`userid`),
  KEY `[[dbprefix]]messcontrequ_req_ix` (`requesteduserid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Maintains list of contact requests between users' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_conversations`
--

CREATE TABLE `[[dbprefix]]message_conversations` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `type` bigint(10) NOT NULL DEFAULT '1',
  `name` varchar(255) DEFAULT NULL,
  `convhash` varchar(40) DEFAULT NULL,
  `component` varchar(100) DEFAULT NULL,
  `itemtype` varchar(100) DEFAULT NULL,
  `itemid` bigint(10) DEFAULT NULL,
  `contextid` bigint(10) DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messconv_typ_ix` (`type`),
  KEY `[[dbprefix]]messconv_con_ix` (`convhash`),
  KEY `[[dbprefix]]messconv_comiteiteco_ix` (`component`,`itemtype`,`itemid`,`contextid`),
  KEY `[[dbprefix]]messconv_con2_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all message conversations' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_conversation_actions`
--

CREATE TABLE `[[dbprefix]]message_conversation_actions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `conversationid` bigint(10) NOT NULL,
  `action` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messconvacti_use_ix` (`userid`),
  KEY `[[dbprefix]]messconvacti_con_ix` (`conversationid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all per-user actions on individual conversations' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_conversation_members`
--

CREATE TABLE `[[dbprefix]]message_conversation_members` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `conversationid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messconvmemb_con_ix` (`conversationid`),
  KEY `[[dbprefix]]messconvmemb_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all members in a conversations' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_email_messages`
--

CREATE TABLE `[[dbprefix]]message_email_messages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridto` bigint(10) NOT NULL,
  `conversationid` bigint(10) NOT NULL,
  `messageid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messemaimess_use_ix` (`useridto`),
  KEY `[[dbprefix]]messemaimess_con_ix` (`conversationid`),
  KEY `[[dbprefix]]messemaimess_mes_ix` (`messageid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Keeps track of what emails to send in an email digest' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_popup`
--

CREATE TABLE `[[dbprefix]]message_popup` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `messageid` bigint(10) NOT NULL,
  `isread` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messpopu_mesisr_uix` (`messageid`,`isread`),
  KEY `[[dbprefix]]messpopu_isr_ix` (`isread`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Keep state of notifications for the popup message processor' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_popup_notifications`
--

CREATE TABLE `[[dbprefix]]message_popup_notifications` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `notificationid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messpopunoti_not_ix` (`notificationid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='List of notifications to display in the message output popup' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_processors`
--

CREATE TABLE `[[dbprefix]]message_processors` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(166) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='List of message output plugins' AUTO_INCREMENT=5 ;

--
-- Dumping data for table `[[dbprefix]]message_processors`
--

INSERT INTO `[[dbprefix]]message_processors` VALUES
(1, 'airnotifier', 1),
(2, 'email', 1),
(3, 'jabber', 1),
(4, 'popup', 1);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_providers`
--

CREATE TABLE `[[dbprefix]]message_providers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL DEFAULT '',
  `component` varchar(200) NOT NULL DEFAULT '',
  `capability` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messprov_comnam_uix` (`component`,`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table stores the message providers (modules and core sy' AUTO_INCREMENT=41 ;

--
-- Dumping data for table `[[dbprefix]]message_providers`
--

INSERT INTO `[[dbprefix]]message_providers` VALUES
(1, 'notices', 'moodle', 'moodle/site:config'),
(2, 'errors', 'moodle', 'moodle/site:config'),
(3, 'availableupdate', 'moodle', 'moodle/site:config'),
(4, 'instantmessage', 'moodle', NULL),
(5, 'backup', 'moodle', 'moodle/site:config'),
(6, 'courserequested', 'moodle', 'moodle/site:approvecourse'),
(7, 'courserequestapproved', 'moodle', 'moodle/course:request'),
(8, 'courserequestrejected', 'moodle', 'moodle/course:request'),
(9, 'coursecompleted', 'moodle', NULL),
(10, 'badgerecipientnotice', 'moodle', 'moodle/badges:earnbadge'),
(11, 'badgecreatornotice', 'moodle', NULL),
(12, 'competencyplancomment', 'moodle', NULL),
(13, 'competencyusercompcomment', 'moodle', NULL),
(14, 'insights', 'moodle', NULL),
(15, 'messagecontactrequests', 'moodle', NULL),
(16, 'asyncbackupnotification', 'moodle', NULL),
(17, 'gradenotifications', 'moodle', NULL),
(18, 'infected', 'moodle', 'moodle/site:config'),
(19, 'assign_notification', 'mod_assign', NULL),
(20, 'assignment_updates', 'mod_assignment', NULL),
(21, 'submission', 'mod_feedback', NULL),
(22, 'message', 'mod_feedback', NULL),
(23, 'posts', 'mod_forum', NULL),
(24, 'digests', 'mod_forum', NULL),
(25, 'graded_essay', 'mod_lesson', NULL),
(26, 'submission', 'mod_quiz', 'mod/quiz:emailnotifysubmission'),
(27, 'confirmation', 'mod_quiz', 'mod/quiz:emailconfirmsubmission'),
(28, 'attempt_overdue', 'mod_quiz', 'mod/quiz:emailwarnoverdue'),
(29, 'flatfile_enrolment', 'enrol_flatfile', NULL),
(30, 'imsenterprise_enrolment', 'enrol_imsenterprise', NULL),
(31, 'expiry_notification', 'enrol_manual', NULL),
(32, 'paypal_enrolment', 'enrol_paypal', NULL),
(33, 'expiry_notification', 'enrol_self', NULL),
(34, 'contactdataprotectionofficer', 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests'),
(35, 'datarequestprocessingresults', 'tool_dataprivacy', NULL),
(36, 'notifyexceptions', 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests'),
(37, 'invalidrecipienthandler', 'tool_messageinbound', NULL),
(38, 'messageprocessingerror', 'tool_messageinbound', NULL),
(39, 'messageprocessingsuccess', 'tool_messageinbound', NULL),
(40, 'notification', 'tool_monitor', 'tool/monitor:subscribe');

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_read`
--

CREATE TABLE `[[dbprefix]]message_read` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridfrom` bigint(10) NOT NULL DEFAULT '0',
  `useridto` bigint(10) NOT NULL DEFAULT '0',
  `subject` longtext,
  `fullmessage` longtext,
  `fullmessageformat` smallint(4) DEFAULT '0',
  `fullmessagehtml` longtext,
  `smallmessage` longtext,
  `notification` tinyint(1) DEFAULT '0',
  `contexturl` longtext,
  `contexturlname` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timeread` bigint(10) NOT NULL DEFAULT '0',
  `timeuserfromdeleted` bigint(10) NOT NULL DEFAULT '0',
  `timeusertodeleted` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) DEFAULT NULL,
  `eventtype` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]messread_useusetimti_ix` (`useridfrom`,`useridto`,`timeuserfromdeleted`,`timeusertodeleted`),
  KEY `[[dbprefix]]messread_nottim_ix` (`notification`,`timeread`),
  KEY `[[dbprefix]]messread_usetimnot_ix` (`useridfrom`,`timeuserfromdeleted`,`notification`),
  KEY `[[dbprefix]]messread_usetimnot2_ix` (`useridto`,`timeusertodeleted`,`notification`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all messages that have been read' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_users_blocked`
--

CREATE TABLE `[[dbprefix]]message_users_blocked` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `blockeduserid` bigint(10) NOT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messuserbloc_useblo_uix` (`userid`,`blockeduserid`),
  KEY `[[dbprefix]]messuserbloc_use_ix` (`userid`),
  KEY `[[dbprefix]]messuserbloc_blo_ix` (`blockeduserid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Maintains lists of blocked users' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]message_user_actions`
--

CREATE TABLE `[[dbprefix]]message_user_actions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `messageid` bigint(10) NOT NULL,
  `action` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]messuseracti_usemes_uix` (`userid`,`messageid`,`action`),
  KEY `[[dbprefix]]messuseracti_use_ix` (`userid`),
  KEY `[[dbprefix]]messuseracti_mes_ix` (`messageid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all per-user actions on individual messages' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnetservice_enrol_courses`
--

CREATE TABLE `[[dbprefix]]mnetservice_enrol_courses` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hostid` bigint(10) NOT NULL,
  `remoteid` bigint(10) NOT NULL,
  `categoryid` bigint(10) NOT NULL,
  `categoryname` varchar(255) NOT NULL DEFAULT '',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `fullname` varchar(254) NOT NULL DEFAULT '',
  `shortname` varchar(100) NOT NULL DEFAULT '',
  `idnumber` varchar(100) NOT NULL DEFAULT '',
  `summary` longtext NOT NULL,
  `summaryformat` smallint(3) DEFAULT '0',
  `startdate` bigint(10) NOT NULL,
  `roleid` bigint(10) NOT NULL,
  `rolename` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]mnetenrocour_hosrem_uix` (`hostid`,`remoteid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Caches the information fetched via XML-RPC about courses on ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnetservice_enrol_enrolments`
--

CREATE TABLE `[[dbprefix]]mnetservice_enrol_enrolments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hostid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `remotecourseid` bigint(10) NOT NULL,
  `rolename` varchar(255) NOT NULL DEFAULT '',
  `enroltime` bigint(10) NOT NULL DEFAULT '0',
  `enroltype` varchar(20) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mnetenroenro_use_ix` (`userid`),
  KEY `[[dbprefix]]mnetenroenro_hos_ix` (`hostid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Caches the information about enrolments of our local users i' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_application`
--

CREATE TABLE `[[dbprefix]]mnet_application` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `display_name` varchar(50) NOT NULL DEFAULT '',
  `xmlrpc_server_url` varchar(255) NOT NULL DEFAULT '',
  `sso_land_url` varchar(255) NOT NULL DEFAULT '',
  `sso_jump_url` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Information about applications on remote hosts' AUTO_INCREMENT=3 ;

--
-- Dumping data for table `[[dbprefix]]mnet_application`
--

INSERT INTO `[[dbprefix]]mnet_application` VALUES
(1, 'moodle', 'Moodle', '/mnet/xmlrpc/server.php', '/auth/mnet/land.php', '/auth/mnet/jump.php'),
(2, 'mahara', 'Mahara', '/api/xmlrpc/server.php', '/auth/xmlrpc/land.php', '/auth/xmlrpc/jump.php');

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_host`
--

CREATE TABLE `[[dbprefix]]mnet_host` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `wwwroot` varchar(255) NOT NULL DEFAULT '',
  `ip_address` varchar(45) NOT NULL DEFAULT '',
  `name` varchar(80) NOT NULL DEFAULT '',
  `public_key` longtext NOT NULL,
  `public_key_expires` bigint(10) NOT NULL DEFAULT '0',
  `transport` tinyint(2) NOT NULL DEFAULT '0',
  `portno` mediumint(5) NOT NULL DEFAULT '0',
  `last_connect_time` bigint(10) NOT NULL DEFAULT '0',
  `last_log_id` bigint(10) NOT NULL DEFAULT '0',
  `force_theme` tinyint(1) NOT NULL DEFAULT '0',
  `theme` varchar(100) DEFAULT NULL,
  `applicationid` bigint(10) NOT NULL DEFAULT '1',
  `sslverification` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mnethost_app_ix` (`applicationid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Information about the local and remote hosts for RPC' AUTO_INCREMENT=3 ;

--
-- Dumping data for table `[[dbprefix]]mnet_host`
--

INSERT INTO `[[dbprefix]]mnet_host` VALUES
(1, 0, '[[softurl]]', '[[serverip]]', '', '', 0, 0, 0, 0, 0, 0, NULL, 1, 0),
(2, 0, '', '', 'All Hosts', '', 0, 0, 0, 0, 0, 0, NULL, 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_host2service`
--

CREATE TABLE `[[dbprefix]]mnet_host2service` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hostid` bigint(10) NOT NULL DEFAULT '0',
  `serviceid` bigint(10) NOT NULL DEFAULT '0',
  `publish` tinyint(1) NOT NULL DEFAULT '0',
  `subscribe` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]mnethost_hosser_uix` (`hostid`,`serviceid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Information about the services for a given host' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_log`
--

CREATE TABLE `[[dbprefix]]mnet_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hostid` bigint(10) NOT NULL DEFAULT '0',
  `remoteid` bigint(10) NOT NULL DEFAULT '0',
  `time` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `ip` varchar(45) NOT NULL DEFAULT '',
  `course` bigint(10) NOT NULL DEFAULT '0',
  `coursename` varchar(40) NOT NULL DEFAULT '',
  `module` varchar(20) NOT NULL DEFAULT '',
  `cmid` bigint(10) NOT NULL DEFAULT '0',
  `action` varchar(40) NOT NULL DEFAULT '',
  `url` varchar(100) NOT NULL DEFAULT '',
  `info` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mnetlog_hosusecou_ix` (`hostid`,`userid`,`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Store session data from users migrating to other sites' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_remote_rpc`
--

CREATE TABLE `[[dbprefix]]mnet_remote_rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `functionname` varchar(40) NOT NULL DEFAULT '',
  `xmlrpcpath` varchar(80) NOT NULL DEFAULT '',
  `plugintype` varchar(20) NOT NULL DEFAULT '',
  `pluginname` varchar(20) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table describes functions that might be called remotely' AUTO_INCREMENT=17 ;

--
-- Dumping data for table `[[dbprefix]]mnet_remote_rpc`
--

INSERT INTO `[[dbprefix]]mnet_remote_rpc` VALUES
(1, 'user_authorise', 'auth/mnet/auth.php/user_authorise', 'auth', 'mnet', 1),
(2, 'keepalive_server', 'auth/mnet/auth.php/keepalive_server', 'auth', 'mnet', 1),
(3, 'kill_children', 'auth/mnet/auth.php/kill_children', 'auth', 'mnet', 1),
(4, 'refresh_log', 'auth/mnet/auth.php/refresh_log', 'auth', 'mnet', 1),
(5, 'fetch_user_image', 'auth/mnet/auth.php/fetch_user_image', 'auth', 'mnet', 1),
(6, 'fetch_theme_info', 'auth/mnet/auth.php/fetch_theme_info', 'auth', 'mnet', 1),
(7, 'update_enrolments', 'auth/mnet/auth.php/update_enrolments', 'auth', 'mnet', 1),
(8, 'keepalive_client', 'auth/mnet/auth.php/keepalive_client', 'auth', 'mnet', 1),
(9, 'kill_child', 'auth/mnet/auth.php/kill_child', 'auth', 'mnet', 1),
(10, 'available_courses', 'enrol/mnet/enrol.php/available_courses', 'enrol', 'mnet', 1),
(11, 'user_enrolments', 'enrol/mnet/enrol.php/user_enrolments', 'enrol', 'mnet', 1),
(12, 'enrol_user', 'enrol/mnet/enrol.php/enrol_user', 'enrol', 'mnet', 1),
(13, 'unenrol_user', 'enrol/mnet/enrol.php/unenrol_user', 'enrol', 'mnet', 1),
(14, 'course_enrolments', 'enrol/mnet/enrol.php/course_enrolments', 'enrol', 'mnet', 1),
(15, 'send_content_intent', 'portfolio/mahara/lib.php/send_content_intent', 'portfolio', 'mahara', 1),
(16, 'send_content_ready', 'portfolio/mahara/lib.php/send_content_ready', 'portfolio', 'mahara', 1);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_remote_service2rpc`
--

CREATE TABLE `[[dbprefix]]mnet_remote_service2rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `serviceid` bigint(10) NOT NULL DEFAULT '0',
  `rpcid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]mnetremoserv_rpcser_uix` (`rpcid`,`serviceid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Group functions or methods under a service' AUTO_INCREMENT=17 ;

--
-- Dumping data for table `[[dbprefix]]mnet_remote_service2rpc`
--

INSERT INTO `[[dbprefix]]mnet_remote_service2rpc` VALUES
(1, 1, 1),
(2, 1, 2),
(3, 1, 3),
(4, 1, 4),
(5, 1, 5),
(6, 1, 6),
(7, 1, 7),
(8, 2, 8),
(9, 2, 9),
(10, 3, 10),
(11, 3, 11),
(12, 3, 12),
(13, 3, 13),
(14, 3, 14),
(15, 4, 15),
(16, 4, 16);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_rpc`
--

CREATE TABLE `[[dbprefix]]mnet_rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `functionname` varchar(40) NOT NULL DEFAULT '',
  `xmlrpcpath` varchar(80) NOT NULL DEFAULT '',
  `plugintype` varchar(20) NOT NULL DEFAULT '',
  `pluginname` varchar(20) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `help` longtext NOT NULL,
  `profile` longtext NOT NULL,
  `filename` varchar(100) NOT NULL DEFAULT '',
  `classname` varchar(150) DEFAULT NULL,
  `static` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mnetrpc_enaxml_ix` (`enabled`,`xmlrpcpath`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Functions or methods that we may publish or subscribe to' AUTO_INCREMENT=16 ;

--
-- Dumping data for table `[[dbprefix]]mnet_rpc`
--

INSERT INTO `[[dbprefix]]mnet_rpc` VALUES
(1, 'user_authorise', 'auth/mnet/auth.php/user_authorise', 'auth', 'mnet', 1, 'Return user data for the provided token, compare with user_agent string.', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:5:"token";s:4:"type";s:6:"string";s:11:"description";s:37:"The unique ID provided by remotehost.";}i:1;a:3:{s:4:"name";s:9:"useragent";s:4:"type";s:6:"string";s:11:"description";s:18:"User Agent string.";}}s:6:"return";a:2:{s:4:"type";s:5:"array";s:11:"description";s:44:"$userdata Array of user info for remote host";}}', 'auth.php', 'auth_plugin_mnet', 0),
(2, 'keepalive_server', 'auth/mnet/auth.php/keepalive_server', 'auth', 'mnet', 1, 'Receives an array of usernames from a remote machine and prods their\nsessions to keep them alive', 'a:2:{s:10:"parameters";a:1:{i:0;a:3:{s:4:"name";s:5:"array";s:4:"type";s:5:"array";s:11:"description";s:21:"An array of usernames";}}s:6:"return";a:2:{s:4:"type";s:6:"string";s:11:"description";s:28:""All ok" or an error message";}}', 'auth.php', 'auth_plugin_mnet', 0),
(3, 'kill_children', 'auth/mnet/auth.php/kill_children', 'auth', 'mnet', 1, 'The IdP uses this function to kill child sessions on other hosts', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:8:"username";s:4:"type";s:6:"string";s:11:"description";s:28:"Username for session to kill";}i:1;a:3:{s:4:"name";s:9:"useragent";s:4:"type";s:6:"string";s:11:"description";s:35:"SHA1 hash of user agent to look for";}}s:6:"return";a:2:{s:4:"type";s:6:"string";s:11:"description";s:39:"A plaintext report of what has happened";}}', 'auth.php', 'auth_plugin_mnet', 0),
(4, 'refresh_log', 'auth/mnet/auth.php/refresh_log', 'auth', 'mnet', 1, 'Receives an array of log entries from an SP and adds them to the mnet_log\ntable', 'a:2:{s:10:"parameters";a:1:{i:0;a:3:{s:4:"name";s:5:"array";s:4:"type";s:5:"array";s:11:"description";s:21:"An array of usernames";}}s:6:"return";a:2:{s:4:"type";s:6:"string";s:11:"description";s:28:""All ok" or an error message";}}', 'auth.php', 'auth_plugin_mnet', 0),
(5, 'fetch_user_image', 'auth/mnet/auth.php/fetch_user_image', 'auth', 'mnet', 1, 'Returns the user''s profile image info\nIf the user exists and has a profile picture, the returned array will contain keys:\nf1          - the content of the default 100x100px image\nf1_mimetype - the mimetype of the f1 file\nf2          - the content of the 35x35px variant of the image\nf2_mimetype - the mimetype of the f2 file\nThe mimetype information was added in Moodle 2.0. In Moodle 1.x, images are always jpegs.', 'a:2:{s:10:"parameters";a:1:{i:0;a:3:{s:4:"name";s:8:"username";s:4:"type";s:3:"int";s:11:"description";s:18:"The id of the user";}}s:6:"return";a:2:{s:4:"type";s:11:"false|array";s:11:"description";s:84:"false if user not found, empty array if no picture exists, array with data otherwise";}}', 'auth.php', 'auth_plugin_mnet', 0),
(6, 'fetch_theme_info', 'auth/mnet/auth.php/fetch_theme_info', 'auth', 'mnet', 1, 'Returns the theme information and logo url as strings.', 'a:2:{s:10:"parameters";a:0:{}s:6:"return";a:2:{s:4:"type";s:6:"string";s:11:"description";s:14:"The theme info";}}', 'auth.php', 'auth_plugin_mnet', 0),
(7, 'update_enrolments', 'auth/mnet/auth.php/update_enrolments', 'auth', 'mnet', 1, 'Invoke this function _on_ the IDP to update it with enrolment info local to\nthe SP right after calling user_authorise()\nNormally called by the SP after calling user_authorise()', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:8:"username";s:4:"type";s:6:"string";s:11:"description";s:12:"The username";}i:1;a:3:{s:4:"name";s:7:"courses";s:4:"type";s:5:"array";s:11:"description";s:75:"Assoc array of courses following the structure of mnetservice_enrol_courses";}}s:6:"return";a:2:{s:4:"type";s:4:"bool";s:11:"description";s:0:"";}}', 'auth.php', 'auth_plugin_mnet', 0),
(8, 'keepalive_client', 'auth/mnet/auth.php/keepalive_client', 'auth', 'mnet', 1, 'Poll the IdP server to let it know that a user it has authenticated is still\nonline', 'a:2:{s:10:"parameters";a:0:{}s:6:"return";a:2:{s:4:"type";s:4:"void";s:11:"description";s:0:"";}}', 'auth.php', 'auth_plugin_mnet', 0),
(9, 'kill_child', 'auth/mnet/auth.php/kill_child', 'auth', 'mnet', 1, 'When the IdP requests that child sessions are terminated,\nthis function will be called on each of the child hosts. The machine that\ncalls the function (over xmlrpc) provides us with the mnethostid we need.', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:8:"username";s:4:"type";s:6:"string";s:11:"description";s:28:"Username for session to kill";}i:1;a:3:{s:4:"name";s:9:"useragent";s:4:"type";s:6:"string";s:11:"description";s:35:"SHA1 hash of user agent to look for";}}s:6:"return";a:2:{s:4:"type";s:4:"bool";s:11:"description";s:15:"True on success";}}', 'auth.php', 'auth_plugin_mnet', 0),
(10, 'available_courses', 'enrol/mnet/enrol.php/available_courses', 'enrol', 'mnet', 1, 'Returns list of courses that we offer to the caller for remote enrolment of their users\nSince Moodle 2.0, courses are made available for MNet peers by creating an instance\nof enrol_mnet plugin for the course. Hidden courses are not returned. If there are two\ninstances - one specific for the host and one for ''All hosts'', the setting of the specific\none is used. The id of the peer is kept in customint1, no other custom fields are used.', 'a:2:{s:10:"parameters";a:0:{}s:6:"return";a:2:{s:4:"type";s:5:"array";s:11:"description";s:0:"";}}', 'enrol.php', 'enrol_mnet_mnetservice_enrol', 0),
(11, 'user_enrolments', 'enrol/mnet/enrol.php/user_enrolments', 'enrol', 'mnet', 1, 'This method has never been implemented in Moodle MNet API', 'a:2:{s:10:"parameters";a:0:{}s:6:"return";a:2:{s:4:"type";s:5:"array";s:11:"description";s:11:"empty array";}}', 'enrol.php', 'enrol_mnet_mnetservice_enrol', 0),
(12, 'enrol_user', 'enrol/mnet/enrol.php/enrol_user', 'enrol', 'mnet', 1, 'Enrol remote user to our course\nIf we do not have local record for the remote user in our database,\nit gets created here.', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:8:"userdata";s:4:"type";s:5:"array";s:11:"description";s:43:"user details {@see mnet_fields_to_import()}";}i:1;a:3:{s:4:"name";s:8:"courseid";s:4:"type";s:3:"int";s:11:"description";s:19:"our local course id";}}s:6:"return";a:2:{s:4:"type";s:4:"bool";s:11:"description";s:69:"true if the enrolment has been successful, throws exception otherwise";}}', 'enrol.php', 'enrol_mnet_mnetservice_enrol', 0),
(13, 'unenrol_user', 'enrol/mnet/enrol.php/unenrol_user', 'enrol', 'mnet', 1, 'Unenrol remote user from our course\nOnly users enrolled via enrol_mnet plugin can be unenrolled remotely. If the\nremote user is enrolled into the local course via some other enrol plugin\n(enrol_manual for example), the remote host can''t touch such enrolment. Please\ndo not report this behaviour as bug, it is a feature ;-)', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:8:"username";s:4:"type";s:6:"string";s:11:"description";s:18:"of the remote user";}i:1;a:3:{s:4:"name";s:8:"courseid";s:4:"type";s:3:"int";s:11:"description";s:19:"of our local course";}}s:6:"return";a:2:{s:4:"type";s:4:"bool";s:11:"description";s:71:"true if the unenrolment has been successful, throws exception otherwise";}}', 'enrol.php', 'enrol_mnet_mnetservice_enrol', 0),
(14, 'course_enrolments', 'enrol/mnet/enrol.php/course_enrolments', 'enrol', 'mnet', 1, 'Returns a list of users from the client server who are enrolled in our course\nSuitable instance of enrol_mnet must be created in the course. This method will not\nreturn any information about the enrolments in courses that are not available for\nremote enrolment, even if their users are enrolled into them via other plugin\n(note the difference from {@link self::user_enrolments()}).\nThis method will return enrolment information for users from hosts regardless\nthe enrolment plugin. It does not matter if the user was enrolled remotely by\ntheir admin or locally. Once the course is available for remote enrolments, we\nwill tell them everything about their users.\nIn Moodle 1.x the returned array used to be indexed by username. The side effect\nof MDL-19219 fix is that we do not need to use such index and therefore we can\nreturn all enrolment records. MNet clients 1.x will only use the last record for\nthe student, if she is enrolled via multiple plugins.', 'a:2:{s:10:"parameters";a:2:{i:0;a:3:{s:4:"name";s:8:"courseid";s:4:"type";s:3:"int";s:11:"description";s:16:"ID of our course";}i:1;a:3:{s:4:"name";s:5:"roles";s:4:"type";s:12:"string|array";s:11:"description";s:58:"comma separated list of role shortnames (or array of them)";}}s:6:"return";a:2:{s:4:"type";s:5:"array";s:11:"description";s:0:"";}}', 'enrol.php', 'enrol_mnet_mnetservice_enrol', 0),
(15, 'fetch_file', 'portfolio/mahara/lib.php/fetch_file', 'portfolio', 'mahara', 1, 'xmlrpc (mnet) function to get the file.\nreads in the file and returns it base_64 encoded\nso that it can be enrypted by mnet.', 'a:2:{s:10:"parameters";a:1:{i:0;a:3:{s:4:"name";s:5:"token";s:4:"type";s:6:"string";s:11:"description";s:56:"the token recieved previously during send_content_intent";}}s:6:"return";a:2:{s:4:"type";s:4:"void";s:11:"description";s:0:"";}}', 'lib.php', 'portfolio_plugin_mahara', 1);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_service`
--

CREATE TABLE `[[dbprefix]]mnet_service` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(40) NOT NULL DEFAULT '',
  `description` varchar(40) NOT NULL DEFAULT '',
  `apiversion` varchar(10) NOT NULL DEFAULT '',
  `offer` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='A service is a group of functions' AUTO_INCREMENT=5 ;

--
-- Dumping data for table `[[dbprefix]]mnet_service`
--

INSERT INTO `[[dbprefix]]mnet_service` VALUES
(1, 'sso_idp', '', '1', 1),
(2, 'sso_sp', '', '1', 1),
(3, 'mnet_enrol', '', '1', 1),
(4, 'pf', '', '1', 1);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_service2rpc`
--

CREATE TABLE `[[dbprefix]]mnet_service2rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `serviceid` bigint(10) NOT NULL DEFAULT '0',
  `rpcid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]mnetserv_rpcser_uix` (`rpcid`,`serviceid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Group functions or methods under a service' AUTO_INCREMENT=16 ;

--
-- Dumping data for table `[[dbprefix]]mnet_service2rpc`
--

INSERT INTO `[[dbprefix]]mnet_service2rpc` VALUES
(1, 1, 1),
(2, 1, 2),
(3, 1, 3),
(4, 1, 4),
(5, 1, 5),
(6, 1, 6),
(7, 1, 7),
(8, 2, 8),
(9, 2, 9),
(10, 3, 10),
(11, 3, 11),
(12, 3, 12),
(13, 3, 13),
(14, 3, 14),
(15, 4, 15);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_session`
--

CREATE TABLE `[[dbprefix]]mnet_session` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `username` varchar(100) NOT NULL DEFAULT '',
  `token` varchar(40) NOT NULL DEFAULT '',
  `mnethostid` bigint(10) NOT NULL DEFAULT '0',
  `useragent` varchar(40) NOT NULL DEFAULT '',
  `confirm_timeout` bigint(10) NOT NULL DEFAULT '0',
  `session_id` varchar(40) NOT NULL DEFAULT '',
  `expires` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]mnetsess_tok_uix` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Store session data from users migrating to other sites' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]mnet_sso_access_control`
--

CREATE TABLE `[[dbprefix]]mnet_sso_access_control` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL DEFAULT '',
  `mnet_host_id` bigint(10) NOT NULL DEFAULT '0',
  `accessctrl` varchar(20) NOT NULL DEFAULT 'allow',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]mnetssoaccecont_mne_uix` (`mnet_host_id`,`username`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Users by host permitted (or not) to login from a remote prov' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]modules`
--

CREATE TABLE `[[dbprefix]]modules` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `cron` bigint(10) NOT NULL DEFAULT '0',
  `lastcron` bigint(10) NOT NULL DEFAULT '0',
  `search` varchar(255) NOT NULL DEFAULT '',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]modu_nam_ix` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='modules available in the site' AUTO_INCREMENT=24 ;

--
-- Dumping data for table `[[dbprefix]]modules`
--

INSERT INTO `[[dbprefix]]modules` VALUES
(1, 'assign', 0, 0, '', 1),
(2, 'assignment', 60, 0, '', 0),
(3, 'book', 0, 0, '', 1),
(4, 'chat', 0, 0, '', 1),
(5, 'choice', 0, 0, '', 1),
(6, 'data', 0, 0, '', 1),
(7, 'feedback', 0, 0, '', 1),
(8, 'folder', 0, 0, '', 1),
(9, 'forum', 0, 0, '', 1),
(10, 'glossary', 0, 0, '', 1),
(11, 'h5pactivity', 0, 0, '', 1),
(12, 'imscp', 0, 0, '', 1),
(13, 'label', 0, 0, '', 1),
(14, 'lesson', 0, 0, '', 1),
(15, 'lti', 0, 0, '', 1),
(16, 'page', 0, 0, '', 1),
(17, 'quiz', 0, 0, '', 1),
(18, 'resource', 0, 0, '', 1),
(19, 'scorm', 0, 0, '', 1),
(20, 'survey', 0, 0, '', 1),
(21, 'url', 0, 0, '', 1),
(22, 'wiki', 0, 0, '', 1),
(23, 'workshop', 0, 0, '', 1);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]my_pages`
--

CREATE TABLE `[[dbprefix]]my_pages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) DEFAULT '0',
  `name` varchar(200) NOT NULL DEFAULT '',
  `private` tinyint(1) NOT NULL DEFAULT '1',
  `sortorder` mediumint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]mypage_usepri_ix` (`userid`,`private`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Extra user pages for the My Moodle system' AUTO_INCREMENT=4 ;

--
-- Dumping data for table `[[dbprefix]]my_pages`
--

INSERT INTO `[[dbprefix]]my_pages` VALUES
(1, NULL, '__default', 0, 0),
(2, NULL, '__default', 1, 0),
(3, 2, '__default', 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]notifications`
--

CREATE TABLE `[[dbprefix]]notifications` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridfrom` bigint(10) NOT NULL,
  `useridto` bigint(10) NOT NULL,
  `subject` longtext,
  `fullmessage` longtext,
  `fullmessageformat` tinyint(1) NOT NULL DEFAULT '0',
  `fullmessagehtml` longtext,
  `smallmessage` longtext,
  `component` varchar(100) DEFAULT NULL,
  `eventtype` varchar(100) DEFAULT NULL,
  `contexturl` longtext,
  `contexturlname` longtext,
  `timeread` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `customdata` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]noti_use_ix` (`useridfrom`),
  KEY `[[dbprefix]]noti_use2_ix` (`useridto`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores all notifications' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]oauth2_access_token`
--

CREATE TABLE `[[dbprefix]]oauth2_access_token` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `issuerid` bigint(10) NOT NULL,
  `token` longtext NOT NULL,
  `expires` bigint(10) NOT NULL,
  `scope` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]oautaccetoke_iss_uix` (`issuerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores access tokens for system accounts in order to be able' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]oauth2_endpoint`
--

CREATE TABLE `[[dbprefix]]oauth2_endpoint` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `url` longtext NOT NULL,
  `issuerid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]oautendp_iss_ix` (`issuerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Describes the named endpoint for an oauth2 service.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]oauth2_issuer`
--

CREATE TABLE `[[dbprefix]]oauth2_issuer` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `image` longtext NOT NULL,
  `baseurl` longtext NOT NULL,
  `clientid` longtext NOT NULL,
  `clientsecret` longtext NOT NULL,
  `loginscopes` longtext NOT NULL,
  `loginscopesoffline` longtext NOT NULL,
  `loginparams` longtext NOT NULL,
  `loginparamsoffline` longtext NOT NULL,
  `alloweddomains` longtext NOT NULL,
  `scopessupported` longtext,
  `enabled` tinyint(2) NOT NULL DEFAULT '1',
  `showonloginpage` tinyint(2) NOT NULL DEFAULT '1',
  `basicauth` tinyint(2) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL,
  `requireconfirmation` tinyint(2) NOT NULL DEFAULT '1',
  `servicetype` varchar(255) DEFAULT NULL,
  `loginpagename` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Details for an oauth 2 connect identity issuer.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]oauth2_refresh_token`
--

CREATE TABLE `[[dbprefix]]oauth2_refresh_token` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `issuerid` bigint(10) NOT NULL,
  `token` longtext NOT NULL,
  `scopehash` varchar(40) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]oautrefrtoke_useiss_uix` (`userid`,`issuerid`,`scopehash`),
  KEY `[[dbprefix]]oautrefrtoke_iss_ix` (`issuerid`),
  KEY `[[dbprefix]]oautrefrtoke_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores refresh tokens which can be exchanged for access toke' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]oauth2_system_account`
--

CREATE TABLE `[[dbprefix]]oauth2_system_account` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `issuerid` bigint(10) NOT NULL,
  `refreshtoken` longtext NOT NULL,
  `grantedscopes` longtext NOT NULL,
  `email` longtext,
  `username` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]oautsystacco_iss_uix` (`issuerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stored details used to get an access token as a system user ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]oauth2_user_field_mapping`
--

CREATE TABLE `[[dbprefix]]oauth2_user_field_mapping` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timemodified` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `issuerid` bigint(10) NOT NULL,
  `externalfield` varchar(500) NOT NULL DEFAULT '',
  `internalfield` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]oautuserfielmapp_is_uix` (`issuerid`,`internalfield`),
  KEY `[[dbprefix]]oautuserfielmapp_iss_ix` (`issuerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Mapping of oauth user fields to moodle fields.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]page`
--

CREATE TABLE `[[dbprefix]]page` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `content` longtext,
  `contentformat` smallint(4) NOT NULL DEFAULT '0',
  `legacyfiles` smallint(4) NOT NULL DEFAULT '0',
  `legacyfileslast` bigint(10) DEFAULT NULL,
  `display` smallint(4) NOT NULL DEFAULT '0',
  `displayoptions` longtext,
  `revision` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]page_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each record is one page and its config data' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]paygw_paypal`
--

CREATE TABLE `[[dbprefix]]paygw_paypal` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `paymentid` bigint(10) NOT NULL,
  `pp_orderid` varchar(255) NOT NULL DEFAULT 'The ID of the order in PayPal',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]paygpayp_pay_uix` (`paymentid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores PayPal related information' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]payments`
--

CREATE TABLE `[[dbprefix]]payments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `component` varchar(100) NOT NULL DEFAULT '',
  `paymentarea` varchar(50) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `amount` varchar(20) NOT NULL DEFAULT '',
  `currency` varchar(3) NOT NULL DEFAULT '',
  `accountid` bigint(10) NOT NULL,
  `gateway` varchar(100) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]paym_gat_ix` (`gateway`),
  KEY `[[dbprefix]]paym_compayite_ix` (`component`,`paymentarea`,`itemid`),
  KEY `[[dbprefix]]paym_use_ix` (`userid`),
  KEY `[[dbprefix]]paym_acc_ix` (`accountid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores information about payments' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]payment_accounts`
--

CREATE TABLE `[[dbprefix]]payment_accounts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `idnumber` varchar(100) DEFAULT NULL,
  `contextid` bigint(10) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Payment accounts' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]payment_gateways`
--

CREATE TABLE `[[dbprefix]]payment_gateways` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `accountid` bigint(10) NOT NULL,
  `gateway` varchar(100) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `config` longtext,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]paymgate_acc_ix` (`accountid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Configuration for one gateway for one payment account' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]portfolio_instance`
--

CREATE TABLE `[[dbprefix]]portfolio_instance` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `plugin` varchar(50) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='base table (not including config data) for instances of port' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]portfolio_instance_config`
--

CREATE TABLE `[[dbprefix]]portfolio_instance_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instance` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]portinstconf_nam_ix` (`name`),
  KEY `[[dbprefix]]portinstconf_ins_ix` (`instance`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='config for portfolio plugin instances' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]portfolio_instance_user`
--

CREATE TABLE `[[dbprefix]]portfolio_instance_user` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instance` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]portinstuser_ins_ix` (`instance`),
  KEY `[[dbprefix]]portinstuser_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='user data for portfolio instances.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]portfolio_log`
--

CREATE TABLE `[[dbprefix]]portfolio_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `time` bigint(10) NOT NULL,
  `portfolio` bigint(10) NOT NULL,
  `caller_class` varchar(150) NOT NULL DEFAULT '',
  `caller_file` varchar(255) NOT NULL DEFAULT '',
  `caller_component` varchar(255) DEFAULT NULL,
  `caller_sha1` varchar(255) NOT NULL DEFAULT '',
  `tempdataid` bigint(10) NOT NULL DEFAULT '0',
  `returnurl` varchar(255) NOT NULL DEFAULT '',
  `continueurl` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]portlog_use_ix` (`userid`),
  KEY `[[dbprefix]]portlog_por_ix` (`portfolio`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='log of portfolio transfers (used to later check for duplicat' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]portfolio_mahara_queue`
--

CREATE TABLE `[[dbprefix]]portfolio_mahara_queue` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `transferid` bigint(10) NOT NULL,
  `token` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]portmahaqueu_tok_ix` (`token`),
  KEY `[[dbprefix]]portmahaqueu_tra_ix` (`transferid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='maps mahara tokens to transfer ids' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]portfolio_tempdata`
--

CREATE TABLE `[[dbprefix]]portfolio_tempdata` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `data` longtext,
  `expirytime` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `instance` bigint(10) DEFAULT '0',
  `queued` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]porttemp_use_ix` (`userid`),
  KEY `[[dbprefix]]porttemp_ins_ix` (`instance`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='stores temporary data for portfolio exports. the id of this ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]post`
--

CREATE TABLE `[[dbprefix]]post` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `module` varchar(20) NOT NULL DEFAULT '',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `moduleid` bigint(10) NOT NULL DEFAULT '0',
  `coursemoduleid` bigint(10) NOT NULL DEFAULT '0',
  `subject` varchar(128) NOT NULL DEFAULT '',
  `summary` longtext,
  `content` longtext,
  `uniquehash` varchar(255) NOT NULL DEFAULT '',
  `rating` bigint(10) NOT NULL DEFAULT '0',
  `format` bigint(10) NOT NULL DEFAULT '0',
  `summaryformat` tinyint(2) NOT NULL DEFAULT '0',
  `attachment` varchar(100) DEFAULT NULL,
  `publishstate` varchar(20) NOT NULL DEFAULT 'draft',
  `lastmodified` bigint(10) NOT NULL DEFAULT '0',
  `created` bigint(10) NOT NULL DEFAULT '0',
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]post_iduse_uix` (`id`,`userid`),
  KEY `[[dbprefix]]post_las_ix` (`lastmodified`),
  KEY `[[dbprefix]]post_mod_ix` (`module`),
  KEY `[[dbprefix]]post_sub_ix` (`subject`),
  KEY `[[dbprefix]]post_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Generic post table to hold data blog entries etc in differen' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]profiling`
--

CREATE TABLE `[[dbprefix]]profiling` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `runid` varchar(32) NOT NULL DEFAULT '',
  `url` varchar(255) NOT NULL DEFAULT '',
  `data` longtext NOT NULL,
  `totalexecutiontime` bigint(10) NOT NULL,
  `totalcputime` bigint(10) NOT NULL,
  `totalcalls` bigint(10) NOT NULL,
  `totalmemory` bigint(10) NOT NULL,
  `runreference` tinyint(2) NOT NULL DEFAULT '0',
  `runcomment` varchar(255) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]prof_run_uix` (`runid`),
  KEY `[[dbprefix]]prof_urlrun_ix` (`url`,`runreference`),
  KEY `[[dbprefix]]prof_timrun_ix` (`timecreated`,`runreference`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the results of all the profiling runs' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_ddimageortext`
--

CREATE TABLE `[[dbprefix]]qtype_ddimageortext` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypddim_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines drag and drop (text or images onto a background imag' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_ddimageortext_drags`
--

CREATE TABLE `[[dbprefix]]qtype_ddimageortext_drags` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `draggroup` bigint(10) NOT NULL DEFAULT '0',
  `infinite` smallint(4) NOT NULL DEFAULT '0',
  `label` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypddimdrag_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Images to drag. Actual file names are not stored here we use' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_ddimageortext_drops`
--

CREATE TABLE `[[dbprefix]]qtype_ddimageortext_drops` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `xleft` bigint(10) NOT NULL DEFAULT '0',
  `ytop` bigint(10) NOT NULL DEFAULT '0',
  `choice` bigint(10) NOT NULL DEFAULT '0',
  `label` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypddimdrop_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Drop boxes' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_ddmarker`
--

CREATE TABLE `[[dbprefix]]qtype_ddmarker` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  `showmisplaced` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypddma_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines drag and drop (text or images onto a background imag' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_ddmarker_drags`
--

CREATE TABLE `[[dbprefix]]qtype_ddmarker_drags` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `label` longtext NOT NULL,
  `infinite` smallint(4) NOT NULL DEFAULT '0',
  `noofdrags` bigint(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypddmadrag_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Labels for markers to drag.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_ddmarker_drops`
--

CREATE TABLE `[[dbprefix]]qtype_ddmarker_drops` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `shape` varchar(255) DEFAULT NULL,
  `coords` longtext NOT NULL,
  `choice` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypddmadrop_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='drop regions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_essay_options`
--

CREATE TABLE `[[dbprefix]]qtype_essay_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL,
  `responseformat` varchar(16) NOT NULL DEFAULT 'editor',
  `responserequired` tinyint(2) NOT NULL DEFAULT '1',
  `responsefieldlines` smallint(4) NOT NULL DEFAULT '15',
  `minwordlimit` bigint(10) DEFAULT NULL,
  `maxwordlimit` bigint(10) DEFAULT NULL,
  `attachments` smallint(4) NOT NULL DEFAULT '0',
  `attachmentsrequired` smallint(4) NOT NULL DEFAULT '0',
  `graderinfo` longtext,
  `graderinfoformat` smallint(4) NOT NULL DEFAULT '0',
  `responsetemplate` longtext,
  `responsetemplateformat` smallint(4) NOT NULL DEFAULT '0',
  `maxbytes` bigint(10) NOT NULL DEFAULT '0',
  `filetypeslist` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]qtypessaopti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Extra options for essay questions.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_match_options`
--

CREATE TABLE `[[dbprefix]]qtype_match_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]qtypmatcopti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines the question-type specific options for matching ques' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_match_subquestions`
--

CREATE TABLE `[[dbprefix]]qtype_match_subquestions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `questiontext` longtext NOT NULL,
  `questiontextformat` tinyint(2) NOT NULL DEFAULT '0',
  `answertext` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]qtypmatcsubq_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='The subquestions that make up a matching question' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_multichoice_options`
--

CREATE TABLE `[[dbprefix]]qtype_multichoice_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `layout` smallint(4) NOT NULL DEFAULT '0',
  `single` smallint(4) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `answernumbering` varchar(10) NOT NULL DEFAULT 'abc',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  `showstandardinstruction` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]qtypmultopti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for multiple choice questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_randomsamatch_options`
--

CREATE TABLE `[[dbprefix]]qtype_randomsamatch_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `choose` bigint(10) NOT NULL DEFAULT '4',
  `subcats` tinyint(2) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]qtyprandopti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Info about a random short-answer matching question' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]qtype_shortanswer_options`
--

CREATE TABLE `[[dbprefix]]qtype_shortanswer_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `usecase` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]qtypshoropti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for short answer questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question`
--

CREATE TABLE `[[dbprefix]]question` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `category` bigint(10) NOT NULL DEFAULT '0',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `questiontext` longtext NOT NULL,
  `questiontextformat` tinyint(2) NOT NULL DEFAULT '0',
  `generalfeedback` longtext NOT NULL,
  `generalfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `defaultmark` decimal(12,7) NOT NULL DEFAULT '1.0000000',
  `penalty` decimal(12,7) NOT NULL DEFAULT '0.3333333',
  `qtype` varchar(20) NOT NULL DEFAULT '',
  `length` bigint(10) NOT NULL DEFAULT '1',
  `stamp` varchar(255) NOT NULL DEFAULT '',
  `version` varchar(255) NOT NULL DEFAULT '',
  `hidden` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `createdby` bigint(10) DEFAULT NULL,
  `modifiedby` bigint(10) DEFAULT NULL,
  `idnumber` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]ques_catidn_uix` (`category`,`idnumber`),
  KEY `[[dbprefix]]ques_qty_ix` (`qtype`),
  KEY `[[dbprefix]]ques_cat_ix` (`category`),
  KEY `[[dbprefix]]ques_par_ix` (`parent`),
  KEY `[[dbprefix]]ques_cre_ix` (`createdby`),
  KEY `[[dbprefix]]ques_mod_ix` (`modifiedby`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='The questions themselves' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_answers`
--

CREATE TABLE `[[dbprefix]]question_answers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `answer` longtext NOT NULL,
  `answerformat` tinyint(2) NOT NULL DEFAULT '0',
  `fraction` decimal(12,7) NOT NULL DEFAULT '0.0000000',
  `feedback` longtext NOT NULL,
  `feedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesansw_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Answers, with a fractional grade (0-1) and feedback' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_attempts`
--

CREATE TABLE `[[dbprefix]]question_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionusageid` bigint(10) NOT NULL,
  `slot` bigint(10) NOT NULL,
  `behaviour` varchar(32) NOT NULL DEFAULT '',
  `questionid` bigint(10) NOT NULL,
  `variant` bigint(10) NOT NULL DEFAULT '1',
  `maxmark` decimal(12,7) NOT NULL,
  `minfraction` decimal(12,7) NOT NULL,
  `maxfraction` decimal(12,7) NOT NULL DEFAULT '1.0000000',
  `flagged` tinyint(1) NOT NULL DEFAULT '0',
  `questionsummary` longtext,
  `rightanswer` longtext,
  `responsesummary` longtext,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quesatte_queslo_uix` (`questionusageid`,`slot`),
  KEY `[[dbprefix]]quesatte_beh_ix` (`behaviour`),
  KEY `[[dbprefix]]quesatte_que_ix` (`questionid`),
  KEY `[[dbprefix]]quesatte_que2_ix` (`questionusageid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each row here corresponds to an attempt at one question, as ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_attempt_steps`
--

CREATE TABLE `[[dbprefix]]question_attempt_steps` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionattemptid` bigint(10) NOT NULL,
  `sequencenumber` bigint(10) NOT NULL,
  `state` varchar(13) NOT NULL DEFAULT '',
  `fraction` decimal(12,7) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `userid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quesattestep_queseq_uix` (`questionattemptid`,`sequencenumber`),
  KEY `[[dbprefix]]quesattestep_que_ix` (`questionattemptid`),
  KEY `[[dbprefix]]quesattestep_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores one step in in a question attempt. As well as the dat' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_attempt_step_data`
--

CREATE TABLE `[[dbprefix]]question_attempt_step_data` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `attemptstepid` bigint(10) NOT NULL,
  `name` varchar(32) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesattestepdata_att_ix` (`attemptstepid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each question_attempt_step has an associative array of the d' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_calculated`
--

CREATE TABLE `[[dbprefix]]question_calculated` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `answer` bigint(10) NOT NULL DEFAULT '0',
  `tolerance` varchar(20) NOT NULL DEFAULT '0.0',
  `tolerancetype` bigint(10) NOT NULL DEFAULT '1',
  `correctanswerlength` bigint(10) NOT NULL DEFAULT '2',
  `correctanswerformat` bigint(10) NOT NULL DEFAULT '2',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quescalc_ans_ix` (`answer`),
  KEY `[[dbprefix]]quescalc_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for questions of type calculated' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_calculated_options`
--

CREATE TABLE `[[dbprefix]]question_calculated_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `synchronize` tinyint(2) NOT NULL DEFAULT '0',
  `single` smallint(4) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '0',
  `correctfeedback` longtext,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `answernumbering` varchar(10) NOT NULL DEFAULT 'abc',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quescalcopti_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for questions of type calculated' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_categories`
--

CREATE TABLE `[[dbprefix]]question_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL DEFAULT '0',
  `info` longtext NOT NULL,
  `infoformat` tinyint(2) NOT NULL DEFAULT '0',
  `stamp` varchar(255) NOT NULL DEFAULT '',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL DEFAULT '999',
  `idnumber` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quescate_consta_uix` (`contextid`,`stamp`),
  UNIQUE KEY `[[dbprefix]]quescate_conidn_uix` (`contextid`,`idnumber`),
  KEY `[[dbprefix]]quescate_con_ix` (`contextid`),
  KEY `[[dbprefix]]quescate_par_ix` (`parent`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Categories are for grouping questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_datasets`
--

CREATE TABLE `[[dbprefix]]question_datasets` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `datasetdefinition` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesdata_quedat_ix` (`question`,`datasetdefinition`),
  KEY `[[dbprefix]]quesdata_que_ix` (`question`),
  KEY `[[dbprefix]]quesdata_dat_ix` (`datasetdefinition`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Many-many relation between questions and dataset definitions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_dataset_definitions`
--

CREATE TABLE `[[dbprefix]]question_dataset_definitions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `category` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` bigint(10) NOT NULL DEFAULT '0',
  `options` varchar(255) NOT NULL DEFAULT '',
  `itemcount` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesdatadefi_cat_ix` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Organises and stores properties for dataset items' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_dataset_items`
--

CREATE TABLE `[[dbprefix]]question_dataset_items` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definition` bigint(10) NOT NULL DEFAULT '0',
  `itemnumber` bigint(10) NOT NULL DEFAULT '0',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesdataitem_def_ix` (`definition`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Individual dataset items' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_ddwtos`
--

CREATE TABLE `[[dbprefix]]question_ddwtos` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesddwt_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines drag and drop (words into sentences) questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_gapselect`
--

CREATE TABLE `[[dbprefix]]question_gapselect` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesgaps_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Defines select missing words questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_hints`
--

CREATE TABLE `[[dbprefix]]question_hints` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL,
  `hint` longtext NOT NULL,
  `hintformat` smallint(4) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(1) DEFAULT NULL,
  `clearwrong` tinyint(1) DEFAULT NULL,
  `options` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]queshint_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the the part of the question definition that gives di' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_multianswer`
--

CREATE TABLE `[[dbprefix]]question_multianswer` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `sequence` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesmult_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for multianswer questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_numerical`
--

CREATE TABLE `[[dbprefix]]question_numerical` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `answer` bigint(10) NOT NULL DEFAULT '0',
  `tolerance` varchar(255) NOT NULL DEFAULT '0.0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesnume_ans_ix` (`answer`),
  KEY `[[dbprefix]]quesnume_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for numerical questions.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_numerical_options`
--

CREATE TABLE `[[dbprefix]]question_numerical_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `showunits` smallint(4) NOT NULL DEFAULT '0',
  `unitsleft` smallint(4) NOT NULL DEFAULT '0',
  `unitgradingtype` smallint(4) NOT NULL DEFAULT '0',
  `unitpenalty` decimal(12,7) NOT NULL DEFAULT '0.1000000',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesnumeopti_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for questions of type numerical This table is also u' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_numerical_units`
--

CREATE TABLE `[[dbprefix]]question_numerical_units` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `multiplier` decimal(38,19) NOT NULL DEFAULT '1.0000000000000000000',
  `unit` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quesnumeunit_queuni_uix` (`question`,`unit`),
  KEY `[[dbprefix]]quesnumeunit_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Optional unit options for numerical questions. This table is' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_response_analysis`
--

CREATE TABLE `[[dbprefix]]question_response_analysis` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hashcode` varchar(40) NOT NULL DEFAULT '',
  `whichtries` varchar(255) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL,
  `questionid` bigint(10) NOT NULL,
  `variant` bigint(10) DEFAULT NULL,
  `subqid` varchar(100) NOT NULL DEFAULT '',
  `aid` varchar(100) DEFAULT NULL,
  `response` longtext,
  `credit` decimal(15,5) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Analysis of student responses given to questions.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_response_count`
--

CREATE TABLE `[[dbprefix]]question_response_count` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `analysisid` bigint(10) NOT NULL,
  `try` bigint(10) NOT NULL,
  `rcount` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesrespcoun_ana_ix` (`analysisid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Count for each responses for each try at a question.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_statistics`
--

CREATE TABLE `[[dbprefix]]question_statistics` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hashcode` varchar(40) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL,
  `questionid` bigint(10) NOT NULL,
  `slot` bigint(10) DEFAULT NULL,
  `subquestion` smallint(4) NOT NULL,
  `variant` bigint(10) DEFAULT NULL,
  `s` bigint(10) NOT NULL DEFAULT '0',
  `effectiveweight` decimal(15,5) DEFAULT NULL,
  `negcovar` tinyint(2) NOT NULL DEFAULT '0',
  `discriminationindex` decimal(15,5) DEFAULT NULL,
  `discriminativeefficiency` decimal(15,5) DEFAULT NULL,
  `sd` decimal(15,10) DEFAULT NULL,
  `facility` decimal(15,10) DEFAULT NULL,
  `subquestions` longtext,
  `maxmark` decimal(12,7) DEFAULT NULL,
  `positions` longtext,
  `randomguessscore` decimal(12,7) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Statistics for individual questions used in an activity.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_truefalse`
--

CREATE TABLE `[[dbprefix]]question_truefalse` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `trueanswer` bigint(10) NOT NULL DEFAULT '0',
  `falseanswer` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]questrue_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Options for True-False questions' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]question_usages`
--

CREATE TABLE `[[dbprefix]]question_usages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(255) NOT NULL DEFAULT '',
  `preferredbehaviour` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quesusag_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table''s main purpose it to assign a unique id to each a' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz`
--

CREATE TABLE `[[dbprefix]]quiz` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `timeopen` bigint(10) NOT NULL DEFAULT '0',
  `timeclose` bigint(10) NOT NULL DEFAULT '0',
  `timelimit` bigint(10) NOT NULL DEFAULT '0',
  `overduehandling` varchar(16) NOT NULL DEFAULT 'autoabandon',
  `graceperiod` bigint(10) NOT NULL DEFAULT '0',
  `preferredbehaviour` varchar(32) NOT NULL DEFAULT '',
  `canredoquestions` smallint(4) NOT NULL DEFAULT '0',
  `attempts` mediumint(6) NOT NULL DEFAULT '0',
  `attemptonlast` smallint(4) NOT NULL DEFAULT '0',
  `grademethod` smallint(4) NOT NULL DEFAULT '1',
  `decimalpoints` smallint(4) NOT NULL DEFAULT '2',
  `questiondecimalpoints` smallint(4) NOT NULL DEFAULT '-1',
  `reviewattempt` mediumint(6) NOT NULL DEFAULT '0',
  `reviewcorrectness` mediumint(6) NOT NULL DEFAULT '0',
  `reviewmarks` mediumint(6) NOT NULL DEFAULT '0',
  `reviewspecificfeedback` mediumint(6) NOT NULL DEFAULT '0',
  `reviewgeneralfeedback` mediumint(6) NOT NULL DEFAULT '0',
  `reviewrightanswer` mediumint(6) NOT NULL DEFAULT '0',
  `reviewoverallfeedback` mediumint(6) NOT NULL DEFAULT '0',
  `questionsperpage` bigint(10) NOT NULL DEFAULT '0',
  `navmethod` varchar(16) NOT NULL DEFAULT 'free',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '0',
  `sumgrades` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `grade` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `password` varchar(255) NOT NULL DEFAULT '',
  `subnet` varchar(255) NOT NULL DEFAULT '',
  `browsersecurity` varchar(32) NOT NULL DEFAULT '',
  `delay1` bigint(10) NOT NULL DEFAULT '0',
  `delay2` bigint(10) NOT NULL DEFAULT '0',
  `showuserpicture` smallint(4) NOT NULL DEFAULT '0',
  `showblocks` smallint(4) NOT NULL DEFAULT '0',
  `completionattemptsexhausted` tinyint(1) DEFAULT '0',
  `completionpass` tinyint(1) DEFAULT '0',
  `completionminattempts` bigint(10) NOT NULL DEFAULT '0',
  `allowofflineattempts` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quiz_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='The settings for each quiz.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quizaccess_seb_quizsettings`
--

CREATE TABLE `[[dbprefix]]quizaccess_seb_quizsettings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quizid` bigint(10) NOT NULL,
  `cmid` bigint(10) NOT NULL,
  `templateid` bigint(10) NOT NULL,
  `requiresafeexambrowser` tinyint(1) NOT NULL,
  `showsebtaskbar` tinyint(1) DEFAULT NULL,
  `showwificontrol` tinyint(1) DEFAULT NULL,
  `showreloadbutton` tinyint(1) DEFAULT NULL,
  `showtime` tinyint(1) DEFAULT NULL,
  `showkeyboardlayout` tinyint(1) DEFAULT NULL,
  `allowuserquitseb` tinyint(1) DEFAULT NULL,
  `quitpassword` longtext,
  `linkquitseb` longtext,
  `userconfirmquit` tinyint(1) DEFAULT NULL,
  `enableaudiocontrol` tinyint(1) DEFAULT NULL,
  `muteonstartup` tinyint(1) DEFAULT NULL,
  `allowspellchecking` tinyint(1) DEFAULT NULL,
  `allowreloadinexam` tinyint(1) DEFAULT NULL,
  `activateurlfiltering` tinyint(1) DEFAULT NULL,
  `filterembeddedcontent` tinyint(1) DEFAULT NULL,
  `expressionsallowed` longtext,
  `regexallowed` longtext,
  `expressionsblocked` longtext,
  `regexblocked` longtext,
  `allowedbrowserexamkeys` longtext,
  `showsebdownloadlink` tinyint(1) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quizsebquiz_qui_uix` (`quizid`),
  UNIQUE KEY `[[dbprefix]]quizsebquiz_cmi_uix` (`cmid`),
  KEY `[[dbprefix]]quizsebquiz_tem_ix` (`templateid`),
  KEY `[[dbprefix]]quizsebquiz_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the quiz level Safe Exam Browser configuration.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quizaccess_seb_template`
--

CREATE TABLE `[[dbprefix]]quizaccess_seb_template` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `content` longtext NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quizsebtemp_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Templates for Safe Exam Browser configuration.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_attempts`
--

CREATE TABLE `[[dbprefix]]quiz_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quiz` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `attempt` mediumint(6) NOT NULL DEFAULT '0',
  `uniqueid` bigint(10) NOT NULL DEFAULT '0',
  `layout` longtext NOT NULL,
  `currentpage` bigint(10) NOT NULL DEFAULT '0',
  `preview` smallint(3) NOT NULL DEFAULT '0',
  `state` varchar(16) NOT NULL DEFAULT 'inprogress',
  `timestart` bigint(10) NOT NULL DEFAULT '0',
  `timefinish` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `timemodifiedoffline` bigint(10) NOT NULL DEFAULT '0',
  `timecheckstate` bigint(10) DEFAULT '0',
  `sumgrades` decimal(10,5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quizatte_quiuseatt_uix` (`quiz`,`userid`,`attempt`),
  UNIQUE KEY `[[dbprefix]]quizatte_uni_uix` (`uniqueid`),
  KEY `[[dbprefix]]quizatte_statim_ix` (`state`,`timecheckstate`),
  KEY `[[dbprefix]]quizatte_qui_ix` (`quiz`),
  KEY `[[dbprefix]]quizatte_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores users attempts at quizzes.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_feedback`
--

CREATE TABLE `[[dbprefix]]quiz_feedback` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quizid` bigint(10) NOT NULL DEFAULT '0',
  `feedbacktext` longtext NOT NULL,
  `feedbacktextformat` tinyint(2) NOT NULL DEFAULT '0',
  `mingrade` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `maxgrade` decimal(10,5) NOT NULL DEFAULT '0.00000',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quizfeed_qui_ix` (`quizid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Feedback given to students based on which grade band their o' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_grades`
--

CREATE TABLE `[[dbprefix]]quiz_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quiz` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `grade` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quizgrad_use_ix` (`userid`),
  KEY `[[dbprefix]]quizgrad_qui_ix` (`quiz`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the overall grade for each user on the quiz, based on' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_overrides`
--

CREATE TABLE `[[dbprefix]]quiz_overrides` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quiz` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) DEFAULT NULL,
  `userid` bigint(10) DEFAULT NULL,
  `timeopen` bigint(10) DEFAULT NULL,
  `timeclose` bigint(10) DEFAULT NULL,
  `timelimit` bigint(10) DEFAULT NULL,
  `attempts` mediumint(6) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quizover_qui_ix` (`quiz`),
  KEY `[[dbprefix]]quizover_gro_ix` (`groupid`),
  KEY `[[dbprefix]]quizover_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='The overrides to quiz settings on a per-user and per-group b' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_overview_regrades`
--

CREATE TABLE `[[dbprefix]]quiz_overview_regrades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionusageid` bigint(10) NOT NULL,
  `slot` bigint(10) NOT NULL,
  `newfraction` decimal(12,7) DEFAULT NULL,
  `oldfraction` decimal(12,7) DEFAULT NULL,
  `regraded` smallint(4) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quizoverregr_queslo_ix` (`questionusageid`,`slot`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table records which question attempts need regrading an' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_reports`
--

CREATE TABLE `[[dbprefix]]quiz_reports` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `displayorder` bigint(10) NOT NULL,
  `capability` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quizrepo_nam_uix` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Lists all the installed quiz reports and their display order' AUTO_INCREMENT=5 ;

--
-- Dumping data for table `[[dbprefix]]quiz_reports`
--

INSERT INTO `[[dbprefix]]quiz_reports` VALUES
(1, 'grading', 6000, 'mod/quiz:grade'),
(2, 'overview', 10000, NULL),
(3, 'responses', 9000, NULL),
(4, 'statistics', 8000, 'quiz/statistics:view');

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_sections`
--

CREATE TABLE `[[dbprefix]]quiz_sections` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quizid` bigint(10) NOT NULL,
  `firstslot` bigint(10) NOT NULL,
  `heading` varchar(1333) DEFAULT NULL,
  `shufflequestions` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quizsect_quifir_uix` (`quizid`,`firstslot`),
  KEY `[[dbprefix]]quizsect_qui_ix` (`quizid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores sections of a quiz with section name (heading), from ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_slots`
--

CREATE TABLE `[[dbprefix]]quiz_slots` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `slot` bigint(10) NOT NULL,
  `quizid` bigint(10) NOT NULL DEFAULT '0',
  `page` bigint(10) NOT NULL,
  `requireprevious` smallint(4) NOT NULL DEFAULT '0',
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `questioncategoryid` bigint(10) DEFAULT NULL,
  `includingsubcategories` smallint(4) DEFAULT NULL,
  `maxmark` decimal(12,7) NOT NULL DEFAULT '0.0000000',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]quizslot_quislo_uix` (`quizid`,`slot`),
  KEY `[[dbprefix]]quizslot_qui_ix` (`quizid`),
  KEY `[[dbprefix]]quizslot_que_ix` (`questionid`),
  KEY `[[dbprefix]]quizslot_que2_ix` (`questioncategoryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the question used in a quiz, with the order, and for ' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_slot_tags`
--

CREATE TABLE `[[dbprefix]]quiz_slot_tags` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `slotid` bigint(10) DEFAULT NULL,
  `tagid` bigint(10) DEFAULT NULL,
  `tagname` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]quizslottags_slo_ix` (`slotid`),
  KEY `[[dbprefix]]quizslottags_tag_ix` (`tagid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores data about the tags that a question must have so that' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]quiz_statistics`
--

CREATE TABLE `[[dbprefix]]quiz_statistics` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hashcode` varchar(40) NOT NULL DEFAULT '',
  `whichattempts` smallint(4) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `firstattemptscount` bigint(10) NOT NULL,
  `highestattemptscount` bigint(10) NOT NULL,
  `lastattemptscount` bigint(10) NOT NULL,
  `allattemptscount` bigint(10) NOT NULL,
  `firstattemptsavg` decimal(15,5) DEFAULT NULL,
  `highestattemptsavg` decimal(15,5) DEFAULT NULL,
  `lastattemptsavg` decimal(15,5) DEFAULT NULL,
  `allattemptsavg` decimal(15,5) DEFAULT NULL,
  `median` decimal(15,5) DEFAULT NULL,
  `standarddeviation` decimal(15,5) DEFAULT NULL,
  `skewness` decimal(15,10) DEFAULT NULL,
  `kurtosis` decimal(15,5) DEFAULT NULL,
  `cic` decimal(15,10) DEFAULT NULL,
  `errorratio` decimal(15,10) DEFAULT NULL,
  `standarderror` decimal(15,10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='table to cache results from analysis done in statistics repo' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]rating`
--

CREATE TABLE `[[dbprefix]]rating` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `ratingarea` varchar(50) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `scaleid` bigint(10) NOT NULL,
  `rating` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]rati_comratconite_ix` (`component`,`ratingarea`,`contextid`,`itemid`),
  KEY `[[dbprefix]]rati_con_ix` (`contextid`),
  KEY `[[dbprefix]]rati_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='moodle ratings' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]registration_hubs`
--

CREATE TABLE `[[dbprefix]]registration_hubs` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `token` varchar(255) NOT NULL DEFAULT '',
  `hubname` varchar(255) NOT NULL DEFAULT '',
  `huburl` varchar(255) NOT NULL DEFAULT '',
  `confirmed` tinyint(1) NOT NULL DEFAULT '0',
  `secret` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='hub where the site is registered on with their associated to' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]repository`
--

CREATE TABLE `[[dbprefix]]repository` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL DEFAULT '',
  `visible` tinyint(1) DEFAULT '1',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table contains one entry for every configured external ' AUTO_INCREMENT=9 ;

--
-- Dumping data for table `[[dbprefix]]repository`
--

INSERT INTO `[[dbprefix]]repository` VALUES
(1, 'areafiles', 1, 1),
(2, 'contentbank', 1, 2),
(3, 'local', 1, 3),
(4, 'recent', 1, 4),
(5, 'upload', 1, 5),
(6, 'url', 1, 6),
(7, 'user', 1, 7),
(8, 'wikimedia', 1, 8);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]repository_instances`
--

CREATE TABLE `[[dbprefix]]repository_instances` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `typeid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `contextid` bigint(10) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `readonly` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table contains one entry for every configured external ' AUTO_INCREMENT=9 ;

--
-- Dumping data for table `[[dbprefix]]repository_instances`
--

INSERT INTO `[[dbprefix]]repository_instances` VALUES
(1, '', 1, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(2, '', 2, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(3, '', 3, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(4, '', 4, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(5, '', 5, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(6, '', 6, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(7, '', 7, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0),
(8, '', 8, 0, 1, NULL, NULL, [[timestamp]], [[timestamp]], 0);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]repository_instance_config`
--

CREATE TABLE `[[dbprefix]]repository_instance_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instanceid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='The config for intances' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]repository_onedrive_access`
--

CREATE TABLE `[[dbprefix]]repository_onedrive_access` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `timemodified` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `permissionid` varchar(255) NOT NULL DEFAULT '',
  `itemid` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]repoonedacce_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='List of temporary access grants.' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]resource`
--

CREATE TABLE `[[dbprefix]]resource` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `tobemigrated` smallint(4) NOT NULL DEFAULT '0',
  `legacyfiles` smallint(4) NOT NULL DEFAULT '0',
  `legacyfileslast` bigint(10) DEFAULT NULL,
  `display` smallint(4) NOT NULL DEFAULT '0',
  `displayoptions` longtext,
  `filterfiles` smallint(4) NOT NULL DEFAULT '0',
  `revision` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]reso_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each record is one resource and its config data' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]resource_old`
--

CREATE TABLE `[[dbprefix]]resource_old` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` varchar(30) NOT NULL DEFAULT '',
  `reference` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `alltext` longtext NOT NULL,
  `popup` longtext NOT NULL,
  `options` varchar(255) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `cmid` bigint(10) DEFAULT NULL,
  `newmodule` varchar(50) DEFAULT NULL,
  `newid` bigint(10) DEFAULT NULL,
  `migrated` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]resoold_old_uix` (`oldid`),
  KEY `[[dbprefix]]resoold_cmi_ix` (`cmid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='backup of all old resource instances from 1.9' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role`
--

CREATE TABLE `[[dbprefix]]role` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `shortname` varchar(100) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `archetype` varchar(30) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]role_sor_uix` (`sortorder`),
  UNIQUE KEY `[[dbprefix]]role_sho_uix` (`shortname`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='moodle roles' AUTO_INCREMENT=9 ;

--
-- Dumping data for table `[[dbprefix]]role`
--

INSERT INTO `[[dbprefix]]role` VALUES
(1, '', 'manager', '', 1, 'manager'),
(2, '', 'coursecreator', '', 2, 'coursecreator'),
(3, '', 'editingteacher', '', 3, 'editingteacher'),
(4, '', 'teacher', '', 4, 'teacher'),
(5, '', 'student', '', 5, 'student'),
(6, '', 'guest', '', 6, 'guest'),
(7, '', 'user', '', 7, 'user'),
(8, '', 'frontpage', '', 8, 'frontpage');

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role_allow_assign`
--

CREATE TABLE `[[dbprefix]]role_allow_assign` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `allowassign` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]rolealloassi_rolall_uix` (`roleid`,`allowassign`),
  KEY `[[dbprefix]]rolealloassi_rol_ix` (`roleid`),
  KEY `[[dbprefix]]rolealloassi_all_ix` (`allowassign`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='this defines what role can assign what role' AUTO_INCREMENT=8 ;

--
-- Dumping data for table `[[dbprefix]]role_allow_assign`
--

INSERT INTO `[[dbprefix]]role_allow_assign` VALUES
(1, 1, 1),
(2, 1, 2),
(3, 1, 3),
(4, 1, 4),
(5, 1, 5),
(6, 3, 4),
(7, 3, 5);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role_allow_override`
--

CREATE TABLE `[[dbprefix]]role_allow_override` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `allowoverride` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]rolealloover_rolall_uix` (`roleid`,`allowoverride`),
  KEY `[[dbprefix]]rolealloover_rol_ix` (`roleid`),
  KEY `[[dbprefix]]rolealloover_all_ix` (`allowoverride`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='this defines what role can override what role' AUTO_INCREMENT=12 ;

--
-- Dumping data for table `[[dbprefix]]role_allow_override`
--

INSERT INTO `[[dbprefix]]role_allow_override` VALUES
(1, 1, 1),
(2, 1, 2),
(3, 1, 3),
(4, 1, 4),
(5, 1, 5),
(6, 1, 6),
(7, 1, 7),
(8, 1, 8),
(9, 3, 4),
(10, 3, 5),
(11, 3, 6);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role_allow_switch`
--

CREATE TABLE `[[dbprefix]]role_allow_switch` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL,
  `allowswitch` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]rolealloswit_rolall_uix` (`roleid`,`allowswitch`),
  KEY `[[dbprefix]]rolealloswit_rol_ix` (`roleid`),
  KEY `[[dbprefix]]rolealloswit_all_ix` (`allowswitch`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table stores which which other roles a user is allowed ' AUTO_INCREMENT=10 ;

--
-- Dumping data for table `[[dbprefix]]role_allow_switch`
--

INSERT INTO `[[dbprefix]]role_allow_switch` VALUES
(1, 1, 3),
(2, 1, 4),
(3, 1, 5),
(4, 1, 6),
(5, 3, 4),
(6, 3, 5),
(7, 3, 6),
(8, 4, 5),
(9, 4, 6);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role_allow_view`
--

CREATE TABLE `[[dbprefix]]role_allow_view` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL,
  `allowview` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]rolealloview_rolall_uix` (`roleid`,`allowview`),
  KEY `[[dbprefix]]rolealloview_rol_ix` (`roleid`),
  KEY `[[dbprefix]]rolealloview_all_ix` (`allowview`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table stores which which other roles a user is allowed ' AUTO_INCREMENT=25 ;

--
-- Dumping data for table `[[dbprefix]]role_allow_view`
--

INSERT INTO `[[dbprefix]]role_allow_view` VALUES
(1, 1, 1),
(2, 1, 2),
(3, 1, 3),
(4, 1, 4),
(5, 1, 5),
(6, 1, 6),
(7, 1, 7),
(8, 1, 8),
(9, 2, 2),
(10, 2, 3),
(11, 2, 4),
(12, 2, 5),
(13, 3, 2),
(14, 3, 3),
(15, 3, 4),
(16, 3, 5),
(17, 4, 2),
(18, 4, 3),
(19, 4, 4),
(20, 4, 5),
(21, 5, 2),
(22, 5, 3),
(23, 5, 4),
(24, 5, 5);

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role_assignments`
--

CREATE TABLE `[[dbprefix]]role_assignments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `contextid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `modifierid` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]roleassi_sor_ix` (`sortorder`),
  KEY `[[dbprefix]]roleassi_rolcon_ix` (`roleid`,`contextid`),
  KEY `[[dbprefix]]roleassi_useconrol_ix` (`userid`,`contextid`,`roleid`),
  KEY `[[dbprefix]]roleassi_comiteuse_ix` (`component`,`itemid`,`userid`),
  KEY `[[dbprefix]]roleassi_rol_ix` (`roleid`),
  KEY `[[dbprefix]]roleassi_con_ix` (`contextid`),
  KEY `[[dbprefix]]roleassi_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='assigning roles in different context' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `[[dbprefix]]role_capabilities`
--

CREATE TABLE `[[dbprefix]]role_capabilities` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL DEFAULT '0',
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `capability` varchar(255) NOT NULL DEFAULT '',
  `permission` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `modifierid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]rolecapa_rolconcap_uix` (`roleid`,`contextid`,`capability`),
  KEY `[[dbprefix]]rolecapa_rol_ix` (`roleid`),
  KEY `[[dbprefix]]rolecapa_con_ix` (`contextid`),
  KEY `[[dbprefix]]rolecapa_mod_ix` (`modifierid`),
  KEY `[[dbprefix]]rolecapa_cap_ix` (`capability`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='permission has to be signed, overriding a capability for a p' AUTO_INCREMENT=1448 ;

--
-- Dumping data for table `[[dbprefix]]role_capabilities`
--

INSERT INTO `[[dbprefix]]role_capabilities` VALUES
(1, 1, 1, 'moodle/site:configview', 1, [[timestamp]], 0),
(2, 1, 2, 'moodle/site:configview', 1, [[timestamp]], 0),
(3, 1, 1, 'moodle/site:readallmessages', 1, [[timestamp]], 0),
(4, 1, 3, 'moodle/site:readallmessages', 1, [[timestamp]], 0),
(5, 1, 1, 'moodle/site:manageallmessaging', 1, [[timestamp]], 0),
(6, 1, 1, 'moodle/site:deleteanymessage', 1, [[timestamp]], 0),
(7, 1, 1, 'moodle/site:sendmessage', 1, [[timestamp]], 0),
(8, 1, 7, 'moodle/site:sendmessage', 1, [[timestamp]], 0),
(9, 1, 7, 'moodle/site:senderrormessage', 1, [[timestamp]], 0),
(10, 1, 7, 'moodle/site:deleteownmessage', 1, [[timestamp]], 0),
(11, 1, 1, 'moodle/site:approvecourse', 1, [[timestamp]], 0),
(12, 1, 3, 'moodle/backup:backupcourse', 1, [[timestamp]], 0),
(13, 1, 1, 'moodle/backup:backupcourse', 1, [[timestamp]], 0),
(14, 1, 3, 'moodle/backup:backupsection', 1, [[timestamp]], 0),
(15, 1, 1, 'moodle/backup:backupsection', 1, [[timestamp]], 0),
(16, 1, 3, 'moodle/backup:backupactivity', 1, [[timestamp]], 0),
(17, 1, 1, 'moodle/backup:backupactivity', 1, [[timestamp]], 0),
(18, 1, 3, 'moodle/backup:backuptargetimport', 1, [[timestamp]], 0),
(19, 1, 1, 'moodle/backup:backuptargetimport', 1, [[timestamp]], 0),
(20, 1, 3, 'moodle/backup:downloadfile', 1, [[timestamp]], 0),
(21, 1, 1, 'moodle/backup:downloadfile', 1, [[timestamp]], 0),
(22, 1, 3, 'moodle/backup:configure', 1, [[timestamp]], 0),
(23, 1, 1, 'moodle/backup:configure', 1, [[timestamp]], 0),
(24, 1, 1, 'moodle/backup:userinfo', 1, [[timestamp]], 0),
(25, 1, 1, 'moodle/backup:anonymise', 1, [[timestamp]], 0),
(26, 1, 3, 'moodle/restore:restorecourse', 1, [[timestamp]], 0),
(27, 1, 1, 'moodle/restore:restorecourse', 1, [[timestamp]], 0),
(28, 1, 3, 'moodle/restore:restoresection', 1, [[timestamp]], 0),
(29, 1, 1, 'moodle/restore:restoresection', 1, [[timestamp]], 0),
(30, 1, 3, 'moodle/restore:restoreactivity', 1, [[timestamp]], 0),
(31, 1, 1, 'moodle/restore:restoreactivity', 1, [[timestamp]], 0),
(32, 1, 3, 'moodle/restore:viewautomatedfilearea', 1, [[timestamp]], 0),
(33, 1, 1, 'moodle/restore:viewautomatedfilearea', 1, [[timestamp]], 0),
(34, 1, 3, 'moodle/restore:restoretargetimport', 1, [[timestamp]], 0),
(35, 1, 1, 'moodle/restore:restoretargetimport', 1, [[timestamp]], 0),
(36, 1, 3, 'moodle/restore:uploadfile', 1, [[timestamp]], 0),
(37, 1, 1, 'moodle/restore:uploadfile', 1, [[timestamp]], 0),
(38, 1, 3, 'moodle/restore:configure', 1, [[timestamp]], 0),
(39, 1, 1, 'moodle/restore:configure', 1, [[timestamp]], 0),
(40, 1, 2, 'moodle/restore:rolldates', 1, [[timestamp]], 0),
(41, 1, 1, 'moodle/restore:rolldates', 1, [[timestamp]], 0),
(42, 1, 1, 'moodle/restore:userinfo', 1, [[timestamp]], 0),
(43, 1, 1, 'moodle/restore:createuser', 1, [[timestamp]], 0),
(44, 1, 3, 'moodle/site:manageblocks', 1, [[timestamp]], 0),
(45, 1, 1, 'moodle/site:manageblocks', 1, [[timestamp]], 0),
(46, 1, 3, 'moodle/site:accessallgroups', 1, [[timestamp]], 0),
(47, 1, 1, 'moodle/site:accessallgroups', 1, [[timestamp]], 0),
(48, 1, 1, 'moodle/site:viewanonymousevents', 1, [[timestamp]], 0),
(49, 1, 4, 'moodle/site:viewfullnames', 1, [[timestamp]], 0),
(50, 1, 3, 'moodle/site:viewfullnames', 1, [[timestamp]], 0),
(51, 1, 1, 'moodle/site:viewfullnames', 1, [[timestamp]], 0),
(52, 1, 4, 'moodle/site:viewuseridentity', 1, [[timestamp]], 0),
(53, 1, 3, 'moodle/site:viewuseridentity', 1, [[timestamp]], 0),
(54, 1, 1, 'moodle/site:viewuseridentity', 1, [[timestamp]], 0),
(55, 1, 4, 'moodle/site:viewreports', 1, [[timestamp]], 0),
(56, 1, 3, 'moodle/site:viewreports', 1, [[timestamp]], 0),
(57, 1, 1, 'moodle/site:viewreports', 1, [[timestamp]], 0),
(58, 1, 3, 'moodle/site:trustcontent', 1, [[timestamp]], 0),
(59, 1, 1, 'moodle/site:trustcontent', 1, [[timestamp]], 0),
(60, 1, 1, 'moodle/site:uploadusers', 1, [[timestamp]], 0),
(61, 1, 3, 'moodle/filter:manage', 1, [[timestamp]], 0),
(62, 1, 1, 'moodle/filter:manage', 1, [[timestamp]], 0),
(63, 1, 1, 'moodle/user:create', 1, [[timestamp]], 0),
(64, 1, 1, 'moodle/user:delete', 1, [[timestamp]], 0),
(65, 1, 1, 'moodle/user:update', 1, [[timestamp]], 0),
(66, 1, 6, 'moodle/user:viewdetails', 1, [[timestamp]], 0),
(67, 1, 5, 'moodle/user:viewdetails', 1, [[timestamp]], 0),
(68, 1, 4, 'moodle/user:viewdetails', 1, [[timestamp]], 0),
(69, 1, 3, 'moodle/user:viewdetails', 1, [[timestamp]], 0),
(70, 1, 1, 'moodle/user:viewdetails', 1, [[timestamp]], 0),
(71, 1, 1, 'moodle/user:viewalldetails', 1, [[timestamp]], 0),
(72, 1, 1, 'moodle/user:viewlastip', 1, [[timestamp]], 0),
(73, 1, 4, 'moodle/user:viewhiddendetails', 1, [[timestamp]], 0),
(74, 1, 3, 'moodle/user:viewhiddendetails', 1, [[timestamp]], 0),
(75, 1, 1, 'moodle/user:viewhiddendetails', 1, [[timestamp]], 0),
(76, 1, 1, 'moodle/user:loginas', 1, [[timestamp]], 0),
(77, 1, 1, 'moodle/user:managesyspages', 1, [[timestamp]], 0),
(78, 1, 7, 'moodle/user:manageownblocks', 1, [[timestamp]], 0),
(79, 1, 7, 'moodle/user:manageownfiles', 1, [[timestamp]], 0),
(80, 1, 1, 'moodle/my:configsyspages', 1, [[timestamp]], 0),
(81, 1, 3, 'moodle/role:assign', 1, [[timestamp]], 0),
(82, 1, 1, 'moodle/role:assign', 1, [[timestamp]], 0),
(83, 1, 4, 'moodle/role:review', 1, [[timestamp]], 0),
(84, 1, 3, 'moodle/role:review', 1, [[timestamp]], 0),
(85, 1, 1, 'moodle/role:review', 1, [[timestamp]], 0),
(86, 1, 1, 'moodle/role:override', 1, [[timestamp]], 0),
(87, 1, 3, 'moodle/role:safeoverride', 1, [[timestamp]], 0),
(88, 1, 1, 'moodle/role:manage', 1, [[timestamp]], 0),
(89, 1, 3, 'moodle/role:switchroles', 1, [[timestamp]], 0),
(90, 1, 1, 'moodle/role:switchroles', 1, [[timestamp]], 0),
(91, 1, 1, 'moodle/category:manage', 1, [[timestamp]], 0),
(92, 1, 6, 'moodle/category:viewcourselist', 1, [[timestamp]], 0),
(93, 1, 7, 'moodle/category:viewcourselist', 1, [[timestamp]], 0),
(94, 1, 2, 'moodle/category:viewhiddencategories', 1, [[timestamp]], 0),
(95, 1, 1, 'moodle/category:viewhiddencategories', 1, [[timestamp]], 0),
(96, 1, 1, 'moodle/cohort:manage', 1, [[timestamp]], 0),
(97, 1, 1, 'moodle/cohort:assign', 1, [[timestamp]], 0),
(98, 1, 3, 'moodle/cohort:view', 1, [[timestamp]], 0),
(99, 1, 1, 'moodle/cohort:view', 1, [[timestamp]], 0),
(100, 1, 2, 'moodle/course:create', 1, [[timestamp]], 0),
(101, 1, 1, 'moodle/course:create', 1, [[timestamp]], 0),
(102, 1, 3, 'moodle/course:creategroupconversations', 1, [[timestamp]], 0),
(103, 1, 1, 'moodle/course:creategroupconversations', 1, [[timestamp]], 0),
(104, 1, 1, 'moodle/course:delete', 1, [[timestamp]], 0),
(105, 1, 3, 'moodle/course:update', 1, [[timestamp]], 0),
(106, 1, 1, 'moodle/course:update', 1, [[timestamp]], 0),
(107, 1, 1, 'moodle/course:view', 1, [[timestamp]], 0),
(108, 1, 3, 'moodle/course:enrolreview', 1, [[timestamp]], 0),
(109, 1, 1, 'moodle/course:enrolreview', 1, [[timestamp]], 0),
(110, 1, 3, 'moodle/course:enrolconfig', 1, [[timestamp]], 0),
(111, 1, 1, 'moodle/course:enrolconfig', 1, [[timestamp]], 0),
(112, 1, 3, 'moodle/course:reviewotherusers', 1, [[timestamp]], 0),
(113, 1, 1, 'moodle/course:reviewotherusers', 1, [[timestamp]], 0),
(114, 1, 4, 'moodle/course:bulkmessaging', 1, [[timestamp]], 0),
(115, 1, 3, 'moodle/course:bulkmessaging', 1, [[timestamp]], 0),
(116, 1, 1, 'moodle/course:bulkmessaging', 1, [[timestamp]], 0),
(117, 1, 4, 'moodle/course:viewhiddenuserfields', 1, [[timestamp]], 0),
(118, 1, 3, 'moodle/course:viewhiddenuserfields', 1, [[timestamp]], 0),
(119, 1, 1, 'moodle/course:viewhiddenuserfields', 1, [[timestamp]], 0),
(120, 1, 2, 'moodle/course:viewhiddencourses', 1, [[timestamp]], 0),
(121, 1, 4, 'moodle/course:viewhiddencourses', 1, [[timestamp]], 0),
(122, 1, 3, 'moodle/course:viewhiddencourses', 1, [[timestamp]], 0),
(123, 1, 1, 'moodle/course:viewhiddencourses', 1, [[timestamp]], 0),
(124, 1, 3, 'moodle/course:visibility', 1, [[timestamp]], 0),
(125, 1, 1, 'moodle/course:visibility', 1, [[timestamp]], 0),
(126, 1, 3, 'moodle/course:managefiles', 1, [[timestamp]], 0),
(127, 1, 1, 'moodle/course:managefiles', 1, [[timestamp]], 0),
(128, 1, 1, 'moodle/course:ignoreavailabilityrestrictions', 1, [[timestamp]], 0),
(129, 1, 2, 'moodle/course:ignoreavailabilityrestrictions', 1, [[timestamp]], 0),
(130, 1, 3, 'moodle/course:ignoreavailabilityrestrictions', 1, [[timestamp]], 0),
(131, 1, 4, 'moodle/course:ignoreavailabilityrestrictions', 1, [[timestamp]], 0),
(132, 1, 3, 'moodle/course:manageactivities', 1, [[timestamp]], 0),
(133, 1, 1, 'moodle/course:manageactivities', 1, [[timestamp]], 0),
(134, 1, 3, 'moodle/course:activityvisibility', 1, [[timestamp]], 0),
(135, 1, 1, 'moodle/course:activityvisibility', 1, [[timestamp]], 0),
(136, 1, 4, 'moodle/course:viewhiddenactivities', 1, [[timestamp]], 0),
(137, 1, 3, 'moodle/course:viewhiddenactivities', 1, [[timestamp]], 0),
(138, 1, 1, 'moodle/course:viewhiddenactivities', 1, [[timestamp]], 0),
(139, 1, 5, 'moodle/course:viewparticipants', 1, [[timestamp]], 0),
(140, 1, 4, 'moodle/course:viewparticipants', 1, [[timestamp]], 0),
(141, 1, 3, 'moodle/course:viewparticipants', 1, [[timestamp]], 0),
(142, 1, 1, 'moodle/course:viewparticipants', 1, [[timestamp]], 0),
(143, 1, 3, 'moodle/course:changefullname', 1, [[timestamp]], 0),
(144, 1, 1, 'moodle/course:changefullname', 1, [[timestamp]], 0),
(145, 1, 3, 'moodle/course:changeshortname', 1, [[timestamp]], 0),
(146, 1, 1, 'moodle/course:changeshortname', 1, [[timestamp]], 0),
(147, 1, 1, 'moodle/course:changelockedcustomfields', 1, [[timestamp]], 0),
(148, 1, 3, 'moodle/course:renameroles', 1, [[timestamp]], 0),
(149, 1, 1, 'moodle/course:renameroles', 1, [[timestamp]], 0),
(150, 1, 3, 'moodle/course:changeidnumber', 1, [[timestamp]], 0),
(151, 1, 1, 'moodle/course:changeidnumber', 1, [[timestamp]], 0),
(152, 1, 3, 'moodle/course:changecategory', 1, [[timestamp]], 0),
(153, 1, 1, 'moodle/course:changecategory', 1, [[timestamp]], 0),
(154, 1, 3, 'moodle/course:changesummary', 1, [[timestamp]], 0),
(155, 1, 1, 'moodle/course:changesummary', 1, [[timestamp]], 0),
(156, 1, 3, 'moodle/course:setforcedlanguage', 1, [[timestamp]], 0),
(157, 1, 1, 'moodle/course:setforcedlanguage', 1, [[timestamp]], 0),
(158, 1, 1, 'moodle/site:viewparticipants', 1, [[timestamp]], 0),
(159, 1, 5, 'moodle/course:isincompletionreports', 1, [[timestamp]], 0),
(160, 1, 5, 'moodle/course:viewscales', 1, [[timestamp]], 0),
(161, 1, 4, 'moodle/course:viewscales', 1, [[timestamp]], 0),
(162, 1, 3, 'moodle/course:viewscales', 1, [[timestamp]], 0),
(163, 1, 1, 'moodle/course:viewscales', 1, [[timestamp]], 0),
(164, 1, 3, 'moodle/course:managescales', 1, [[timestamp]], 0),
(165, 1, 1, 'moodle/course:managescales', 1, [[timestamp]], 0),
(166, 1, 3, 'moodle/course:managegroups', 1, [[timestamp]], 0),
(167, 1, 1, 'moodle/course:managegroups', 1, [[timestamp]], 0),
(168, 1, 3, 'moodle/course:reset', 1, [[timestamp]], 0),
(169, 1, 1, 'moodle/course:reset', 1, [[timestamp]], 0),
(170, 1, 3, 'moodle/course:viewsuspendedusers', 1, [[timestamp]], 0),
(171, 1, 1, 'moodle/course:viewsuspendedusers', 1, [[timestamp]], 0),
(172, 1, 1, 'moodle/course:tag', 1, [[timestamp]], 0),
(173, 1, 3, 'moodle/course:tag', 1, [[timestamp]], 0),
(174, 1, 6, 'moodle/blog:view', 1, [[timestamp]], 0),
(175, 1, 7, 'moodle/blog:view', 1, [[timestamp]], 0),
(176, 1, 5, 'moodle/blog:view', 1, [[timestamp]], 0),
(177, 1, 4, 'moodle/blog:view', 1, [[timestamp]], 0),
(178, 1, 3, 'moodle/blog:view', 1, [[timestamp]], 0),
(179, 1, 1, 'moodle/blog:view', 1, [[timestamp]], 0),
(180, 1, 6, 'moodle/blog:search', 1, [[timestamp]], 0),
(181, 1, 7, 'moodle/blog:search', 1, [[timestamp]], 0),
(182, 1, 5, 'moodle/blog:search', 1, [[timestamp]], 0),
(183, 1, 4, 'moodle/blog:search', 1, [[timestamp]], 0),
(184, 1, 3, 'moodle/blog:search', 1, [[timestamp]], 0),
(185, 1, 1, 'moodle/blog:search', 1, [[timestamp]], 0),
(186, 1, 1, 'moodle/blog:viewdrafts', 1, [[timestamp]], 0),
(187, 1, 7, 'moodle/blog:create', 1, [[timestamp]], 0),
(188, 1, 1, 'moodle/blog:create', 1, [[timestamp]], 0),
(189, 1, 4, 'moodle/blog:manageentries', 1, [[timestamp]], 0),
(190, 1, 3, 'moodle/blog:manageentries', 1, [[timestamp]], 0),
(191, 1, 1, 'moodle/blog:manageentries', 1, [[timestamp]], 0),
(192, 1, 5, 'moodle/blog:manageexternal', 1, [[timestamp]], 0),
(193, 1, 7, 'moodle/blog:manageexternal', 1, [[timestamp]], 0),
(194, 1, 4, 'moodle/blog:manageexternal', 1, [[timestamp]], 0),
(195, 1, 3, 'moodle/blog:manageexternal', 1, [[timestamp]], 0),
(196, 1, 1, 'moodle/blog:manageexternal', 1, [[timestamp]], 0),
(197, 1, 7, 'moodle/calendar:manageownentries', 1, [[timestamp]], 0),
(198, 1, 1, 'moodle/calendar:manageownentries', 1, [[timestamp]], 0),
(199, 1, 4, 'moodle/calendar:managegroupentries', 1, [[timestamp]], 0),
(200, 1, 3, 'moodle/calendar:managegroupentries', 1, [[timestamp]], 0),
(201, 1, 1, 'moodle/calendar:managegroupentries', 1, [[timestamp]], 0),
(202, 1, 4, 'moodle/calendar:manageentries', 1, [[timestamp]], 0),
(203, 1, 3, 'moodle/calendar:manageentries', 1, [[timestamp]], 0),
(204, 1, 1, 'moodle/calendar:manageentries', 1, [[timestamp]], 0),
(205, 1, 1, 'moodle/user:editprofile', 1, [[timestamp]], 0),
(206, 1, 6, 'moodle/user:editownprofile', -1000, [[timestamp]], 0),
(207, 1, 7, 'moodle/user:editownprofile', 1, [[timestamp]], 0),
(208, 1, 1, 'moodle/user:editownprofile', 1, [[timestamp]], 0),
(209, 1, 6, 'moodle/user:changeownpassword', -1000, [[timestamp]], 0),
(210, 1, 7, 'moodle/user:changeownpassword', 1, [[timestamp]], 0),
(211, 1, 1, 'moodle/user:changeownpassword', 1, [[timestamp]], 0),
(212, 1, 5, 'moodle/user:readuserposts', 1, [[timestamp]], 0),
(213, 1, 4, 'moodle/user:readuserposts', 1, [[timestamp]], 0),
(214, 1, 3, 'moodle/user:readuserposts', 1, [[timestamp]], 0),
(215, 1, 1, 'moodle/user:readuserposts', 1, [[timestamp]], 0),
(216, 1, 5, 'moodle/user:readuserblogs', 1, [[timestamp]], 0),
(217, 1, 4, 'moodle/user:readuserblogs', 1, [[timestamp]], 0),
(218, 1, 3, 'moodle/user:readuserblogs', 1, [[timestamp]], 0),
(219, 1, 1, 'moodle/user:readuserblogs', 1, [[timestamp]], 0),
(220, 1, 1, 'moodle/user:editmessageprofile', 1, [[timestamp]], 0),
(221, 1, 6, 'moodle/user:editownmessageprofile', -1000, [[timestamp]], 0),
(222, 1, 7, 'moodle/user:editownmessageprofile', 1, [[timestamp]], 0),
(223, 1, 1, 'moodle/user:editownmessageprofile', 1, [[timestamp]], 0),
(224, 1, 3, 'moodle/question:managecategory', 1, [[timestamp]], 0),
(225, 1, 1, 'moodle/question:managecategory', 1, [[timestamp]], 0),
(226, 1, 3, 'moodle/question:add', 1, [[timestamp]], 0),
(227, 1, 1, 'moodle/question:add', 1, [[timestamp]], 0),
(228, 1, 3, 'moodle/question:editmine', 1, [[timestamp]], 0),
(229, 1, 1, 'moodle/question:editmine', 1, [[timestamp]], 0),
(230, 1, 3, 'moodle/question:editall', 1, [[timestamp]], 0),
(231, 1, 1, 'moodle/question:editall', 1, [[timestamp]], 0),
(232, 1, 3, 'moodle/question:viewmine', 1, [[timestamp]], 0),
(233, 1, 1, 'moodle/question:viewmine', 1, [[timestamp]], 0),
(234, 1, 3, 'moodle/question:viewall', 1, [[timestamp]], 0),
(235, 1, 1, 'moodle/question:viewall', 1, [[timestamp]], 0),
(236, 1, 3, 'moodle/question:usemine', 1, [[timestamp]], 0),
(237, 1, 1, 'moodle/question:usemine', 1, [[timestamp]], 0),
(238, 1, 3, 'moodle/question:useall', 1, [[timestamp]], 0),
(239, 1, 1, 'moodle/question:useall', 1, [[timestamp]], 0),
(240, 1, 3, 'moodle/question:movemine', 1, [[timestamp]], 0),
(241, 1, 1, 'moodle/question:movemine', 1, [[timestamp]], 0),
(242, 1, 3, 'moodle/question:moveall', 1, [[timestamp]], 0),
(243, 1, 1, 'moodle/question:moveall', 1, [[timestamp]], 0),
(244, 1, 1, 'moodle/question:config', 1, [[timestamp]], 0),
(245, 1, 5, 'moodle/question:flag', 1, [[timestamp]], 0),
(246, 1, 4, 'moodle/question:flag', 1, [[timestamp]], 0),
(247, 1, 3, 'moodle/question:flag', 1, [[timestamp]], 0),
(248, 1, 1, 'moodle/question:flag', 1, [[timestamp]], 0),
(249, 1, 3, 'moodle/question:tagmine', 1, [[timestamp]], 0),
(250, 1, 1, 'moodle/question:tagmine', 1, [[timestamp]], 0),
(251, 1, 3, 'moodle/question:tagall', 1, [[timestamp]], 0),
(252, 1, 1, 'moodle/question:tagall', 1, [[timestamp]], 0),
(253, 1, 4, 'moodle/site:doclinks', 1, [[timestamp]], 0),
(254, 1, 3, 'moodle/site:doclinks', 1, [[timestamp]], 0),
(255, 1, 1, 'moodle/site:doclinks', 1, [[timestamp]], 0),
(256, 1, 3, 'moodle/course:sectionvisibility', 1, [[timestamp]], 0),
(257, 1, 1, 'moodle/course:sectionvisibility', 1, [[timestamp]], 0),
(258, 1, 3, 'moodle/course:useremail', 1, [[timestamp]], 0),
(259, 1, 1, 'moodle/course:useremail', 1, [[timestamp]], 0),
(260, 1, 3, 'moodle/course:viewhiddensections', 1, [[timestamp]], 0),
(261, 1, 1, 'moodle/course:viewhiddensections', 1, [[timestamp]], 0),
(262, 1, 3, 'moodle/course:setcurrentsection', 1, [[timestamp]], 0),
(263, 1, 1, 'moodle/course:setcurrentsection', 1, [[timestamp]], 0),
(264, 1, 3, 'moodle/course:movesections', 1, [[timestamp]], 0),
(265, 1, 1, 'moodle/course:movesections', 1, [[timestamp]], 0),
(266, 1, 4, 'moodle/grade:viewall', 1, [[timestamp]], 0),
(267, 1, 3, 'moodle/grade:viewall', 1, [[timestamp]], 0),
(268, 1, 1, 'moodle/grade:viewall', 1, [[timestamp]], 0),
(269, 1, 5, 'moodle/grade:view', 1, [[timestamp]], 0),
(270, 1, 4, 'moodle/grade:viewhidden', 1, [[timestamp]], 0),
(271, 1, 3, 'moodle/grade:viewhidden', 1, [[timestamp]], 0),
(272, 1, 1, 'moodle/grade:viewhidden', 1, [[timestamp]], 0),
(273, 1, 3, 'moodle/grade:import', 1, [[timestamp]], 0),
(274, 1, 1, 'moodle/grade:import', 1, [[timestamp]], 0),
(275, 1, 4, 'moodle/grade:export', 1, [[timestamp]], 0),
(276, 1, 3, 'moodle/grade:export', 1, [[timestamp]], 0),
(277, 1, 1, 'moodle/grade:export', 1, [[timestamp]], 0),
(278, 1, 3, 'moodle/grade:manage', 1, [[timestamp]], 0),
(279, 1, 1, 'moodle/grade:manage', 1, [[timestamp]], 0),
(280, 1, 3, 'moodle/grade:edit', 1, [[timestamp]], 0),
(281, 1, 1, 'moodle/grade:edit', 1, [[timestamp]], 0),
(282, 1, 3, 'moodle/grade:managegradingforms', 1, [[timestamp]], 0),
(283, 1, 1, 'moodle/grade:managegradingforms', 1, [[timestamp]], 0),
(284, 1, 1, 'moodle/grade:sharegradingforms', 1, [[timestamp]], 0),
(285, 1, 1, 'moodle/grade:managesharedforms', 1, [[timestamp]], 0),
(286, 1, 3, 'moodle/grade:manageoutcomes', 1, [[timestamp]], 0),
(287, 1, 1, 'moodle/grade:manageoutcomes', 1, [[timestamp]], 0),
(288, 1, 3, 'moodle/grade:manageletters', 1, [[timestamp]], 0),
(289, 1, 1, 'moodle/grade:manageletters', 1, [[timestamp]], 0),
(290, 1, 3, 'moodle/grade:hide', 1, [[timestamp]], 0),
(291, 1, 1, 'moodle/grade:hide', 1, [[timestamp]], 0),
(292, 1, 3, 'moodle/grade:lock', 1, [[timestamp]], 0),
(293, 1, 1, 'moodle/grade:lock', 1, [[timestamp]], 0),
(294, 1, 3, 'moodle/grade:unlock', 1, [[timestamp]], 0),
(295, 1, 1, 'moodle/grade:unlock', 1, [[timestamp]], 0),
(296, 1, 7, 'moodle/my:manageblocks', 1, [[timestamp]], 0),
(297, 1, 4, 'moodle/notes:view', 1, [[timestamp]], 0),
(298, 1, 3, 'moodle/notes:view', 1, [[timestamp]], 0),
(299, 1, 1, 'moodle/notes:view', 1, [[timestamp]], 0),
(300, 1, 4, 'moodle/notes:manage', 1, [[timestamp]], 0),
(301, 1, 3, 'moodle/notes:manage', 1, [[timestamp]], 0),
(302, 1, 1, 'moodle/notes:manage', 1, [[timestamp]], 0),
(303, 1, 1, 'moodle/tag:manage', 1, [[timestamp]], 0),
(304, 1, 1, 'moodle/tag:edit', 1, [[timestamp]], 0),
(305, 1, 7, 'moodle/tag:flag', 1, [[timestamp]], 0),
(306, 1, 4, 'moodle/tag:editblocks', 1, [[timestamp]], 0),
(307, 1, 3, 'moodle/tag:editblocks', 1, [[timestamp]], 0),
(308, 1, 1, 'moodle/tag:editblocks', 1, [[timestamp]], 0),
(309, 1, 6, 'moodle/block:view', 1, [[timestamp]], 0),
(310, 1, 7, 'moodle/block:view', 1, [[timestamp]], 0),
(311, 1, 5, 'moodle/block:view', 1, [[timestamp]], 0),
(312, 1, 4, 'moodle/block:view', 1, [[timestamp]], 0),
(313, 1, 3, 'moodle/block:view', 1, [[timestamp]], 0),
(314, 1, 3, 'moodle/block:edit', 1, [[timestamp]], 0),
(315, 1, 1, 'moodle/block:edit', 1, [[timestamp]], 0),
(316, 1, 7, 'moodle/portfolio:export', 1, [[timestamp]], 0),
(317, 1, 5, 'moodle/portfolio:export', 1, [[timestamp]], 0),
(318, 1, 4, 'moodle/portfolio:export', 1, [[timestamp]], 0),
(319, 1, 3, 'moodle/portfolio:export', 1, [[timestamp]], 0),
(320, 1, 8, 'moodle/comment:view', 1, [[timestamp]], 0),
(321, 1, 6, 'moodle/comment:view', 1, [[timestamp]], 0),
(322, 1, 7, 'moodle/comment:view', 1, [[timestamp]], 0),
(323, 1, 5, 'moodle/comment:view', 1, [[timestamp]], 0),
(324, 1, 4, 'moodle/comment:view', 1, [[timestamp]], 0),
(325, 1, 3, 'moodle/comment:view', 1, [[timestamp]], 0),
(326, 1, 1, 'moodle/comment:view', 1, [[timestamp]], 0),
(327, 1, 7, 'moodle/comment:post', 1, [[timestamp]], 0),
(328, 1, 5, 'moodle/comment:post', 1, [[timestamp]], 0),
(329, 1, 4, 'moodle/comment:post', 1, [[timestamp]], 0),
(330, 1, 3, 'moodle/comment:post', 1, [[timestamp]], 0),
(331, 1, 1, 'moodle/comment:post', 1, [[timestamp]], 0),
(332, 1, 3, 'moodle/comment:delete', 1, [[timestamp]], 0),
(333, 1, 1, 'moodle/comment:delete', 1, [[timestamp]], 0),
(334, 1, 1, 'moodle/webservice:createtoken', 1, [[timestamp]], 0),
(335, 1, 7, 'moodle/webservice:createmobiletoken', 1, [[timestamp]], 0),
(336, 1, 7, 'moodle/rating:view', 1, [[timestamp]], 0),
(337, 1, 5, 'moodle/rating:view', 1, [[timestamp]], 0),
(338, 1, 4, 'moodle/rating:view', 1, [[timestamp]], 0),
(339, 1, 3, 'moodle/rating:view', 1, [[timestamp]], 0),
(340, 1, 1, 'moodle/rating:view', 1, [[timestamp]], 0),
(341, 1, 7, 'moodle/rating:viewany', 1, [[timestamp]], 0),
(342, 1, 5, 'moodle/rating:viewany', 1, [[timestamp]], 0),
(343, 1, 4, 'moodle/rating:viewany', 1, [[timestamp]], 0),
(344, 1, 3, 'moodle/rating:viewany', 1, [[timestamp]], 0),
(345, 1, 1, 'moodle/rating:viewany', 1, [[timestamp]], 0),
(346, 1, 7, 'moodle/rating:viewall', 1, [[timestamp]], 0),
(347, 1, 5, 'moodle/rating:viewall', 1, [[timestamp]], 0),
(348, 1, 4, 'moodle/rating:viewall', 1, [[timestamp]], 0),
(349, 1, 3, 'moodle/rating:viewall', 1, [[timestamp]], 0),
(350, 1, 1, 'moodle/rating:viewall', 1, [[timestamp]], 0),
(351, 1, 7, 'moodle/rating:rate', 1, [[timestamp]], 0),
(352, 1, 5, 'moodle/rating:rate', 1, [[timestamp]], 0),
(353, 1, 4, 'moodle/rating:rate', 1, [[timestamp]], 0),
(354, 1, 3, 'moodle/rating:rate', 1, [[timestamp]], 0),
(355, 1, 1, 'moodle/rating:rate', 1, [[timestamp]], 0),
(356, 1, 4, 'moodle/course:markcomplete', 1, [[timestamp]], 0),
(357, 1, 3, 'moodle/course:markcomplete', 1, [[timestamp]], 0),
(358, 1, 1, 'moodle/course:markcomplete', 1, [[timestamp]], 0),
(359, 1, 4, 'moodle/course:overridecompletion', 1, [[timestamp]], 0),
(360, 1, 3, 'moodle/course:overridecompletion', 1, [[timestamp]], 0),
(361, 1, 1, 'moodle/course:overridecompletion', 1, [[timestamp]], 0),
(362, 1, 1, 'moodle/badges:manageglobalsettings', 1, [[timestamp]], 0),
(363, 1, 7, 'moodle/badges:viewbadges', 1, [[timestamp]], 0),
(364, 1, 7, 'moodle/badges:manageownbadges', 1, [[timestamp]], 0),
(365, 1, 7, 'moodle/badges:viewotherbadges', 1, [[timestamp]], 0),
(366, 1, 7, 'moodle/badges:earnbadge', 1, [[timestamp]], 0),
(367, 1, 1, 'moodle/badges:createbadge', 1, [[timestamp]], 0),
(368, 1, 3, 'moodle/badges:createbadge', 1, [[timestamp]], 0),
(369, 1, 1, 'moodle/badges:deletebadge', 1, [[timestamp]], 0),
(370, 1, 3, 'moodle/badges:deletebadge', 1, [[timestamp]], 0),
(371, 1, 1, 'moodle/badges:configuredetails', 1, [[timestamp]], 0),
(372, 1, 3, 'moodle/badges:configuredetails', 1, [[timestamp]], 0),
(373, 1, 1, 'moodle/badges:configurecriteria', 1, [[timestamp]], 0),
(374, 1, 3, 'moodle/badges:configurecriteria', 1, [[timestamp]], 0),
(375, 1, 1, 'moodle/badges:configuremessages', 1, [[timestamp]], 0),
(376, 1, 3, 'moodle/badges:configuremessages', 1, [[timestamp]], 0),
(377, 1, 1, 'moodle/badges:awardbadge', 1, [[timestamp]], 0),
(378, 1, 4, 'moodle/badges:awardbadge', 1, [[timestamp]], 0),
(379, 1, 3, 'moodle/badges:awardbadge', 1, [[timestamp]], 0),
(380, 1, 1, 'moodle/badges:revokebadge', 1, [[timestamp]], 0),
(381, 1, 4, 'moodle/badges:revokebadge', 1, [[timestamp]], 0),
(382, 1, 3, 'moodle/badges:revokebadge', 1, [[timestamp]], 0),
(383, 1, 1, 'moodle/badges:viewawarded', 1, [[timestamp]], 0),
(384, 1, 4, 'moodle/badges:viewawarded', 1, [[timestamp]], 0),
(385, 1, 3, 'moodle/badges:viewawarded', 1, [[timestamp]], 0),
(386, 1, 6, 'moodle/search:query', 1, [[timestamp]], 0),
(387, 1, 7, 'moodle/search:query', 1, [[timestamp]], 0),
(388, 1, 5, 'moodle/search:query', 1, [[timestamp]], 0),
(389, 1, 4, 'moodle/search:query', 1, [[timestamp]], 0),
(390, 1, 3, 'moodle/search:query', 1, [[timestamp]], 0),
(391, 1, 1, 'moodle/search:query', 1, [[timestamp]], 0),
(392, 1, 1, 'moodle/competency:competencymanage', 1, [[timestamp]], 0),
(393, 1, 7, 'moodle/competency:competencyview', 1, [[timestamp]], 0),
(394, 1, 3, 'moodle/competency:competencygrade', 1, [[timestamp]], 0),
(395, 1, 4, 'moodle/competency:competencygrade', 1, [[timestamp]], 0),
(396, 1, 1, 'moodle/competency:competencygrade', 1, [[timestamp]], 0),
(397, 1, 3, 'moodle/competency:coursecompetencymanage', 1, [[timestamp]], 0),
(398, 1, 1, 'moodle/competency:coursecompetencymanage', 1, [[timestamp]], 0),
(399, 1, 1, 'moodle/competency:coursecompetencyconfigure', 1, [[timestamp]], 0),
(400, 1, 5, 'moodle/competency:coursecompetencygradable', 1, [[timestamp]], 0),
(401, 1, 7, 'moodle/competency:coursecompetencyview', 1, [[timestamp]], 0),
(402, 1, 1, 'moodle/competency:planmanage', 1, [[timestamp]], 0),
(403, 1, 1, 'moodle/competency:planmanagedraft', 1, [[timestamp]], 0),
(404, 1, 1, 'moodle/competency:planview', 1, [[timestamp]], 0),
(405, 1, 1, 'moodle/competency:planviewdraft', 1, [[timestamp]], 0),
(406, 1, 7, 'moodle/competency:planviewown', 1, [[timestamp]], 0),
(407, 1, 1, 'moodle/competency:planrequestreview', 1, [[timestamp]], 0),
(408, 1, 7, 'moodle/competency:planrequestreviewown', 1, [[timestamp]], 0),
(409, 1, 1, 'moodle/competency:planreview', 1, [[timestamp]], 0),
(410, 1, 1, 'moodle/competency:plancomment', 1, [[timestamp]], 0),
(411, 1, 7, 'moodle/competency:plancommentown', 1, [[timestamp]], 0),
(412, 1, 1, 'moodle/competency:usercompetencyview', 1, [[timestamp]], 0),
(413, 1, 3, 'moodle/competency:usercompetencyview', 1, [[timestamp]], 0),
(414, 1, 4, 'moodle/competency:usercompetencyview', 1, [[timestamp]], 0),
(415, 1, 1, 'moodle/competency:usercompetencyrequestreview', 1, [[timestamp]], 0),
(416, 1, 7, 'moodle/competency:usercompetencyrequestreviewown', 1, [[timestamp]], 0),
(417, 1, 1, 'moodle/competency:usercompetencyreview', 1, [[timestamp]], 0),
(418, 1, 1, 'moodle/competency:usercompetencycomment', 1, [[timestamp]], 0),
(419, 1, 7, 'moodle/competency:usercompetencycommentown', 1, [[timestamp]], 0),
(420, 1, 1, 'moodle/competency:templatemanage', 1, [[timestamp]], 0),
(421, 1, 4, 'moodle/analytics:listinsights', 1, [[timestamp]], 0),
(422, 1, 3, 'moodle/analytics:listinsights', 1, [[timestamp]], 0),
(423, 1, 1, 'moodle/analytics:listinsights', 1, [[timestamp]], 0),
(424, 1, 1, 'moodle/analytics:managemodels', 1, [[timestamp]], 0),
(425, 1, 1, 'moodle/competency:templateview', 1, [[timestamp]], 0),
(426, 1, 1, 'moodle/competency:userevidencemanage', 1, [[timestamp]], 0),
(427, 1, 7, 'moodle/competency:userevidencemanageown', 1, [[timestamp]], 0),
(428, 1, 1, 'moodle/competency:userevidenceview', 1, [[timestamp]], 0),
(429, 1, 4, 'moodle/site:messageanyuser', 1, [[timestamp]], 0),
(430, 1, 3, 'moodle/site:messageanyuser', 1, [[timestamp]], 0),
(431, 1, 1, 'moodle/site:messageanyuser', 1, [[timestamp]], 0),
(432, 1, 7, 'moodle/course:togglecompletion', 1, [[timestamp]], 0),
(433, 1, 7, 'moodle/analytics:listowninsights', 1, [[timestamp]], 0),
(434, 1, 3, 'moodle/h5p:setdisplayoptions', 1, [[timestamp]], 0),
(435, 1, 1, 'moodle/h5p:deploy', 1, [[timestamp]], 0),
(436, 1, 3, 'moodle/h5p:deploy', 1, [[timestamp]], 0),
(437, 1, 1, 'moodle/h5p:updatelibraries', 1, [[timestamp]], 0),
(438, 1, 1, 'moodle/course:recommendactivity', 1, [[timestamp]], 0),
(439, 1, 1, 'moodle/contentbank:access', 1, [[timestamp]], 0),
(440, 1, 2, 'moodle/contentbank:access', 1, [[timestamp]], 0),
(441, 1, 3, 'moodle/contentbank:access', 1, [[timestamp]], 0),
(442, 1, 1, 'moodle/contentbank:upload', 1, [[timestamp]], 0),
(443, 1, 2, 'moodle/contentbank:upload', 1, [[timestamp]], 0),
(444, 1, 3, 'moodle/contentbank:upload', 1, [[timestamp]], 0),
(445, 1, 1, 'moodle/contentbank:deleteanycontent', 1, [[timestamp]], 0),
(446, 1, 2, 'moodle/contentbank:deleteanycontent', 1, [[timestamp]], 0),
(447, 1, 7, 'moodle/contentbank:deleteowncontent', 1, [[timestamp]], 0),
(448, 1, 1, 'moodle/contentbank:manageanycontent', 1, [[timestamp]], 0),
(449, 1, 2, 'moodle/contentbank:manageanycontent', 1, [[timestamp]], 0),
(450, 1, 1, 'moodle/contentbank:manageowncontent', 1, [[timestamp]], 0),
(451, 1, 2, 'moodle/contentbank:manageowncontent', 1, [[timestamp]], 0),
(452, 1, 3, 'moodle/contentbank:manageowncontent', 1, [[timestamp]], 0),
(453, 1, 1, 'moodle/contentbank:useeditor', 1, [[timestamp]], 0),
(454, 1, 2, 'moodle/contentbank:useeditor', 1, [[timestamp]], 0),
(455, 1, 3, 'moodle/contentbank:useeditor', 1, [[timestamp]], 0),
(456, 1, 1, 'moodle/contentbank:downloadcontent', 1, [[timestamp]], 0),
(457, 1, 2, 'moodle/contentbank:downloadcontent', 1, [[timestamp]], 0),
(458, 1, 3, 'moodle/contentbank:downloadcontent', 1, [[timestamp]], 0),
(459, 1, 5, 'moodle/course:downloadcoursecontent', 1, [[timestamp]], 0),
(460, 1, 4, 'moodle/course:downloadcoursecontent', 1, [[timestamp]], 0),
(461, 1, 3, 'moodle/course:downloadcoursecontent', 1, [[timestamp]], 0),
(462, 1, 1, 'moodle/course:downloadcoursecontent', 1, [[timestamp]], 0),
(463, 1, 3, 'moodle/course:configuredownloadcontent', 1, [[timestamp]], 0),
(464, 1, 1, 'moodle/course:configuredownloadcontent', 1, [[timestamp]], 0),
(465, 1, 1, 'moodle/contentbank:viewunlistedcontent', 1, [[timestamp]], 0),
(466, 1, 2, 'moodle/contentbank:viewunlistedcontent', 1, [[timestamp]], 0),
(467, 1, 6, 'mod/assign:view', 1, [[timestamp]], 0),
(468, 1, 5, 'mod/assign:view', 1, [[timestamp]], 0),
(469, 1, 4, 'mod/assign:view', 1, [[timestamp]], 0),
(470, 1, 3, 'mod/assign:view', 1, [[timestamp]], 0),
(471, 1, 1, 'mod/assign:view', 1, [[timestamp]], 0),
(472, 1, 5, 'mod/assign:submit', 1, [[timestamp]], 0),
(473, 1, 4, 'mod/assign:grade', 1, [[timestamp]], 0),
(474, 1, 3, 'mod/assign:grade', 1, [[timestamp]], 0),
(475, 1, 1, 'mod/assign:grade', 1, [[timestamp]], 0),
(476, 1, 4, 'mod/assign:exportownsubmission', 1, [[timestamp]], 0),
(477, 1, 3, 'mod/assign:exportownsubmission', 1, [[timestamp]], 0),
(478, 1, 1, 'mod/assign:exportownsubmission', 1, [[timestamp]], 0),
(479, 1, 5, 'mod/assign:exportownsubmission', 1, [[timestamp]], 0),
(480, 1, 3, 'mod/assign:addinstance', 1, [[timestamp]], 0),
(481, 1, 1, 'mod/assign:addinstance', 1, [[timestamp]], 0),
(482, 1, 4, 'mod/assign:grantextension', 1, [[timestamp]], 0),
(483, 1, 3, 'mod/assign:grantextension', 1, [[timestamp]], 0),
(484, 1, 1, 'mod/assign:grantextension', 1, [[timestamp]], 0),
(485, 1, 3, 'mod/assign:revealidentities', 1, [[timestamp]], 0),
(486, 1, 1, 'mod/assign:revealidentities', 1, [[timestamp]], 0),
(487, 1, 3, 'mod/assign:reviewgrades', 1, [[timestamp]], 0),
(488, 1, 1, 'mod/assign:reviewgrades', 1, [[timestamp]], 0),
(489, 1, 3, 'mod/assign:releasegrades', 1, [[timestamp]], 0),
(490, 1, 1, 'mod/assign:releasegrades', 1, [[timestamp]], 0),
(491, 1, 3, 'mod/assign:managegrades', 1, [[timestamp]], 0),
(492, 1, 1, 'mod/assign:managegrades', 1, [[timestamp]], 0),
(493, 1, 3, 'mod/assign:manageallocations', 1, [[timestamp]], 0),
(494, 1, 1, 'mod/assign:manageallocations', 1, [[timestamp]], 0),
(495, 1, 3, 'mod/assign:viewgrades', 1, [[timestamp]], 0),
(496, 1, 1, 'mod/assign:viewgrades', 1, [[timestamp]], 0),
(497, 1, 4, 'mod/assign:viewgrades', 1, [[timestamp]], 0),
(498, 1, 1, 'mod/assign:viewblinddetails', 1, [[timestamp]], 0),
(499, 1, 4, 'mod/assign:receivegradernotifications', 1, [[timestamp]], 0),
(500, 1, 3, 'mod/assign:receivegradernotifications', 1, [[timestamp]], 0),
(501, 1, 1, 'mod/assign:receivegradernotifications', 1, [[timestamp]], 0),
(502, 1, 3, 'mod/assign:manageoverrides', 1, [[timestamp]], 0),
(503, 1, 1, 'mod/assign:manageoverrides', 1, [[timestamp]], 0),
(504, 1, 4, 'mod/assign:showhiddengrader', 1, [[timestamp]], 0),
(505, 1, 3, 'mod/assign:showhiddengrader', 1, [[timestamp]], 0),
(506, 1, 1, 'mod/assign:showhiddengrader', 1, [[timestamp]], 0),
(507, 1, 5, 'mod/assign:viewownsubmissionsummary', 1, [[timestamp]], 0),
(508, 1, 6, 'mod/assignment:view', 1, [[timestamp]], 0),
(509, 1, 5, 'mod/assignment:view', 1, [[timestamp]], 0),
(510, 1, 4, 'mod/assignment:view', 1, [[timestamp]], 0),
(511, 1, 3, 'mod/assignment:view', 1, [[timestamp]], 0),
(512, 1, 1, 'mod/assignment:view', 1, [[timestamp]], 0),
(513, 1, 3, 'mod/assignment:addinstance', 1, [[timestamp]], 0),
(514, 1, 1, 'mod/assignment:addinstance', 1, [[timestamp]], 0),
(515, 1, 5, 'mod/assignment:submit', 1, [[timestamp]], 0),
(516, 1, 4, 'mod/assignment:grade', 1, [[timestamp]], 0),
(517, 1, 3, 'mod/assignment:grade', 1, [[timestamp]], 0),
(518, 1, 1, 'mod/assignment:grade', 1, [[timestamp]], 0),
(519, 1, 4, 'mod/assignment:exportownsubmission', 1, [[timestamp]], 0),
(520, 1, 3, 'mod/assignment:exportownsubmission', 1, [[timestamp]], 0),
(521, 1, 1, 'mod/assignment:exportownsubmission', 1, [[timestamp]], 0),
(522, 1, 5, 'mod/assignment:exportownsubmission', 1, [[timestamp]], 0),
(523, 1, 3, 'mod/book:addinstance', 1, [[timestamp]], 0),
(524, 1, 1, 'mod/book:addinstance', 1, [[timestamp]], 0),
(525, 1, 6, 'mod/book:read', 1, [[timestamp]], 0),
(526, 1, 8, 'mod/book:read', 1, [[timestamp]], 0),
(527, 1, 5, 'mod/book:read', 1, [[timestamp]], 0),
(528, 1, 4, 'mod/book:read', 1, [[timestamp]], 0),
(529, 1, 3, 'mod/book:read', 1, [[timestamp]], 0),
(530, 1, 1, 'mod/book:read', 1, [[timestamp]], 0),
(531, 1, 4, 'mod/book:viewhiddenchapters', 1, [[timestamp]], 0),
(532, 1, 3, 'mod/book:viewhiddenchapters', 1, [[timestamp]], 0),
(533, 1, 1, 'mod/book:viewhiddenchapters', 1, [[timestamp]], 0),
(534, 1, 3, 'mod/book:edit', 1, [[timestamp]], 0),
(535, 1, 1, 'mod/book:edit', 1, [[timestamp]], 0),
(536, 1, 3, 'mod/chat:addinstance', 1, [[timestamp]], 0),
(537, 1, 1, 'mod/chat:addinstance', 1, [[timestamp]], 0),
(538, 1, 5, 'mod/chat:chat', 1, [[timestamp]], 0),
(539, 1, 4, 'mod/chat:chat', 1, [[timestamp]], 0),
(540, 1, 3, 'mod/chat:chat', 1, [[timestamp]], 0),
(541, 1, 1, 'mod/chat:chat', 1, [[timestamp]], 0),
(542, 1, 5, 'mod/chat:readlog', 1, [[timestamp]], 0),
(543, 1, 4, 'mod/chat:readlog', 1, [[timestamp]], 0),
(544, 1, 3, 'mod/chat:readlog', 1, [[timestamp]], 0),
(545, 1, 1, 'mod/chat:readlog', 1, [[timestamp]], 0),
(546, 1, 4, 'mod/chat:deletelog', 1, [[timestamp]], 0),
(547, 1, 3, 'mod/chat:deletelog', 1, [[timestamp]], 0),
(548, 1, 1, 'mod/chat:deletelog', 1, [[timestamp]], 0),
(549, 1, 4, 'mod/chat:exportparticipatedsession', 1, [[timestamp]], 0),
(550, 1, 3, 'mod/chat:exportparticipatedsession', 1, [[timestamp]], 0),
(551, 1, 1, 'mod/chat:exportparticipatedsession', 1, [[timestamp]], 0),
(552, 1, 4, 'mod/chat:exportsession', 1, [[timestamp]], 0),
(553, 1, 3, 'mod/chat:exportsession', 1, [[timestamp]], 0),
(554, 1, 1, 'mod/chat:exportsession', 1, [[timestamp]], 0),
(555, 1, 7, 'mod/chat:view', 1, [[timestamp]], 0),
(556, 1, 6, 'mod/chat:view', 1, [[timestamp]], 0),
(557, 1, 3, 'mod/choice:addinstance', 1, [[timestamp]], 0),
(558, 1, 1, 'mod/choice:addinstance', 1, [[timestamp]], 0),
(559, 1, 5, 'mod/choice:choose', 1, [[timestamp]], 0),
(560, 1, 4, 'mod/choice:choose', 1, [[timestamp]], 0),
(561, 1, 3, 'mod/choice:choose', 1, [[timestamp]], 0),
(562, 1, 4, 'mod/choice:readresponses', 1, [[timestamp]], 0),
(563, 1, 3, 'mod/choice:readresponses', 1, [[timestamp]], 0),
(564, 1, 1, 'mod/choice:readresponses', 1, [[timestamp]], 0),
(565, 1, 4, 'mod/choice:deleteresponses', 1, [[timestamp]], 0),
(566, 1, 3, 'mod/choice:deleteresponses', 1, [[timestamp]], 0),
(567, 1, 1, 'mod/choice:deleteresponses', 1, [[timestamp]], 0),
(568, 1, 4, 'mod/choice:downloadresponses', 1, [[timestamp]], 0),
(569, 1, 3, 'mod/choice:downloadresponses', 1, [[timestamp]], 0),
(570, 1, 1, 'mod/choice:downloadresponses', 1, [[timestamp]], 0),
(571, 1, 7, 'mod/choice:view', 1, [[timestamp]], 0),
(572, 1, 6, 'mod/choice:view', 1, [[timestamp]], 0),
(573, 1, 3, 'mod/data:addinstance', 1, [[timestamp]], 0),
(574, 1, 1, 'mod/data:addinstance', 1, [[timestamp]], 0),
(575, 1, 8, 'mod/data:viewentry', 1, [[timestamp]], 0),
(576, 1, 6, 'mod/data:viewentry', 1, [[timestamp]], 0),
(577, 1, 5, 'mod/data:viewentry', 1, [[timestamp]], 0),
(578, 1, 4, 'mod/data:viewentry', 1, [[timestamp]], 0),
(579, 1, 3, 'mod/data:viewentry', 1, [[timestamp]], 0),
(580, 1, 1, 'mod/data:viewentry', 1, [[timestamp]], 0),
(581, 1, 5, 'mod/data:writeentry', 1, [[timestamp]], 0),
(582, 1, 4, 'mod/data:writeentry', 1, [[timestamp]], 0),
(583, 1, 3, 'mod/data:writeentry', 1, [[timestamp]], 0),
(584, 1, 1, 'mod/data:writeentry', 1, [[timestamp]], 0),
(585, 1, 5, 'mod/data:comment', 1, [[timestamp]], 0),
(586, 1, 4, 'mod/data:comment', 1, [[timestamp]], 0),
(587, 1, 3, 'mod/data:comment', 1, [[timestamp]], 0),
(588, 1, 1, 'mod/data:comment', 1, [[timestamp]], 0),
(589, 1, 4, 'mod/data:rate', 1, [[timestamp]], 0),
(590, 1, 3, 'mod/data:rate', 1, [[timestamp]], 0),
(591, 1, 1, 'mod/data:rate', 1, [[timestamp]], 0),
(592, 1, 4, 'mod/data:viewrating', 1, [[timestamp]], 0),
(593, 1, 3, 'mod/data:viewrating', 1, [[timestamp]], 0),
(594, 1, 1, 'mod/data:viewrating', 1, [[timestamp]], 0),
(595, 1, 4, 'mod/data:viewanyrating', 1, [[timestamp]], 0),
(596, 1, 3, 'mod/data:viewanyrating', 1, [[timestamp]], 0),
(597, 1, 1, 'mod/data:viewanyrating', 1, [[timestamp]], 0),
(598, 1, 4, 'mod/data:viewallratings', 1, [[timestamp]], 0),
(599, 1, 3, 'mod/data:viewallratings', 1, [[timestamp]], 0),
(600, 1, 1, 'mod/data:viewallratings', 1, [[timestamp]], 0),
(601, 1, 4, 'mod/data:approve', 1, [[timestamp]], 0),
(602, 1, 3, 'mod/data:approve', 1, [[timestamp]], 0),
(603, 1, 1, 'mod/data:approve', 1, [[timestamp]], 0),
(604, 1, 4, 'mod/data:manageentries', 1, [[timestamp]], 0),
(605, 1, 3, 'mod/data:manageentries', 1, [[timestamp]], 0),
(606, 1, 1, 'mod/data:manageentries', 1, [[timestamp]], 0),
(607, 1, 4, 'mod/data:managecomments', 1, [[timestamp]], 0),
(608, 1, 3, 'mod/data:managecomments', 1, [[timestamp]], 0),
(609, 1, 1, 'mod/data:managecomments', 1, [[timestamp]], 0),
(610, 1, 3, 'mod/data:managetemplates', 1, [[timestamp]], 0),
(611, 1, 1, 'mod/data:managetemplates', 1, [[timestamp]], 0),
(612, 1, 4, 'mod/data:viewalluserpresets', 1, [[timestamp]], 0),
(613, 1, 3, 'mod/data:viewalluserpresets', 1, [[timestamp]], 0),
(614, 1, 1, 'mod/data:viewalluserpresets', 1, [[timestamp]], 0),
(615, 1, 1, 'mod/data:manageuserpresets', 1, [[timestamp]], 0),
(616, 1, 1, 'mod/data:exportentry', 1, [[timestamp]], 0),
(617, 1, 4, 'mod/data:exportentry', 1, [[timestamp]], 0),
(618, 1, 3, 'mod/data:exportentry', 1, [[timestamp]], 0),
(619, 1, 1, 'mod/data:exportownentry', 1, [[timestamp]], 0),
(620, 1, 4, 'mod/data:exportownentry', 1, [[timestamp]], 0),
(621, 1, 3, 'mod/data:exportownentry', 1, [[timestamp]], 0),
(622, 1, 5, 'mod/data:exportownentry', 1, [[timestamp]], 0),
(623, 1, 1, 'mod/data:exportallentries', 1, [[timestamp]], 0),
(624, 1, 4, 'mod/data:exportallentries', 1, [[timestamp]], 0),
(625, 1, 3, 'mod/data:exportallentries', 1, [[timestamp]], 0),
(626, 1, 1, 'mod/data:exportuserinfo', 1, [[timestamp]], 0),
(627, 1, 4, 'mod/data:exportuserinfo', 1, [[timestamp]], 0),
(628, 1, 3, 'mod/data:exportuserinfo', 1, [[timestamp]], 0),
(629, 1, 6, 'mod/data:view', 1, [[timestamp]], 0),
(630, 1, 5, 'mod/data:view', 1, [[timestamp]], 0),
(631, 1, 4, 'mod/data:view', 1, [[timestamp]], 0),
(632, 1, 3, 'mod/data:view', 1, [[timestamp]], 0),
(633, 1, 1, 'mod/data:view', 1, [[timestamp]], 0),
(634, 1, 3, 'mod/feedback:addinstance', 1, [[timestamp]], 0),
(635, 1, 1, 'mod/feedback:addinstance', 1, [[timestamp]], 0),
(636, 1, 6, 'mod/feedback:view', 1, [[timestamp]], 0),
(637, 1, 8, 'mod/feedback:view', 1, [[timestamp]], 0),
(638, 1, 5, 'mod/feedback:view', 1, [[timestamp]], 0),
(639, 1, 4, 'mod/feedback:view', 1, [[timestamp]], 0),
(640, 1, 3, 'mod/feedback:view', 1, [[timestamp]], 0),
(641, 1, 1, 'mod/feedback:view', 1, [[timestamp]], 0),
(642, 1, 8, 'mod/feedback:complete', 1, [[timestamp]], 0),
(643, 1, 5, 'mod/feedback:complete', 1, [[timestamp]], 0),
(644, 1, 5, 'mod/feedback:viewanalysepage', 1, [[timestamp]], 0),
(645, 1, 3, 'mod/feedback:viewanalysepage', 1, [[timestamp]], 0),
(646, 1, 1, 'mod/feedback:viewanalysepage', 1, [[timestamp]], 0),
(647, 1, 3, 'mod/feedback:deletesubmissions', 1, [[timestamp]], 0),
(648, 1, 1, 'mod/feedback:deletesubmissions', 1, [[timestamp]], 0),
(649, 1, 1, 'mod/feedback:mapcourse', 1, [[timestamp]], 0),
(650, 1, 3, 'mod/feedback:edititems', 1, [[timestamp]], 0),
(651, 1, 1, 'mod/feedback:edititems', 1, [[timestamp]], 0),
(652, 1, 3, 'mod/feedback:createprivatetemplate', 1, [[timestamp]], 0),
(653, 1, 1, 'mod/feedback:createprivatetemplate', 1, [[timestamp]], 0),
(654, 1, 3, 'mod/feedback:createpublictemplate', 1, [[timestamp]], 0),
(655, 1, 1, 'mod/feedback:createpublictemplate', 1, [[timestamp]], 0),
(656, 1, 3, 'mod/feedback:deletetemplate', 1, [[timestamp]], 0),
(657, 1, 1, 'mod/feedback:deletetemplate', 1, [[timestamp]], 0),
(658, 1, 4, 'mod/feedback:viewreports', 1, [[timestamp]], 0),
(659, 1, 3, 'mod/feedback:viewreports', 1, [[timestamp]], 0),
(660, 1, 1, 'mod/feedback:viewreports', 1, [[timestamp]], 0),
(661, 1, 4, 'mod/feedback:receivemail', 1, [[timestamp]], 0),
(662, 1, 3, 'mod/feedback:receivemail', 1, [[timestamp]], 0),
(663, 1, 3, 'mod/folder:addinstance', 1, [[timestamp]], 0),
(664, 1, 1, 'mod/folder:addinstance', 1, [[timestamp]], 0),
(665, 1, 6, 'mod/folder:view', 1, [[timestamp]], 0),
(666, 1, 7, 'mod/folder:view', 1, [[timestamp]], 0),
(667, 1, 3, 'mod/folder:managefiles', 1, [[timestamp]], 0),
(668, 1, 3, 'mod/forum:addinstance', 1, [[timestamp]], 0),
(669, 1, 1, 'mod/forum:addinstance', 1, [[timestamp]], 0),
(670, 1, 8, 'mod/forum:viewdiscussion', 1, [[timestamp]], 0),
(671, 1, 6, 'mod/forum:viewdiscussion', 1, [[timestamp]], 0),
(672, 1, 5, 'mod/forum:viewdiscussion', 1, [[timestamp]], 0),
(673, 1, 4, 'mod/forum:viewdiscussion', 1, [[timestamp]], 0),
(674, 1, 3, 'mod/forum:viewdiscussion', 1, [[timestamp]], 0),
(675, 1, 1, 'mod/forum:viewdiscussion', 1, [[timestamp]], 0),
(676, 1, 4, 'mod/forum:viewhiddentimedposts', 1, [[timestamp]], 0),
(677, 1, 3, 'mod/forum:viewhiddentimedposts', 1, [[timestamp]], 0),
(678, 1, 1, 'mod/forum:viewhiddentimedposts', 1, [[timestamp]], 0),
(679, 1, 5, 'mod/forum:startdiscussion', 1, [[timestamp]], 0),
(680, 1, 4, 'mod/forum:startdiscussion', 1, [[timestamp]], 0),
(681, 1, 3, 'mod/forum:startdiscussion', 1, [[timestamp]], 0),
(682, 1, 1, 'mod/forum:startdiscussion', 1, [[timestamp]], 0),
(683, 1, 5, 'mod/forum:replypost', 1, [[timestamp]], 0),
(684, 1, 4, 'mod/forum:replypost', 1, [[timestamp]], 0),
(685, 1, 3, 'mod/forum:replypost', 1, [[timestamp]], 0),
(686, 1, 1, 'mod/forum:replypost', 1, [[timestamp]], 0),
(687, 1, 4, 'mod/forum:addnews', 1, [[timestamp]], 0),
(688, 1, 3, 'mod/forum:addnews', 1, [[timestamp]], 0),
(689, 1, 1, 'mod/forum:addnews', 1, [[timestamp]], 0),
(690, 1, 4, 'mod/forum:replynews', 1, [[timestamp]], 0),
(691, 1, 3, 'mod/forum:replynews', 1, [[timestamp]], 0),
(692, 1, 1, 'mod/forum:replynews', 1, [[timestamp]], 0),
(693, 1, 5, 'mod/forum:viewrating', 1, [[timestamp]], 0),
(694, 1, 4, 'mod/forum:viewrating', 1, [[timestamp]], 0),
(695, 1, 3, 'mod/forum:viewrating', 1, [[timestamp]], 0),
(696, 1, 1, 'mod/forum:viewrating', 1, [[timestamp]], 0),
(697, 1, 4, 'mod/forum:viewanyrating', 1, [[timestamp]], 0),
(698, 1, 3, 'mod/forum:viewanyrating', 1, [[timestamp]], 0),
(699, 1, 1, 'mod/forum:viewanyrating', 1, [[timestamp]], 0),
(700, 1, 4, 'mod/forum:viewallratings', 1, [[timestamp]], 0),
(701, 1, 3, 'mod/forum:viewallratings', 1, [[timestamp]], 0),
(702, 1, 1, 'mod/forum:viewallratings', 1, [[timestamp]], 0),
(703, 1, 4, 'mod/forum:rate', 1, [[timestamp]], 0),
(704, 1, 3, 'mod/forum:rate', 1, [[timestamp]], 0),
(705, 1, 1, 'mod/forum:rate', 1, [[timestamp]], 0),
(706, 1, 4, 'mod/forum:postprivatereply', 1, [[timestamp]], 0),
(707, 1, 3, 'mod/forum:postprivatereply', 1, [[timestamp]], 0),
(708, 1, 1, 'mod/forum:postprivatereply', 1, [[timestamp]], 0),
(709, 1, 4, 'mod/forum:readprivatereplies', 1, [[timestamp]], 0),
(710, 1, 3, 'mod/forum:readprivatereplies', 1, [[timestamp]], 0),
(711, 1, 1, 'mod/forum:readprivatereplies', 1, [[timestamp]], 0),
(712, 1, 5, 'mod/forum:createattachment', 1, [[timestamp]], 0),
(713, 1, 4, 'mod/forum:createattachment', 1, [[timestamp]], 0),
(714, 1, 3, 'mod/forum:createattachment', 1, [[timestamp]], 0),
(715, 1, 1, 'mod/forum:createattachment', 1, [[timestamp]], 0),
(716, 1, 5, 'mod/forum:deleteownpost', 1, [[timestamp]], 0),
(717, 1, 4, 'mod/forum:deleteownpost', 1, [[timestamp]], 0),
(718, 1, 3, 'mod/forum:deleteownpost', 1, [[timestamp]], 0),
(719, 1, 1, 'mod/forum:deleteownpost', 1, [[timestamp]], 0),
(720, 1, 4, 'mod/forum:deleteanypost', 1, [[timestamp]], 0),
(721, 1, 3, 'mod/forum:deleteanypost', 1, [[timestamp]], 0),
(722, 1, 1, 'mod/forum:deleteanypost', 1, [[timestamp]], 0),
(723, 1, 4, 'mod/forum:splitdiscussions', 1, [[timestamp]], 0),
(724, 1, 3, 'mod/forum:splitdiscussions', 1, [[timestamp]], 0),
(725, 1, 1, 'mod/forum:splitdiscussions', 1, [[timestamp]], 0),
(726, 1, 4, 'mod/forum:movediscussions', 1, [[timestamp]], 0),
(727, 1, 3, 'mod/forum:movediscussions', 1, [[timestamp]], 0),
(728, 1, 1, 'mod/forum:movediscussions', 1, [[timestamp]], 0),
(729, 1, 4, 'mod/forum:pindiscussions', 1, [[timestamp]], 0),
(730, 1, 3, 'mod/forum:pindiscussions', 1, [[timestamp]], 0),
(731, 1, 1, 'mod/forum:pindiscussions', 1, [[timestamp]], 0),
(732, 1, 4, 'mod/forum:editanypost', 1, [[timestamp]], 0),
(733, 1, 3, 'mod/forum:editanypost', 1, [[timestamp]], 0),
(734, 1, 1, 'mod/forum:editanypost', 1, [[timestamp]], 0),
(735, 1, 4, 'mod/forum:viewqandawithoutposting', 1, [[timestamp]], 0),
(736, 1, 3, 'mod/forum:viewqandawithoutposting', 1, [[timestamp]], 0),
(737, 1, 1, 'mod/forum:viewqandawithoutposting', 1, [[timestamp]], 0),
(738, 1, 4, 'mod/forum:viewsubscribers', 1, [[timestamp]], 0),
(739, 1, 3, 'mod/forum:viewsubscribers', 1, [[timestamp]], 0),
(740, 1, 1, 'mod/forum:viewsubscribers', 1, [[timestamp]], 0),
(741, 1, 4, 'mod/forum:managesubscriptions', 1, [[timestamp]], 0),
(742, 1, 3, 'mod/forum:managesubscriptions', 1, [[timestamp]], 0),
(743, 1, 1, 'mod/forum:managesubscriptions', 1, [[timestamp]], 0),
(744, 1, 4, 'mod/forum:postwithoutthrottling', 1, [[timestamp]], 0),
(745, 1, 3, 'mod/forum:postwithoutthrottling', 1, [[timestamp]], 0),
(746, 1, 1, 'mod/forum:postwithoutthrottling', 1, [[timestamp]], 0),
(747, 1, 4, 'mod/forum:exportdiscussion', 1, [[timestamp]], 0),
(748, 1, 3, 'mod/forum:exportdiscussion', 1, [[timestamp]], 0),
(749, 1, 1, 'mod/forum:exportdiscussion', 1, [[timestamp]], 0),
(750, 1, 4, 'mod/forum:exportforum', 1, [[timestamp]], 0),
(751, 1, 3, 'mod/forum:exportforum', 1, [[timestamp]], 0),
(752, 1, 1, 'mod/forum:exportforum', 1, [[timestamp]], 0),
(753, 1, 4, 'mod/forum:exportpost', 1, [[timestamp]], 0),
(754, 1, 3, 'mod/forum:exportpost', 1, [[timestamp]], 0),
(755, 1, 1, 'mod/forum:exportpost', 1, [[timestamp]], 0),
(756, 1, 4, 'mod/forum:exportownpost', 1, [[timestamp]], 0),
(757, 1, 3, 'mod/forum:exportownpost', 1, [[timestamp]], 0),
(758, 1, 1, 'mod/forum:exportownpost', 1, [[timestamp]], 0),
(759, 1, 5, 'mod/forum:exportownpost', 1, [[timestamp]], 0),
(760, 1, 4, 'mod/forum:addquestion', 1, [[timestamp]], 0),
(761, 1, 3, 'mod/forum:addquestion', 1, [[timestamp]], 0),
(762, 1, 1, 'mod/forum:addquestion', 1, [[timestamp]], 0),
(763, 1, 5, 'mod/forum:allowforcesubscribe', 1, [[timestamp]], 0),
(764, 1, 4, 'mod/forum:allowforcesubscribe', 1, [[timestamp]], 0),
(765, 1, 3, 'mod/forum:allowforcesubscribe', 1, [[timestamp]], 0),
(766, 1, 8, 'mod/forum:allowforcesubscribe', 1, [[timestamp]], 0),
(767, 1, 4, 'mod/forum:canposttomygroups', 1, [[timestamp]], 0),
(768, 1, 3, 'mod/forum:canposttomygroups', 1, [[timestamp]], 0),
(769, 1, 1, 'mod/forum:canposttomygroups', 1, [[timestamp]], 0),
(770, 1, 4, 'mod/forum:canoverridediscussionlock', 1, [[timestamp]], 0),
(771, 1, 3, 'mod/forum:canoverridediscussionlock', 1, [[timestamp]], 0),
(772, 1, 1, 'mod/forum:canoverridediscussionlock', 1, [[timestamp]], 0),
(773, 1, 4, 'mod/forum:canoverridecutoff', 1, [[timestamp]], 0),
(774, 1, 3, 'mod/forum:canoverridecutoff', 1, [[timestamp]], 0),
(775, 1, 1, 'mod/forum:canoverridecutoff', 1, [[timestamp]], 0),
(776, 1, 7, 'mod/forum:cantogglefavourite', 1, [[timestamp]], 0),
(777, 1, 4, 'mod/forum:grade', 1, [[timestamp]], 0),
(778, 1, 3, 'mod/forum:grade', 1, [[timestamp]], 0),
(779, 1, 1, 'mod/forum:grade', 1, [[timestamp]], 0),
(780, 1, 3, 'mod/glossary:addinstance', 1, [[timestamp]], 0),
(781, 1, 1, 'mod/glossary:addinstance', 1, [[timestamp]], 0),
(782, 1, 8, 'mod/glossary:view', 1, [[timestamp]], 0),
(783, 1, 6, 'mod/glossary:view', 1, [[timestamp]], 0),
(784, 1, 5, 'mod/glossary:view', 1, [[timestamp]], 0),
(785, 1, 4, 'mod/glossary:view', 1, [[timestamp]], 0),
(786, 1, 3, 'mod/glossary:view', 1, [[timestamp]], 0),
(787, 1, 1, 'mod/glossary:view', 1, [[timestamp]], 0),
(788, 1, 5, 'mod/glossary:write', 1, [[timestamp]], 0),
(789, 1, 4, 'mod/glossary:write', 1, [[timestamp]], 0),
(790, 1, 3, 'mod/glossary:write', 1, [[timestamp]], 0),
(791, 1, 1, 'mod/glossary:write', 1, [[timestamp]], 0),
(792, 1, 4, 'mod/glossary:manageentries', 1, [[timestamp]], 0),
(793, 1, 3, 'mod/glossary:manageentries', 1, [[timestamp]], 0),
(794, 1, 1, 'mod/glossary:manageentries', 1, [[timestamp]], 0),
(795, 1, 4, 'mod/glossary:managecategories', 1, [[timestamp]], 0),
(796, 1, 3, 'mod/glossary:managecategories', 1, [[timestamp]], 0),
(797, 1, 1, 'mod/glossary:managecategories', 1, [[timestamp]], 0),
(798, 1, 5, 'mod/glossary:comment', 1, [[timestamp]], 0),
(799, 1, 4, 'mod/glossary:comment', 1, [[timestamp]], 0),
(800, 1, 3, 'mod/glossary:comment', 1, [[timestamp]], 0),
(801, 1, 1, 'mod/glossary:comment', 1, [[timestamp]], 0),
(802, 1, 4, 'mod/glossary:managecomments', 1, [[timestamp]], 0),
(803, 1, 3, 'mod/glossary:managecomments', 1, [[timestamp]], 0),
(804, 1, 1, 'mod/glossary:managecomments', 1, [[timestamp]], 0),
(805, 1, 4, 'mod/glossary:import', 1, [[timestamp]], 0),
(806, 1, 3, 'mod/glossary:import', 1, [[timestamp]], 0),
(807, 1, 1, 'mod/glossary:import', 1, [[timestamp]], 0),
(808, 1, 4, 'mod/glossary:export', 1, [[timestamp]], 0),
(809, 1, 3, 'mod/glossary:export', 1, [[timestamp]], 0),
(810, 1, 1, 'mod/glossary:export', 1, [[timestamp]], 0),
(811, 1, 4, 'mod/glossary:approve', 1, [[timestamp]], 0),
(812, 1, 3, 'mod/glossary:approve', 1, [[timestamp]], 0),
(813, 1, 1, 'mod/glossary:approve', 1, [[timestamp]], 0),
(814, 1, 4, 'mod/glossary:rate', 1, [[timestamp]], 0),
(815, 1, 3, 'mod/glossary:rate', 1, [[timestamp]], 0),
(816, 1, 1, 'mod/glossary:rate', 1, [[timestamp]], 0),
(817, 1, 4, 'mod/glossary:viewrating', 1, [[timestamp]], 0),
(818, 1, 3, 'mod/glossary:viewrating', 1, [[timestamp]], 0),
(819, 1, 1, 'mod/glossary:viewrating', 1, [[timestamp]], 0),
(820, 1, 4, 'mod/glossary:viewanyrating', 1, [[timestamp]], 0),
(821, 1, 3, 'mod/glossary:viewanyrating', 1, [[timestamp]], 0),
(822, 1, 1, 'mod/glossary:viewanyrating', 1, [[timestamp]], 0),
(823, 1, 4, 'mod/glossary:viewallratings', 1, [[timestamp]], 0),
(824, 1, 3, 'mod/glossary:viewallratings', 1, [[timestamp]], 0),
(825, 1, 1, 'mod/glossary:viewallratings', 1, [[timestamp]], 0),
(826, 1, 4, 'mod/glossary:exportentry', 1, [[timestamp]], 0),
(827, 1, 3, 'mod/glossary:exportentry', 1, [[timestamp]], 0),
(828, 1, 1, 'mod/glossary:exportentry', 1, [[timestamp]], 0),
(829, 1, 4, 'mod/glossary:exportownentry', 1, [[timestamp]], 0),
(830, 1, 3, 'mod/glossary:exportownentry', 1, [[timestamp]], 0),
(831, 1, 1, 'mod/glossary:exportownentry', 1, [[timestamp]], 0),
(832, 1, 5, 'mod/glossary:exportownentry', 1, [[timestamp]], 0),
(833, 1, 6, 'mod/h5pactivity:view', 1, [[timestamp]], 0),
(834, 1, 5, 'mod/h5pactivity:view', 1, [[timestamp]], 0),
(835, 1, 4, 'mod/h5pactivity:view', 1, [[timestamp]], 0),
(836, 1, 3, 'mod/h5pactivity:view', 1, [[timestamp]], 0),
(837, 1, 1, 'mod/h5pactivity:view', 1, [[timestamp]], 0),
(838, 1, 3, 'mod/h5pactivity:addinstance', 1, [[timestamp]], 0),
(839, 1, 1, 'mod/h5pactivity:addinstance', 1, [[timestamp]], 0),
(840, 1, 5, 'mod/h5pactivity:submit', 1, [[timestamp]], 0),
(841, 1, 3, 'mod/h5pactivity:reviewattempts', 1, [[timestamp]], 0),
(842, 1, 1, 'mod/h5pactivity:reviewattempts', 1, [[timestamp]], 0),
(843, 1, 6, 'mod/imscp:view', 1, [[timestamp]], 0),
(844, 1, 7, 'mod/imscp:view', 1, [[timestamp]], 0),
(845, 1, 3, 'mod/imscp:addinstance', 1, [[timestamp]], 0),
(846, 1, 1, 'mod/imscp:addinstance', 1, [[timestamp]], 0),
(847, 1, 3, 'mod/label:addinstance', 1, [[timestamp]], 0),
(848, 1, 1, 'mod/label:addinstance', 1, [[timestamp]], 0),
(849, 1, 7, 'mod/label:view', 1, [[timestamp]], 0),
(850, 1, 6, 'mod/label:view', 1, [[timestamp]], 0),
(851, 1, 3, 'mod/lesson:addinstance', 1, [[timestamp]], 0),
(852, 1, 1, 'mod/lesson:addinstance', 1, [[timestamp]], 0),
(853, 1, 3, 'mod/lesson:edit', 1, [[timestamp]], 0),
(854, 1, 1, 'mod/lesson:edit', 1, [[timestamp]], 0),
(855, 1, 4, 'mod/lesson:grade', 1, [[timestamp]], 0),
(856, 1, 3, 'mod/lesson:grade', 1, [[timestamp]], 0),
(857, 1, 1, 'mod/lesson:grade', 1, [[timestamp]], 0),
(858, 1, 4, 'mod/lesson:viewreports', 1, [[timestamp]], 0),
(859, 1, 3, 'mod/lesson:viewreports', 1, [[timestamp]], 0),
(860, 1, 1, 'mod/lesson:viewreports', 1, [[timestamp]], 0),
(861, 1, 4, 'mod/lesson:manage', 1, [[timestamp]], 0),
(862, 1, 3, 'mod/lesson:manage', 1, [[timestamp]], 0),
(863, 1, 1, 'mod/lesson:manage', 1, [[timestamp]], 0),
(864, 1, 3, 'mod/lesson:manageoverrides', 1, [[timestamp]], 0),
(865, 1, 1, 'mod/lesson:manageoverrides', 1, [[timestamp]], 0),
(866, 1, 7, 'mod/lesson:view', 1, [[timestamp]], 0),
(867, 1, 6, 'mod/lesson:view', 1, [[timestamp]], 0),
(868, 1, 5, 'mod/lti:view', 1, [[timestamp]], 0),
(869, 1, 4, 'mod/lti:view', 1, [[timestamp]], 0),
(870, 1, 3, 'mod/lti:view', 1, [[timestamp]], 0),
(871, 1, 1, 'mod/lti:view', 1, [[timestamp]], 0),
(872, 1, 3, 'mod/lti:addinstance', 1, [[timestamp]], 0),
(873, 1, 1, 'mod/lti:addinstance', 1, [[timestamp]], 0),
(874, 1, 4, 'mod/lti:manage', 1, [[timestamp]], 0),
(875, 1, 3, 'mod/lti:manage', 1, [[timestamp]], 0),
(876, 1, 1, 'mod/lti:manage', 1, [[timestamp]], 0);
INSERT INTO `[[dbprefix]]role_capabilities` VALUES
(877, 1, 3, 'mod/lti:addcoursetool', 1, [[timestamp]], 0),
(878, 1, 1, 'mod/lti:addcoursetool', 1, [[timestamp]], 0),
(879, 1, 3, 'mod/lti:addpreconfiguredinstance', 1, [[timestamp]], 0),
(880, 1, 1, 'mod/lti:addpreconfiguredinstance', 1, [[timestamp]], 0),
(881, 1, 3, 'mod/lti:addmanualinstance', 1, [[timestamp]], 0),
(882, 1, 1, 'mod/lti:addmanualinstance', 1, [[timestamp]], 0),
(883, 1, 3, 'mod/lti:requesttooladd', 1, [[timestamp]], 0),
(884, 1, 1, 'mod/lti:requesttooladd', 1, [[timestamp]], 0),
(885, 1, 6, 'mod/page:view', 1, [[timestamp]], 0),
(886, 1, 7, 'mod/page:view', 1, [[timestamp]], 0),
(887, 1, 3, 'mod/page:addinstance', 1, [[timestamp]], 0),
(888, 1, 1, 'mod/page:addinstance', 1, [[timestamp]], 0),
(889, 1, 6, 'mod/quiz:view', 1, [[timestamp]], 0),
(890, 1, 5, 'mod/quiz:view', 1, [[timestamp]], 0),
(891, 1, 4, 'mod/quiz:view', 1, [[timestamp]], 0),
(892, 1, 3, 'mod/quiz:view', 1, [[timestamp]], 0),
(893, 1, 1, 'mod/quiz:view', 1, [[timestamp]], 0),
(894, 1, 3, 'mod/quiz:addinstance', 1, [[timestamp]], 0),
(895, 1, 1, 'mod/quiz:addinstance', 1, [[timestamp]], 0),
(896, 1, 5, 'mod/quiz:attempt', 1, [[timestamp]], 0),
(897, 1, 5, 'mod/quiz:reviewmyattempts', 1, [[timestamp]], 0),
(898, 1, 3, 'mod/quiz:manage', 1, [[timestamp]], 0),
(899, 1, 1, 'mod/quiz:manage', 1, [[timestamp]], 0),
(900, 1, 3, 'mod/quiz:manageoverrides', 1, [[timestamp]], 0),
(901, 1, 1, 'mod/quiz:manageoverrides', 1, [[timestamp]], 0),
(902, 1, 4, 'mod/quiz:viewoverrides', 1, [[timestamp]], 0),
(903, 1, 3, 'mod/quiz:viewoverrides', 1, [[timestamp]], 0),
(904, 1, 1, 'mod/quiz:viewoverrides', 1, [[timestamp]], 0),
(905, 1, 4, 'mod/quiz:preview', 1, [[timestamp]], 0),
(906, 1, 3, 'mod/quiz:preview', 1, [[timestamp]], 0),
(907, 1, 1, 'mod/quiz:preview', 1, [[timestamp]], 0),
(908, 1, 4, 'mod/quiz:grade', 1, [[timestamp]], 0),
(909, 1, 3, 'mod/quiz:grade', 1, [[timestamp]], 0),
(910, 1, 1, 'mod/quiz:grade', 1, [[timestamp]], 0),
(911, 1, 4, 'mod/quiz:regrade', 1, [[timestamp]], 0),
(912, 1, 3, 'mod/quiz:regrade', 1, [[timestamp]], 0),
(913, 1, 1, 'mod/quiz:regrade', 1, [[timestamp]], 0),
(914, 1, 4, 'mod/quiz:viewreports', 1, [[timestamp]], 0),
(915, 1, 3, 'mod/quiz:viewreports', 1, [[timestamp]], 0),
(916, 1, 1, 'mod/quiz:viewreports', 1, [[timestamp]], 0),
(917, 1, 3, 'mod/quiz:deleteattempts', 1, [[timestamp]], 0),
(918, 1, 1, 'mod/quiz:deleteattempts', 1, [[timestamp]], 0),
(919, 1, 6, 'mod/resource:view', 1, [[timestamp]], 0),
(920, 1, 7, 'mod/resource:view', 1, [[timestamp]], 0),
(921, 1, 3, 'mod/resource:addinstance', 1, [[timestamp]], 0),
(922, 1, 1, 'mod/resource:addinstance', 1, [[timestamp]], 0),
(923, 1, 3, 'mod/scorm:addinstance', 1, [[timestamp]], 0),
(924, 1, 1, 'mod/scorm:addinstance', 1, [[timestamp]], 0),
(925, 1, 4, 'mod/scorm:viewreport', 1, [[timestamp]], 0),
(926, 1, 3, 'mod/scorm:viewreport', 1, [[timestamp]], 0),
(927, 1, 1, 'mod/scorm:viewreport', 1, [[timestamp]], 0),
(928, 1, 5, 'mod/scorm:skipview', 1, [[timestamp]], 0),
(929, 1, 5, 'mod/scorm:savetrack', 1, [[timestamp]], 0),
(930, 1, 4, 'mod/scorm:savetrack', 1, [[timestamp]], 0),
(931, 1, 3, 'mod/scorm:savetrack', 1, [[timestamp]], 0),
(932, 1, 1, 'mod/scorm:savetrack', 1, [[timestamp]], 0),
(933, 1, 5, 'mod/scorm:viewscores', 1, [[timestamp]], 0),
(934, 1, 4, 'mod/scorm:viewscores', 1, [[timestamp]], 0),
(935, 1, 3, 'mod/scorm:viewscores', 1, [[timestamp]], 0),
(936, 1, 1, 'mod/scorm:viewscores', 1, [[timestamp]], 0),
(937, 1, 4, 'mod/scorm:deleteresponses', 1, [[timestamp]], 0),
(938, 1, 3, 'mod/scorm:deleteresponses', 1, [[timestamp]], 0),
(939, 1, 1, 'mod/scorm:deleteresponses', 1, [[timestamp]], 0),
(940, 1, 3, 'mod/survey:addinstance', 1, [[timestamp]], 0),
(941, 1, 1, 'mod/survey:addinstance', 1, [[timestamp]], 0),
(942, 1, 5, 'mod/survey:participate', 1, [[timestamp]], 0),
(943, 1, 4, 'mod/survey:participate', 1, [[timestamp]], 0),
(944, 1, 3, 'mod/survey:participate', 1, [[timestamp]], 0),
(945, 1, 1, 'mod/survey:participate', 1, [[timestamp]], 0),
(946, 1, 4, 'mod/survey:readresponses', 1, [[timestamp]], 0),
(947, 1, 3, 'mod/survey:readresponses', 1, [[timestamp]], 0),
(948, 1, 1, 'mod/survey:readresponses', 1, [[timestamp]], 0),
(949, 1, 4, 'mod/survey:download', 1, [[timestamp]], 0),
(950, 1, 3, 'mod/survey:download', 1, [[timestamp]], 0),
(951, 1, 1, 'mod/survey:download', 1, [[timestamp]], 0),
(952, 1, 6, 'mod/url:view', 1, [[timestamp]], 0),
(953, 1, 7, 'mod/url:view', 1, [[timestamp]], 0),
(954, 1, 3, 'mod/url:addinstance', 1, [[timestamp]], 0),
(955, 1, 1, 'mod/url:addinstance', 1, [[timestamp]], 0),
(956, 1, 3, 'mod/wiki:addinstance', 1, [[timestamp]], 0),
(957, 1, 1, 'mod/wiki:addinstance', 1, [[timestamp]], 0),
(958, 1, 6, 'mod/wiki:viewpage', 1, [[timestamp]], 0),
(959, 1, 8, 'mod/wiki:viewpage', 1, [[timestamp]], 0),
(960, 1, 5, 'mod/wiki:viewpage', 1, [[timestamp]], 0),
(961, 1, 4, 'mod/wiki:viewpage', 1, [[timestamp]], 0),
(962, 1, 3, 'mod/wiki:viewpage', 1, [[timestamp]], 0),
(963, 1, 1, 'mod/wiki:viewpage', 1, [[timestamp]], 0),
(964, 1, 5, 'mod/wiki:editpage', 1, [[timestamp]], 0),
(965, 1, 4, 'mod/wiki:editpage', 1, [[timestamp]], 0),
(966, 1, 3, 'mod/wiki:editpage', 1, [[timestamp]], 0),
(967, 1, 1, 'mod/wiki:editpage', 1, [[timestamp]], 0),
(968, 1, 5, 'mod/wiki:createpage', 1, [[timestamp]], 0),
(969, 1, 4, 'mod/wiki:createpage', 1, [[timestamp]], 0),
(970, 1, 3, 'mod/wiki:createpage', 1, [[timestamp]], 0),
(971, 1, 1, 'mod/wiki:createpage', 1, [[timestamp]], 0),
(972, 1, 5, 'mod/wiki:viewcomment', 1, [[timestamp]], 0),
(973, 1, 4, 'mod/wiki:viewcomment', 1, [[timestamp]], 0),
(974, 1, 3, 'mod/wiki:viewcomment', 1, [[timestamp]], 0),
(975, 1, 1, 'mod/wiki:viewcomment', 1, [[timestamp]], 0),
(976, 1, 5, 'mod/wiki:editcomment', 1, [[timestamp]], 0),
(977, 1, 4, 'mod/wiki:editcomment', 1, [[timestamp]], 0),
(978, 1, 3, 'mod/wiki:editcomment', 1, [[timestamp]], 0),
(979, 1, 1, 'mod/wiki:editcomment', 1, [[timestamp]], 0),
(980, 1, 4, 'mod/wiki:managecomment', 1, [[timestamp]], 0),
(981, 1, 3, 'mod/wiki:managecomment', 1, [[timestamp]], 0),
(982, 1, 1, 'mod/wiki:managecomment', 1, [[timestamp]], 0),
(983, 1, 4, 'mod/wiki:managefiles', 1, [[timestamp]], 0),
(984, 1, 3, 'mod/wiki:managefiles', 1, [[timestamp]], 0),
(985, 1, 1, 'mod/wiki:managefiles', 1, [[timestamp]], 0),
(986, 1, 4, 'mod/wiki:overridelock', 1, [[timestamp]], 0),
(987, 1, 3, 'mod/wiki:overridelock', 1, [[timestamp]], 0),
(988, 1, 1, 'mod/wiki:overridelock', 1, [[timestamp]], 0),
(989, 1, 4, 'mod/wiki:managewiki', 1, [[timestamp]], 0),
(990, 1, 3, 'mod/wiki:managewiki', 1, [[timestamp]], 0),
(991, 1, 1, 'mod/wiki:managewiki', 1, [[timestamp]], 0),
(992, 1, 6, 'mod/workshop:view', 1, [[timestamp]], 0),
(993, 1, 5, 'mod/workshop:view', 1, [[timestamp]], 0),
(994, 1, 4, 'mod/workshop:view', 1, [[timestamp]], 0),
(995, 1, 3, 'mod/workshop:view', 1, [[timestamp]], 0),
(996, 1, 1, 'mod/workshop:view', 1, [[timestamp]], 0),
(997, 1, 3, 'mod/workshop:addinstance', 1, [[timestamp]], 0),
(998, 1, 1, 'mod/workshop:addinstance', 1, [[timestamp]], 0),
(999, 1, 4, 'mod/workshop:switchphase', 1, [[timestamp]], 0),
(1000, 1, 3, 'mod/workshop:switchphase', 1, [[timestamp]], 0),
(1001, 1, 1, 'mod/workshop:switchphase', 1, [[timestamp]], 0),
(1002, 1, 3, 'mod/workshop:editdimensions', 1, [[timestamp]], 0),
(1003, 1, 1, 'mod/workshop:editdimensions', 1, [[timestamp]], 0),
(1004, 1, 5, 'mod/workshop:submit', 1, [[timestamp]], 0),
(1005, 1, 5, 'mod/workshop:peerassess', 1, [[timestamp]], 0),
(1006, 1, 4, 'mod/workshop:manageexamples', 1, [[timestamp]], 0),
(1007, 1, 3, 'mod/workshop:manageexamples', 1, [[timestamp]], 0),
(1008, 1, 1, 'mod/workshop:manageexamples', 1, [[timestamp]], 0),
(1009, 1, 4, 'mod/workshop:allocate', 1, [[timestamp]], 0),
(1010, 1, 3, 'mod/workshop:allocate', 1, [[timestamp]], 0),
(1011, 1, 1, 'mod/workshop:allocate', 1, [[timestamp]], 0),
(1012, 1, 4, 'mod/workshop:publishsubmissions', 1, [[timestamp]], 0),
(1013, 1, 3, 'mod/workshop:publishsubmissions', 1, [[timestamp]], 0),
(1014, 1, 1, 'mod/workshop:publishsubmissions', 1, [[timestamp]], 0),
(1015, 1, 5, 'mod/workshop:viewauthornames', 1, [[timestamp]], 0),
(1016, 1, 4, 'mod/workshop:viewauthornames', 1, [[timestamp]], 0),
(1017, 1, 3, 'mod/workshop:viewauthornames', 1, [[timestamp]], 0),
(1018, 1, 1, 'mod/workshop:viewauthornames', 1, [[timestamp]], 0),
(1019, 1, 4, 'mod/workshop:viewreviewernames', 1, [[timestamp]], 0),
(1020, 1, 3, 'mod/workshop:viewreviewernames', 1, [[timestamp]], 0),
(1021, 1, 1, 'mod/workshop:viewreviewernames', 1, [[timestamp]], 0),
(1022, 1, 4, 'mod/workshop:viewallsubmissions', 1, [[timestamp]], 0),
(1023, 1, 3, 'mod/workshop:viewallsubmissions', 1, [[timestamp]], 0),
(1024, 1, 1, 'mod/workshop:viewallsubmissions', 1, [[timestamp]], 0),
(1025, 1, 5, 'mod/workshop:viewpublishedsubmissions', 1, [[timestamp]], 0),
(1026, 1, 4, 'mod/workshop:viewpublishedsubmissions', 1, [[timestamp]], 0),
(1027, 1, 3, 'mod/workshop:viewpublishedsubmissions', 1, [[timestamp]], 0),
(1028, 1, 1, 'mod/workshop:viewpublishedsubmissions', 1, [[timestamp]], 0),
(1029, 1, 5, 'mod/workshop:viewauthorpublished', 1, [[timestamp]], 0),
(1030, 1, 4, 'mod/workshop:viewauthorpublished', 1, [[timestamp]], 0),
(1031, 1, 3, 'mod/workshop:viewauthorpublished', 1, [[timestamp]], 0),
(1032, 1, 1, 'mod/workshop:viewauthorpublished', 1, [[timestamp]], 0),
(1033, 1, 4, 'mod/workshop:viewallassessments', 1, [[timestamp]], 0),
(1034, 1, 3, 'mod/workshop:viewallassessments', 1, [[timestamp]], 0),
(1035, 1, 1, 'mod/workshop:viewallassessments', 1, [[timestamp]], 0),
(1036, 1, 4, 'mod/workshop:overridegrades', 1, [[timestamp]], 0),
(1037, 1, 3, 'mod/workshop:overridegrades', 1, [[timestamp]], 0),
(1038, 1, 1, 'mod/workshop:overridegrades', 1, [[timestamp]], 0),
(1039, 1, 4, 'mod/workshop:ignoredeadlines', 1, [[timestamp]], 0),
(1040, 1, 3, 'mod/workshop:ignoredeadlines', 1, [[timestamp]], 0),
(1041, 1, 1, 'mod/workshop:ignoredeadlines', 1, [[timestamp]], 0),
(1042, 1, 4, 'mod/workshop:deletesubmissions', 1, [[timestamp]], 0),
(1043, 1, 3, 'mod/workshop:deletesubmissions', 1, [[timestamp]], 0),
(1044, 1, 1, 'mod/workshop:deletesubmissions', 1, [[timestamp]], 0),
(1045, 1, 1, 'mod/workshop:exportsubmissions', 1, [[timestamp]], 0),
(1046, 1, 4, 'mod/workshop:exportsubmissions', 1, [[timestamp]], 0),
(1047, 1, 3, 'mod/workshop:exportsubmissions', 1, [[timestamp]], 0),
(1048, 1, 5, 'mod/workshop:exportsubmissions', 1, [[timestamp]], 0),
(1049, 1, 7, 'auth/oauth2:managelinkedlogins', 1, [[timestamp]], 0),
(1050, 1, 1, 'enrol/category:config', 1, [[timestamp]], 0),
(1051, 1, 3, 'enrol/category:config', 1, [[timestamp]], 0),
(1052, 1, 3, 'enrol/cohort:config', 1, [[timestamp]], 0),
(1053, 1, 1, 'enrol/cohort:config', 1, [[timestamp]], 0),
(1054, 1, 1, 'enrol/cohort:unenrol', 1, [[timestamp]], 0),
(1055, 1, 1, 'enrol/database:unenrol', 1, [[timestamp]], 0),
(1056, 1, 1, 'enrol/database:config', 1, [[timestamp]], 0),
(1057, 1, 3, 'enrol/database:config', 1, [[timestamp]], 0),
(1058, 1, 1, 'enrol/fee:config', 1, [[timestamp]], 0),
(1059, 1, 1, 'enrol/fee:manage', 1, [[timestamp]], 0),
(1060, 1, 3, 'enrol/fee:manage', 1, [[timestamp]], 0),
(1061, 1, 1, 'enrol/fee:unenrol', 1, [[timestamp]], 0),
(1062, 1, 1, 'enrol/guest:config', 1, [[timestamp]], 0),
(1063, 1, 3, 'enrol/guest:config', 1, [[timestamp]], 0),
(1064, 1, 1, 'enrol/imsenterprise:config', 1, [[timestamp]], 0),
(1065, 1, 3, 'enrol/imsenterprise:config', 1, [[timestamp]], 0),
(1066, 1, 1, 'enrol/ldap:manage', 1, [[timestamp]], 0),
(1067, 1, 1, 'enrol/lti:config', 1, [[timestamp]], 0),
(1068, 1, 3, 'enrol/lti:config', 1, [[timestamp]], 0),
(1069, 1, 1, 'enrol/lti:unenrol', 1, [[timestamp]], 0),
(1070, 1, 3, 'enrol/lti:unenrol', 1, [[timestamp]], 0),
(1071, 1, 1, 'enrol/manual:config', 1, [[timestamp]], 0),
(1072, 1, 1, 'enrol/manual:enrol', 1, [[timestamp]], 0),
(1073, 1, 3, 'enrol/manual:enrol', 1, [[timestamp]], 0),
(1074, 1, 1, 'enrol/manual:manage', 1, [[timestamp]], 0),
(1075, 1, 3, 'enrol/manual:manage', 1, [[timestamp]], 0),
(1076, 1, 1, 'enrol/manual:unenrol', 1, [[timestamp]], 0),
(1077, 1, 3, 'enrol/manual:unenrol', 1, [[timestamp]], 0),
(1078, 1, 1, 'enrol/meta:config', 1, [[timestamp]], 0),
(1079, 1, 3, 'enrol/meta:config', 1, [[timestamp]], 0),
(1080, 1, 1, 'enrol/meta:selectaslinked', 1, [[timestamp]], 0),
(1081, 1, 1, 'enrol/meta:unenrol', 1, [[timestamp]], 0),
(1082, 1, 1, 'enrol/mnet:config', 1, [[timestamp]], 0),
(1083, 1, 3, 'enrol/mnet:config', 1, [[timestamp]], 0),
(1084, 1, 1, 'enrol/paypal:config', 1, [[timestamp]], 0),
(1085, 1, 1, 'enrol/paypal:manage', 1, [[timestamp]], 0),
(1086, 1, 3, 'enrol/paypal:manage', 1, [[timestamp]], 0),
(1087, 1, 1, 'enrol/paypal:unenrol', 1, [[timestamp]], 0),
(1088, 1, 3, 'enrol/self:config', 1, [[timestamp]], 0),
(1089, 1, 1, 'enrol/self:config', 1, [[timestamp]], 0),
(1090, 1, 3, 'enrol/self:manage', 1, [[timestamp]], 0),
(1091, 1, 1, 'enrol/self:manage', 1, [[timestamp]], 0),
(1092, 1, 5, 'enrol/self:unenrolself', 1, [[timestamp]], 0),
(1093, 1, 3, 'enrol/self:unenrol', 1, [[timestamp]], 0),
(1094, 1, 1, 'enrol/self:unenrol', 1, [[timestamp]], 0),
(1095, 1, 7, 'enrol/self:enrolself', 1, [[timestamp]], 0),
(1096, 1, 7, 'message/airnotifier:managedevice', 1, [[timestamp]], 0),
(1097, 1, 3, 'block/accessreview:addinstance', 1, [[timestamp]], 0),
(1098, 1, 1, 'block/accessreview:addinstance', 1, [[timestamp]], 0),
(1099, 1, 3, 'block/accessreview:view', 1, [[timestamp]], 0),
(1100, 1, 1, 'block/accessreview:view', 1, [[timestamp]], 0),
(1101, 1, 3, 'block/activity_modules:addinstance', 1, [[timestamp]], 0),
(1102, 1, 1, 'block/activity_modules:addinstance', 1, [[timestamp]], 0),
(1103, 1, 3, 'block/activity_results:addinstance', 1, [[timestamp]], 0),
(1104, 1, 1, 'block/activity_results:addinstance', 1, [[timestamp]], 0),
(1105, 1, 7, 'block/admin_bookmarks:myaddinstance', 1, [[timestamp]], 0),
(1106, 1, 3, 'block/admin_bookmarks:addinstance', 1, [[timestamp]], 0),
(1107, 1, 1, 'block/admin_bookmarks:addinstance', 1, [[timestamp]], 0),
(1108, 1, 3, 'block/badges:addinstance', 1, [[timestamp]], 0),
(1109, 1, 1, 'block/badges:addinstance', 1, [[timestamp]], 0),
(1110, 1, 7, 'block/badges:myaddinstance', 1, [[timestamp]], 0),
(1111, 1, 3, 'block/blog_menu:addinstance', 1, [[timestamp]], 0),
(1112, 1, 1, 'block/blog_menu:addinstance', 1, [[timestamp]], 0),
(1113, 1, 3, 'block/blog_recent:addinstance', 1, [[timestamp]], 0),
(1114, 1, 1, 'block/blog_recent:addinstance', 1, [[timestamp]], 0),
(1115, 1, 3, 'block/blog_tags:addinstance', 1, [[timestamp]], 0),
(1116, 1, 1, 'block/blog_tags:addinstance', 1, [[timestamp]], 0),
(1117, 1, 7, 'block/calendar_month:myaddinstance', 1, [[timestamp]], 0),
(1118, 1, 3, 'block/calendar_month:addinstance', 1, [[timestamp]], 0),
(1119, 1, 1, 'block/calendar_month:addinstance', 1, [[timestamp]], 0),
(1120, 1, 7, 'block/calendar_upcoming:myaddinstance', 1, [[timestamp]], 0),
(1121, 1, 3, 'block/calendar_upcoming:addinstance', 1, [[timestamp]], 0),
(1122, 1, 1, 'block/calendar_upcoming:addinstance', 1, [[timestamp]], 0),
(1123, 1, 7, 'block/comments:myaddinstance', 1, [[timestamp]], 0),
(1124, 1, 3, 'block/comments:addinstance', 1, [[timestamp]], 0),
(1125, 1, 1, 'block/comments:addinstance', 1, [[timestamp]], 0),
(1126, 1, 3, 'block/completionstatus:addinstance', 1, [[timestamp]], 0),
(1127, 1, 1, 'block/completionstatus:addinstance', 1, [[timestamp]], 0),
(1128, 1, 7, 'block/course_list:myaddinstance', 1, [[timestamp]], 0),
(1129, 1, 3, 'block/course_list:addinstance', 1, [[timestamp]], 0),
(1130, 1, 1, 'block/course_list:addinstance', 1, [[timestamp]], 0),
(1131, 1, 3, 'block/course_summary:addinstance', 1, [[timestamp]], 0),
(1132, 1, 1, 'block/course_summary:addinstance', 1, [[timestamp]], 0),
(1133, 1, 3, 'block/feedback:addinstance', 1, [[timestamp]], 0),
(1134, 1, 1, 'block/feedback:addinstance', 1, [[timestamp]], 0),
(1135, 1, 7, 'block/globalsearch:myaddinstance', 1, [[timestamp]], 0),
(1136, 1, 3, 'block/globalsearch:addinstance', 1, [[timestamp]], 0),
(1137, 1, 1, 'block/globalsearch:addinstance', 1, [[timestamp]], 0),
(1138, 1, 7, 'block/glossary_random:myaddinstance', 1, [[timestamp]], 0),
(1139, 1, 3, 'block/glossary_random:addinstance', 1, [[timestamp]], 0),
(1140, 1, 1, 'block/glossary_random:addinstance', 1, [[timestamp]], 0),
(1141, 1, 7, 'block/html:myaddinstance', 1, [[timestamp]], 0),
(1142, 1, 3, 'block/html:addinstance', 1, [[timestamp]], 0),
(1143, 1, 1, 'block/html:addinstance', 1, [[timestamp]], 0),
(1144, 1, 3, 'block/login:addinstance', 1, [[timestamp]], 0),
(1145, 1, 1, 'block/login:addinstance', 1, [[timestamp]], 0),
(1146, 1, 3, 'block/lp:addinstance', 1, [[timestamp]], 0),
(1147, 1, 1, 'block/lp:addinstance', 1, [[timestamp]], 0),
(1148, 1, 7, 'block/lp:myaddinstance', 1, [[timestamp]], 0),
(1149, 1, 7, 'block/mentees:myaddinstance', 1, [[timestamp]], 0),
(1150, 1, 3, 'block/mentees:addinstance', 1, [[timestamp]], 0),
(1151, 1, 1, 'block/mentees:addinstance', 1, [[timestamp]], 0),
(1152, 1, 7, 'block/mnet_hosts:myaddinstance', 1, [[timestamp]], 0),
(1153, 1, 3, 'block/mnet_hosts:addinstance', 1, [[timestamp]], 0),
(1154, 1, 1, 'block/mnet_hosts:addinstance', 1, [[timestamp]], 0),
(1155, 1, 7, 'block/myoverview:myaddinstance', 1, [[timestamp]], 0),
(1156, 1, 7, 'block/myprofile:myaddinstance', 1, [[timestamp]], 0),
(1157, 1, 3, 'block/myprofile:addinstance', 1, [[timestamp]], 0),
(1158, 1, 1, 'block/myprofile:addinstance', 1, [[timestamp]], 0),
(1159, 1, 7, 'block/navigation:myaddinstance', 1, [[timestamp]], 0),
(1160, 1, 3, 'block/navigation:addinstance', 1, [[timestamp]], 0),
(1161, 1, 1, 'block/navigation:addinstance', 1, [[timestamp]], 0),
(1162, 1, 7, 'block/news_items:myaddinstance', 1, [[timestamp]], 0),
(1163, 1, 3, 'block/news_items:addinstance', 1, [[timestamp]], 0),
(1164, 1, 1, 'block/news_items:addinstance', 1, [[timestamp]], 0),
(1165, 1, 7, 'block/online_users:myaddinstance', 1, [[timestamp]], 0),
(1166, 1, 3, 'block/online_users:addinstance', 1, [[timestamp]], 0),
(1167, 1, 1, 'block/online_users:addinstance', 1, [[timestamp]], 0),
(1168, 1, 7, 'block/online_users:viewlist', 1, [[timestamp]], 0),
(1169, 1, 6, 'block/online_users:viewlist', -1, [[timestamp]], 0),
(1170, 1, 5, 'block/online_users:viewlist', 1, [[timestamp]], 0),
(1171, 1, 4, 'block/online_users:viewlist', 1, [[timestamp]], 0),
(1172, 1, 3, 'block/online_users:viewlist', 1, [[timestamp]], 0),
(1173, 1, 1, 'block/online_users:viewlist', 1, [[timestamp]], 0),
(1174, 1, 7, 'block/private_files:myaddinstance', 1, [[timestamp]], 0),
(1175, 1, 3, 'block/private_files:addinstance', 1, [[timestamp]], 0),
(1176, 1, 1, 'block/private_files:addinstance', 1, [[timestamp]], 0),
(1177, 1, 3, 'block/quiz_results:addinstance', 1, [[timestamp]], 0),
(1178, 1, 1, 'block/quiz_results:addinstance', 1, [[timestamp]], 0),
(1179, 1, 3, 'block/recent_activity:addinstance', 1, [[timestamp]], 0),
(1180, 1, 1, 'block/recent_activity:addinstance', 1, [[timestamp]], 0),
(1181, 1, 7, 'block/recent_activity:viewaddupdatemodule', 1, [[timestamp]], 0),
(1182, 1, 7, 'block/recent_activity:viewdeletemodule', 1, [[timestamp]], 0),
(1183, 1, 7, 'block/recentlyaccessedcourses:myaddinstance', 1, [[timestamp]], 0),
(1184, 1, 7, 'block/recentlyaccesseditems:myaddinstance', 1, [[timestamp]], 0),
(1185, 1, 7, 'block/rss_client:myaddinstance', 1, [[timestamp]], 0),
(1186, 1, 3, 'block/rss_client:addinstance', 1, [[timestamp]], 0),
(1187, 1, 1, 'block/rss_client:addinstance', 1, [[timestamp]], 0),
(1188, 1, 4, 'block/rss_client:manageownfeeds', 1, [[timestamp]], 0),
(1189, 1, 3, 'block/rss_client:manageownfeeds', 1, [[timestamp]], 0),
(1190, 1, 1, 'block/rss_client:manageownfeeds', 1, [[timestamp]], 0),
(1191, 1, 1, 'block/rss_client:manageanyfeeds', 1, [[timestamp]], 0),
(1192, 1, 3, 'block/search_forums:addinstance', 1, [[timestamp]], 0),
(1193, 1, 1, 'block/search_forums:addinstance', 1, [[timestamp]], 0),
(1194, 1, 3, 'block/section_links:addinstance', 1, [[timestamp]], 0),
(1195, 1, 1, 'block/section_links:addinstance', 1, [[timestamp]], 0),
(1196, 1, 3, 'block/selfcompletion:addinstance', 1, [[timestamp]], 0),
(1197, 1, 1, 'block/selfcompletion:addinstance', 1, [[timestamp]], 0),
(1198, 1, 7, 'block/settings:myaddinstance', 1, [[timestamp]], 0),
(1199, 1, 3, 'block/settings:addinstance', 1, [[timestamp]], 0),
(1200, 1, 1, 'block/settings:addinstance', 1, [[timestamp]], 0),
(1201, 1, 3, 'block/site_main_menu:addinstance', 1, [[timestamp]], 0),
(1202, 1, 1, 'block/site_main_menu:addinstance', 1, [[timestamp]], 0),
(1203, 1, 3, 'block/social_activities:addinstance', 1, [[timestamp]], 0),
(1204, 1, 1, 'block/social_activities:addinstance', 1, [[timestamp]], 0),
(1205, 1, 7, 'block/starredcourses:myaddinstance', 1, [[timestamp]], 0),
(1206, 1, 3, 'block/tag_flickr:addinstance', 1, [[timestamp]], 0),
(1207, 1, 1, 'block/tag_flickr:addinstance', 1, [[timestamp]], 0),
(1208, 1, 3, 'block/tag_youtube:addinstance', 1, [[timestamp]], 0),
(1209, 1, 1, 'block/tag_youtube:addinstance', 1, [[timestamp]], 0),
(1210, 1, 7, 'block/tags:myaddinstance', 1, [[timestamp]], 0),
(1211, 1, 3, 'block/tags:addinstance', 1, [[timestamp]], 0),
(1212, 1, 1, 'block/tags:addinstance', 1, [[timestamp]], 0),
(1213, 1, 7, 'block/timeline:myaddinstance', 1, [[timestamp]], 0),
(1214, 1, 4, 'report/completion:view', 1, [[timestamp]], 0),
(1215, 1, 3, 'report/completion:view', 1, [[timestamp]], 0),
(1216, 1, 1, 'report/completion:view', 1, [[timestamp]], 0),
(1217, 1, 4, 'report/courseoverview:view', 1, [[timestamp]], 0),
(1218, 1, 3, 'report/courseoverview:view', 1, [[timestamp]], 0),
(1219, 1, 1, 'report/courseoverview:view', 1, [[timestamp]], 0),
(1220, 1, 4, 'report/log:view', 1, [[timestamp]], 0),
(1221, 1, 3, 'report/log:view', 1, [[timestamp]], 0),
(1222, 1, 1, 'report/log:view', 1, [[timestamp]], 0),
(1223, 1, 4, 'report/log:viewtoday', 1, [[timestamp]], 0),
(1224, 1, 3, 'report/log:viewtoday', 1, [[timestamp]], 0),
(1225, 1, 1, 'report/log:viewtoday', 1, [[timestamp]], 0),
(1226, 1, 4, 'report/loglive:view', 1, [[timestamp]], 0),
(1227, 1, 3, 'report/loglive:view', 1, [[timestamp]], 0),
(1228, 1, 1, 'report/loglive:view', 1, [[timestamp]], 0),
(1229, 1, 4, 'report/outline:view', 1, [[timestamp]], 0),
(1230, 1, 3, 'report/outline:view', 1, [[timestamp]], 0),
(1231, 1, 1, 'report/outline:view', 1, [[timestamp]], 0),
(1232, 1, 4, 'report/outline:viewuserreport', 1, [[timestamp]], 0),
(1233, 1, 3, 'report/outline:viewuserreport', 1, [[timestamp]], 0),
(1234, 1, 1, 'report/outline:viewuserreport', 1, [[timestamp]], 0),
(1235, 1, 4, 'report/participation:view', 1, [[timestamp]], 0),
(1236, 1, 3, 'report/participation:view', 1, [[timestamp]], 0),
(1237, 1, 1, 'report/participation:view', 1, [[timestamp]], 0),
(1238, 1, 1, 'report/performance:view', 1, [[timestamp]], 0),
(1239, 1, 4, 'report/progress:view', 1, [[timestamp]], 0),
(1240, 1, 3, 'report/progress:view', 1, [[timestamp]], 0),
(1241, 1, 1, 'report/progress:view', 1, [[timestamp]], 0),
(1242, 1, 1, 'report/security:view', 1, [[timestamp]], 0),
(1243, 1, 4, 'report/stats:view', 1, [[timestamp]], 0),
(1244, 1, 3, 'report/stats:view', 1, [[timestamp]], 0),
(1245, 1, 1, 'report/stats:view', 1, [[timestamp]], 0),
(1246, 1, 1, 'report/status:view', 1, [[timestamp]], 0),
(1247, 1, 6, 'report/usersessions:manageownsessions', -1000, [[timestamp]], 0),
(1248, 1, 7, 'report/usersessions:manageownsessions', 1, [[timestamp]], 0),
(1249, 1, 1, 'report/usersessions:manageownsessions', 1, [[timestamp]], 0),
(1250, 1, 4, 'gradeexport/ods:view', 1, [[timestamp]], 0),
(1251, 1, 3, 'gradeexport/ods:view', 1, [[timestamp]], 0),
(1252, 1, 1, 'gradeexport/ods:view', 1, [[timestamp]], 0),
(1253, 1, 1, 'gradeexport/ods:publish', 1, [[timestamp]], 0),
(1254, 1, 4, 'gradeexport/txt:view', 1, [[timestamp]], 0),
(1255, 1, 3, 'gradeexport/txt:view', 1, [[timestamp]], 0),
(1256, 1, 1, 'gradeexport/txt:view', 1, [[timestamp]], 0),
(1257, 1, 1, 'gradeexport/txt:publish', 1, [[timestamp]], 0),
(1258, 1, 4, 'gradeexport/xls:view', 1, [[timestamp]], 0),
(1259, 1, 3, 'gradeexport/xls:view', 1, [[timestamp]], 0),
(1260, 1, 1, 'gradeexport/xls:view', 1, [[timestamp]], 0),
(1261, 1, 1, 'gradeexport/xls:publish', 1, [[timestamp]], 0),
(1262, 1, 4, 'gradeexport/xml:view', 1, [[timestamp]], 0),
(1263, 1, 3, 'gradeexport/xml:view', 1, [[timestamp]], 0),
(1264, 1, 1, 'gradeexport/xml:view', 1, [[timestamp]], 0),
(1265, 1, 1, 'gradeexport/xml:publish', 1, [[timestamp]], 0),
(1266, 1, 3, 'gradeimport/csv:view', 1, [[timestamp]], 0),
(1267, 1, 1, 'gradeimport/csv:view', 1, [[timestamp]], 0),
(1268, 1, 3, 'gradeimport/direct:view', 1, [[timestamp]], 0),
(1269, 1, 1, 'gradeimport/direct:view', 1, [[timestamp]], 0),
(1270, 1, 3, 'gradeimport/xml:view', 1, [[timestamp]], 0),
(1271, 1, 1, 'gradeimport/xml:view', 1, [[timestamp]], 0),
(1272, 1, 1, 'gradeimport/xml:publish', 1, [[timestamp]], 0),
(1273, 1, 4, 'gradereport/grader:view', 1, [[timestamp]], 0),
(1274, 1, 3, 'gradereport/grader:view', 1, [[timestamp]], 0),
(1275, 1, 1, 'gradereport/grader:view', 1, [[timestamp]], 0),
(1276, 1, 4, 'gradereport/history:view', 1, [[timestamp]], 0),
(1277, 1, 3, 'gradereport/history:view', 1, [[timestamp]], 0),
(1278, 1, 1, 'gradereport/history:view', 1, [[timestamp]], 0),
(1279, 1, 4, 'gradereport/outcomes:view', 1, [[timestamp]], 0),
(1280, 1, 3, 'gradereport/outcomes:view', 1, [[timestamp]], 0),
(1281, 1, 1, 'gradereport/outcomes:view', 1, [[timestamp]], 0),
(1282, 1, 7, 'gradereport/overview:view', 1, [[timestamp]], 0),
(1283, 1, 3, 'gradereport/singleview:view', 1, [[timestamp]], 0),
(1284, 1, 1, 'gradereport/singleview:view', 1, [[timestamp]], 0),
(1285, 1, 5, 'gradereport/user:view', 1, [[timestamp]], 0),
(1286, 1, 4, 'gradereport/user:view', 1, [[timestamp]], 0),
(1287, 1, 3, 'gradereport/user:view', 1, [[timestamp]], 0),
(1288, 1, 1, 'gradereport/user:view', 1, [[timestamp]], 0),
(1289, 1, 7, 'repository/areafiles:view', 1, [[timestamp]], 0),
(1290, 1, 7, 'repository/boxnet:view', 1, [[timestamp]], 0),
(1291, 1, 2, 'repository/contentbank:view', 1, [[timestamp]], 0),
(1292, 1, 3, 'repository/contentbank:view', 1, [[timestamp]], 0),
(1293, 1, 1, 'repository/contentbank:view', 1, [[timestamp]], 0),
(1294, 1, 2, 'repository/contentbank:accesscoursecontent', 1, [[timestamp]], 0),
(1295, 1, 3, 'repository/contentbank:accesscoursecontent', 1, [[timestamp]], 0),
(1296, 1, 1, 'repository/contentbank:accesscoursecontent', 1, [[timestamp]], 0),
(1297, 1, 2, 'repository/contentbank:accesscoursecategorycontent', 1, [[timestamp]], 0),
(1298, 1, 1, 'repository/contentbank:accesscoursecategorycontent', 1, [[timestamp]], 0),
(1299, 1, 7, 'repository/contentbank:accessgeneralcontent', 1, [[timestamp]], 0),
(1300, 1, 2, 'repository/coursefiles:view', 1, [[timestamp]], 0),
(1301, 1, 4, 'repository/coursefiles:view', 1, [[timestamp]], 0),
(1302, 1, 3, 'repository/coursefiles:view', 1, [[timestamp]], 0),
(1303, 1, 1, 'repository/coursefiles:view', 1, [[timestamp]], 0),
(1304, 1, 7, 'repository/dropbox:view', 1, [[timestamp]], 0),
(1305, 1, 7, 'repository/equella:view', 1, [[timestamp]], 0),
(1306, 1, 2, 'repository/filesystem:view', 1, [[timestamp]], 0),
(1307, 1, 4, 'repository/filesystem:view', 1, [[timestamp]], 0),
(1308, 1, 3, 'repository/filesystem:view', 1, [[timestamp]], 0),
(1309, 1, 1, 'repository/filesystem:view', 1, [[timestamp]], 0),
(1310, 1, 7, 'repository/flickr:view', 1, [[timestamp]], 0),
(1311, 1, 7, 'repository/flickr_public:view', 1, [[timestamp]], 0),
(1312, 1, 7, 'repository/googledocs:view', 1, [[timestamp]], 0),
(1313, 1, 2, 'repository/local:view', 1, [[timestamp]], 0),
(1314, 1, 4, 'repository/local:view', 1, [[timestamp]], 0),
(1315, 1, 3, 'repository/local:view', 1, [[timestamp]], 0),
(1316, 1, 1, 'repository/local:view', 1, [[timestamp]], 0),
(1317, 1, 7, 'repository/merlot:view', 1, [[timestamp]], 0),
(1318, 1, 7, 'repository/nextcloud:view', 1, [[timestamp]], 0),
(1319, 1, 7, 'repository/onedrive:view', 1, [[timestamp]], 0),
(1320, 1, 7, 'repository/picasa:view', 1, [[timestamp]], 0),
(1321, 1, 7, 'repository/recent:view', 1, [[timestamp]], 0),
(1322, 1, 7, 'repository/s3:view', 1, [[timestamp]], 0),
(1323, 1, 7, 'repository/skydrive:view', 1, [[timestamp]], 0),
(1324, 1, 7, 'repository/upload:view', 1, [[timestamp]], 0),
(1325, 1, 7, 'repository/url:view', 1, [[timestamp]], 0),
(1326, 1, 7, 'repository/user:view', 1, [[timestamp]], 0),
(1327, 1, 2, 'repository/webdav:view', 1, [[timestamp]], 0),
(1328, 1, 4, 'repository/webdav:view', 1, [[timestamp]], 0),
(1329, 1, 3, 'repository/webdav:view', 1, [[timestamp]], 0),
(1330, 1, 1, 'repository/webdav:view', 1, [[timestamp]], 0),
(1331, 1, 7, 'repository/wikimedia:view', 1, [[timestamp]], 0),
(1332, 1, 7, 'repository/youtube:view', 1, [[timestamp]], 0),
(1333, 1, 4, 'tool/brickfield:viewcoursetools', 1, [[timestamp]], 0),
(1334, 1, 3, 'tool/brickfield:viewcoursetools', 1, [[timestamp]], 0),
(1335, 1, 1, 'tool/brickfield:viewcoursetools', 1, [[timestamp]], 0),
(1336, 1, 1, 'tool/brickfield:viewsystemtools', 1, [[timestamp]], 0),
(1337, 1, 1, 'tool/customlang:view', 1, [[timestamp]], 0),
(1338, 1, 1, 'tool/customlang:edit', 1, [[timestamp]], 0),
(1339, 1, 1, 'tool/customlang:export', 1, [[timestamp]], 0),
(1340, 1, 7, 'tool/dataprivacy:downloadownrequest', 1, [[timestamp]], 0),
(1341, 1, 7, 'tool/dataprivacy:requestdelete', 1, [[timestamp]], 0),
(1342, 1, 1, 'tool/lpmigrate:frameworksmigrate', 1, [[timestamp]], 0),
(1343, 1, 4, 'tool/monitor:subscribe', 1, [[timestamp]], 0),
(1344, 1, 3, 'tool/monitor:subscribe', 1, [[timestamp]], 0),
(1345, 1, 1, 'tool/monitor:subscribe', 1, [[timestamp]], 0),
(1346, 1, 4, 'tool/monitor:managerules', 1, [[timestamp]], 0),
(1347, 1, 3, 'tool/monitor:managerules', 1, [[timestamp]], 0),
(1348, 1, 1, 'tool/monitor:managerules', 1, [[timestamp]], 0),
(1349, 1, 1, 'tool/monitor:managetool', 1, [[timestamp]], 0),
(1350, 1, 7, 'tool/policy:accept', 1, [[timestamp]], 0),
(1351, 1, 1, 'tool/policy:managedocs', 1, [[timestamp]], 0),
(1352, 1, 1, 'tool/policy:viewacceptances', 1, [[timestamp]], 0),
(1353, 1, 3, 'tool/recyclebin:deleteitems', 1, [[timestamp]], 0),
(1354, 1, 1, 'tool/recyclebin:deleteitems', 1, [[timestamp]], 0),
(1355, 1, 3, 'tool/recyclebin:restoreitems', 1, [[timestamp]], 0),
(1356, 1, 1, 'tool/recyclebin:restoreitems', 1, [[timestamp]], 0),
(1357, 1, 4, 'tool/recyclebin:viewitems', 1, [[timestamp]], 0),
(1358, 1, 3, 'tool/recyclebin:viewitems', 1, [[timestamp]], 0),
(1359, 1, 1, 'tool/recyclebin:viewitems', 1, [[timestamp]], 0),
(1360, 1, 1, 'tool/uploaduser:uploaduserpictures', 1, [[timestamp]], 0),
(1361, 1, 1, 'tool/usertours:managetours', 1, [[timestamp]], 0),
(1362, 1, 1, 'contenttype/h5p:access', 1, [[timestamp]], 0),
(1363, 1, 2, 'contenttype/h5p:access', 1, [[timestamp]], 0),
(1364, 1, 3, 'contenttype/h5p:access', 1, [[timestamp]], 0),
(1365, 1, 1, 'contenttype/h5p:upload', 1, [[timestamp]], 0),
(1366, 1, 2, 'contenttype/h5p:upload', 1, [[timestamp]], 0),
(1367, 1, 3, 'contenttype/h5p:upload', 1, [[timestamp]], 0),
(1368, 1, 1, 'contenttype/h5p:useeditor', 1, [[timestamp]], 0),
(1369, 1, 2, 'contenttype/h5p:useeditor', 1, [[timestamp]], 0),
(1370, 1, 3, 'contenttype/h5p:useeditor', 1, [[timestamp]], 0),
(1371, 1, 3, 'booktool/importhtml:import', 1, [[timestamp]], 0),
(1372, 1, 1, 'booktool/importhtml:import', 1, [[timestamp]], 0),
(1373, 1, 6, 'booktool/print:print', 1, [[timestamp]], 0),
(1374, 1, 8, 'booktool/print:print', 1, [[timestamp]], 0),
(1375, 1, 5, 'booktool/print:print', 1, [[timestamp]], 0),
(1376, 1, 4, 'booktool/print:print', 1, [[timestamp]], 0),
(1377, 1, 3, 'booktool/print:print', 1, [[timestamp]], 0),
(1378, 1, 1, 'booktool/print:print', 1, [[timestamp]], 0),
(1379, 1, 4, 'forumreport/summary:view', 1, [[timestamp]], 0),
(1380, 1, 3, 'forumreport/summary:view', 1, [[timestamp]], 0),
(1381, 1, 1, 'forumreport/summary:view', 1, [[timestamp]], 0),
(1382, 1, 4, 'forumreport/summary:viewall', 1, [[timestamp]], 0),
(1383, 1, 3, 'forumreport/summary:viewall', 1, [[timestamp]], 0),
(1384, 1, 1, 'forumreport/summary:viewall', 1, [[timestamp]], 0),
(1385, 1, 4, 'quiz/grading:viewstudentnames', 1, [[timestamp]], 0),
(1386, 1, 3, 'quiz/grading:viewstudentnames', 1, [[timestamp]], 0),
(1387, 1, 1, 'quiz/grading:viewstudentnames', 1, [[timestamp]], 0),
(1388, 1, 4, 'quiz/grading:viewidnumber', 1, [[timestamp]], 0),
(1389, 1, 3, 'quiz/grading:viewidnumber', 1, [[timestamp]], 0),
(1390, 1, 1, 'quiz/grading:viewidnumber', 1, [[timestamp]], 0),
(1391, 1, 4, 'quiz/statistics:view', 1, [[timestamp]], 0),
(1392, 1, 3, 'quiz/statistics:view', 1, [[timestamp]], 0),
(1393, 1, 1, 'quiz/statistics:view', 1, [[timestamp]], 0),
(1394, 1, 1, 'quizaccess/seb:managetemplates', 1, [[timestamp]], 0),
(1395, 1, 1, 'quizaccess/seb:bypassseb', 1, [[timestamp]], 0),
(1396, 1, 3, 'quizaccess/seb:bypassseb', 1, [[timestamp]], 0),
(1397, 1, 1, 'quizaccess/seb:manage_seb_requiresafeexambrowser', 1, [[timestamp]], 0),
(1398, 1, 3, 'quizaccess/seb:manage_seb_requiresafeexambrowser', 1, [[timestamp]], 0),
(1399, 1, 1, 'quizaccess/seb:manage_seb_templateid', 1, [[timestamp]], 0),
(1400, 1, 3, 'quizaccess/seb:manage_seb_templateid', 1, [[timestamp]], 0),
(1401, 1, 1, 'quizaccess/seb:manage_filemanager_sebconfigfile', 1, [[timestamp]], 0),
(1402, 1, 3, 'quizaccess/seb:manage_filemanager_sebconfigfile', 1, [[timestamp]], 0),
(1403, 1, 1, 'quizaccess/seb:manage_seb_showsebdownloadlink', 1, [[timestamp]], 0),
(1404, 1, 3, 'quizaccess/seb:manage_seb_showsebdownloadlink', 1, [[timestamp]], 0),
(1405, 1, 1, 'quizaccess/seb:manage_seb_allowedbrowserexamkeys', 1, [[timestamp]], 0),
(1406, 1, 3, 'quizaccess/seb:manage_seb_allowedbrowserexamkeys', 1, [[timestamp]], 0),
(1407, 1, 1, 'quizaccess/seb:manage_seb_linkquitseb', 1, [[timestamp]], 0),
(1408, 1, 3, 'quizaccess/seb:manage_seb_linkquitseb', 1, [[timestamp]], 0),
(1409, 1, 1, 'quizaccess/seb:manage_seb_userconfirmquit', 1, [[timestamp]], 0),
(1410, 1, 3, 'quizaccess/seb:manage_seb_userconfirmquit', 1, [[timestamp]], 0),
(1411, 1, 1, 'quizaccess/seb:manage_seb_allowuserquitseb', 1, [[timestamp]], 0),
(1412, 1, 3, 'quizaccess/seb:manage_seb_allowuserquitseb', 1, [[timestamp]], 0),
(1413, 1, 1, 'quizaccess/seb:manage_seb_quitpassword', 1, [[timestamp]], 0),
(1414, 1, 3, 'quizaccess/seb:manage_seb_quitpassword', 1, [[timestamp]], 0),
(1415, 1, 1, 'quizaccess/seb:manage_seb_allowreloadinexam', 1, [[timestamp]], 0),
(1416, 1, 3, 'quizaccess/seb:manage_seb_allowreloadinexam', 1, [[timestamp]], 0),
(1417, 1, 1, 'quizaccess/seb:manage_seb_showsebtaskbar', 1, [[timestamp]], 0),
(1418, 1, 3, 'quizaccess/seb:manage_seb_showsebtaskbar', 1, [[timestamp]], 0),
(1419, 1, 1, 'quizaccess/seb:manage_seb_showreloadbutton', 1, [[timestamp]], 0),
(1420, 1, 3, 'quizaccess/seb:manage_seb_showreloadbutton', 1, [[timestamp]], 0),
(1421, 1, 1, 'quizaccess/seb:manage_seb_showtime', 1, [[timestamp]], 0),
(1422, 1, 3, 'quizaccess/seb:manage_seb_showtime', 1, [[timestamp]], 0),
(1423, 1, 1, 'quizaccess/seb:manage_seb_showkeyboardlayout', 1, [[timestamp]], 0),
(1424, 1, 3, 'quizaccess/seb:manage_seb_showkeyboardlayout', 1, [[timestamp]], 0),
(1425, 1, 1, 'quizaccess/seb:manage_seb_showwificontrol', 1, [[timestamp]], 0),
(1426, 1, 3, 'quizaccess/seb:manage_seb_showwificontrol', 1, [[timestamp]], 0),
(1427, 1, 1, 'quizaccess/seb:manage_seb_enableaudiocontrol', 1, [[timestamp]], 0),
(1428, 1, 3, 'quizaccess/seb:manage_seb_enableaudiocontrol', 1, [[timestamp]], 0),
(1429, 1, 1, 'quizaccess/seb:manage_seb_muteonstartup', 1, [[timestamp]], 0),
(1430, 1, 3, 'quizaccess/seb:manage_seb_muteonstartup', 1, [[timestamp]], 0),
(1431, 1, 1, 'quizaccess/seb:manage_seb_allowspellchecking', 1, [[timestamp]], 0),
(1432, 1, 3, 'quizaccess/seb:manage_seb_allowspellchecking', 1, [[timestamp]], 0),
(1433, 1, 1, 'quizaccess/seb:manage_seb_activateurlfiltering', 1, [[timestamp]], 0),
(1434, 1, 3, 'quizaccess/seb:manage_seb_activateurlfiltering', 1, [[timestamp]], 0),
(1435, 1, 1, 'quizaccess/seb:manage_seb_filterembeddedcontent', 1, [[timestamp]], 0),
(1436, 1, 3, 'quizaccess/seb:manage_seb_filterembeddedcontent', 1, [[timestamp]], 0),
(1437, 1, 1, 'quizaccess/seb:manage_seb_expressionsallowed', 1, [[timestamp]], 0),
(1438, 1, 3, 'quizaccess/seb:manage_seb_expressionsallowed', 1, [[timestamp]], 0),
(1439, 1, 1, 'quizaccess/seb:manage_seb_regexallowed', 1, [[timestamp]], 0),
(1440, 1, 3, 'quizaccess/seb:manage_seb_regexallowed', 1, [[timestamp]], 0),
(1441, 1, 1, 'quizaccess/seb:manage_seb_expressionsblocked', 1, [[timestamp]], 0),
(1442, 1, 3, 'quizaccess/seb:manage_seb_expressionsblocked', 1, [[timestamp]], 0),
(1443, 1, 1, 'quizaccess/seb:manage_seb_regexblocked', 1, [[timestamp]], 0),
(1444, 1, 3, 'quizaccess/seb:manage_seb_regexblocked', 1, [[timestamp]], 0),
(1445, 1, 3, 'atto/h5p:addembed', 1, [[timestamp]], 0),
(1446, 1, 7, 'atto/recordrtc:recordaudio', 1, [[timestamp]], 0),
(1447, 1, 7, 'atto/recordrtc:recordvideo', 1, [[timestamp]], 0);

-- --------------------------------------------------------

--
