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

CREATE TABLE `[[dbprefix]]contentbank_content` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contenttype` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contextid` bigint NOT NULL,
  `visibility` tinyint(1) NOT NULL DEFAULT '1',
  `instanceid` bigint DEFAULT NULL,
  `configdata` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `usercreated` bigint NOT NULL,
  `usermodified` bigint DEFAULT NULL,
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]contcont_nam_ix` (`name`),
  KEY `[[dbprefix]]contcont_conconins_ix` (`contextid`,`contenttype`,`instanceid`),
  KEY `[[dbprefix]]contcont_con_ix` (`contextid`),
  KEY `[[dbprefix]]contcont_use_ix` (`usermodified`),
  KEY `[[dbprefix]]contcont_use2_ix` (`usercreated`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table stores content data in the content bank.';

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

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

CREATE TABLE `[[dbprefix]]context` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contextlevel` bigint NOT NULL DEFAULT '0',
  `instanceid` bigint NOT NULL DEFAULT '0',
  `path` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `depth` tinyint NOT NULL DEFAULT '0',
  `locked` tinyint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]cont_conins_uix` (`contextlevel`,`instanceid`),
  KEY `[[dbprefix]]cont_ins_ix` (`instanceid`),
  KEY `[[dbprefix]]cont_pat_ix` (`path`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='one of these must be set' AUTO_INCREMENT=14 ;

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

INSERT INTO `[[dbprefix]]context` VALUES
(1, 10, 0, '/1', 1, 0),
(2, 50, 1, '/1/2', 2, 0),
(3, 40, 1, '/1/3', 2, 0),
(4, 30, 1, '/1/4', 2, 0),
(5, 30, 2, '/1/5', 2, 0),
(6, 80, 1, '/1/6', 2, 0),
(7, 80, 2, '/1/7', 2, 0),
(8, 80, 3, '/1/8', 2, 0),
(9, 80, 4, '/1/9', 2, 0),
(10, 80, 5, '/1/10', 2, 0),
(11, 80, 6, '/1/5/11', 3, 0),
(12, 80, 7, '/1/5/12', 3, 0),
(13, 80, 8, '/1/5/13', 3, 0);

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

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

CREATE TABLE `[[dbprefix]]context_temp` (
  `id` bigint NOT NULL,
  `path` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `depth` tinyint NOT NULL,
  `locked` tinyint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Used by build_context_path() in upgrade and cron to keep con';

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

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

CREATE TABLE `[[dbprefix]]course` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `category` bigint NOT NULL DEFAULT '0',
  `sortorder` bigint NOT NULL DEFAULT '0',
  `fullname` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `shortname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `idnumber` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `summary` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `summaryformat` tinyint NOT NULL DEFAULT '0',
  `format` varchar(21) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT 'topics',
  `showgrades` tinyint NOT NULL DEFAULT '1',
  `newsitems` mediumint NOT NULL DEFAULT '1',
  `startdate` bigint NOT NULL DEFAULT '0',
  `enddate` bigint NOT NULL DEFAULT '0',
  `relativedatesmode` tinyint(1) NOT NULL DEFAULT '0',
  `marker` bigint NOT NULL DEFAULT '0',
  `maxbytes` bigint NOT NULL DEFAULT '0',
  `legacyfiles` smallint NOT NULL DEFAULT '0',
  `showreports` smallint NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `visibleold` tinyint(1) NOT NULL DEFAULT '1',
  `downloadcontent` tinyint(1) DEFAULT NULL,
  `groupmode` smallint NOT NULL DEFAULT '0',
  `groupmodeforce` smallint NOT NULL DEFAULT '0',
  `defaultgroupingid` bigint NOT NULL DEFAULT '0',
  `lang` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `calendartype` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `theme` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `requested` tinyint(1) NOT NULL DEFAULT '0',
  `enablecompletion` tinyint(1) NOT NULL DEFAULT '0',
  `completionnotify` tinyint(1) NOT NULL DEFAULT '0',
  `cacherev` bigint NOT NULL DEFAULT '0',
  `originalcourseid` bigint DEFAULT NULL,
  `showactivitydates` tinyint(1) NOT NULL DEFAULT '0',
  `showcompletionconditions` tinyint(1) DEFAULT NULL,
  `pdfexportfont` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]cour_cat_ix` (`category`),
  KEY `[[dbprefix]]cour_idn_ix` (`idnumber`),
  KEY `[[dbprefix]]cour_sho_ix` (`shortname`),
  KEY `[[dbprefix]]cour_sor_ix` (`sortorder`),
  KEY `[[dbprefix]]cour_ori_ix` (`originalcourseid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Central course table' AUTO_INCREMENT=2 ;

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

INSERT INTO `[[dbprefix]]course` VALUES
(1, 0, 0, '[[site_name]]', '[[site_desc]]', '', '', 0, 'site', 1, 3, 0, 0, 0, 0, 0, 0, 0, 1, 1, NULL, 0, 0, 0, '', '', '', [[timestamp]], [[timestamp]], 0, 0, 0, [[timestamp]], NULL, 0, NULL, NULL);

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

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

CREATE TABLE `[[dbprefix]]course_categories` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `idnumber` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint NOT NULL DEFAULT '0',
  `parent` bigint NOT NULL DEFAULT '0',
  `sortorder` bigint NOT NULL DEFAULT '0',
  `coursecount` bigint NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `visibleold` tinyint(1) NOT NULL DEFAULT '1',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `depth` bigint NOT NULL DEFAULT '0',
  `path` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `theme` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]courcate_par_ix` (`parent`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Course categories' AUTO_INCREMENT=2 ;

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

INSERT INTO `[[dbprefix]]course_categories` VALUES
(1, 'Category 1', NULL, NULL, 1, 0, 10000, 0, 1, 1, [[timestamp]], 1, '/1', NULL);

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

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

CREATE TABLE `[[dbprefix]]course_completions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL DEFAULT '0',
  `course` bigint NOT NULL DEFAULT '0',
  `timeenrolled` bigint NOT NULL DEFAULT '0',
  `timestarted` bigint NOT NULL DEFAULT '0',
  `timecompleted` bigint DEFAULT NULL,
  `reaggregate` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courcomp_usecou_uix` (`userid`,`course`),
  KEY `[[dbprefix]]courcomp_use_ix` (`userid`),
  KEY `[[dbprefix]]courcomp_cou_ix` (`course`),
  KEY `[[dbprefix]]courcomp_tim_ix` (`timecompleted`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Course completion records';

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

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

CREATE TABLE `[[dbprefix]]course_completion_aggr_methd` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `criteriatype` bigint DEFAULT NULL,
  `method` tinyint(1) NOT NULL DEFAULT '0',
  `value` decimal(10,5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courcompaggrmeth_cou_uix` (`course`,`criteriatype`),
  KEY `[[dbprefix]]courcompaggrmeth_cou_ix` (`course`),
  KEY `[[dbprefix]]courcompaggrmeth_cri_ix` (`criteriatype`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Course completion aggregation methods for criteria';

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

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

CREATE TABLE `[[dbprefix]]course_completion_criteria` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `criteriatype` bigint NOT NULL DEFAULT '0',
  `module` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `moduleinstance` bigint DEFAULT NULL,
  `courseinstance` bigint DEFAULT NULL,
  `enrolperiod` bigint DEFAULT NULL,
  `timeend` bigint DEFAULT NULL,
  `gradepass` decimal(10,5) DEFAULT NULL,
  `role` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]courcompcrit_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Course completion criteria';

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

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

CREATE TABLE `[[dbprefix]]course_completion_crit_compl` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL DEFAULT '0',
  `course` bigint NOT NULL DEFAULT '0',
  `criteriaid` bigint NOT NULL DEFAULT '0',
  `gradefinal` decimal(10,5) DEFAULT NULL,
  `unenroled` bigint DEFAULT NULL,
  `timecompleted` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courcompcritcomp_use_uix` (`userid`,`course`,`criteriaid`),
  KEY `[[dbprefix]]courcompcritcomp_use_ix` (`userid`),
  KEY `[[dbprefix]]courcompcritcomp_cou_ix` (`course`),
  KEY `[[dbprefix]]courcompcritcomp_cri_ix` (`criteriaid`),
  KEY `[[dbprefix]]courcompcritcomp_tim_ix` (`timecompleted`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Course completion user records';

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

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

CREATE TABLE `[[dbprefix]]course_completion_defaults` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL,
  `module` bigint NOT NULL,
  `completion` tinyint(1) NOT NULL DEFAULT '0',
  `completionview` tinyint(1) NOT NULL DEFAULT '0',
  `completionusegrade` tinyint(1) NOT NULL DEFAULT '0',
  `completionpassgrade` tinyint(1) NOT NULL DEFAULT '0',
  `completionexpected` bigint NOT NULL DEFAULT '0',
  `customrules` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courcompdefa_coumod_uix` (`course`,`module`),
  KEY `[[dbprefix]]courcompdefa_mod_ix` (`module`),
  KEY `[[dbprefix]]courcompdefa_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Default settings for activities completion';

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

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

CREATE TABLE `[[dbprefix]]course_format_options` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint NOT NULL,
  `format` varchar(21) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `sectionid` bigint NOT NULL DEFAULT '0',
  `name` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `value` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courformopti_coufors_uix` (`courseid`,`format`,`sectionid`,`name`),
  KEY `[[dbprefix]]courformopti_cou_ix` (`courseid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores format-specific options for the course or course sect' AUTO_INCREMENT=2 ;

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

INSERT INTO `[[dbprefix]]course_format_options` VALUES
(1, 1, 'site', 0, 'numsections', '1');

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

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

CREATE TABLE `[[dbprefix]]course_modules` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `module` bigint NOT NULL DEFAULT '0',
  `instance` bigint NOT NULL DEFAULT '0',
  `section` bigint NOT NULL DEFAULT '0',
  `idnumber` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `added` bigint NOT NULL DEFAULT '0',
  `score` smallint NOT NULL DEFAULT '0',
  `indent` mediumint NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `visibleoncoursepage` tinyint(1) NOT NULL DEFAULT '1',
  `visibleold` tinyint(1) NOT NULL DEFAULT '1',
  `groupmode` smallint NOT NULL DEFAULT '0',
  `groupingid` bigint NOT NULL DEFAULT '0',
  `completion` tinyint(1) NOT NULL DEFAULT '0',
  `completiongradeitemnumber` bigint DEFAULT NULL,
  `completionview` tinyint(1) NOT NULL DEFAULT '0',
  `completionexpected` bigint NOT NULL DEFAULT '0',
  `completionpassgrade` tinyint(1) NOT NULL DEFAULT '0',
  `showdescription` tinyint(1) NOT NULL DEFAULT '0',
  `availability` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `deletioninprogress` tinyint(1) NOT NULL DEFAULT '0',
  `downloadcontent` tinyint(1) DEFAULT '1',
  `lang` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]courmodu_vis_ix` (`visible`),
  KEY `[[dbprefix]]courmodu_cou_ix` (`course`),
  KEY `[[dbprefix]]courmodu_mod_ix` (`module`),
  KEY `[[dbprefix]]courmodu_ins_ix` (`instance`),
  KEY `[[dbprefix]]courmodu_idncou_ix` (`idnumber`,`course`),
  KEY `[[dbprefix]]courmodu_gro_ix` (`groupingid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='course_modules table retrofitted from MySQL' AUTO_INCREMENT=1 ;

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

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

CREATE TABLE `[[dbprefix]]course_modules_completion` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `coursemoduleid` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `completionstate` tinyint(1) NOT NULL,
  `overrideby` bigint DEFAULT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courmoducomp_usecou_uix` (`userid`,`coursemoduleid`),
  KEY `[[dbprefix]]courmoducomp_cou_ix` (`coursemoduleid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Stores the completion state (completed or not completed, etc';

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

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

CREATE TABLE `[[dbprefix]]course_modules_viewed` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `coursemoduleid` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `timecreated` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]courmoduview_usecou_uix` (`userid`,`coursemoduleid`),
  KEY `[[dbprefix]]courmoduview_cou_ix` (`coursemoduleid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Tracks the completion viewed (viewed with cmid/userid and ot';

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

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

CREATE TABLE `[[dbprefix]]course_published` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `huburl` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `courseid` bigint NOT NULL,
  `timepublished` bigint NOT NULL,
  `enrollable` tinyint(1) NOT NULL DEFAULT '1',
  `hubcourseid` bigint NOT NULL,
  `status` tinyint(1) DEFAULT '0',
  `timechecked` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]courpubl_hub_ix` (`hubcourseid`),
  KEY `[[dbprefix]]courpubl_cou_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Information about how and when an local courses were publish';

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

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

CREATE TABLE `[[dbprefix]]course_sections` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `section` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `summary` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `summaryformat` tinyint NOT NULL DEFAULT '0',
  `sequence` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `availability` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `itemid` bigint DEFAULT NULL,
  `timemodified` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]coursect_cousec_uix` (`course`,`section`),
  KEY `[[dbprefix]]coursect_comite_ix` (`component`,`itemid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='to define the sections for each course' AUTO_INCREMENT=1 ;

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

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

CREATE TABLE `[[dbprefix]]customfield_category` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(400) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` bigint DEFAULT NULL,
  `sortorder` bigint DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `area` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemid` bigint NOT NULL DEFAULT '0',
  `contextid` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]custcate_comareitesor_ix` (`component`,`area`,`itemid`,`sortorder`),
  KEY `[[dbprefix]]custcate_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='core_customfield category table' AUTO_INCREMENT=1 ;

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

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

CREATE TABLE `[[dbprefix]]customfield_data` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `fieldid` bigint NOT NULL,
  `instanceid` bigint NOT NULL,
  `intvalue` bigint DEFAULT NULL,
  `decvalue` decimal(10,5) DEFAULT NULL,
  `shortcharvalue` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `charvalue` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `value` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `valueformat` bigint NOT NULL,
  `valuetrust` tinyint NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `contextid` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]custdata_insfie_uix` (`instanceid`,`fieldid`),
  KEY `[[dbprefix]]custdata_fieint_ix` (`fieldid`,`intvalue`),
  KEY `[[dbprefix]]custdata_fiesho_ix` (`fieldid`,`shortcharvalue`),
  KEY `[[dbprefix]]custdata_fiedec_ix` (`fieldid`,`decvalue`),
  KEY `[[dbprefix]]custdata_fie_ix` (`fieldid`),
  KEY `[[dbprefix]]custdata_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='core_customfield data table';

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

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

CREATE TABLE `[[dbprefix]]customfield_field` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `shortname` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `name` varchar(400) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `type` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` bigint DEFAULT NULL,
  `sortorder` bigint DEFAULT NULL,
  `categoryid` bigint DEFAULT NULL,
  `configdata` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]custfiel_catsor_ix` (`categoryid`,`sortorder`),
  KEY `[[dbprefix]]custfiel_cat_ix` (`categoryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='core_customfield field table' AUTO_INCREMENT=1 ;

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

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

CREATE TABLE `[[dbprefix]]data` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `introformat` smallint NOT NULL DEFAULT '0',
  `comments` smallint NOT NULL DEFAULT '0',
  `timeavailablefrom` bigint NOT NULL DEFAULT '0',
  `timeavailableto` bigint NOT NULL DEFAULT '0',
  `timeviewfrom` bigint NOT NULL DEFAULT '0',
  `timeviewto` bigint NOT NULL DEFAULT '0',
  `requiredentries` int NOT NULL DEFAULT '0',
  `requiredentriestoview` int NOT NULL DEFAULT '0',
  `maxentries` int NOT NULL DEFAULT '0',
  `rssarticles` smallint NOT NULL DEFAULT '0',
  `singletemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `listtemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `listtemplateheader` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `listtemplatefooter` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `addtemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `rsstemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `rsstitletemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `csstemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `jstemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `asearchtemplate` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `approval` smallint NOT NULL DEFAULT '0',
  `manageapproved` smallint NOT NULL DEFAULT '1',
  `scale` bigint NOT NULL DEFAULT '0',
  `assessed` bigint NOT NULL DEFAULT '0',
  `assesstimestart` bigint NOT NULL DEFAULT '0',
  `assesstimefinish` bigint NOT NULL DEFAULT '0',
  `defaultsort` bigint NOT NULL DEFAULT '0',
  `defaultsortdir` smallint NOT NULL DEFAULT '0',
  `editany` smallint NOT NULL DEFAULT '0',
  `notification` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `config` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `completionentries` bigint DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]data_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='all database activities';

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

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

CREATE TABLE `[[dbprefix]]data_content` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `fieldid` bigint NOT NULL DEFAULT '0',
  `recordid` bigint NOT NULL DEFAULT '0',
  `content` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `content1` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `content2` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `content3` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `content4` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]datacont_rec_ix` (`recordid`),
  KEY `[[dbprefix]]datacont_fie_ix` (`fieldid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='the content introduced in each record/fields';

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

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

CREATE TABLE `[[dbprefix]]data_fields` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `dataid` bigint NOT NULL DEFAULT '0',
  `type` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `param1` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param2` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param3` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param4` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param5` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param6` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param7` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param8` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param9` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `param10` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]datafiel_typdat_ix` (`type`,`dataid`),
  KEY `[[dbprefix]]datafiel_dat_ix` (`dataid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='every field available';

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

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

CREATE TABLE `[[dbprefix]]data_records` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL DEFAULT '0',
  `groupid` bigint NOT NULL DEFAULT '0',
  `dataid` bigint NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `approved` smallint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]datareco_dat_ix` (`dataid`),
  KEY `[[dbprefix]]datareco_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='every record introduced';

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

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

CREATE TABLE `[[dbprefix]]enrol_flatfile` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `action` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `roleid` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `courseid` bigint NOT NULL,
  `timestart` bigint NOT NULL DEFAULT '0',
  `timeend` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enroflat_cou_ix` (`courseid`),
  KEY `[[dbprefix]]enroflat_use_ix` (`userid`),
  KEY `[[dbprefix]]enroflat_rol_ix` (`roleid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='enrol_flatfile table retrofitted from MySQL';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_app_registration` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `platformid` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `clientid` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `uniqueid` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `platformclienthash` varchar(64) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `platformuniqueidhash` varchar(64) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `authenticationrequesturl` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `jwksurl` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `accesstokenurl` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enroltiappregi_uni_uix` (`uniqueid`),
  UNIQUE KEY `[[dbprefix]]enroltiappregi_pla_uix` (`platformclienthash`),
  UNIQUE KEY `[[dbprefix]]enroltiappregi_pla2_uix` (`platformuniqueidhash`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Details of each application that has been registered with th';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_context` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contextid` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `ltideploymentid` bigint NOT NULL,
  `type` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enrolticont_lticon_uix` (`ltideploymentid`,`contextid`),
  KEY `[[dbprefix]]enrolticont_lti_ix` (`ltideploymentid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each row represents a context in the platform, where resourc';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_deployment` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `deploymentid` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `platformid` bigint NOT NULL,
  `legacyconsumerkey` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enroltidepl_pladep_uix` (`platformid`,`deploymentid`),
  KEY `[[dbprefix]]enroltidepl_pla_ix` (`platformid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each row represents a deployment of a tool within a platform';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_lti2_context` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `consumerid` bigint NOT NULL,
  `lticontextkey` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `type` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `settings` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `created` bigint NOT NULL,
  `updated` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enroltilti2cont_con_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Information about a specific LTI contexts from the consumers';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_lti2_nonce` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `consumerid` bigint NOT NULL,
  `value` varchar(64) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `expires` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enroltilti2nonc_con_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Nonce used for authentication between moodle and a consumer';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_lti2_resource_link` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contextid` bigint DEFAULT NULL,
  `consumerid` bigint DEFAULT NULL,
  `ltiresourcelinkkey` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `settings` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `primaryresourcelinkid` bigint DEFAULT NULL,
  `shareapproved` tinyint(1) DEFAULT NULL,
  `created` bigint NOT NULL,
  `updated` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enroltilti2resolink_c_ix` (`contextid`),
  KEY `[[dbprefix]]enroltilti2resolink_p_ix` (`primaryresourcelinkid`),
  KEY `[[dbprefix]]enroltilti2resolink_2_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Link from the consumer to the tool';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_lti2_share_key` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `sharekey` varchar(32) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `resourcelinkid` bigint NOT NULL,
  `autoapprove` tinyint(1) NOT NULL,
  `expires` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enroltilti2sharkey_s_uix` (`sharekey`),
  UNIQUE KEY `[[dbprefix]]enroltilti2sharkey_r_uix` (`resourcelinkid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Resource link share key';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_lti2_tool_proxy` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `toolproxykey` varchar(32) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `consumerid` bigint NOT NULL,
  `toolproxy` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `created` bigint NOT NULL,
  `updated` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enroltilti2toolprox__uix` (`toolproxykey`),
  KEY `[[dbprefix]]enroltilti2toolprox_c_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='A tool proxy between moodle and a consumer';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_lti2_user_result` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `resourcelinkid` bigint NOT NULL,
  `ltiuserkey` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `ltiresultsourcedid` varchar(1024) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `created` bigint NOT NULL,
  `updated` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enroltilti2userresu_r_ix` (`resourcelinkid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Results for each user for each resource link';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_resource_link` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `resourcelinkid` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `ltideploymentid` bigint NOT NULL,
  `resourceid` bigint NOT NULL,
  `lticontextid` bigint DEFAULT NULL,
  `lineitemsservice` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `lineitemservice` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `lineitemscope` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `resultscope` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `scorescope` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `contextmembershipsurl` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `nrpsserviceversions` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enroltiresolink_resl_uix` (`resourcelinkid`,`ltideploymentid`),
  KEY `[[dbprefix]]enroltiresolink_lti_ix` (`ltideploymentid`),
  KEY `[[dbprefix]]enroltiresolink_lti2_ix` (`lticontextid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Each row represents a resource link for a platform and deplo';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_tool_consumer_map` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `toolid` bigint NOT NULL,
  `consumerid` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enroltitoolconsmap_to_ix` (`toolid`),
  KEY `[[dbprefix]]enroltitoolconsmap_co_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Table that maps the published tool to tool consumers.';

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

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

CREATE TABLE `[[dbprefix]]enrol_lti_user_resource_link` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `ltiuserid` bigint NOT NULL,
  `resourcelinkid` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]enroltiuserresolink__uix` (`ltiuserid`,`resourcelinkid`),
  KEY `[[dbprefix]]enroltiuserresolink_l_ix` (`ltiuserid`),
  KEY `[[dbprefix]]enroltiuserresolink_r_ix` (`resourcelinkid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Join table mapping users to resource links as this is a many';

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

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

CREATE TABLE `[[dbprefix]]enrol_paypal` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `business` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `receiver_email` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `receiver_id` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `item_name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `courseid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `instanceid` bigint NOT NULL DEFAULT '0',
  `memo` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `tax` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `option_name1` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `option_selection1_x` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `option_name2` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `option_selection2_x` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `payment_status` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `pending_reason` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `reason_code` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `txn_id` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `parent_txn_id` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `payment_type` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `timeupdated` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]enropayp_bus_ix` (`business`),
  KEY `[[dbprefix]]enropayp_rec_ix` (`receiver_email`),
  KEY `[[dbprefix]]enropayp_cou_ix` (`courseid`),
  KEY `[[dbprefix]]enropayp_use_ix` (`userid`),
  KEY `[[dbprefix]]enropayp_ins_ix` (`instanceid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Holds all known information about PayPal transactions';

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

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

CREATE TABLE `[[dbprefix]]event` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `format` smallint NOT NULL DEFAULT '0',
  `categoryid` bigint NOT NULL DEFAULT '0',
  `courseid` bigint NOT NULL DEFAULT '0',
  `groupid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `repeatid` bigint NOT NULL DEFAULT '0',
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `modulename` varchar(20) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `instance` bigint NOT NULL DEFAULT '0',
  `type` smallint NOT NULL DEFAULT '0',
  `eventtype` varchar(20) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `timestart` bigint NOT NULL DEFAULT '0',
  `timeduration` bigint NOT NULL DEFAULT '0',
  `timesort` bigint DEFAULT NULL,
  `visible` smallint NOT NULL DEFAULT '1',
  `uuid` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `sequence` bigint NOT NULL DEFAULT '1',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `subscriptionid` bigint DEFAULT NULL,
  `priority` bigint DEFAULT NULL,
  `location` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]even_cou_ix` (`courseid`),
  KEY `[[dbprefix]]even_use_ix` (`userid`),
  KEY `[[dbprefix]]even_tim_ix` (`timestart`),
  KEY `[[dbprefix]]even_tim2_ix` (`timeduration`),
  KEY `[[dbprefix]]even_uui_ix` (`uuid`),
  KEY `[[dbprefix]]even_typtim_ix` (`type`,`timesort`),
  KEY `[[dbprefix]]even_grocoucatvisuse_ix` (`groupid`,`courseid`,`categoryid`,`visible`,`userid`),
  KEY `[[dbprefix]]even_eve_ix` (`eventtype`),
  KEY `[[dbprefix]]even_comeveins_ix` (`component`,`eventtype`,`instance`),
  KEY `[[dbprefix]]even_modinseve_ix` (`modulename`,`instance`,`eventtype`),
  KEY `[[dbprefix]]even_cat_ix` (`categoryid`),
  KEY `[[dbprefix]]even_sub_ix` (`subscriptionid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='For everything with a time associated to it' AUTO_INCREMENT=1 ;

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

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

CREATE TABLE `[[dbprefix]]events_handlers` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `eventname` varchar(166) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `component` varchar(166) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `handlerfile` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `handlerfunction` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `schedule` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `status` bigint NOT NULL DEFAULT '0',
  `internal` tinyint NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]evenhand_evecom_uix` (`eventname`,`component`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table is for storing which components requests what typ';

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

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

CREATE TABLE `[[dbprefix]]events_queue` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `eventdata` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `stackdump` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `userid` bigint DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]evenqueu_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This table is for storing queued events. It stores only one ';

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

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

CREATE TABLE `[[dbprefix]]events_queue_handlers` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `queuedeventid` bigint NOT NULL,
  `handlerid` bigint NOT NULL,
  `status` bigint DEFAULT NULL,
  `errormessage` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]evenqueuhand_que_ix` (`queuedeventid`),
  KEY `[[dbprefix]]evenqueuhand_han_ix` (`handlerid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='This is the list of queued handlers for processing. The even';

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

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

CREATE TABLE `[[dbprefix]]event_subscriptions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `url` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `categoryid` bigint NOT NULL DEFAULT '0',
  `courseid` bigint NOT NULL DEFAULT '0',
  `groupid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `eventtype` varchar(20) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `pollinterval` bigint NOT NULL DEFAULT '0',
  `lastupdated` bigint DEFAULT NULL,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]evensubs_cou_ix` (`courseid`),
  KEY `[[dbprefix]]evensubs_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Tracks subscriptions to remote calendars.';

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

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

CREATE TABLE `[[dbprefix]]external_functions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(200) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `classname` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `methodname` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `classpath` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `capabilities` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `services` varchar(1333) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]extefunc_nam_uix` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='list of all external functions' AUTO_INCREMENT=754 ;

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

INSERT INTO `[[dbprefix]]external_functions` VALUES
(1, 'core_auth_confirm_user', 'core_auth_external', 'confirm_user', NULL, 'moodle', '', NULL),
(2, 'core_auth_request_password_reset', 'core_auth_external', 'request_password_reset', NULL, 'moodle', '', NULL),
(3, 'core_auth_is_minor', 'core_auth_external', 'is_minor', NULL, 'moodle', '', NULL),
(4, 'core_auth_is_age_digital_consent_verification_enabled', 'core_auth_external', 'is_age_digital_consent_verification_enabled', NULL, 'moodle', '', NULL),
(5, 'core_auth_resend_confirmation_email', 'core_auth_external', 'resend_confirmation_email', NULL, 'moodle', '', NULL),
(6, 'core_backup_get_async_backup_progress', 'core_backup_external', 'get_async_backup_progress', 'backup/externallib.php', 'moodle', '', NULL),
(7, 'core_backup_get_async_backup_links_backup', 'core_backup_external', 'get_async_backup_links_backup', 'backup/externallib.php', 'moodle', '', NULL),
(8, 'core_backup_get_async_backup_links_restore', 'core_backup_external', 'get_async_backup_links_restore', 'backup/externallib.php', 'moodle', '', NULL),
(9, 'core_backup_get_copy_progress', 'core_backup_external', 'get_copy_progress', 'backup/externallib.php', 'moodle', '', NULL),
(10, 'core_backup_submit_copy_form', 'core_backup_external', 'submit_copy_form', 'backup/externallib.php', 'moodle', '', NULL),
(11, 'core_badges_disable_badges', 'core_badges\\external\\disable_badges', 'execute', NULL, 'moodle', '', NULL),
(12, 'core_badges_enable_badges', 'core_badges\\external\\enable_badges', 'execute', NULL, 'moodle', '', NULL),
(13, 'core_badges_get_badge', 'core_badges\\external\\get_badge', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(14, 'core_badges_get_user_badges', 'core_badges_external', 'get_user_badges', NULL, 'moodle', 'moodle/badges:viewotherbadges', 'moodle_mobile_app'),
(15, 'core_badges_get_user_badge_by_hash', 'core_badges\\external\\get_user_badge_by_hash', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(16, 'core_blog_get_entries', 'core_blog\\external', 'get_entries', NULL, 'moodle', '', 'moodle_mobile_app'),
(17, 'core_blog_view_entries', 'core_blog\\external', 'view_entries', NULL, 'moodle', '', 'moodle_mobile_app'),
(18, 'core_blog_get_access_information', '\\core_blog\\external\\get_access_information', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(19, 'core_blog_add_entry', '\\core_blog\\external\\add_entry', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(20, 'core_blog_delete_entry', '\\core_blog\\external\\delete_entry', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(21, 'core_blog_prepare_entry_for_edition', '\\core_blog\\external\\prepare_entry_for_edition', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(22, 'core_blog_update_entry', '\\core_blog\\external\\update_entry', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(23, 'core_calendar_get_calendar_monthly_view', 'core_calendar_external', 'get_calendar_monthly_view', 'calendar/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(24, 'core_calendar_get_calendar_day_view', 'core_calendar_external', 'get_calendar_day_view', 'calendar/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(25, 'core_calendar_get_calendar_upcoming_view', 'core_calendar_external', 'get_calendar_upcoming_view', 'calendar/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(26, 'core_calendar_update_event_start_day', 'core_calendar_external', 'update_event_start_day', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(27, 'core_calendar_create_calendar_events', 'core_calendar_external', 'create_calendar_events', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(28, 'core_calendar_delete_calendar_events', 'core_calendar_external', 'delete_calendar_events', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(29, 'core_calendar_get_calendar_events', 'core_calendar_external', 'get_calendar_events', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(30, 'core_calendar_get_action_events_by_timesort', 'core_calendar_external', 'get_calendar_action_events_by_timesort', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(31, 'core_calendar_get_action_events_by_course', 'core_calendar_external', 'get_calendar_action_events_by_course', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(32, 'core_calendar_get_action_events_by_courses', 'core_calendar_external', 'get_calendar_action_events_by_courses', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(33, 'core_calendar_get_calendar_event_by_id', 'core_calendar_external', 'get_calendar_event_by_id', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(34, 'core_calendar_submit_create_update_form', 'core_calendar_external', 'submit_create_update_form', 'calendar/externallib.php', 'moodle', 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', 'moodle_mobile_app'),
(35, 'core_calendar_get_calendar_access_information', 'core_calendar_external', 'get_calendar_access_information', 'calendar/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(36, 'core_calendar_get_allowed_event_types', 'core_calendar_external', 'get_allowed_event_types', 'calendar/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(37, 'core_calendar_get_timestamps', 'core_calendar_external', 'get_timestamps', 'calendar/externallib.php', 'moodle', '', NULL),
(38, 'core_calendar_get_calendar_export_token', 'core_calendar\\external\\export\\token', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(39, 'core_calendar_delete_subscription', 'core_calendar\\external\\subscription\\delete', 'execute', NULL, 'moodle', '', NULL),
(40, 'core_check_get_result_admintree', 'core\\check\\external\\get_result_admintree', 'execute', NULL, 'moodle', '', NULL),
(41, 'core_cohort_add_cohort_members', 'core_cohort_external', 'add_cohort_members', 'cohort/externallib.php', 'moodle', 'moodle/cohort:assign', NULL),
(42, 'core_cohort_create_cohorts', 'core_cohort_external', 'create_cohorts', 'cohort/externallib.php', 'moodle', 'moodle/cohort:manage', NULL),
(43, 'core_cohort_delete_cohort_members', 'core_cohort_external', 'delete_cohort_members', 'cohort/externallib.php', 'moodle', 'moodle/cohort:assign', NULL),
(44, 'core_cohort_delete_cohorts', 'core_cohort_external', 'delete_cohorts', 'cohort/externallib.php', 'moodle', 'moodle/cohort:manage', NULL),
(45, 'core_cohort_get_cohort_members', 'core_cohort_external', 'get_cohort_members', 'cohort/externallib.php', 'moodle', 'moodle/cohort:view', NULL),
(46, 'core_cohort_search_cohorts', 'core_cohort_external', 'search_cohorts', 'cohort/externallib.php', 'moodle', 'moodle/cohort:view', NULL),
(47, 'core_cohort_get_cohorts', 'core_cohort_external', 'get_cohorts', 'cohort/externallib.php', 'moodle', 'moodle/cohort:view', NULL),
(48, 'core_cohort_update_cohorts', 'core_cohort_external', 'update_cohorts', 'cohort/externallib.php', 'moodle', 'moodle/cohort:manage', NULL),
(49, 'core_comment_get_comments', 'core_comment_external', 'get_comments', NULL, 'moodle', 'moodle/comment:view', 'moodle_mobile_app'),
(50, 'core_comment_add_comments', 'core_comment_external', 'add_comments', NULL, 'moodle', '', 'moodle_mobile_app'),
(51, 'core_comment_delete_comments', 'core_comment_external', 'delete_comments', NULL, 'moodle', '', 'moodle_mobile_app'),
(52, 'core_completion_get_activities_completion_status', 'core_completion_external', 'get_activities_completion_status', NULL, 'moodle', '', 'moodle_mobile_app'),
(53, 'core_completion_get_course_completion_status', 'core_completion_external', 'get_course_completion_status', NULL, 'moodle', 'report/completion:view', 'moodle_mobile_app'),
(54, 'core_completion_mark_course_self_completed', 'core_completion_external', 'mark_course_self_completed', NULL, 'moodle', '', 'moodle_mobile_app'),
(55, 'core_completion_update_activity_completion_status_manually', 'core_completion_external', 'update_activity_completion_status_manually', NULL, 'moodle', '', 'moodle_mobile_app'),
(56, 'core_completion_override_activity_completion_status', 'core_completion_external', 'override_activity_completion_status', NULL, 'moodle', 'moodle/course:overridecompletion', NULL),
(57, 'core_course_create_categories', 'core_course_external', 'create_categories', 'course/externallib.php', 'moodle', 'moodle/category:manage', NULL),
(58, 'core_course_create_courses', 'core_course_external', 'create_courses', 'course/externallib.php', 'moodle', 'moodle/course:create, moodle/course:visibility', NULL),
(59, 'core_course_delete_categories', 'core_course_external', 'delete_categories', 'course/externallib.php', 'moodle', 'moodle/category:manage', NULL),
(60, 'core_course_delete_courses', 'core_course_external', 'delete_courses', 'course/externallib.php', 'moodle', 'moodle/course:delete', NULL),
(61, 'core_course_delete_modules', 'core_course_external', 'delete_modules', 'course/externallib.php', 'moodle', 'moodle/course:manageactivities', NULL),
(62, 'core_course_duplicate_course', 'core_course_external', 'duplicate_course', 'course/externallib.php', 'moodle', 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create', NULL),
(63, 'core_course_get_categories', 'core_course_external', 'get_categories', 'course/externallib.php', 'moodle', 'moodle/category:viewhiddencategories', 'moodle_mobile_app'),
(64, 'core_course_get_contents', 'core_course_external', 'get_course_contents', 'course/externallib.php', 'moodle', 'moodle/course:update, moodle/course:viewhiddencourses', 'moodle_mobile_app'),
(65, 'core_course_get_course_module', 'core_course_external', 'get_course_module', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(66, 'core_course_get_course_module_by_instance', 'core_course_external', 'get_course_module_by_instance', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(67, 'core_course_get_module', 'core_course_external', 'get_module', 'course/externallib.php', 'moodle', '', NULL),
(68, 'core_courseformat_file_handlers', 'core_courseformat\\external\\file_handlers', 'execute', NULL, 'moodle', '', NULL),
(69, 'core_courseformat_get_state', 'core_courseformat\\external\\get_state', 'execute', NULL, 'moodle', '', NULL),
(70, 'core_courseformat_new_module', 'core_courseformat\\external\\new_module', 'execute', NULL, 'moodle', 'moodle/course:manageactivities', NULL),
(71, 'core_courseformat_update_course', 'core_courseformat\\external\\update_course', 'execute', NULL, 'moodle', 'moodle/course:sectionvisibility, moodle/course:activityvisibility', NULL),
(72, 'core_courseformat_create_module', 'core_courseformat\\external\\create_module', 'execute', NULL, 'moodle', 'moodle/course:manageactivities', NULL),
(73, 'core_course_edit_module', 'core_course_external', 'edit_module', 'course/externallib.php', 'moodle', '', NULL),
(74, 'core_course_edit_section', 'core_course_external', 'edit_section', 'course/externallib.php', 'moodle', '', NULL),
(75, 'core_course_get_courses', 'core_course_external', 'get_courses', 'course/externallib.php', 'moodle', 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses', 'moodle_mobile_app'),
(76, 'core_course_import_course', 'core_course_external', 'import_course', 'course/externallib.php', 'moodle', 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport', NULL),
(77, 'core_course_search_courses', 'core_course_external', 'search_courses', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(78, 'core_course_update_categories', 'core_course_external', 'update_categories', 'course/externallib.php', 'moodle', 'moodle/category:manage', NULL),
(79, 'core_course_update_courses', 'core_course_external', 'update_courses', 'course/externallib.php', 'moodle', 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility', NULL),
(80, 'core_course_view_course', 'core_course_external', 'view_course', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(81, 'core_course_get_user_navigation_options', 'core_course_external', 'get_user_navigation_options', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(82, 'core_course_get_user_administration_options', 'core_course_external', 'get_user_administration_options', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(83, 'core_course_get_courses_by_field', 'core_course_external', 'get_courses_by_field', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(84, 'core_course_check_updates', 'core_course_external', 'check_updates', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(85, 'core_course_get_updates_since', 'core_course_external', 'get_updates_since', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(86, 'core_course_get_enrolled_courses_by_timeline_classification', 'core_course_external', 'get_enrolled_courses_by_timeline_classification', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(87, 'core_course_get_enrolled_courses_with_action_events_by_timeline_classification', '\\core_course\\external\\get_enrolled_courses_with_action_events_by_timeline_classification', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(88, 'core_course_get_recent_courses', 'core_course_external', 'get_recent_courses', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(89, 'core_course_set_favourite_courses', 'core_course_external', 'set_favourite_courses', 'course/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(90, 'core_course_get_enrolled_users_by_cmid', 'core_course_external', 'get_enrolled_users_by_cmid', 'course/externallib.php', 'moodle', '', NULL),
(91, 'core_course_add_content_item_to_user_favourites', 'core_course_external', 'add_content_item_to_user_favourites', 'course/externallib.php', 'moodle', '', NULL),
(92, 'core_course_remove_content_item_from_user_favourites', 'core_course_external', 'remove_content_item_from_user_favourites', 'course/externallib.php', 'moodle', '', NULL),
(93, 'core_course_get_course_content_items', 'core_course_external', 'get_course_content_items', 'course/externallib.php', 'moodle', '', NULL),
(94, 'core_course_get_activity_chooser_footer', 'core_course_external', 'get_activity_chooser_footer', 'course/externallib.php', 'moodle', '', NULL),
(95, 'core_course_toggle_activity_recommendation', 'core_course_external', 'toggle_activity_recommendation', 'course/externallib.php', 'moodle', '', NULL),
(96, 'core_enrol_get_course_enrolment_methods', 'core_enrol_external', 'get_course_enrolment_methods', 'enrol/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(97, 'core_enrol_get_enrolled_users', 'core_enrol_external', 'get_enrolled_users', 'enrol/externallib.php', 'moodle', 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', 'moodle_mobile_app'),
(98, 'core_enrol_get_enrolled_users_with_capability', 'core_enrol_external', 'get_enrolled_users_with_capability', 'enrol/externallib.php', 'moodle', '', NULL),
(99, 'core_enrol_get_potential_users', 'core_enrol_external', 'get_potential_users', 'enrol/externallib.php', 'moodle', 'moodle/course:enrolreview', NULL),
(100, 'core_enrol_search_users', 'core_enrol_external', 'search_users', 'enrol/externallib.php', 'moodle', 'moodle/course:viewparticipants', 'moodle_mobile_app'),
(101, 'core_enrol_get_users_courses', 'core_enrol_external', 'get_users_courses', 'enrol/externallib.php', 'moodle', 'moodle/course:viewparticipants', 'moodle_mobile_app'),
(102, 'core_enrol_submit_user_enrolment_form', 'core_enrol_external', 'submit_user_enrolment_form', 'enrol/externallib.php', 'moodle', '', NULL),
(103, 'core_enrol_unenrol_user_enrolment', 'core_enrol_external', 'unenrol_user_enrolment', 'enrol/externallib.php', 'moodle', '', NULL),
(104, 'core_fetch_notifications', 'core_external', 'fetch_notifications', 'lib/external/externallib.php', 'moodle', '', NULL),
(105, 'core_session_touch', 'core\\session\\external', 'touch_session', NULL, 'moodle', '', NULL),
(106, 'core_session_time_remaining', 'core\\session\\external', 'time_remaining', NULL, 'moodle', '', NULL),
(107, 'core_files_get_files', 'core_files_external', 'get_files', 'files/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(108, 'core_files_upload', 'core_files_external', 'upload', 'files/externallib.php', 'moodle', '', NULL),
(109, 'core_files_delete_draft_files', 'core_files\\external\\delete\\draft', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(110, 'core_files_get_unused_draft_itemid', 'core_files\\external\\get\\unused_draft', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(111, 'core_form_get_filetypes_browser_data', 'core_form\\external', 'get_filetypes_browser_data', NULL, 'moodle', '', NULL),
(112, 'core_form_dynamic_form', 'core_form\\external\\dynamic_form', 'execute', NULL, 'moodle', '', NULL),
(113, 'core_get_component_strings', 'core_external', 'get_component_strings', 'lib/external/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(114, 'core_get_fragment', 'core_external', 'get_fragment', 'lib/external/externallib.php', 'moodle', '', NULL),
(115, 'core_get_string', 'core_external', 'get_string', 'lib/external/externallib.php', 'moodle', '', NULL),
(116, 'core_get_strings', 'core_external', 'get_strings', 'lib/external/externallib.php', 'moodle', '', NULL),
(117, 'core_get_user_dates', 'core_external', 'get_user_dates', 'lib/external/externallib.php', 'moodle', '', NULL),
(118, 'core_grades_update_grades', 'core_grades_external', 'update_grades', NULL, 'moodle', '', NULL),
(119, 'core_grades_grader_gradingpanel_point_fetch', 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\fetch', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(120, 'core_grades_grader_gradingpanel_point_store', 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\store', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(121, 'core_grades_grader_gradingpanel_scale_fetch', 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\fetch', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(122, 'core_grades_grader_gradingpanel_scale_store', 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\store', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(123, 'core_grades_create_gradecategories', 'core_grades\\external\\create_gradecategories', 'execute', NULL, 'moodle', 'moodle/grade:manage', NULL),
(124, 'core_grades_get_enrolled_users_for_selector', 'core_grades\\external\\get_enrolled_users_for_selector', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(125, 'core_grades_get_groups_for_selector', 'core_group\\external\\get_groups_for_selector', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(126, 'core_grades_get_feedback', 'core_grades\\external\\get_feedback', 'execute', NULL, 'moodle', '', NULL),
(127, 'core_grades_get_gradeitems', 'core_grades\\external\\get_gradeitems', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(128, 'core_grades_get_grade_tree', 'core_grades\\external\\get_grade_tree', 'execute', NULL, 'moodle', '', NULL),
(129, 'core_grades_get_gradable_users', 'core_grades\\external\\get_gradable_users', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(130, 'core_grading_get_definitions', 'core_grading_external', 'get_definitions', NULL, 'moodle', '', NULL),
(131, 'core_grading_get_gradingform_instances', 'core_grading_external', 'get_gradingform_instances', NULL, 'moodle', '', NULL),
(132, 'core_grading_save_definitions', 'core_grading_external', 'save_definitions', NULL, 'moodle', '', NULL),
(133, 'core_group_add_group_members', 'core_group_external', 'add_group_members', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(134, 'core_group_assign_grouping', 'core_group_external', 'assign_grouping', 'group/externallib.php', 'moodle', '', NULL),
(135, 'core_group_create_groupings', 'core_group_external', 'create_groupings', 'group/externallib.php', 'moodle', '', NULL),
(136, 'core_group_create_groups', 'core_group_external', 'create_groups', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(137, 'core_group_delete_group_members', 'core_group_external', 'delete_group_members', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(138, 'core_group_delete_groupings', 'core_group_external', 'delete_groupings', 'group/externallib.php', 'moodle', '', NULL),
(139, 'core_group_delete_groups', 'core_group_external', 'delete_groups', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(140, 'core_group_get_activity_allowed_groups', 'core_group_external', 'get_activity_allowed_groups', 'group/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(141, 'core_group_get_activity_groupmode', 'core_group_external', 'get_activity_groupmode', 'group/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(142, 'core_group_get_course_groupings', 'core_group_external', 'get_course_groupings', 'group/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(143, 'core_group_get_course_groups', 'core_group_external', 'get_course_groups', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', 'moodle_mobile_app'),
(144, 'core_group_get_course_user_groups', 'core_group_external', 'get_course_user_groups', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', 'moodle_mobile_app'),
(145, 'core_group_get_group_members', 'core_group_external', 'get_group_members', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(146, 'core_group_get_groupings', 'core_group_external', 'get_groupings', 'group/externallib.php', 'moodle', '', NULL),
(147, 'core_group_get_groups', 'core_group_external', 'get_groups', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(148, 'core_group_get_groups_for_selector', 'core_group\\external\\get_groups_for_selector', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(149, 'core_group_unassign_grouping', 'core_group_external', 'unassign_grouping', 'group/externallib.php', 'moodle', '', NULL),
(150, 'core_group_update_groupings', 'core_group_external', 'update_groupings', 'group/externallib.php', 'moodle', '', NULL),
(151, 'core_group_update_groups', 'core_group_external', 'update_groups', 'group/externallib.php', 'moodle', 'moodle/course:managegroups', NULL),
(152, 'core_message_mute_conversations', 'core_message_external', 'mute_conversations', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(153, 'core_message_unmute_conversations', 'core_message_external', 'unmute_conversations', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(154, 'core_message_block_user', 'core_message_external', 'block_user', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(155, 'core_message_get_contact_requests', 'core_message_external', 'get_contact_requests', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(156, 'core_message_create_contact_request', 'core_message_external', 'create_contact_request', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(157, 'core_message_confirm_contact_request', 'core_message_external', 'confirm_contact_request', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(158, 'core_message_decline_contact_request', 'core_message_external', 'decline_contact_request', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(159, 'core_message_get_received_contact_requests_count', 'core_message_external', 'get_received_contact_requests_count', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(160, 'core_message_delete_contacts', 'core_message_external', 'delete_contacts', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(161, 'core_message_delete_conversations_by_id', 'core_message_external', 'delete_conversations_by_id', 'message/externallib.php', 'moodle', 'moodle/site:deleteownmessage', 'moodle_mobile_app'),
(162, 'core_message_delete_message', 'core_message_external', 'delete_message', 'message/externallib.php', 'moodle', 'moodle/site:deleteownmessage', 'moodle_mobile_app'),
(163, 'core_message_get_blocked_users', 'core_message_external', 'get_blocked_users', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(164, 'core_message_data_for_messagearea_search_messages', 'core_message_external', 'data_for_messagearea_search_messages', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(165, 'core_message_message_search_users', 'core_message_external', 'message_search_users', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(166, 'core_message_get_user_contacts', 'core_message_external', 'get_user_contacts', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(167, 'core_message_get_conversations', 'core_message_external', 'get_conversations', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(168, 'core_message_get_conversation', 'core_message_external', 'get_conversation', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(169, 'core_message_get_conversation_between_users', 'core_message_external', 'get_conversation_between_users', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(170, 'core_message_get_self_conversation', 'core_message_external', 'get_self_conversation', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(171, 'core_message_get_messages', 'core_message_external', 'get_messages', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(172, 'core_message_get_conversation_counts', 'core_message_external', 'get_conversation_counts', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(173, 'core_message_get_unread_conversation_counts', 'core_message_external', 'get_unread_conversation_counts', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(174, 'core_message_get_conversation_members', 'core_message_external', 'get_conversation_members', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(175, 'core_message_get_member_info', 'core_message_external', 'get_member_info', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(176, 'core_message_get_unread_conversations_count', 'core_message_external', 'get_unread_conversations_count', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(177, 'core_message_mark_all_notifications_as_read', 'core_message_external', 'mark_all_notifications_as_read', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(178, 'core_message_mark_all_conversation_messages_as_read', 'core_message_external', 'mark_all_conversation_messages_as_read', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(179, 'core_message_mark_message_read', 'core_message_external', 'mark_message_read', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(180, 'core_message_mark_notification_read', 'core_message_external', 'mark_notification_read', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(181, 'core_message_message_processor_config_form', 'core_message_external', 'message_processor_config_form', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(182, 'core_message_get_message_processor', 'core_message_external', 'get_message_processor', 'message/externallib.php', 'moodle', '', NULL),
(183, 'core_message_search_contacts', 'core_message_external', 'search_contacts', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(184, 'core_message_send_instant_messages', 'core_message_external', 'send_instant_messages', 'message/externallib.php', 'moodle', 'moodle/site:sendmessage', 'moodle_mobile_app'),
(185, 'core_message_send_messages_to_conversation', 'core_message_external', 'send_messages_to_conversation', 'message/externallib.php', 'moodle', 'moodle/site:sendmessage', 'moodle_mobile_app'),
(186, 'core_message_get_conversation_messages', 'core_message_external', 'get_conversation_messages', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(187, 'core_message_unblock_user', 'core_message_external', 'unblock_user', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(188, 'core_message_get_user_notification_preferences', 'core_message_external', 'get_user_notification_preferences', 'message/externallib.php', 'moodle', 'moodle/user:editownmessageprofile', 'moodle_mobile_app'),
(189, 'core_message_get_user_message_preferences', 'core_message_external', 'get_user_message_preferences', 'message/externallib.php', 'moodle', 'moodle/user:editownmessageprofile', 'moodle_mobile_app'),
(190, 'core_message_set_favourite_conversations', 'core_message_external', 'set_favourite_conversations', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(191, 'core_message_unset_favourite_conversations', 'core_message_external', 'unset_favourite_conversations', 'message/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(192, 'core_message_delete_message_for_all_users', 'core_message_external', 'delete_message_for_all_users', 'message/externallib.php', 'moodle', 'moodle/site:deleteanymessage', 'moodle_mobile_app'),
(193, 'core_message_get_unread_notification_count', '\\core_message\\external\\get_unread_notification_count', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(194, 'core_message_set_default_notification', 'core_message\\external\\message_set_default_notification', 'execute', NULL, 'moodle', 'moodle/site:config', NULL),
(195, 'core_my_view_page', '\\core_my\\external\\view_page', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(196, 'core_notes_create_notes', 'core_notes_external', 'create_notes', 'notes/externallib.php', 'moodle', 'moodle/notes:manage', 'moodle_mobile_app'),
(197, 'core_notes_delete_notes', 'core_notes_external', 'delete_notes', 'notes/externallib.php', 'moodle', 'moodle/notes:manage', 'moodle_mobile_app'),
(198, 'core_notes_get_course_notes', 'core_notes_external', 'get_course_notes', 'notes/externallib.php', 'moodle', 'moodle/notes:view', 'moodle_mobile_app'),
(199, 'core_notes_get_notes', 'core_notes_external', 'get_notes', 'notes/externallib.php', 'moodle', 'moodle/notes:view', NULL),
(200, 'core_notes_update_notes', 'core_notes_external', 'update_notes', 'notes/externallib.php', 'moodle', 'moodle/notes:manage', NULL),
(201, 'core_notes_view_notes', 'core_notes_external', 'view_notes', 'notes/externallib.php', 'moodle', 'moodle/notes:view', 'moodle_mobile_app'),
(202, 'core_output_load_template', 'core\\output\\external', 'load_template', NULL, 'moodle', '', NULL),
(203, 'core_output_load_template_with_dependencies', 'core\\output\\external', 'load_template_with_dependencies', NULL, 'moodle', '', NULL),
(204, 'core_output_load_fontawesome_icon_system_map', 'core\\external\\output\\icon_system\\load_fontawesome_map', 'execute', NULL, 'moodle', '', NULL),
(205, 'core_question_update_flag', 'core_question_external', 'update_flag', NULL, 'moodle', 'moodle/question:flag', 'moodle_mobile_app'),
(206, 'core_question_get_random_question_summaries', 'core_question_external', 'get_random_question_summaries', NULL, 'moodle', '', NULL),
(207, 'core_rating_get_item_ratings', 'core_rating_external', 'get_item_ratings', NULL, 'moodle', 'moodle/rating:view', 'moodle_mobile_app'),
(208, 'core_rating_add_rating', 'core_rating_external', 'add_rating', NULL, 'moodle', 'moodle/rating:rate', 'moodle_mobile_app'),
(209, 'core_role_assign_roles', 'core_role_external', 'assign_roles', 'enrol/externallib.php', 'moodle', 'moodle/role:assign', NULL),
(210, 'core_role_unassign_roles', 'core_role_external', 'unassign_roles', 'enrol/externallib.php', 'moodle', 'moodle/role:assign', NULL),
(211, 'core_search_get_relevant_users', '\\core_search\\external', 'get_relevant_users', NULL, 'moodle', '', NULL),
(212, 'core_search_get_results', '\\core_search\\external\\get_results', 'execute', NULL, 'moodle', 'moodle/search:query', 'moodle_mobile_app'),
(213, 'core_search_get_search_areas_list', '\\core_search\\external\\get_search_areas_list', 'execute', NULL, 'moodle', 'moodle/search:query', 'moodle_mobile_app'),
(214, 'core_search_view_results', '\\core_search\\external\\view_results', 'execute', NULL, 'moodle', 'moodle/search:query', 'moodle_mobile_app'),
(215, 'core_search_get_top_results', '\\core_search\\external\\get_top_results', 'execute', NULL, 'moodle', 'moodle/search:query', 'moodle_mobile_app'),
(216, 'core_tag_get_tagindex', 'core_tag_external', 'get_tagindex', NULL, 'moodle', '', 'moodle_mobile_app'),
(217, 'core_tag_get_tags', 'core_tag_external', 'get_tags', NULL, 'moodle', '', NULL),
(218, 'core_tag_update_tags', 'core_tag_external', 'update_tags', NULL, 'moodle', '', NULL),
(219, 'core_tag_get_tagindex_per_area', 'core_tag_external', 'get_tagindex_per_area', NULL, 'moodle', '', 'moodle_mobile_app'),
(220, 'core_tag_get_tag_areas', 'core_tag_external', 'get_tag_areas', NULL, 'moodle', '', 'moodle_mobile_app'),
(221, 'core_tag_get_tag_collections', 'core_tag_external', 'get_tag_collections', NULL, 'moodle', '', 'moodle_mobile_app'),
(222, 'core_tag_get_tag_cloud', 'core_tag_external', 'get_tag_cloud', NULL, 'moodle', '', 'moodle_mobile_app'),
(223, 'core_update_inplace_editable', 'core_external', 'update_inplace_editable', 'lib/external/externallib.php', 'moodle', '', NULL),
(224, 'core_user_add_user_device', 'core_user_external', 'add_user_device', 'user/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(225, 'core_user_update_user_device_public_key', '\\core_user\\external\\update_user_device_public_key', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(226, 'core_user_add_user_private_files', 'core_user_external', 'add_user_private_files', 'user/externallib.php', 'moodle', 'moodle/user:manageownfiles', 'moodle_mobile_app'),
(227, 'core_user_create_users', 'core_user_external', 'create_users', 'user/externallib.php', 'moodle', 'moodle/user:create', NULL),
(228, 'core_user_delete_users', 'core_user_external', 'delete_users', 'user/externallib.php', 'moodle', 'moodle/user:delete', NULL),
(229, 'core_user_get_course_user_profiles', 'core_user_external', 'get_course_user_profiles', 'user/externallib.php', 'moodle', 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', 'moodle_mobile_app'),
(230, 'core_user_get_users', 'core_user_external', 'get_users', 'user/externallib.php', 'moodle', 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', NULL),
(231, 'core_user_get_users_by_field', 'core_user_external', 'get_users_by_field', 'user/externallib.php', 'moodle', 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', 'moodle_mobile_app'),
(232, 'core_user_search_identity', '\\core_user\\external\\search_identity', 'execute', NULL, 'moodle', 'moodle/user:viewalldetails', NULL),
(233, 'core_user_remove_user_device', 'core_user_external', 'remove_user_device', 'user/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(234, 'core_user_update_users', 'core_user_external', 'update_users', 'user/externallib.php', 'moodle', 'moodle/user:update', NULL),
(235, 'core_user_update_user_preferences', 'core_user_external', 'update_user_preferences', 'user/externallib.php', 'moodle', 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile', 'moodle_mobile_app'),
(236, 'core_user_view_user_list', 'core_user_external', 'view_user_list', 'user/externallib.php', 'moodle', 'moodle/course:viewparticipants', 'moodle_mobile_app'),
(237, 'core_user_view_user_profile', 'core_user_external', 'view_user_profile', 'user/externallib.php', 'moodle', 'moodle/user:viewdetails', 'moodle_mobile_app'),
(238, 'core_user_get_user_preferences', 'core_user_external', 'get_user_preferences', 'user/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(239, 'core_user_update_picture', 'core_user_external', 'update_picture', 'user/externallib.php', 'moodle', 'moodle/user:editownprofile, moodle/user:editprofile', 'moodle_mobile_app'),
(240, 'core_user_set_user_preferences', 'core_user_external', 'set_user_preferences', 'user/externallib.php', 'moodle', 'moodle/site:config', 'moodle_mobile_app'),
(241, 'core_user_agree_site_policy', 'core_user_external', 'agree_site_policy', 'user/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(242, 'core_user_get_private_files_info', 'core_user_external', 'get_private_files_info', 'user/externallib.php', 'moodle', 'moodle/user:manageownfiles', 'moodle_mobile_app'),
(243, 'core_user_prepare_private_files_for_edition', '\\core_user\\external\\prepare_private_files_for_edition', 'execute', NULL, 'moodle', 'moodle/user:manageownfiles', 'moodle_mobile_app'),
(244, 'core_user_update_private_files', '\\core_user\\external\\update_private_files', 'execute', NULL, 'moodle', 'moodle/user:manageownfiles', 'moodle_mobile_app'),
(245, 'core_competency_create_competency_framework', 'core_competency\\external', 'create_competency_framework', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(246, 'core_competency_read_competency_framework', 'core_competency\\external', 'read_competency_framework', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(247, 'core_competency_duplicate_competency_framework', 'core_competency\\external', 'duplicate_competency_framework', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(248, 'core_competency_delete_competency_framework', 'core_competency\\external', 'delete_competency_framework', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(249, 'core_competency_update_competency_framework', 'core_competency\\external', 'update_competency_framework', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(250, 'core_competency_list_competency_frameworks', 'core_competency\\external', 'list_competency_frameworks', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(251, 'core_competency_count_competency_frameworks', 'core_competency\\external', 'count_competency_frameworks', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(252, 'core_competency_competency_framework_viewed', 'core_competency\\external', 'competency_framework_viewed', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(253, 'core_competency_create_competency', 'core_competency\\external', 'create_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(254, 'core_competency_read_competency', 'core_competency\\external', 'read_competency', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(255, 'core_competency_competency_viewed', 'core_competency\\external', 'competency_viewed', NULL, 'moodle', 'moodle/competency:competencyview', 'moodle_mobile_app'),
(256, 'core_competency_delete_competency', 'core_competency\\external', 'delete_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(257, 'core_competency_update_competency', 'core_competency\\external', 'update_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(258, 'core_competency_list_competencies', 'core_competency\\external', 'list_competencies', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(259, 'core_competency_list_competencies_in_template', 'core_competency\\external', 'list_competencies_in_template', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(260, 'core_competency_count_competencies', 'core_competency\\external', 'count_competencies', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(261, 'core_competency_count_competencies_in_template', 'core_competency\\external', 'count_competencies_in_template', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(262, 'core_competency_search_competencies', 'core_competency\\external', 'search_competencies', NULL, 'moodle', 'moodle/competency:competencyview', NULL),
(263, 'core_competency_set_parent_competency', 'core_competency\\external', 'set_parent_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(264, 'core_competency_move_up_competency', 'core_competency\\external', 'move_up_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(265, 'core_competency_move_down_competency', 'core_competency\\external', 'move_down_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(266, 'core_competency_list_course_module_competencies', 'core_competency\\external', 'list_course_module_competencies', NULL, 'moodle', 'moodle/competency:coursecompetencyview', NULL),
(267, 'core_competency_count_course_module_competencies', 'core_competency\\external', 'count_course_module_competencies', NULL, 'moodle', 'moodle/competency:coursecompetencyview', NULL),
(268, 'core_competency_list_course_competencies', 'core_competency\\external', 'list_course_competencies', NULL, 'moodle', 'moodle/competency:coursecompetencyview', 'moodle_mobile_app'),
(269, 'core_competency_count_competencies_in_course', 'core_competency\\external', 'count_competencies_in_course', NULL, 'moodle', 'moodle/competency:coursecompetencyview', NULL),
(270, 'core_competency_count_courses_using_competency', 'core_competency\\external', 'count_courses_using_competency', NULL, 'moodle', 'moodle/competency:coursecompetencyview', NULL),
(271, 'core_competency_add_competency_to_course', 'core_competency\\external', 'add_competency_to_course', NULL, 'moodle', 'moodle/competency:coursecompetencymanage', NULL),
(272, 'core_competency_add_competency_to_template', 'core_competency\\external', 'add_competency_to_template', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(273, 'core_competency_remove_competency_from_course', 'core_competency\\external', 'remove_competency_from_course', NULL, 'moodle', 'moodle/competency:coursecompetencymanage', NULL),
(274, 'core_competency_set_course_competency_ruleoutcome', 'core_competency\\external', 'set_course_competency_ruleoutcome', NULL, 'moodle', 'moodle/competency:coursecompetencymanage', NULL),
(275, 'core_competency_remove_competency_from_template', 'core_competency\\external', 'remove_competency_from_template', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(276, 'core_competency_reorder_course_competency', 'core_competency\\external', 'reorder_course_competency', NULL, 'moodle', 'moodle/competency:coursecompetencymanage', NULL),
(277, 'core_competency_reorder_template_competency', 'core_competency\\external', 'reorder_template_competency', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(278, 'core_competency_create_template', 'core_competency\\external', 'create_template', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(279, 'core_competency_duplicate_template', 'core_competency\\external', 'duplicate_template', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(280, 'core_competency_read_template', 'core_competency\\external', 'read_template', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(281, 'core_competency_delete_template', 'core_competency\\external', 'delete_template', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(282, 'core_competency_update_template', 'core_competency\\external', 'update_template', NULL, 'moodle', 'moodle/competency:templatemanage', NULL),
(283, 'core_competency_list_templates', 'core_competency\\external', 'list_templates', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(284, 'core_competency_list_templates_using_competency', 'core_competency\\external', 'list_templates_using_competency', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(285, 'core_competency_count_templates', 'core_competency\\external', 'count_templates', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(286, 'core_competency_count_templates_using_competency', 'core_competency\\external', 'count_templates_using_competency', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(287, 'core_competency_create_plan', 'core_competency\\external', 'create_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(288, 'core_competency_update_plan', 'core_competency\\external', 'update_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(289, 'core_competency_complete_plan', 'core_competency\\external', 'complete_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(290, 'core_competency_reopen_plan', 'core_competency\\external', 'reopen_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(291, 'core_competency_read_plan', 'core_competency\\external', 'read_plan', NULL, 'moodle', 'moodle/competency:planviewown', NULL),
(292, 'core_competency_delete_plan', 'core_competency\\external', 'delete_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(293, 'core_competency_list_user_plans', 'core_competency\\external', 'list_user_plans', NULL, 'moodle', 'moodle/competency:planviewown', NULL),
(294, 'core_competency_list_plan_competencies', 'core_competency\\external', 'list_plan_competencies', NULL, 'moodle', 'moodle/competency:planviewown', NULL),
(295, 'core_competency_add_competency_to_plan', 'core_competency\\external', 'add_competency_to_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(296, 'core_competency_remove_competency_from_plan', 'core_competency\\external', 'remove_competency_from_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(297, 'core_competency_reorder_plan_competency', 'core_competency\\external', 'reorder_plan_competency', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(298, 'core_competency_plan_request_review', 'core_competency\\external', 'plan_request_review', NULL, 'moodle', 'moodle/competency:planmanagedraft', NULL),
(299, 'core_competency_plan_start_review', 'core_competency\\external', 'plan_start_review', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(300, 'core_competency_plan_stop_review', 'core_competency\\external', 'plan_stop_review', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(301, 'core_competency_plan_cancel_review_request', 'core_competency\\external', 'plan_cancel_review_request', NULL, 'moodle', 'moodle/competency:planmanagedraft', NULL),
(302, 'core_competency_approve_plan', 'core_competency\\external', 'approve_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(303, 'core_competency_unapprove_plan', 'core_competency\\external', 'unapprove_plan', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(304, 'core_competency_template_has_related_data', 'core_competency\\external', 'template_has_related_data', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(305, 'core_competency_get_scale_values', 'core_competency\\external', 'get_scale_values', NULL, 'moodle', 'moodle/competency:competencymanage', 'moodle_mobile_app'),
(306, 'core_competency_add_related_competency', 'core_competency\\external', 'add_related_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(307, 'core_competency_remove_related_competency', 'core_competency\\external', 'remove_related_competency', NULL, 'moodle', 'moodle/competency:competencymanage', NULL),
(308, 'core_competency_read_user_evidence', 'core_competency\\external', 'read_user_evidence', NULL, 'moodle', 'moodle/competency:userevidenceview', NULL),
(309, 'core_competency_delete_user_evidence', 'core_competency\\external', 'delete_user_evidence', NULL, 'moodle', 'moodle/competency:userevidencemanageown', NULL),
(310, 'core_competency_create_user_evidence_competency', 'core_competency\\external', 'create_user_evidence_competency', NULL, 'moodle', 'moodle/competency:userevidencemanageown, moodle/competency:competencyview', NULL),
(311, 'core_competency_delete_user_evidence_competency', 'core_competency\\external', 'delete_user_evidence_competency', NULL, 'moodle', 'moodle/competency:userevidencemanageown', NULL),
(312, 'core_competency_user_competency_cancel_review_request', 'core_competency\\external', 'user_competency_cancel_review_request', NULL, 'moodle', 'moodle/competency:userevidencemanageown', NULL),
(313, 'core_competency_user_competency_request_review', 'core_competency\\external', 'user_competency_request_review', NULL, 'moodle', 'moodle/competency:userevidencemanageown', NULL),
(314, 'core_competency_user_competency_start_review', 'core_competency\\external', 'user_competency_start_review', NULL, 'moodle', 'moodle/competency:competencygrade', NULL),
(315, 'core_competency_user_competency_stop_review', 'core_competency\\external', 'user_competency_stop_review', NULL, 'moodle', 'moodle/competency:competencygrade', NULL),
(316, 'core_competency_user_competency_viewed', 'core_competency\\external', 'user_competency_viewed', NULL, 'moodle', 'moodle/competency:usercompetencyview', 'moodle_mobile_app'),
(317, 'core_competency_user_competency_viewed_in_plan', 'core_competency\\external', 'user_competency_viewed_in_plan', NULL, 'moodle', 'moodle/competency:usercompetencyview', 'moodle_mobile_app'),
(318, 'core_competency_user_competency_viewed_in_course', 'core_competency\\external', 'user_competency_viewed_in_course', NULL, 'moodle', 'moodle/competency:usercompetencyview', 'moodle_mobile_app'),
(319, 'core_competency_user_competency_plan_viewed', 'core_competency\\external', 'user_competency_plan_viewed', NULL, 'moodle', 'moodle/competency:usercompetencyview', 'moodle_mobile_app'),
(320, 'core_competency_grade_competency', 'core_competency\\external', 'grade_competency', NULL, 'moodle', 'moodle/competency:competencygrade', NULL),
(321, 'core_competency_grade_competency_in_plan', 'core_competency\\external', 'grade_competency_in_plan', NULL, 'moodle', 'moodle/competency:competencygrade', NULL);
INSERT INTO `[[dbprefix]]external_functions` VALUES
(322, 'core_competency_grade_competency_in_course', 'core_competency\\external', 'grade_competency_in_course', NULL, 'moodle', 'moodle/competency:competencygrade', 'moodle_mobile_app'),
(323, 'core_competency_unlink_plan_from_template', 'core_competency\\external', 'unlink_plan_from_template', NULL, 'moodle', 'moodle/competency:planmanage', NULL),
(324, 'core_competency_template_viewed', 'core_competency\\external', 'template_viewed', NULL, 'moodle', 'moodle/competency:templateview', NULL),
(325, 'core_competency_request_review_of_user_evidence_linked_competencies', 'core_competency\\external', 'request_review_of_user_evidence_linked_competencies', NULL, 'moodle', 'moodle/competency:userevidencemanageown', NULL),
(326, 'core_competency_update_course_competency_settings', 'core_competency\\external', 'update_course_competency_settings', NULL, 'moodle', 'moodle/competency:coursecompetencyconfigure', NULL),
(327, 'core_competency_delete_evidence', 'core_competency\\external', 'delete_evidence', NULL, 'moodle', 'moodle/competency:evidencedelete', 'moodle_mobile_app'),
(328, 'core_webservice_get_site_info', 'core_webservice_external', 'get_site_info', 'webservice/externallib.php', 'moodle', '', 'moodle_mobile_app'),
(329, 'core_block_get_course_blocks', 'core_block_external', 'get_course_blocks', NULL, 'moodle', '', 'moodle_mobile_app'),
(330, 'core_block_get_dashboard_blocks', 'core_block_external', 'get_dashboard_blocks', NULL, 'moodle', '', 'moodle_mobile_app'),
(331, 'core_block_fetch_addable_blocks', 'core_block\\external\\fetch_addable_blocks', 'execute', NULL, 'moodle', 'moodle/site:manageblocks', 'moodle_mobile_app'),
(332, 'core_filters_get_available_in_context', 'core_filters\\external\\get_available_in_context', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(333, 'core_filters_get_all_states', 'core_filters\\external\\get_all_states', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(334, 'core_customfield_delete_field', 'core_customfield_external', 'delete_field', 'customfield/externallib.php', 'moodle', '', NULL),
(335, 'core_customfield_reload_template', 'core_customfield_external', 'reload_template', 'customfield/externallib.php', 'moodle', '', NULL),
(336, 'core_customfield_create_category', 'core_customfield_external', 'create_category', 'customfield/externallib.php', 'moodle', '', NULL),
(337, 'core_customfield_delete_category', 'core_customfield_external', 'delete_category', 'customfield/externallib.php', 'moodle', '', NULL),
(338, 'core_customfield_move_field', 'core_customfield_external', 'move_field', 'customfield/externallib.php', 'moodle', '', NULL),
(339, 'core_customfield_move_category', 'core_customfield_external', 'move_category', 'customfield/externallib.php', 'moodle', '', NULL),
(340, 'core_h5p_get_trusted_h5p_file', 'core_h5p\\external', 'get_trusted_h5p_file', NULL, 'moodle', '', 'moodle_mobile_app'),
(341, 'core_table_get_dynamic_table_content', 'core_table\\external\\dynamic\\get', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(342, 'core_xapi_statement_post', 'core_xapi\\external\\post_statement', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(343, 'core_xapi_post_state', 'core_xapi\\external\\post_state', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(344, 'core_xapi_get_state', 'core_xapi\\external\\get_state', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(345, 'core_xapi_get_states', 'core_xapi\\external\\get_states', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(346, 'core_xapi_delete_state', 'core_xapi\\external\\delete_state', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(347, 'core_xapi_delete_states', 'core_xapi\\external\\delete_states', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(348, 'core_contentbank_delete_content', 'core_contentbank\\external\\delete_content', 'execute', NULL, 'moodle', 'moodle/contentbank:deleteanycontent', NULL),
(349, 'core_contentbank_rename_content', 'core_contentbank\\external\\rename_content', 'execute', NULL, 'moodle', 'moodle/contentbank:manageowncontent', NULL),
(350, 'core_contentbank_copy_content', 'core_contentbank\\external\\copy_content', 'execute', NULL, 'moodle', 'moodle/contentbank:copycontent, moodle/contentbank:copyanycontent', NULL),
(351, 'core_contentbank_set_content_visibility', 'core_contentbank\\external\\set_content_visibility', 'execute', NULL, 'moodle', 'moodle/contentbank:manageowncontent', NULL),
(352, 'core_create_userfeedback_action_record', 'core\\external\\record_userfeedback_action', 'execute', NULL, 'moodle', '', NULL),
(353, 'core_payment_get_available_gateways', 'core_payment\\external\\get_available_gateways', 'execute', NULL, 'moodle', '', NULL),
(354, 'core_reportbuilder_filters_reset', 'core_reportbuilder\\external\\filters\\reset', 'execute', NULL, 'moodle', '', NULL),
(355, 'core_reportbuilder_set_filters', 'core_reportbuilder\\external\\filters\\set', 'execute', NULL, 'moodle', '', NULL),
(356, 'core_dynamic_tabs_get_content', 'core\\external\\dynamic_tabs_get_content', 'execute', NULL, 'moodle', '', NULL),
(357, 'core_change_editmode', 'core\\external\\editmode', 'change_editmode', NULL, 'moodle', '', NULL),
(358, 'core_reportbuilder_reports_delete', 'core_reportbuilder\\external\\reports\\delete', 'execute', NULL, 'moodle', '', NULL),
(359, 'core_reportbuilder_reports_get', 'core_reportbuilder\\external\\reports\\get', 'execute', NULL, 'moodle', '', NULL),
(360, 'core_reportbuilder_list_reports', 'core_reportbuilder\\external\\reports\\listing', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(361, 'core_reportbuilder_retrieve_report', 'core_reportbuilder\\external\\reports\\retrieve', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(362, 'core_reportbuilder_retrieve_system_report', 'core_reportbuilder\\external\\systemreports\\retrieve', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(363, 'core_reportbuilder_can_view_system_report', 'core_reportbuilder\\external\\systemreports\\can_view', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(364, 'core_reportbuilder_view_report', 'core_reportbuilder\\external\\reports\\view', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(365, 'core_reportbuilder_columns_add', 'core_reportbuilder\\external\\columns\\add', 'execute', NULL, 'moodle', '', NULL),
(366, 'core_reportbuilder_columns_delete', 'core_reportbuilder\\external\\columns\\delete', 'execute', NULL, 'moodle', '', NULL),
(367, 'core_reportbuilder_columns_reorder', 'core_reportbuilder\\external\\columns\\reorder', 'execute', NULL, 'moodle', '', NULL),
(368, 'core_reportbuilder_columns_sort_get', 'core_reportbuilder\\external\\columns\\sort\\get', 'execute', NULL, 'moodle', '', NULL),
(369, 'core_reportbuilder_columns_sort_reorder', 'core_reportbuilder\\external\\columns\\sort\\reorder', 'execute', NULL, 'moodle', '', NULL),
(370, 'core_reportbuilder_columns_sort_toggle', 'core_reportbuilder\\external\\columns\\sort\\toggle', 'execute', NULL, 'moodle', '', NULL),
(371, 'core_reportbuilder_conditions_add', 'core_reportbuilder\\external\\conditions\\add', 'execute', NULL, 'moodle', '', NULL),
(372, 'core_reportbuilder_conditions_delete', 'core_reportbuilder\\external\\conditions\\delete', 'execute', NULL, 'moodle', '', NULL),
(373, 'core_reportbuilder_conditions_reorder', 'core_reportbuilder\\external\\conditions\\reorder', 'execute', NULL, 'moodle', '', NULL),
(374, 'core_reportbuilder_conditions_reset', 'core_reportbuilder\\external\\conditions\\reset', 'execute', NULL, 'moodle', '', NULL),
(375, 'core_reportbuilder_filters_add', 'core_reportbuilder\\external\\filters\\add', 'execute', NULL, 'moodle', '', NULL),
(376, 'core_reportbuilder_filters_delete', 'core_reportbuilder\\external\\filters\\delete', 'execute', NULL, 'moodle', '', NULL),
(377, 'core_reportbuilder_filters_reorder', 'core_reportbuilder\\external\\filters\\reorder', 'execute', NULL, 'moodle', '', NULL),
(378, 'core_reportbuilder_audiences_delete', 'core_reportbuilder\\external\\audiences\\delete', 'execute', NULL, 'moodle', '', NULL),
(379, 'core_reportbuilder_schedules_delete', 'core_reportbuilder\\external\\schedules\\delete', 'execute', NULL, 'moodle', '', NULL),
(380, 'core_reportbuilder_schedules_send', 'core_reportbuilder\\external\\schedules\\send', 'execute', NULL, 'moodle', '', NULL),
(381, 'core_reportbuilder_schedules_toggle', 'core_reportbuilder\\external\\schedules\\toggle', 'execute', NULL, 'moodle', '', NULL),
(382, 'core_admin_set_plugin_state', 'core_admin\\external\\set_plugin_state', 'execute', NULL, 'moodle', '', NULL),
(383, 'core_admin_set_plugin_order', 'core_admin\\external\\set_plugin_order', 'execute', NULL, 'moodle', '', NULL),
(384, 'core_admin_set_block_protection', 'core_admin\\external\\set_block_protection', 'execute', NULL, 'moodle', '', NULL),
(385, 'core_moodlenet_send_activity', 'core\\external\\moodlenet_send_activity', 'execute', NULL, 'moodle', '', NULL),
(386, 'core_moodlenet_get_share_info_activity', 'core\\external\\moodlenet_get_share_info_activity', 'execute', NULL, 'moodle', '', NULL),
(387, 'core_moodlenet_auth_check', 'core\\external\\moodlenet_auth_check', 'execute', NULL, 'moodle', '', NULL),
(388, 'core_moodlenet_get_shared_course_info', 'core\\external\\moodlenet_get_shared_course_info', 'execute', NULL, 'moodle', '', NULL),
(389, 'core_moodlenet_send_course', 'core\\external\\moodlenet_send_course', 'execute', NULL, 'moodle', '', NULL),
(390, 'core_output_poll_stored_progress', 'core\\external\\output\\poll_stored_progress', 'execute', NULL, 'moodle', '', NULL),
(391, 'core_ai_delete_provider_instance', 'core_ai\\external\\delete_provider_instance', 'execute', NULL, 'moodle', '', NULL),
(392, 'core_ai_set_policy_status', 'core_ai\\external\\set_policy_status', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(393, 'core_ai_get_policy_status', 'core_ai\\external\\get_policy_status', 'execute', NULL, 'moodle', '', 'moodle_mobile_app'),
(394, 'core_ai_set_action', 'core_ai\\external\\set_action', 'execute', NULL, 'moodle', '', NULL),
(395, 'core_ai_set_provider_status', 'core_ai\\external\\set_provider_status', 'execute', NULL, 'moodle', '', NULL),
(396, 'core_ai_set_provider_order', 'core_ai\\external\\set_provider_order', 'execute', NULL, 'moodle', '', NULL),
(397, 'core_sms_set_gateway_status', 'core_sms\\external\\sms_gateway_status', 'execute', NULL, 'moodle', '', NULL),
(398, 'core_question_move_questions', '\\core_question\\external\\move_questions', 'execute', NULL, 'moodle', '', NULL),
(399, 'core_question_search_shared_banks', '\\core_question\\external\\search_shared_banks', 'execute', NULL, 'moodle', '', NULL),
(400, 'core_message_set_unsent_message', 'core_message\\external\\set_unsent_message', 'execute', NULL, 'moodle', '', NULL),
(401, 'core_message_get_unsent_message', 'core_message\\external\\get_unsent_message', 'execute', NULL, 'moodle', '', NULL),
(402, 'aiplacement_courseassist_summarise_text', 'aiplacement_courseassist\\external\\summarise_text', 'execute', NULL, 'aiplacement_courseassist', '', 'moodle_mobile_app'),
(403, 'aiplacement_courseassist_explain_text', 'aiplacement_courseassist\\external\\explain_text', 'execute', NULL, 'aiplacement_courseassist', '', 'moodle_mobile_app'),
(404, 'aiplacement_editor_generate_image', 'aiplacement_editor\\external\\generate_image', 'execute', NULL, 'aiplacement_editor', '', 'moodle_mobile_app'),
(405, 'aiplacement_editor_generate_text', 'aiplacement_editor\\external\\generate_text', 'execute', NULL, 'aiplacement_editor', '', 'moodle_mobile_app'),
(406, 'mod_assign_copy_previous_attempt', 'mod_assign_external', 'copy_previous_attempt', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view, mod/assign:submit', NULL),
(407, 'mod_assign_get_grades', 'mod_assign_external', 'get_grades', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(408, 'mod_assign_get_assignments', 'mod_assign_external', 'get_assignments', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(409, 'mod_assign_get_submissions', 'mod_assign_external', 'get_submissions', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(410, 'mod_assign_get_user_flags', 'mod_assign_external', 'get_user_flags', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(411, 'mod_assign_set_user_flags', 'mod_assign_external', 'set_user_flags', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:grade', 'moodle_mobile_app'),
(412, 'mod_assign_get_user_mappings', 'mod_assign_external', 'get_user_mappings', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(413, 'mod_assign_revert_submissions_to_draft', 'mod_assign_external', 'revert_submissions_to_draft', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(414, 'mod_assign_lock_submissions', 'mod_assign_external', 'lock_submissions', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(415, 'mod_assign_unlock_submissions', 'mod_assign_external', 'unlock_submissions', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(416, 'mod_assign_save_submission', 'mod_assign_external', 'save_submission', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(417, 'mod_assign_submit_for_grading', 'mod_assign_external', 'submit_for_grading', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(418, 'mod_assign_save_grade', 'mod_assign_external', 'save_grade', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(419, 'mod_assign_save_grades', 'mod_assign_external', 'save_grades', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(420, 'mod_assign_save_user_extensions', 'mod_assign_external', 'save_user_extensions', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(421, 'mod_assign_reveal_identities', 'mod_assign_external', 'reveal_identities', 'mod/assign/externallib.php', 'mod_assign', '', 'moodle_mobile_app'),
(422, 'mod_assign_view_grading_table', 'mod_assign_external', 'view_grading_table', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view, mod/assign:viewgrades', 'moodle_mobile_app'),
(423, 'mod_assign_view_submission_status', 'mod_assign_external', 'view_submission_status', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view', 'moodle_mobile_app'),
(424, 'mod_assign_get_submission_status', 'mod_assign_external', 'get_submission_status', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view', 'moodle_mobile_app'),
(425, 'mod_assign_list_participants', 'mod_assign_external', 'list_participants', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view, mod/assign:viewgrades', 'moodle_mobile_app'),
(426, 'mod_assign_submit_grading_form', 'mod_assign_external', 'submit_grading_form', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:grade', 'moodle_mobile_app'),
(427, 'mod_assign_get_participant', 'mod_assign_external', 'get_participant', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view, mod/assign:viewgrades', 'moodle_mobile_app'),
(428, 'mod_assign_view_assign', 'mod_assign_external', 'view_assign', 'mod/assign/externallib.php', 'mod_assign', 'mod/assign:view', 'moodle_mobile_app'),
(429, 'mod_assign_start_submission', 'mod_assign\\external\\start_submission', 'execute', NULL, 'mod_assign', 'mod/assign:view', 'moodle_mobile_app'),
(430, 'mod_assign_remove_submission', 'mod_assign\\external\\remove_submission', 'execute', NULL, 'mod_assign', 'mod/assign:submit', 'moodle_mobile_app'),
(431, 'mod_bigbluebuttonbn_can_join', 'mod_bigbluebuttonbn\\external\\can_join', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:view', 'moodle_mobile_app'),
(432, 'mod_bigbluebuttonbn_get_recordings', 'mod_bigbluebuttonbn\\external\\get_recordings', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:view', 'moodle_mobile_app'),
(433, 'mod_bigbluebuttonbn_get_recordings_to_import', 'mod_bigbluebuttonbn\\external\\get_recordings_to_import', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:importrecordings', 'moodle_mobile_app'),
(434, 'mod_bigbluebuttonbn_update_recording', 'mod_bigbluebuttonbn\\external\\update_recording', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:managerecordings', 'moodle_mobile_app'),
(435, 'mod_bigbluebuttonbn_end_meeting', 'mod_bigbluebuttonbn\\external\\end_meeting', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:join', 'moodle_mobile_app'),
(436, 'mod_bigbluebuttonbn_completion_validate', 'mod_bigbluebuttonbn\\external\\completion_validate', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:view', 'moodle_mobile_app'),
(437, 'mod_bigbluebuttonbn_meeting_info', 'mod_bigbluebuttonbn\\external\\meeting_info', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:view', 'moodle_mobile_app'),
(438, 'mod_bigbluebuttonbn_get_bigbluebuttonbns_by_courses', 'mod_bigbluebuttonbn\\external\\get_bigbluebuttonbns_by_courses', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:view', 'moodle_mobile_app'),
(439, 'mod_bigbluebuttonbn_view_bigbluebuttonbn', 'mod_bigbluebuttonbn\\external\\view_bigbluebuttonbn', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:view', 'moodle_mobile_app'),
(440, 'mod_bigbluebuttonbn_get_join_url', 'mod_bigbluebuttonbn\\external\\get_join_url', 'execute', NULL, 'mod_bigbluebuttonbn', 'mod/bigbluebuttonbn:join', 'moodle_mobile_app'),
(441, 'mod_book_view_book', 'mod_book_external', 'view_book', NULL, 'mod_book', 'mod/book:read', 'moodle_mobile_app'),
(442, 'mod_book_get_books_by_courses', 'mod_book_external', 'get_books_by_courses', NULL, 'mod_book', '', 'moodle_mobile_app'),
(443, 'mod_choice_get_choice_results', 'mod_choice_external', 'get_choice_results', NULL, 'mod_choice', '', 'moodle_mobile_app'),
(444, 'mod_choice_get_choice_options', 'mod_choice_external', 'get_choice_options', NULL, 'mod_choice', 'mod/choice:choose', 'moodle_mobile_app'),
(445, 'mod_choice_submit_choice_response', 'mod_choice_external', 'submit_choice_response', NULL, 'mod_choice', 'mod/choice:choose', 'moodle_mobile_app'),
(446, 'mod_choice_view_choice', 'mod_choice_external', 'view_choice', NULL, 'mod_choice', '', 'moodle_mobile_app'),
(447, 'mod_choice_get_choices_by_courses', 'mod_choice_external', 'get_choices_by_courses', NULL, 'mod_choice', '', 'moodle_mobile_app'),
(448, 'mod_choice_delete_choice_responses', 'mod_choice_external', 'delete_choice_responses', NULL, 'mod_choice', 'mod/choice:choose', 'moodle_mobile_app'),
(449, 'mod_data_get_databases_by_courses', 'mod_data_external', 'get_databases_by_courses', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(450, 'mod_data_view_database', 'mod_data_external', 'view_database', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(451, 'mod_data_get_data_access_information', 'mod_data_external', 'get_data_access_information', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(452, 'mod_data_get_entries', 'mod_data_external', 'get_entries', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(453, 'mod_data_get_entry', 'mod_data_external', 'get_entry', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(454, 'mod_data_get_fields', 'mod_data_external', 'get_fields', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(455, 'mod_data_search_entries', 'mod_data_external', 'search_entries', NULL, 'mod_data', 'mod/data:viewentry', 'moodle_mobile_app'),
(456, 'mod_data_approve_entry', 'mod_data_external', 'approve_entry', NULL, 'mod_data', 'mod/data:approve', 'moodle_mobile_app'),
(457, 'mod_data_delete_entry', 'mod_data_external', 'delete_entry', NULL, 'mod_data', 'mod/data:manageentries', 'moodle_mobile_app'),
(458, 'mod_data_add_entry', 'mod_data_external', 'add_entry', NULL, 'mod_data', 'mod/data:writeentry', 'moodle_mobile_app'),
(459, 'mod_data_update_entry', 'mod_data_external', 'update_entry', NULL, 'mod_data', 'mod/data:writeentry', 'moodle_mobile_app'),
(460, 'mod_data_delete_saved_preset', 'mod_data\\external\\delete_saved_preset', 'execute', NULL, 'mod_data', 'mod/data:manageuserpresets', NULL),
(461, 'mod_data_get_mapping_information', 'mod_data\\external\\get_mapping_information', 'execute', NULL, 'mod_data', 'mod/data:managetemplates', NULL),
(462, 'mod_feedback_get_feedbacks_by_courses', 'mod_feedback_external', 'get_feedbacks_by_courses', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(463, 'mod_feedback_get_feedback_access_information', 'mod_feedback_external', 'get_feedback_access_information', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(464, 'mod_feedback_view_feedback', 'mod_feedback_external', 'view_feedback', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(465, 'mod_feedback_get_current_completed_tmp', 'mod_feedback_external', 'get_current_completed_tmp', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(466, 'mod_feedback_get_items', 'mod_feedback_external', 'get_items', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(467, 'mod_feedback_launch_feedback', 'mod_feedback_external', 'launch_feedback', NULL, 'mod_feedback', 'mod/feedback:complete', 'moodle_mobile_app'),
(468, 'mod_feedback_get_page_items', 'mod_feedback_external', 'get_page_items', NULL, 'mod_feedback', 'mod/feedback:complete', 'moodle_mobile_app'),
(469, 'mod_feedback_process_page', 'mod_feedback_external', 'process_page', NULL, 'mod_feedback', 'mod/feedback:complete', 'moodle_mobile_app'),
(470, 'mod_feedback_get_analysis', 'mod_feedback_external', 'get_analysis', NULL, 'mod_feedback', 'mod/feedback:viewanalysepage', 'moodle_mobile_app'),
(471, 'mod_feedback_get_unfinished_responses', 'mod_feedback_external', 'get_unfinished_responses', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(472, 'mod_feedback_get_finished_responses', 'mod_feedback_external', 'get_finished_responses', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(473, 'mod_feedback_get_non_respondents', 'mod_feedback_external', 'get_non_respondents', NULL, 'mod_feedback', 'mod/feedback:viewreports', 'moodle_mobile_app'),
(474, 'mod_feedback_get_responses_analysis', 'mod_feedback_external', 'get_responses_analysis', NULL, 'mod_feedback', 'mod/feedback:viewreports', 'moodle_mobile_app'),
(475, 'mod_feedback_get_last_completed', 'mod_feedback_external', 'get_last_completed', NULL, 'mod_feedback', 'mod/feedback:view', 'moodle_mobile_app'),
(476, 'mod_feedback_questions_reorder', 'mod_feedback\\external\\questions\\reorder', 'execute', NULL, 'mod_feedback', 'mod/feedback:edititems', NULL),
(477, 'mod_folder_view_folder', 'mod_folder_external', 'view_folder', NULL, 'mod_folder', 'mod/folder:view', 'moodle_mobile_app'),
(478, 'mod_folder_get_folders_by_courses', 'mod_folder_external', 'get_folders_by_courses', NULL, 'mod_folder', 'mod/folder:view', 'moodle_mobile_app'),
(479, 'mod_forum_get_forums_by_courses', 'mod_forum_external', 'get_forums_by_courses', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:viewdiscussion', 'moodle_mobile_app'),
(480, 'mod_forum_get_discussion_posts', 'mod_forum_external', 'get_discussion_posts', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting', 'moodle_mobile_app'),
(481, 'mod_forum_get_forum_discussions', 'mod_forum_external', 'get_forum_discussions', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting', 'moodle_mobile_app'),
(482, 'mod_forum_view_forum', 'mod_forum_external', 'view_forum', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:viewdiscussion', 'moodle_mobile_app'),
(483, 'mod_forum_view_forum_discussion', 'mod_forum_external', 'view_forum_discussion', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:viewdiscussion', 'moodle_mobile_app'),
(484, 'mod_forum_add_discussion_post', 'mod_forum_external', 'add_discussion_post', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:replypost', 'moodle_mobile_app'),
(485, 'mod_forum_add_discussion', 'mod_forum_external', 'add_discussion', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:startdiscussion', 'moodle_mobile_app'),
(486, 'mod_forum_can_add_discussion', 'mod_forum_external', 'can_add_discussion', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(487, 'mod_forum_get_forum_access_information', 'mod_forum_external', 'get_forum_access_information', NULL, 'mod_forum', '', 'moodle_mobile_app'),
(488, 'mod_forum_set_subscription_state', 'mod_forum_external', 'set_subscription_state', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(489, 'mod_forum_set_lock_state', 'mod_forum_external', 'set_lock_state', 'mod/forum/externallib.php', 'mod_forum', 'moodle/course:manageactivities', 'moodle_mobile_app'),
(490, 'mod_forum_toggle_favourite_state', 'mod_forum_external', 'toggle_favourite_state', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(491, 'mod_forum_set_pin_state', 'mod_forum_external', 'set_pin_state', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(492, 'mod_forum_delete_post', 'mod_forum_external', 'delete_post', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(493, 'mod_forum_get_discussion_posts_by_userid', 'mod_forum_external', 'get_discussion_posts_by_userid', 'mod/forum/externallib.php', 'mod_forum', 'mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting', NULL),
(494, 'mod_forum_get_discussion_post', 'mod_forum_external', 'get_discussion_post', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(495, 'mod_forum_prepare_draft_area_for_post', 'mod_forum_external', 'prepare_draft_area_for_post', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(496, 'mod_forum_update_discussion_post', 'mod_forum_external', 'update_discussion_post', 'mod/forum/externallib.php', 'mod_forum', '', 'moodle_mobile_app'),
(497, 'mod_glossary_get_glossaries_by_courses', 'mod_glossary_external', 'get_glossaries_by_courses', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(498, 'mod_glossary_view_glossary', 'mod_glossary_external', 'view_glossary', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(499, 'mod_glossary_view_entry', 'mod_glossary_external', 'view_entry', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(500, 'mod_glossary_get_entries_by_letter', 'mod_glossary_external', 'get_entries_by_letter', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(501, 'mod_glossary_get_entries_by_date', 'mod_glossary_external', 'get_entries_by_date', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(502, 'mod_glossary_get_categories', 'mod_glossary_external', 'get_categories', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(503, 'mod_glossary_get_entries_by_category', 'mod_glossary_external', 'get_entries_by_category', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(504, 'mod_glossary_get_authors', 'mod_glossary_external', 'get_authors', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(505, 'mod_glossary_get_entries_by_author', 'mod_glossary_external', 'get_entries_by_author', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(506, 'mod_glossary_get_entries_by_author_id', 'mod_glossary_external', 'get_entries_by_author_id', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(507, 'mod_glossary_get_entries_by_search', 'mod_glossary_external', 'get_entries_by_search', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(508, 'mod_glossary_get_entries_by_term', 'mod_glossary_external', 'get_entries_by_term', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(509, 'mod_glossary_get_entries_to_approve', 'mod_glossary_external', 'get_entries_to_approve', NULL, 'mod_glossary', 'mod/glossary:approve', 'moodle_mobile_app'),
(510, 'mod_glossary_get_entry_by_id', 'mod_glossary_external', 'get_entry_by_id', NULL, 'mod_glossary', 'mod/glossary:view', 'moodle_mobile_app'),
(511, 'mod_glossary_add_entry', 'mod_glossary_external', 'add_entry', NULL, 'mod_glossary', 'mod/glossary:write', 'moodle_mobile_app'),
(512, 'mod_glossary_delete_entry', 'mod_glossary\\external\\delete_entry', 'execute', NULL, 'mod_glossary', '', 'moodle_mobile_app'),
(513, 'mod_glossary_update_entry', 'mod_glossary\\external\\update_entry', 'execute', NULL, 'mod_glossary', '', 'moodle_mobile_app'),
(514, 'mod_glossary_prepare_entry_for_edition', 'mod_glossary\\external\\prepare_entry', 'execute', NULL, 'mod_glossary', '', 'moodle_mobile_app'),
(515, 'mod_h5pactivity_get_h5pactivity_access_information', 'mod_h5pactivity\\external\\get_h5pactivity_access_information', 'execute', NULL, 'mod_h5pactivity', 'mod/h5pactivity:view', 'moodle_mobile_app'),
(516, 'mod_h5pactivity_view_h5pactivity', 'mod_h5pactivity\\external\\view_h5pactivity', 'execute', NULL, 'mod_h5pactivity', 'mod/h5pactivity:view', 'moodle_mobile_app'),
(517, 'mod_h5pactivity_get_attempts', 'mod_h5pactivity\\external\\get_attempts', 'execute', NULL, 'mod_h5pactivity', 'mod/h5pactivity:view', 'moodle_mobile_app'),
(518, 'mod_h5pactivity_get_results', 'mod_h5pactivity\\external\\get_results', 'execute', NULL, 'mod_h5pactivity', 'mod/h5pactivity:view', 'moodle_mobile_app'),
(519, 'mod_h5pactivity_get_h5pactivities_by_courses', 'mod_h5pactivity\\external\\get_h5pactivities_by_courses', 'execute', NULL, 'mod_h5pactivity', 'mod/h5pactivity:view', 'moodle_mobile_app'),
(520, 'mod_h5pactivity_log_report_viewed', 'mod_h5pactivity\\external\\log_report_viewed', 'execute', NULL, 'mod_h5pactivity', '', 'moodle_mobile_app'),
(521, 'mod_h5pactivity_get_user_attempts', 'mod_h5pactivity\\external\\get_user_attempts', 'execute', NULL, 'mod_h5pactivity', 'mod/h5pactivity:reviewattempts', 'moodle_mobile_app'),
(522, 'mod_imscp_view_imscp', 'mod_imscp_external', 'view_imscp', NULL, 'mod_imscp', 'mod/imscp:view', 'moodle_mobile_app'),
(523, 'mod_imscp_get_imscps_by_courses', 'mod_imscp_external', 'get_imscps_by_courses', NULL, 'mod_imscp', 'mod/imscp:view', 'moodle_mobile_app'),
(524, 'mod_label_get_labels_by_courses', 'mod_label_external', 'get_labels_by_courses', NULL, 'mod_label', 'mod/label:view', 'moodle_mobile_app'),
(525, 'mod_lesson_get_lessons_by_courses', 'mod_lesson_external', 'get_lessons_by_courses', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(526, 'mod_lesson_get_lesson_access_information', 'mod_lesson_external', 'get_lesson_access_information', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(527, 'mod_lesson_view_lesson', 'mod_lesson_external', 'view_lesson', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(528, 'mod_lesson_get_questions_attempts', 'mod_lesson_external', 'get_questions_attempts', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(529, 'mod_lesson_get_user_grade', 'mod_lesson_external', 'get_user_grade', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(530, 'mod_lesson_get_user_attempt_grade', 'mod_lesson_external', 'get_user_attempt_grade', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(531, 'mod_lesson_get_content_pages_viewed', 'mod_lesson_external', 'get_content_pages_viewed', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(532, 'mod_lesson_get_user_timers', 'mod_lesson_external', 'get_user_timers', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(533, 'mod_lesson_get_pages', 'mod_lesson_external', 'get_pages', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(534, 'mod_lesson_launch_attempt', 'mod_lesson_external', 'launch_attempt', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(535, 'mod_lesson_get_page_data', 'mod_lesson_external', 'get_page_data', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(536, 'mod_lesson_process_page', 'mod_lesson_external', 'process_page', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(537, 'mod_lesson_finish_attempt', 'mod_lesson_external', 'finish_attempt', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(538, 'mod_lesson_get_attempts_overview', 'mod_lesson_external', 'get_attempts_overview', NULL, 'mod_lesson', 'mod/lesson:viewreports', 'moodle_mobile_app'),
(539, 'mod_lesson_get_user_attempt', 'mod_lesson_external', 'get_user_attempt', NULL, 'mod_lesson', 'mod/lesson:viewreports', 'moodle_mobile_app'),
(540, 'mod_lesson_get_pages_possible_jumps', 'mod_lesson_external', 'get_pages_possible_jumps', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(541, 'mod_lesson_get_lesson', 'mod_lesson_external', 'get_lesson', NULL, 'mod_lesson', 'mod/lesson:view', 'moodle_mobile_app'),
(542, 'mod_lti_get_tool_launch_data', 'mod_lti_external', 'get_tool_launch_data', NULL, 'mod_lti', 'mod/lti:view', 'moodle_mobile_app'),
(543, 'mod_lti_get_ltis_by_courses', 'mod_lti_external', 'get_ltis_by_courses', NULL, 'mod_lti', 'mod/lti:view', 'moodle_mobile_app'),
(544, 'mod_lti_view_lti', 'mod_lti_external', 'view_lti', NULL, 'mod_lti', 'mod/lti:view', 'moodle_mobile_app'),
(545, 'mod_lti_get_tool_proxies', 'mod_lti_external', 'get_tool_proxies', NULL, 'mod_lti', 'moodle/site:config', NULL),
(546, 'mod_lti_create_tool_proxy', 'mod_lti_external', 'create_tool_proxy', NULL, 'mod_lti', 'moodle/site:config', NULL),
(547, 'mod_lti_delete_tool_proxy', 'mod_lti_external', 'delete_tool_proxy', NULL, 'mod_lti', 'moodle/site:config', NULL),
(548, 'mod_lti_get_tool_proxy_registration_request', 'mod_lti_external', 'get_tool_proxy_registration_request', NULL, 'mod_lti', 'moodle/site:config', NULL),
(549, 'mod_lti_get_tool_types', 'mod_lti_external', 'get_tool_types', NULL, 'mod_lti', 'moodle/site:config', NULL),
(550, 'mod_lti_get_tool_types_and_proxies', 'mod_lti\\external\\get_tool_types_and_proxies', 'execute', NULL, 'mod_lti', 'moodle/site:config', NULL),
(551, 'mod_lti_get_tool_types_and_proxies_count', 'mod_lti\\external\\get_tool_types_and_proxies_count', 'execute', NULL, 'mod_lti', 'moodle/site:config', NULL),
(552, 'mod_lti_create_tool_type', 'mod_lti_external', 'create_tool_type', NULL, 'mod_lti', 'moodle/site:config', NULL),
(553, 'mod_lti_update_tool_type', 'mod_lti_external', 'update_tool_type', NULL, 'mod_lti', 'moodle/site:config', NULL),
(554, 'mod_lti_delete_tool_type', 'mod_lti_external', 'delete_tool_type', NULL, 'mod_lti', 'moodle/site:config', NULL),
(555, 'mod_lti_delete_course_tool_type', 'mod_lti\\external\\delete_course_tool_type', 'execute', NULL, 'mod_lti', 'mod/lti:addcoursetool', NULL),
(556, 'mod_lti_toggle_showinactivitychooser', 'mod_lti\\external\\toggle_showinactivitychooser', 'execute', NULL, 'mod_lti', 'mod/lti:addcoursetool', NULL),
(557, 'mod_lti_is_cartridge', 'mod_lti_external', 'is_cartridge', NULL, 'mod_lti', 'moodle/site:config', NULL),
(558, 'mod_page_view_page', 'mod_page_external', 'view_page', NULL, 'mod_page', 'mod/page:view', 'moodle_mobile_app'),
(559, 'mod_page_get_pages_by_courses', 'mod_page_external', 'get_pages_by_courses', NULL, 'mod_page', 'mod/page:view', 'moodle_mobile_app'),
(560, 'mod_quiz_get_quizzes_by_courses', 'mod_quiz_external', 'get_quizzes_by_courses', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(561, 'mod_quiz_view_quiz', 'mod_quiz_external', 'view_quiz', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(562, 'mod_quiz_get_user_attempts', 'mod_quiz_external', 'get_user_attempts', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(563, 'mod_quiz_get_user_quiz_attempts', 'mod_quiz_external', 'get_user_quiz_attempts', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(564, 'mod_quiz_get_user_best_grade', 'mod_quiz_external', 'get_user_best_grade', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(565, 'mod_quiz_get_combined_review_options', 'mod_quiz_external', 'get_combined_review_options', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(566, 'mod_quiz_start_attempt', 'mod_quiz_external', 'start_attempt', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(567, 'mod_quiz_get_attempt_data', 'mod_quiz_external', 'get_attempt_data', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(568, 'mod_quiz_get_attempt_summary', 'mod_quiz_external', 'get_attempt_summary', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(569, 'mod_quiz_save_attempt', 'mod_quiz_external', 'save_attempt', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(570, 'mod_quiz_process_attempt', 'mod_quiz_external', 'process_attempt', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(571, 'mod_quiz_get_attempt_review', 'mod_quiz_external', 'get_attempt_review', NULL, 'mod_quiz', 'mod/quiz:reviewmyattempts', 'moodle_mobile_app'),
(572, 'mod_quiz_view_attempt', 'mod_quiz_external', 'view_attempt', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(573, 'mod_quiz_view_attempt_summary', 'mod_quiz_external', 'view_attempt_summary', NULL, 'mod_quiz', 'mod/quiz:attempt', 'moodle_mobile_app'),
(574, 'mod_quiz_view_attempt_review', 'mod_quiz_external', 'view_attempt_review', NULL, 'mod_quiz', 'mod/quiz:reviewmyattempts', 'moodle_mobile_app'),
(575, 'mod_quiz_get_quiz_feedback_for_grade', 'mod_quiz_external', 'get_quiz_feedback_for_grade', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(576, 'mod_quiz_get_quiz_access_information', 'mod_quiz_external', 'get_quiz_access_information', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(577, 'mod_quiz_get_attempt_access_information', 'mod_quiz_external', 'get_attempt_access_information', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(578, 'mod_quiz_get_quiz_required_qtypes', 'mod_quiz_external', 'get_quiz_required_qtypes', NULL, 'mod_quiz', 'mod/quiz:view', 'moodle_mobile_app'),
(579, 'mod_quiz_set_question_version', 'mod_quiz\\external\\submit_question_version', 'execute', NULL, 'mod_quiz', 'mod/quiz:view', NULL),
(580, 'mod_quiz_reopen_attempt', 'mod_quiz\\external\\reopen_attempt', 'execute', NULL, 'mod_quiz', 'mod/quiz:reopenattempts', NULL),
(581, 'mod_quiz_get_reopen_attempt_confirmation', 'mod_quiz\\external\\get_reopen_attempt_confirmation', 'execute', NULL, 'mod_quiz', 'mod/quiz:reopenattempts', NULL),
(582, 'mod_quiz_add_random_questions', 'mod_quiz\\external\\add_random_questions', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(583, 'mod_quiz_update_filter_condition', 'mod_quiz\\external\\update_filter_condition', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(584, 'mod_quiz_save_overrides', 'mod_quiz\\external\\save_overrides', 'execute', NULL, 'mod_quiz', 'mod/quiz:manageoverrides', NULL),
(585, 'mod_quiz_delete_overrides', 'mod_quiz\\external\\delete_overrides', 'execute', NULL, 'mod_quiz', 'mod/quiz:manageoverrides', NULL),
(586, 'mod_quiz_get_overrides', 'mod_quiz\\external\\get_overrides', 'execute', NULL, 'mod_quiz', 'mod/quiz:manageoverrides', NULL),
(587, 'mod_quiz_create_grade_items', 'mod_quiz\\external\\create_grade_items', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(588, 'mod_quiz_delete_grade_items', 'mod_quiz\\external\\delete_grade_items', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(589, 'mod_quiz_update_grade_items', 'mod_quiz\\external\\update_grade_items', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(590, 'mod_quiz_update_slots', 'mod_quiz\\external\\update_slots', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(591, 'mod_quiz_get_edit_grading_page_data', 'mod_quiz\\external\\get_edit_grading_page_data', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(592, 'mod_quiz_create_grade_item_per_section', 'mod_quiz\\external\\create_grade_item_per_section', 'execute', NULL, 'mod_quiz', 'mod/quiz:manage', NULL),
(593, 'mod_resource_view_resource', 'mod_resource_external', 'view_resource', NULL, 'mod_resource', 'mod/resource:view', 'moodle_mobile_app'),
(594, 'mod_resource_get_resources_by_courses', 'mod_resource_external', 'get_resources_by_courses', NULL, 'mod_resource', 'mod/resource:view', 'moodle_mobile_app'),
(595, 'mod_scorm_view_scorm', 'mod_scorm_external', 'view_scorm', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(596, 'mod_scorm_get_scorm_attempt_count', 'mod_scorm_external', 'get_scorm_attempt_count', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(597, 'mod_scorm_get_scorm_scoes', 'mod_scorm_external', 'get_scorm_scoes', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(598, 'mod_scorm_get_scorm_user_data', 'mod_scorm_external', 'get_scorm_user_data', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(599, 'mod_scorm_insert_scorm_tracks', 'mod_scorm_external', 'insert_scorm_tracks', NULL, 'mod_scorm', 'mod/scorm:savetrack', 'moodle_mobile_app'),
(600, 'mod_scorm_get_scorm_sco_tracks', 'mod_scorm_external', 'get_scorm_sco_tracks', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(601, 'mod_scorm_get_scorms_by_courses', 'mod_scorm_external', 'get_scorms_by_courses', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(602, 'mod_scorm_launch_sco', 'mod_scorm_external', 'launch_sco', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(603, 'mod_scorm_get_scorm_access_information', 'mod_scorm_external', 'get_scorm_access_information', NULL, 'mod_scorm', '', 'moodle_mobile_app'),
(604, 'mod_url_view_url', 'mod_url_external', 'view_url', NULL, 'mod_url', 'mod/url:view', 'moodle_mobile_app'),
(605, 'mod_url_get_urls_by_courses', 'mod_url_external', 'get_urls_by_courses', NULL, 'mod_url', 'mod/url:view', 'moodle_mobile_app'),
(606, 'mod_wiki_get_wikis_by_courses', 'mod_wiki_external', 'get_wikis_by_courses', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(607, 'mod_wiki_view_wiki', 'mod_wiki_external', 'view_wiki', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(608, 'mod_wiki_view_page', 'mod_wiki_external', 'view_page', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(609, 'mod_wiki_get_subwikis', 'mod_wiki_external', 'get_subwikis', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(610, 'mod_wiki_get_subwiki_pages', 'mod_wiki_external', 'get_subwiki_pages', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(611, 'mod_wiki_get_subwiki_files', 'mod_wiki_external', 'get_subwiki_files', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(612, 'mod_wiki_get_page_contents', 'mod_wiki_external', 'get_page_contents', NULL, 'mod_wiki', 'mod/wiki:viewpage', 'moodle_mobile_app'),
(613, 'mod_wiki_get_page_for_editing', 'mod_wiki_external', 'get_page_for_editing', NULL, 'mod_wiki', 'mod/wiki:editpage', 'moodle_mobile_app'),
(614, 'mod_wiki_new_page', 'mod_wiki_external', 'new_page', NULL, 'mod_wiki', 'mod/wiki:editpage', 'moodle_mobile_app'),
(615, 'mod_wiki_edit_page', 'mod_wiki_external', 'edit_page', NULL, 'mod_wiki', 'mod/wiki:editpage', 'moodle_mobile_app'),
(616, 'mod_workshop_get_workshops_by_courses', 'mod_workshop_external', 'get_workshops_by_courses', NULL, 'mod_workshop', 'mod/workshop:view', 'moodle_mobile_app'),
(617, 'mod_workshop_get_workshop_access_information', 'mod_workshop_external', 'get_workshop_access_information', NULL, 'mod_workshop', 'mod/workshop:view', 'moodle_mobile_app'),
(618, 'mod_workshop_get_user_plan', 'mod_workshop_external', 'get_user_plan', NULL, 'mod_workshop', 'mod/workshop:view', 'moodle_mobile_app'),
(619, 'mod_workshop_view_workshop', 'mod_workshop_external', 'view_workshop', NULL, 'mod_workshop', 'mod/workshop:view', 'moodle_mobile_app'),
(620, 'mod_workshop_add_submission', 'mod_workshop_external', 'add_submission', NULL, 'mod_workshop', 'mod/workshop:submit', 'moodle_mobile_app'),
(621, 'mod_workshop_update_submission', 'mod_workshop_external', 'update_submission', NULL, 'mod_workshop', 'mod/workshop:submit', 'moodle_mobile_app'),
(622, 'mod_workshop_delete_submission', 'mod_workshop_external', 'delete_submission', NULL, 'mod_workshop', 'mod/workshop:submit', 'moodle_mobile_app'),
(623, 'mod_workshop_get_submissions', 'mod_workshop_external', 'get_submissions', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(624, 'mod_workshop_get_submission', 'mod_workshop_external', 'get_submission', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(625, 'mod_workshop_get_submission_assessments', 'mod_workshop_external', 'get_submission_assessments', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(626, 'mod_workshop_get_assessment', 'mod_workshop_external', 'get_assessment', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(627, 'mod_workshop_get_assessment_form_definition', 'mod_workshop_external', 'get_assessment_form_definition', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(628, 'mod_workshop_get_reviewer_assessments', 'mod_workshop_external', 'get_reviewer_assessments', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(629, 'mod_workshop_update_assessment', 'mod_workshop_external', 'update_assessment', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(630, 'mod_workshop_get_grades', 'mod_workshop_external', 'get_grades', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(631, 'mod_workshop_evaluate_assessment', 'mod_workshop_external', 'evaluate_assessment', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(632, 'mod_workshop_get_grades_report', 'mod_workshop_external', 'get_grades_report', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(633, 'mod_workshop_view_submission', 'mod_workshop_external', 'view_submission', NULL, 'mod_workshop', 'mod/workshop:view', 'moodle_mobile_app'),
(634, 'mod_workshop_evaluate_submission', 'mod_workshop_external', 'evaluate_submission', NULL, 'mod_workshop', '', 'moodle_mobile_app'),
(635, 'auth_email_get_signup_settings', 'auth_email_external', 'get_signup_settings', NULL, 'auth_email', '', NULL),
(636, 'auth_email_signup_user', 'auth_email_external', 'signup_user', NULL, 'auth_email', '', NULL),
(637, 'customfield_number_recalculate_value', 'customfield_number\\external\\recalculate', 'execute', NULL, 'customfield_number', '', NULL),
(638, 'enrol_guest_get_instance_info', 'enrol_guest_external', 'get_instance_info', NULL, 'enrol_guest', '', 'moodle_mobile_app'),
(639, 'enrol_guest_validate_password', 'enrol_guest\\external\\validate_password', 'execute', NULL, 'enrol_guest', '', 'moodle_mobile_app'),
(640, 'enrol_manual_enrol_users', 'enrol_manual_external', 'enrol_users', 'enrol/manual/externallib.php', 'enrol_manual', 'enrol/manual:enrol', NULL),
(641, 'enrol_manual_unenrol_users', 'enrol_manual_external', 'unenrol_users', 'enrol/manual/externallib.php', 'enrol_manual', 'enrol/manual:unenrol', NULL),
(642, 'enrol_meta_add_instances', 'enrol_meta\\external\\add_instances', 'execute', NULL, 'enrol_meta', 'enrol/meta:config', NULL),
(643, 'enrol_meta_delete_instances', 'enrol_meta\\external\\delete_instances', 'execute', NULL, 'enrol_meta', 'enrol/meta:config', NULL),
(644, 'enrol_self_get_instance_info', 'enrol_self_external', 'get_instance_info', 'enrol/self/externallib.php', 'enrol_self', '', 'moodle_mobile_app'),
(645, 'enrol_self_enrol_user', 'enrol_self_external', 'enrol_user', 'enrol/self/externallib.php', 'enrol_self', '', 'moodle_mobile_app'),
(646, 'message_airnotifier_is_system_configured', 'message_airnotifier_external', 'is_system_configured', 'message/output/airnotifier/externallib.php', 'message_airnotifier', '', 'moodle_mobile_app'),
(647, 'message_airnotifier_are_notification_preferences_configured', 'message_airnotifier_external', 'are_notification_preferences_configured', 'message/output/airnotifier/externallib.php', 'message_airnotifier', '', 'moodle_mobile_app'),
(648, 'message_airnotifier_get_user_devices', 'message_airnotifier_external', 'get_user_devices', 'message/output/airnotifier/externallib.php', 'message_airnotifier', '', 'moodle_mobile_app'),
(649, 'message_airnotifier_enable_device', 'message_airnotifier_external', 'enable_device', 'message/output/airnotifier/externallib.php', 'message_airnotifier', 'message/airnotifier:managedevice', 'moodle_mobile_app'),
(650, 'message_popup_get_popup_notifications', 'message_popup_external', 'get_popup_notifications', 'message/output/popup/externallib.php', 'message_popup', '', 'moodle_mobile_app'),
(651, 'message_popup_get_unread_popup_notification_count', 'message_popup_external', 'get_unread_popup_notification_count', 'message/output/popup/externallib.php', 'message_popup', '', 'moodle_mobile_app'),
(652, 'block_accessreview_get_module_data', 'block_accessreview\\external\\get_module_data', 'execute', NULL, 'block_accessreview', 'block/accessreview:view', NULL),
(653, 'block_accessreview_get_section_data', 'block_accessreview\\external\\get_section_data', 'execute', NULL, 'block_accessreview', 'block/accessreview:view', NULL),
(654, 'block_recentlyaccesseditems_get_recent_items', 'block_recentlyaccesseditems\\external', 'get_recent_items', NULL, 'block_recentlyaccesseditems', '', 'moodle_mobile_app'),
(655, 'block_starredcourses_get_starred_courses', 'block_starredcourses_external', 'get_starred_courses', 'block/starredcourses/classes/external.php', 'block_starredcourses', '', 'moodle_mobile_app'),
(656, 'media_videojs_get_language', 'media_videojs\\external\\get_language', 'execute', NULL, 'media_videojs', '', NULL),
(657, 'editor_tiny_get_configuration', 'editor_tiny\\external\\get_configuration', 'execute', NULL, 'editor_tiny', '', 'moodle_mobile_app'),
(658, 'report_competency_data_for_report', 'report_competency\\external', 'data_for_report', NULL, 'report_competency', 'moodle/competency:coursecompetencyview', NULL),
(659, 'report_insights_action_executed', 'report_insights\\external', 'action_executed', NULL, 'report_insights', '', 'moodle_mobile_app'),
(660, 'gradereport_grader_get_users_in_report', 'gradereport_grader\\external\\get_users_in_report', 'execute', NULL, 'gradereport_grader', 'gradereport/grader:view', 'moodle_mobile_app'),
(661, 'gradereport_overview_get_course_grades', 'gradereport_overview_external', 'get_course_grades', NULL, 'gradereport_overview', '', 'moodle_mobile_app'),
(662, 'gradereport_overview_view_grade_report', 'gradereport_overview_external', 'view_grade_report', NULL, 'gradereport_overview', 'gradereport/overview:view', 'moodle_mobile_app'),
(663, 'gradereport_singleview_get_grade_items_for_search_widget', 'gradereport_singleview\\external\\singleview', 'get_grade_items_for_search_widget', NULL, 'gradereport_singleview', 'gradereport/singleview:view', 'moodle_mobile_app'),
(664, 'gradereport_user_get_grades_table', 'gradereport_user\\external\\user', 'get_grades_table', NULL, 'gradereport_user', 'gradereport/user:view', 'moodle_mobile_app');
INSERT INTO `[[dbprefix]]external_functions` VALUES
(665, 'gradereport_user_view_grade_report', 'gradereport_user\\external\\user', 'view_grade_report', NULL, 'gradereport_user', 'gradereport/user:view', 'moodle_mobile_app'),
(666, 'gradereport_user_get_grade_items', 'gradereport_user\\external\\user', 'get_grade_items', NULL, 'gradereport_user', 'gradereport/user:view', 'moodle_mobile_app'),
(667, 'gradereport_user_get_access_information', 'gradereport_user\\external\\get_access_information', 'execute', NULL, 'gradereport_user', '', 'moodle_mobile_app'),
(668, 'gradingform_guide_grader_gradingpanel_fetch', 'gradingform_guide\\grades\\grader\\gradingpanel\\external\\fetch', 'execute', NULL, 'gradingform_guide', '', NULL),
(669, 'gradingform_guide_grader_gradingpanel_store', 'gradingform_guide\\grades\\grader\\gradingpanel\\external\\store', 'execute', NULL, 'gradingform_guide', '', NULL),
(670, 'gradingform_rubric_grader_gradingpanel_fetch', 'gradingform_rubric\\grades\\grader\\gradingpanel\\external\\fetch', 'execute', NULL, 'gradingform_rubric', '', NULL),
(671, 'gradingform_rubric_grader_gradingpanel_store', 'gradingform_rubric\\grades\\grader\\gradingpanel\\external\\store', 'execute', NULL, 'gradingform_rubric', '', NULL),
(672, 'qbank_columnsortorder_set_columnbank_order', 'qbank_columnsortorder\\external\\set_columnbank_order', 'execute', NULL, 'qbank_columnsortorder', '', NULL),
(673, 'qbank_columnsortorder_set_hidden_columns', 'qbank_columnsortorder\\external\\set_hidden_columns', 'execute', NULL, 'qbank_columnsortorder', '', NULL),
(674, 'qbank_columnsortorder_set_column_size', 'qbank_columnsortorder\\external\\set_column_size', 'execute', NULL, 'qbank_columnsortorder', '', NULL),
(675, 'qbank_editquestion_set_status', 'qbank_editquestion\\external\\update_question_version_status', 'execute', NULL, 'qbank_editquestion', '', NULL),
(676, 'qbank_managecategories_move_category', 'qbank_managecategories\\external\\move_category', 'execute', NULL, 'qbank_managecategories', 'moodle/question:managecategory', NULL),
(677, 'qbank_tagquestion_submit_tags_form', 'qbank_tagquestion\\external\\submit_tags', 'execute', NULL, 'qbank_tagquestion', '', NULL),
(678, 'qbank_viewquestiontext_set_question_text_format', 'qbank_viewquestiontext\\external\\set_question_text_format', 'execute', NULL, 'qbank_viewquestiontext', '', NULL),
(679, 'tool_admin_presets_delete_preset', 'tool_admin_presets\\external\\delete_preset', 'execute', NULL, 'tool_admin_presets', '', NULL),
(680, 'tool_analytics_potential_contexts', 'tool_analytics\\external', 'potential_contexts', NULL, 'tool_analytics', '', 'moodle_mobile_app'),
(681, 'tool_behat_get_entity_generator', 'tool_behat\\external\\get_entity_generator', 'execute', NULL, 'tool_behat', 'moodle/site:config', NULL),
(682, 'tool_dataprivacy_cancel_data_request', 'tool_dataprivacy\\external', 'cancel_data_request', NULL, 'tool_dataprivacy', '', 'moodle_mobile_app'),
(683, 'tool_dataprivacy_contact_dpo', 'tool_dataprivacy\\external', 'contact_dpo', NULL, 'tool_dataprivacy', '', 'moodle_mobile_app'),
(684, 'tool_dataprivacy_mark_complete', 'tool_dataprivacy\\external', 'mark_complete', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(685, 'tool_dataprivacy_get_data_request', 'tool_dataprivacy\\external', 'get_data_request', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(686, 'tool_dataprivacy_approve_data_request', 'tool_dataprivacy\\external', 'approve_data_request', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(687, 'tool_dataprivacy_submit_selected_courses_form', 'tool_dataprivacy\\external\\submit_selected_courses_form', 'execute', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(688, 'tool_dataprivacy_bulk_approve_data_requests', 'tool_dataprivacy\\external', 'bulk_approve_data_requests', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(689, 'tool_dataprivacy_deny_data_request', 'tool_dataprivacy\\external', 'deny_data_request', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(690, 'tool_dataprivacy_bulk_deny_data_requests', 'tool_dataprivacy\\external', 'bulk_deny_data_requests', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(691, 'tool_dataprivacy_get_users', 'tool_dataprivacy\\external', 'get_users', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedatarequests', NULL),
(692, 'tool_dataprivacy_create_purpose_form', 'tool_dataprivacy\\external', 'create_purpose_form', NULL, 'tool_dataprivacy', '', NULL),
(693, 'tool_dataprivacy_create_category_form', 'tool_dataprivacy\\external', 'create_category_form', NULL, 'tool_dataprivacy', '', NULL),
(694, 'tool_dataprivacy_delete_purpose', 'tool_dataprivacy\\external', 'delete_purpose', NULL, 'tool_dataprivacy', '', NULL),
(695, 'tool_dataprivacy_delete_category', 'tool_dataprivacy\\external', 'delete_category', NULL, 'tool_dataprivacy', '', NULL),
(696, 'tool_dataprivacy_set_contextlevel_form', 'tool_dataprivacy\\external', 'set_contextlevel_form', NULL, 'tool_dataprivacy', '', NULL),
(697, 'tool_dataprivacy_set_context_form', 'tool_dataprivacy\\external', 'set_context_form', NULL, 'tool_dataprivacy', '', NULL),
(698, 'tool_dataprivacy_tree_extra_branches', 'tool_dataprivacy\\external', 'tree_extra_branches', NULL, 'tool_dataprivacy', '', NULL),
(699, 'tool_dataprivacy_confirm_contexts_for_deletion', 'tool_dataprivacy\\external', 'confirm_contexts_for_deletion', NULL, 'tool_dataprivacy', '', NULL),
(700, 'tool_dataprivacy_set_context_defaults', 'tool_dataprivacy\\external', 'set_context_defaults', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedataregistry', NULL),
(701, 'tool_dataprivacy_get_category_options', 'tool_dataprivacy\\external', 'get_category_options', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedataregistry', NULL),
(702, 'tool_dataprivacy_get_purpose_options', 'tool_dataprivacy\\external', 'get_purpose_options', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedataregistry', NULL),
(703, 'tool_dataprivacy_get_activity_options', 'tool_dataprivacy\\external', 'get_activity_options', NULL, 'tool_dataprivacy', 'tool/dataprivacy:managedataregistry', NULL),
(704, 'tool_dataprivacy_get_access_information', '\\tool_dataprivacy\\external\\get_access_information', 'execute', NULL, 'tool_dataprivacy', '', 'moodle_mobile_app'),
(705, 'tool_dataprivacy_create_data_request', '\\tool_dataprivacy\\external\\create_data_request', 'execute', NULL, 'tool_dataprivacy', '', 'moodle_mobile_app'),
(706, 'tool_dataprivacy_get_data_requests', '\\tool_dataprivacy\\external\\get_data_requests', 'execute', NULL, 'tool_dataprivacy', '', 'moodle_mobile_app'),
(707, 'tool_lp_data_for_competency_frameworks_manage_page', 'tool_lp\\external', 'data_for_competency_frameworks_manage_page', NULL, 'tool_lp', 'moodle/competency:competencyview', NULL),
(708, 'tool_lp_data_for_competency_summary', 'tool_lp\\external', 'data_for_competency_summary', NULL, 'tool_lp', 'moodle/competency:competencyview', NULL),
(709, 'tool_lp_data_for_competencies_manage_page', 'tool_lp\\external', 'data_for_competencies_manage_page', NULL, 'tool_lp', 'moodle/competency:competencyview', NULL),
(710, 'tool_lp_list_courses_using_competency', 'tool_lp\\external', 'list_courses_using_competency', NULL, 'tool_lp', 'moodle/competency:coursecompetencyview', NULL),
(711, 'tool_lp_data_for_course_competencies_page', 'tool_lp\\external', 'data_for_course_competencies_page', NULL, 'tool_lp', 'moodle/competency:coursecompetencyview', 'moodle_mobile_app'),
(712, 'tool_lp_data_for_template_competencies_page', 'tool_lp\\external', 'data_for_template_competencies_page', NULL, 'tool_lp', 'moodle/competency:templateview', NULL),
(713, 'tool_lp_data_for_templates_manage_page', 'tool_lp\\external', 'data_for_templates_manage_page', NULL, 'tool_lp', 'moodle/competency:templateview', NULL),
(714, 'tool_lp_data_for_plans_page', 'tool_lp\\external', 'data_for_plans_page', NULL, 'tool_lp', 'moodle/competency:planviewown', 'moodle_mobile_app'),
(715, 'tool_lp_data_for_plan_page', 'tool_lp\\external', 'data_for_plan_page', NULL, 'tool_lp', 'moodle/competency:planview', 'moodle_mobile_app'),
(716, 'tool_lp_data_for_related_competencies_section', 'tool_lp\\external', 'data_for_related_competencies_section', NULL, 'tool_lp', 'moodle/competency:competencyview', NULL),
(717, 'tool_lp_search_users', 'tool_lp\\external', 'search_users', NULL, 'tool_lp', 'moodle/competency:templatemanage', NULL),
(718, 'tool_lp_search_cohorts', 'core_cohort_external', 'search_cohorts', 'cohort/externallib.php', 'tool_lp', 'moodle/cohort:view', NULL),
(719, 'tool_lp_data_for_user_evidence_list_page', 'tool_lp\\external', 'data_for_user_evidence_list_page', NULL, 'tool_lp', 'moodle/competency:userevidenceview', 'moodle_mobile_app'),
(720, 'tool_lp_data_for_user_evidence_page', 'tool_lp\\external', 'data_for_user_evidence_page', NULL, 'tool_lp', 'moodle/competency:userevidenceview', 'moodle_mobile_app'),
(721, 'tool_lp_data_for_user_competency_summary', 'tool_lp\\external', 'data_for_user_competency_summary', NULL, 'tool_lp', 'moodle/competency:planview', 'moodle_mobile_app'),
(722, 'tool_lp_data_for_user_competency_summary_in_plan', 'tool_lp\\external', 'data_for_user_competency_summary_in_plan', NULL, 'tool_lp', 'moodle/competency:planview', 'moodle_mobile_app'),
(723, 'tool_lp_data_for_user_competency_summary_in_course', 'tool_lp\\external', 'data_for_user_competency_summary_in_course', NULL, 'tool_lp', 'moodle/competency:coursecompetencyview', 'moodle_mobile_app'),
(724, 'tool_mobile_get_plugins_supporting_mobile', 'tool_mobile\\external', 'get_plugins_supporting_mobile', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(725, 'tool_mobile_get_public_config', 'tool_mobile\\external', 'get_public_config', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(726, 'tool_mobile_get_config', 'tool_mobile\\external', 'get_config', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(727, 'tool_mobile_get_autologin_key', 'tool_mobile\\external', 'get_autologin_key', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(728, 'tool_mobile_get_content', 'tool_mobile\\external', 'get_content', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(729, 'tool_mobile_call_external_functions', 'tool_mobile\\external', 'call_external_functions', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(730, 'tool_mobile_validate_subscription_key', 'tool_mobile\\external', 'validate_subscription_key', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(731, 'tool_mobile_get_tokens_for_qr_login', 'tool_mobile\\external', 'get_tokens_for_qr_login', NULL, 'tool_mobile', '', 'moodle_mobile_app'),
(732, 'tool_moodlenet_verify_webfinger', 'tool_moodlenet\\external', 'verify_webfinger', NULL, 'tool_moodlenet', '', 'moodle_mobile_app'),
(733, 'tool_moodlenet_search_courses', 'tool_moodlenet\\external', 'search_courses', NULL, 'tool_moodlenet', '', 'moodle_mobile_app'),
(734, 'tool_policy_get_policy_version', 'tool_policy\\external', 'get_policy_version', NULL, 'tool_policy', '', NULL),
(735, 'tool_policy_submit_accept_on_behalf', 'tool_policy\\external', 'submit_accept_on_behalf', NULL, 'tool_policy', '', NULL),
(736, 'tool_policy_get_user_acceptances', '\\tool_policy\\external\\get_user_acceptances', 'execute', NULL, 'tool_policy', '', 'moodle_mobile_app'),
(737, 'tool_policy_set_acceptances_status', '\\tool_policy\\external\\set_acceptances_status', 'execute', NULL, 'tool_policy', '', 'moodle_mobile_app'),
(738, 'tool_templatelibrary_list_templates', 'tool_templatelibrary\\external', 'list_templates', NULL, 'tool_templatelibrary', '', NULL),
(739, 'tool_templatelibrary_load_canonical_template', 'tool_templatelibrary\\external', 'load_canonical_template', NULL, 'tool_templatelibrary', '', NULL),
(740, 'tool_usertours_fetch_and_start_tour', 'tool_usertours\\external\\tour', 'fetch_and_start_tour', NULL, 'tool_usertours', '', NULL),
(741, 'tool_usertours_step_shown', 'tool_usertours\\external\\tour', 'step_shown', NULL, 'tool_usertours', '', NULL),
(742, 'tool_usertours_complete_tour', 'tool_usertours\\external\\tour', 'complete_tour', NULL, 'tool_usertours', '', NULL),
(743, 'tool_usertours_reset_tour', 'tool_usertours\\external\\tour', 'reset_tour', NULL, 'tool_usertours', '', NULL),
(744, 'tool_xmldb_invoke_move_action', 'tool_xmldb_external', 'invoke_move_action', NULL, 'tool_xmldb', '', NULL),
(745, 'paygw_paypal_get_config_for_js', 'paygw_paypal\\external\\get_config_for_js', 'execute', NULL, 'paygw_paypal', '', NULL),
(746, 'paygw_paypal_create_transaction_complete', 'paygw_paypal\\external\\transaction_complete', 'execute', NULL, 'paygw_paypal', '', NULL),
(747, 'quizaccess_seb_validate_quiz_keys', 'quizaccess_seb\\external\\validate_quiz_keys', 'execute', NULL, 'quizaccess_seb', '', NULL),
(748, 'tiny_autosave_resume_session', 'tiny_autosave\\external\\resume_autosave_session', 'execute', NULL, 'tiny_autosave', '', NULL),
(749, 'tiny_autosave_reset_session', 'tiny_autosave\\external\\reset_autosave_session', 'execute', NULL, 'tiny_autosave', '', NULL),
(750, 'tiny_autosave_update_session', 'tiny_autosave\\external\\update_autosave_session_content', 'execute', NULL, 'tiny_autosave', '', NULL),
(751, 'tiny_equation_filter', 'tiny_equation\\external\\filter', 'execute', NULL, 'tiny_equation', '', NULL),
(752, 'tiny_media_preview', 'tiny_media\\external\\preview', 'execute', NULL, 'tiny_media', '', NULL),
(753, 'tiny_premium_get_api_key', 'tiny_premium\\external\\get_api_key', 'execute', NULL, 'tiny_premium', '', 'moodle_mobile_app');

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

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

CREATE TABLE `[[dbprefix]]external_services` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(200) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL,
  `requiredcapability` varchar(150) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `restrictedusers` tinyint(1) NOT NULL,
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint DEFAULT NULL,
  `shortname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `downloadfiles` tinyint(1) NOT NULL DEFAULT '0',
  `uploadfiles` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]exteserv_nam_uix` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='built in and custom external services' AUTO_INCREMENT=2 ;

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

INSERT INTO `[[dbprefix]]external_services` VALUES
(1, 'Moodle mobile web service', 0, NULL, 0, 'moodle', [[timestamp]], [[timestamp]], 'moodle_mobile_app', 1, 1);

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

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

CREATE TABLE `[[dbprefix]]external_services_functions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `externalserviceid` bigint NOT NULL,
  `functionname` varchar(200) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]exteservfunc_ext_ix` (`externalserviceid`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='lists functions available in each service group' AUTO_INCREMENT=425 ;

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

INSERT INTO `[[dbprefix]]external_services_functions` VALUES
(1, 1, 'core_badges_get_badge'),
(2, 1, 'core_badges_get_user_badges'),
(3, 1, 'core_badges_get_user_badge_by_hash'),
(4, 1, 'core_blog_get_entries'),
(5, 1, 'core_blog_view_entries'),
(6, 1, 'core_blog_get_access_information'),
(7, 1, 'core_blog_add_entry'),
(8, 1, 'core_blog_delete_entry'),
(9, 1, 'core_blog_prepare_entry_for_edition'),
(10, 1, 'core_blog_update_entry'),
(11, 1, 'core_calendar_get_calendar_monthly_view'),
(12, 1, 'core_calendar_get_calendar_day_view'),
(13, 1, 'core_calendar_get_calendar_upcoming_view'),
(14, 1, 'core_calendar_update_event_start_day'),
(15, 1, 'core_calendar_create_calendar_events'),
(16, 1, 'core_calendar_delete_calendar_events'),
(17, 1, 'core_calendar_get_calendar_events'),
(18, 1, 'core_calendar_get_action_events_by_timesort'),
(19, 1, 'core_calendar_get_action_events_by_course'),
(20, 1, 'core_calendar_get_action_events_by_courses'),
(21, 1, 'core_calendar_get_calendar_event_by_id'),
(22, 1, 'core_calendar_submit_create_update_form'),
(23, 1, 'core_calendar_get_calendar_access_information'),
(24, 1, 'core_calendar_get_allowed_event_types'),
(25, 1, 'core_calendar_get_calendar_export_token'),
(26, 1, 'core_comment_get_comments'),
(27, 1, 'core_comment_add_comments'),
(28, 1, 'core_comment_delete_comments'),
(29, 1, 'core_completion_get_activities_completion_status'),
(30, 1, 'core_completion_get_course_completion_status'),
(31, 1, 'core_completion_mark_course_self_completed'),
(32, 1, 'core_completion_update_activity_completion_status_manually'),
(33, 1, 'core_course_get_categories'),
(34, 1, 'core_course_get_contents'),
(35, 1, 'core_course_get_course_module'),
(36, 1, 'core_course_get_course_module_by_instance'),
(37, 1, 'core_course_get_courses'),
(38, 1, 'core_course_search_courses'),
(39, 1, 'core_course_view_course'),
(40, 1, 'core_course_get_user_navigation_options'),
(41, 1, 'core_course_get_user_administration_options'),
(42, 1, 'core_course_get_courses_by_field'),
(43, 1, 'core_course_check_updates'),
(44, 1, 'core_course_get_updates_since'),
(45, 1, 'core_course_get_enrolled_courses_by_timeline_classification'),
(46, 1, 'core_course_get_enrolled_courses_with_action_events_by_timeline_classification'),
(47, 1, 'core_course_get_recent_courses'),
(48, 1, 'core_course_set_favourite_courses'),
(49, 1, 'core_enrol_get_course_enrolment_methods'),
(50, 1, 'core_enrol_get_enrolled_users'),
(51, 1, 'core_enrol_search_users'),
(52, 1, 'core_enrol_get_users_courses'),
(53, 1, 'core_files_get_files'),
(54, 1, 'core_files_delete_draft_files'),
(55, 1, 'core_files_get_unused_draft_itemid'),
(56, 1, 'core_get_component_strings'),
(57, 1, 'core_grades_grader_gradingpanel_point_fetch'),
(58, 1, 'core_grades_grader_gradingpanel_point_store'),
(59, 1, 'core_grades_grader_gradingpanel_scale_fetch'),
(60, 1, 'core_grades_grader_gradingpanel_scale_store'),
(61, 1, 'core_grades_get_enrolled_users_for_selector'),
(62, 1, 'core_grades_get_groups_for_selector'),
(63, 1, 'core_grades_get_gradeitems'),
(64, 1, 'core_grades_get_gradable_users'),
(65, 1, 'core_group_get_activity_allowed_groups'),
(66, 1, 'core_group_get_activity_groupmode'),
(67, 1, 'core_group_get_course_groupings'),
(68, 1, 'core_group_get_course_groups'),
(69, 1, 'core_group_get_course_user_groups'),
(70, 1, 'core_group_get_groups_for_selector'),
(71, 1, 'core_message_mute_conversations'),
(72, 1, 'core_message_unmute_conversations'),
(73, 1, 'core_message_block_user'),
(74, 1, 'core_message_get_contact_requests'),
(75, 1, 'core_message_create_contact_request'),
(76, 1, 'core_message_confirm_contact_request'),
(77, 1, 'core_message_decline_contact_request'),
(78, 1, 'core_message_get_received_contact_requests_count'),
(79, 1, 'core_message_delete_contacts'),
(80, 1, 'core_message_delete_conversations_by_id'),
(81, 1, 'core_message_delete_message'),
(82, 1, 'core_message_get_blocked_users'),
(83, 1, 'core_message_data_for_messagearea_search_messages'),
(84, 1, 'core_message_message_search_users'),
(85, 1, 'core_message_get_user_contacts'),
(86, 1, 'core_message_get_conversations'),
(87, 1, 'core_message_get_conversation'),
(88, 1, 'core_message_get_conversation_between_users'),
(89, 1, 'core_message_get_self_conversation'),
(90, 1, 'core_message_get_messages'),
(91, 1, 'core_message_get_conversation_counts'),
(92, 1, 'core_message_get_unread_conversation_counts'),
(93, 1, 'core_message_get_conversation_members'),
(94, 1, 'core_message_get_member_info'),
(95, 1, 'core_message_get_unread_conversations_count'),
(96, 1, 'core_message_mark_all_notifications_as_read'),
(97, 1, 'core_message_mark_all_conversation_messages_as_read'),
(98, 1, 'core_message_mark_message_read'),
(99, 1, 'core_message_mark_notification_read'),
(100, 1, 'core_message_message_processor_config_form'),
(101, 1, 'core_message_search_contacts'),
(102, 1, 'core_message_send_instant_messages'),
(103, 1, 'core_message_send_messages_to_conversation'),
(104, 1, 'core_message_get_conversation_messages'),
(105, 1, 'core_message_unblock_user'),
(106, 1, 'core_message_get_user_notification_preferences'),
(107, 1, 'core_message_get_user_message_preferences'),
(108, 1, 'core_message_set_favourite_conversations'),
(109, 1, 'core_message_unset_favourite_conversations'),
(110, 1, 'core_message_delete_message_for_all_users'),
(111, 1, 'core_message_get_unread_notification_count'),
(112, 1, 'core_my_view_page'),
(113, 1, 'core_notes_create_notes'),
(114, 1, 'core_notes_delete_notes'),
(115, 1, 'core_notes_get_course_notes'),
(116, 1, 'core_notes_view_notes'),
(117, 1, 'core_question_update_flag'),
(118, 1, 'core_rating_get_item_ratings'),
(119, 1, 'core_rating_add_rating'),
(120, 1, 'core_search_get_results'),
(121, 1, 'core_search_get_search_areas_list'),
(122, 1, 'core_search_view_results'),
(123, 1, 'core_search_get_top_results'),
(124, 1, 'core_tag_get_tagindex'),
(125, 1, 'core_tag_get_tagindex_per_area'),
(126, 1, 'core_tag_get_tag_areas'),
(127, 1, 'core_tag_get_tag_collections'),
(128, 1, 'core_tag_get_tag_cloud'),
(129, 1, 'core_user_add_user_device'),
(130, 1, 'core_user_update_user_device_public_key'),
(131, 1, 'core_user_add_user_private_files'),
(132, 1, 'core_user_get_course_user_profiles'),
(133, 1, 'core_user_get_users_by_field'),
(134, 1, 'core_user_remove_user_device'),
(135, 1, 'core_user_update_user_preferences'),
(136, 1, 'core_user_view_user_list'),
(137, 1, 'core_user_view_user_profile'),
(138, 1, 'core_user_get_user_preferences'),
(139, 1, 'core_user_update_picture'),
(140, 1, 'core_user_set_user_preferences'),
(141, 1, 'core_user_agree_site_policy'),
(142, 1, 'core_user_get_private_files_info'),
(143, 1, 'core_user_prepare_private_files_for_edition'),
(144, 1, 'core_user_update_private_files'),
(145, 1, 'core_competency_competency_viewed'),
(146, 1, 'core_competency_list_course_competencies'),
(147, 1, 'core_competency_get_scale_values'),
(148, 1, 'core_competency_user_competency_viewed'),
(149, 1, 'core_competency_user_competency_viewed_in_plan'),
(150, 1, 'core_competency_user_competency_viewed_in_course'),
(151, 1, 'core_competency_user_competency_plan_viewed'),
(152, 1, 'core_competency_grade_competency_in_course'),
(153, 1, 'core_competency_delete_evidence'),
(154, 1, 'core_webservice_get_site_info'),
(155, 1, 'core_block_get_course_blocks'),
(156, 1, 'core_block_get_dashboard_blocks'),
(157, 1, 'core_block_fetch_addable_blocks'),
(158, 1, 'core_filters_get_available_in_context'),
(159, 1, 'core_filters_get_all_states'),
(160, 1, 'core_h5p_get_trusted_h5p_file'),
(161, 1, 'core_table_get_dynamic_table_content'),
(162, 1, 'core_xapi_statement_post'),
(163, 1, 'core_xapi_post_state'),
(164, 1, 'core_xapi_get_state'),
(165, 1, 'core_xapi_get_states'),
(166, 1, 'core_xapi_delete_state'),
(167, 1, 'core_xapi_delete_states'),
(168, 1, 'core_reportbuilder_list_reports'),
(169, 1, 'core_reportbuilder_retrieve_report'),
(170, 1, 'core_reportbuilder_retrieve_system_report'),
(171, 1, 'core_reportbuilder_can_view_system_report'),
(172, 1, 'core_reportbuilder_view_report'),
(173, 1, 'core_ai_set_policy_status'),
(174, 1, 'core_ai_get_policy_status'),
(175, 1, 'aiplacement_courseassist_summarise_text'),
(176, 1, 'aiplacement_courseassist_explain_text'),
(177, 1, 'aiplacement_editor_generate_image'),
(178, 1, 'aiplacement_editor_generate_text'),
(179, 1, 'mod_assign_get_grades'),
(180, 1, 'mod_assign_get_assignments'),
(181, 1, 'mod_assign_get_submissions'),
(182, 1, 'mod_assign_get_user_flags'),
(183, 1, 'mod_assign_set_user_flags'),
(184, 1, 'mod_assign_get_user_mappings'),
(185, 1, 'mod_assign_revert_submissions_to_draft'),
(186, 1, 'mod_assign_lock_submissions'),
(187, 1, 'mod_assign_unlock_submissions'),
(188, 1, 'mod_assign_save_submission'),
(189, 1, 'mod_assign_submit_for_grading'),
(190, 1, 'mod_assign_save_grade'),
(191, 1, 'mod_assign_save_grades'),
(192, 1, 'mod_assign_save_user_extensions'),
(193, 1, 'mod_assign_reveal_identities'),
(194, 1, 'mod_assign_view_grading_table'),
(195, 1, 'mod_assign_view_submission_status'),
(196, 1, 'mod_assign_get_submission_status'),
(197, 1, 'mod_assign_list_participants'),
(198, 1, 'mod_assign_submit_grading_form'),
(199, 1, 'mod_assign_get_participant'),
(200, 1, 'mod_assign_view_assign'),
(201, 1, 'mod_assign_start_submission'),
(202, 1, 'mod_assign_remove_submission'),
(203, 1, 'mod_bigbluebuttonbn_can_join'),
(204, 1, 'mod_bigbluebuttonbn_get_recordings'),
(205, 1, 'mod_bigbluebuttonbn_get_recordings_to_import'),
(206, 1, 'mod_bigbluebuttonbn_update_recording'),
(207, 1, 'mod_bigbluebuttonbn_end_meeting'),
(208, 1, 'mod_bigbluebuttonbn_completion_validate'),
(209, 1, 'mod_bigbluebuttonbn_meeting_info'),
(210, 1, 'mod_bigbluebuttonbn_get_bigbluebuttonbns_by_courses'),
(211, 1, 'mod_bigbluebuttonbn_view_bigbluebuttonbn'),
(212, 1, 'mod_bigbluebuttonbn_get_join_url'),
(213, 1, 'mod_book_view_book'),
(214, 1, 'mod_book_get_books_by_courses'),
(215, 1, 'mod_choice_get_choice_results'),
(216, 1, 'mod_choice_get_choice_options'),
(217, 1, 'mod_choice_submit_choice_response'),
(218, 1, 'mod_choice_view_choice'),
(219, 1, 'mod_choice_get_choices_by_courses'),
(220, 1, 'mod_choice_delete_choice_responses'),
(221, 1, 'mod_data_get_databases_by_courses'),
(222, 1, 'mod_data_view_database'),
(223, 1, 'mod_data_get_data_access_information'),
(224, 1, 'mod_data_get_entries'),
(225, 1, 'mod_data_get_entry'),
(226, 1, 'mod_data_get_fields'),
(227, 1, 'mod_data_search_entries'),
(228, 1, 'mod_data_approve_entry'),
(229, 1, 'mod_data_delete_entry'),
(230, 1, 'mod_data_add_entry'),
(231, 1, 'mod_data_update_entry'),
(232, 1, 'mod_feedback_get_feedbacks_by_courses'),
(233, 1, 'mod_feedback_get_feedback_access_information'),
(234, 1, 'mod_feedback_view_feedback'),
(235, 1, 'mod_feedback_get_current_completed_tmp'),
(236, 1, 'mod_feedback_get_items'),
(237, 1, 'mod_feedback_launch_feedback'),
(238, 1, 'mod_feedback_get_page_items'),
(239, 1, 'mod_feedback_process_page'),
(240, 1, 'mod_feedback_get_analysis'),
(241, 1, 'mod_feedback_get_unfinished_responses'),
(242, 1, 'mod_feedback_get_finished_responses'),
(243, 1, 'mod_feedback_get_non_respondents'),
(244, 1, 'mod_feedback_get_responses_analysis'),
(245, 1, 'mod_feedback_get_last_completed'),
(246, 1, 'mod_folder_view_folder'),
(247, 1, 'mod_folder_get_folders_by_courses'),
(248, 1, 'mod_forum_get_forums_by_courses'),
(249, 1, 'mod_forum_get_discussion_posts'),
(250, 1, 'mod_forum_get_forum_discussions'),
(251, 1, 'mod_forum_view_forum'),
(252, 1, 'mod_forum_view_forum_discussion'),
(253, 1, 'mod_forum_add_discussion_post'),
(254, 1, 'mod_forum_add_discussion'),
(255, 1, 'mod_forum_can_add_discussion'),
(256, 1, 'mod_forum_get_forum_access_information'),
(257, 1, 'mod_forum_set_subscription_state'),
(258, 1, 'mod_forum_set_lock_state'),
(259, 1, 'mod_forum_toggle_favourite_state'),
(260, 1, 'mod_forum_set_pin_state'),
(261, 1, 'mod_forum_delete_post'),
(262, 1, 'mod_forum_get_discussion_post'),
(263, 1, 'mod_forum_prepare_draft_area_for_post'),
(264, 1, 'mod_forum_update_discussion_post'),
(265, 1, 'mod_glossary_get_glossaries_by_courses'),
(266, 1, 'mod_glossary_view_glossary'),
(267, 1, 'mod_glossary_view_entry'),
(268, 1, 'mod_glossary_get_entries_by_letter'),
(269, 1, 'mod_glossary_get_entries_by_date'),
(270, 1, 'mod_glossary_get_categories'),
(271, 1, 'mod_glossary_get_entries_by_category'),
(272, 1, 'mod_glossary_get_authors'),
(273, 1, 'mod_glossary_get_entries_by_author'),
(274, 1, 'mod_glossary_get_entries_by_author_id'),
(275, 1, 'mod_glossary_get_entries_by_search'),
(276, 1, 'mod_glossary_get_entries_by_term'),
(277, 1, 'mod_glossary_get_entries_to_approve'),
(278, 1, 'mod_glossary_get_entry_by_id'),
(279, 1, 'mod_glossary_add_entry'),
(280, 1, 'mod_glossary_delete_entry'),
(281, 1, 'mod_glossary_update_entry'),
(282, 1, 'mod_glossary_prepare_entry_for_edition'),
(283, 1, 'mod_h5pactivity_get_h5pactivity_access_information'),
(284, 1, 'mod_h5pactivity_view_h5pactivity'),
(285, 1, 'mod_h5pactivity_get_attempts'),
(286, 1, 'mod_h5pactivity_get_results'),
(287, 1, 'mod_h5pactivity_get_h5pactivities_by_courses'),
(288, 1, 'mod_h5pactivity_log_report_viewed'),
(289, 1, 'mod_h5pactivity_get_user_attempts'),
(290, 1, 'mod_imscp_view_imscp'),
(291, 1, 'mod_imscp_get_imscps_by_courses'),
(292, 1, 'mod_label_get_labels_by_courses'),
(293, 1, 'mod_lesson_get_lessons_by_courses'),
(294, 1, 'mod_lesson_get_lesson_access_information'),
(295, 1, 'mod_lesson_view_lesson'),
(296, 1, 'mod_lesson_get_questions_attempts'),
(297, 1, 'mod_lesson_get_user_grade'),
(298, 1, 'mod_lesson_get_user_attempt_grade'),
(299, 1, 'mod_lesson_get_content_pages_viewed'),
(300, 1, 'mod_lesson_get_user_timers'),
(301, 1, 'mod_lesson_get_pages'),
(302, 1, 'mod_lesson_launch_attempt'),
(303, 1, 'mod_lesson_get_page_data'),
(304, 1, 'mod_lesson_process_page'),
(305, 1, 'mod_lesson_finish_attempt'),
(306, 1, 'mod_lesson_get_attempts_overview'),
(307, 1, 'mod_lesson_get_user_attempt'),
(308, 1, 'mod_lesson_get_pages_possible_jumps'),
(309, 1, 'mod_lesson_get_lesson'),
(310, 1, 'mod_lti_get_tool_launch_data'),
(311, 1, 'mod_lti_get_ltis_by_courses'),
(312, 1, 'mod_lti_view_lti'),
(313, 1, 'mod_page_view_page'),
(314, 1, 'mod_page_get_pages_by_courses'),
(315, 1, 'mod_quiz_get_quizzes_by_courses'),
(316, 1, 'mod_quiz_view_quiz'),
(317, 1, 'mod_quiz_get_user_attempts'),
(318, 1, 'mod_quiz_get_user_quiz_attempts'),
(319, 1, 'mod_quiz_get_user_best_grade'),
(320, 1, 'mod_quiz_get_combined_review_options'),
(321, 1, 'mod_quiz_start_attempt'),
(322, 1, 'mod_quiz_get_attempt_data'),
(323, 1, 'mod_quiz_get_attempt_summary'),
(324, 1, 'mod_quiz_save_attempt'),
(325, 1, 'mod_quiz_process_attempt'),
(326, 1, 'mod_quiz_get_attempt_review'),
(327, 1, 'mod_quiz_view_attempt'),
(328, 1, 'mod_quiz_view_attempt_summary'),
(329, 1, 'mod_quiz_view_attempt_review'),
(330, 1, 'mod_quiz_get_quiz_feedback_for_grade'),
(331, 1, 'mod_quiz_get_quiz_access_information'),
(332, 1, 'mod_quiz_get_attempt_access_information'),
(333, 1, 'mod_quiz_get_quiz_required_qtypes'),
(334, 1, 'mod_resource_view_resource'),
(335, 1, 'mod_resource_get_resources_by_courses'),
(336, 1, 'mod_scorm_view_scorm'),
(337, 1, 'mod_scorm_get_scorm_attempt_count'),
(338, 1, 'mod_scorm_get_scorm_scoes'),
(339, 1, 'mod_scorm_get_scorm_user_data'),
(340, 1, 'mod_scorm_insert_scorm_tracks'),
(341, 1, 'mod_scorm_get_scorm_sco_tracks'),
(342, 1, 'mod_scorm_get_scorms_by_courses'),
(343, 1, 'mod_scorm_launch_sco'),
(344, 1, 'mod_scorm_get_scorm_access_information'),
(345, 1, 'mod_url_view_url'),
(346, 1, 'mod_url_get_urls_by_courses'),
(347, 1, 'mod_wiki_get_wikis_by_courses'),
(348, 1, 'mod_wiki_view_wiki'),
(349, 1, 'mod_wiki_view_page'),
(350, 1, 'mod_wiki_get_subwikis'),
(351, 1, 'mod_wiki_get_subwiki_pages'),
(352, 1, 'mod_wiki_get_subwiki_files'),
(353, 1, 'mod_wiki_get_page_contents'),
(354, 1, 'mod_wiki_get_page_for_editing'),
(355, 1, 'mod_wiki_new_page'),
(356, 1, 'mod_wiki_edit_page'),
(357, 1, 'mod_workshop_get_workshops_by_courses'),
(358, 1, 'mod_workshop_get_workshop_access_information'),
(359, 1, 'mod_workshop_get_user_plan'),
(360, 1, 'mod_workshop_view_workshop'),
(361, 1, 'mod_workshop_add_submission'),
(362, 1, 'mod_workshop_update_submission'),
(363, 1, 'mod_workshop_delete_submission'),
(364, 1, 'mod_workshop_get_submissions'),
(365, 1, 'mod_workshop_get_submission'),
(366, 1, 'mod_workshop_get_submission_assessments'),
(367, 1, 'mod_workshop_get_assessment'),
(368, 1, 'mod_workshop_get_assessment_form_definition'),
(369, 1, 'mod_workshop_get_reviewer_assessments'),
(370, 1, 'mod_workshop_update_assessment'),
(371, 1, 'mod_workshop_get_grades'),
(372, 1, 'mod_workshop_evaluate_assessment'),
(373, 1, 'mod_workshop_get_grades_report'),
(374, 1, 'mod_workshop_view_submission'),
(375, 1, 'mod_workshop_evaluate_submission'),
(376, 1, 'enrol_guest_get_instance_info'),
(377, 1, 'enrol_guest_validate_password'),
(378, 1, 'enrol_self_get_instance_info'),
(379, 1, 'enrol_self_enrol_user'),
(380, 1, 'message_airnotifier_is_system_configured'),
(381, 1, 'message_airnotifier_are_notification_preferences_configured'),
(382, 1, 'message_airnotifier_get_user_devices'),
(383, 1, 'message_airnotifier_enable_device'),
(384, 1, 'message_popup_get_popup_notifications'),
(385, 1, 'message_popup_get_unread_popup_notification_count'),
(386, 1, 'block_recentlyaccesseditems_get_recent_items'),
(387, 1, 'block_starredcourses_get_starred_courses'),
(388, 1, 'editor_tiny_get_configuration'),
(389, 1, 'report_insights_action_executed'),
(390, 1, 'gradereport_grader_get_users_in_report'),
(391, 1, 'gradereport_overview_get_course_grades'),
(392, 1, 'gradereport_overview_view_grade_report'),
(393, 1, 'gradereport_singleview_get_grade_items_for_search_widget'),
(394, 1, 'gradereport_user_get_grades_table'),
(395, 1, 'gradereport_user_view_grade_report'),
(396, 1, 'gradereport_user_get_grade_items'),
(397, 1, 'gradereport_user_get_access_information'),
(398, 1, 'tool_analytics_potential_contexts'),
(399, 1, 'tool_dataprivacy_cancel_data_request'),
(400, 1, 'tool_dataprivacy_contact_dpo'),
(401, 1, 'tool_dataprivacy_get_access_information'),
(402, 1, 'tool_dataprivacy_create_data_request'),
(403, 1, 'tool_dataprivacy_get_data_requests'),
(404, 1, 'tool_lp_data_for_course_competencies_page'),
(405, 1, 'tool_lp_data_for_plans_page'),
(406, 1, 'tool_lp_data_for_plan_page'),
(407, 1, 'tool_lp_data_for_user_evidence_list_page'),
(408, 1, 'tool_lp_data_for_user_evidence_page'),
(409, 1, 'tool_lp_data_for_user_competency_summary'),
(410, 1, 'tool_lp_data_for_user_competency_summary_in_plan'),
(411, 1, 'tool_lp_data_for_user_competency_summary_in_course'),
(412, 1, 'tool_mobile_get_plugins_supporting_mobile'),
(413, 1, 'tool_mobile_get_public_config'),
(414, 1, 'tool_mobile_get_config'),
(415, 1, 'tool_mobile_get_autologin_key'),
(416, 1, 'tool_mobile_get_content'),
(417, 1, 'tool_mobile_call_external_functions'),
(418, 1, 'tool_mobile_validate_subscription_key'),
(419, 1, 'tool_mobile_get_tokens_for_qr_login'),
(420, 1, 'tool_moodlenet_verify_webfinger'),
(421, 1, 'tool_moodlenet_search_courses'),
(422, 1, 'tool_policy_get_user_acceptances'),
(423, 1, 'tool_policy_set_acceptances_status'),
(424, 1, 'tiny_premium_get_api_key');

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

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

CREATE TABLE `[[dbprefix]]external_services_users` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `externalserviceid` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `iprestriction` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `validuntil` bigint DEFAULT NULL,
  `timecreated` bigint 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]]favourite`
--

CREATE TABLE `[[dbprefix]]favourite` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemtype` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemid` bigint NOT NULL,
  `contextid` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `ordering` bigint DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `[[dbprefix]]favo_comiteiteconuse_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,';

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

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

CREATE TABLE `[[dbprefix]]feedback` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `introformat` smallint 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) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `page_after_submit` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `page_after_submitformat` tinyint NOT NULL DEFAULT '0',
  `publish_stats` tinyint(1) NOT NULL DEFAULT '0',
  `timeopen` bigint NOT NULL DEFAULT '0',
  `timeclose` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint 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';

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

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

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

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

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

CREATE TABLE `[[dbprefix]]feedback_completedtmp` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `feedback` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `guestid` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `random_response` bigint NOT NULL DEFAULT '0',
  `anonymous_response` tinyint(1) NOT NULL DEFAULT '0',
  `courseid` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]feedback_item` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `feedback` bigint NOT NULL DEFAULT '0',
  `template` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `label` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `presentation` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `typ` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `hasvalue` tinyint(1) NOT NULL DEFAULT '0',
  `position` smallint NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `dependitem` bigint NOT NULL DEFAULT '0',
  `dependvalue` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `options` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]feedback_sitecourse_map` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `feedbackid` bigint NOT NULL DEFAULT '0',
  `courseid` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]feedback_template` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `ispublic` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]feedback_value` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course_id` bigint NOT NULL DEFAULT '0',
  `item` bigint NOT NULL DEFAULT '0',
  `completed` bigint NOT NULL DEFAULT '0',
  `tmp_completed` bigint NOT NULL DEFAULT '0',
  `value` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]feedback_valuetmp` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course_id` bigint NOT NULL DEFAULT '0',
  `item` bigint NOT NULL DEFAULT '0',
  `completed` bigint NOT NULL DEFAULT '0',
  `tmp_completed` bigint NOT NULL DEFAULT '0',
  `value` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]files` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contenthash` varchar(40) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `pathnamehash` varchar(40) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contextid` bigint NOT NULL,
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `filearea` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemid` bigint NOT NULL,
  `filepath` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `filename` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `userid` bigint DEFAULT NULL,
  `filesize` bigint NOT NULL,
  `mimetype` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `status` bigint NOT NULL DEFAULT '0',
  `source` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `author` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `license` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `sortorder` bigint NOT NULL DEFAULT '0',
  `referencefileid` bigint 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_fil_ix` (`filename`),
  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 NOT NULL AUTO_INCREMENT,
  `repositoryid` bigint NOT NULL,
  `lastsync` bigint DEFAULT NULL,
  `reference` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `referencehash` varchar(40) CHARACTER SET [[utf8]] COLLATE [[collate]] 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 NOT NULL AUTO_INCREMENT,
  `usermodified` bigint NOT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `sourcefileid` bigint NOT NULL,
  `targetformat` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `status` bigint DEFAULT '0',
  `statusmessage` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `converter` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `destfileid` bigint DEFAULT NULL,
  `data` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]fileconv_sou_ix` (`sourcefileid`),
  KEY `[[dbprefix]]fileconv_des_ix` (`destfileid`),
  KEY `[[dbprefix]]fileconv_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Table to track file conversions.';

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

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

CREATE TABLE `[[dbprefix]]filter_active` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contextid` bigint NOT NULL,
  `active` smallint NOT NULL,
  `sortorder` bigint 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 NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contextid` bigint NOT NULL,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `value` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  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 NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `introformat` smallint NOT NULL DEFAULT '0',
  `revision` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `display` smallint 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';

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

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

CREATE TABLE `[[dbprefix]]forum` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `type` varchar(20) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT 'general',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `introformat` smallint NOT NULL DEFAULT '0',
  `duedate` bigint NOT NULL DEFAULT '0',
  `cutoffdate` bigint NOT NULL DEFAULT '0',
  `assessed` bigint NOT NULL DEFAULT '0',
  `assesstimestart` bigint NOT NULL DEFAULT '0',
  `assesstimefinish` bigint NOT NULL DEFAULT '0',
  `scale` bigint NOT NULL DEFAULT '0',
  `grade_forum` bigint NOT NULL DEFAULT '0',
  `grade_forum_notify` smallint NOT NULL DEFAULT '0',
  `maxbytes` bigint NOT NULL DEFAULT '0',
  `maxattachments` bigint NOT NULL DEFAULT '1',
  `forcesubscribe` tinyint(1) NOT NULL DEFAULT '0',
  `trackingtype` tinyint NOT NULL DEFAULT '1',
  `rsstype` tinyint NOT NULL DEFAULT '0',
  `rssarticles` tinyint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `warnafter` bigint NOT NULL DEFAULT '0',
  `blockafter` bigint NOT NULL DEFAULT '0',
  `blockperiod` bigint NOT NULL DEFAULT '0',
  `completiondiscussions` int NOT NULL DEFAULT '0',
  `completionreplies` int NOT NULL DEFAULT '0',
  `completionposts` int NOT NULL DEFAULT '0',
  `displaywordcount` tinyint(1) NOT NULL DEFAULT '0',
  `lockdiscussionafter` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]forum_digests` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL,
  `forum` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]forum_discussions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `forum` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `firstpost` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `groupid` bigint NOT NULL DEFAULT '-1',
  `assessed` tinyint(1) NOT NULL DEFAULT '1',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `usermodified` bigint NOT NULL DEFAULT '0',
  `timestart` bigint NOT NULL DEFAULT '0',
  `timeend` bigint NOT NULL DEFAULT '0',
  `pinned` tinyint(1) NOT NULL DEFAULT '0',
  `timelocked` bigint 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`),
  KEY `[[dbprefix]]forudisc_use2_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Forums are composed of discussions';

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

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

CREATE TABLE `[[dbprefix]]forum_discussion_subs` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `forum` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `discussion` bigint NOT NULL,
  `preference` bigint 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 ';

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

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

CREATE TABLE `[[dbprefix]]forum_grades` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `forum` bigint NOT NULL,
  `itemnumber` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `grade` decimal(10,5) DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]forum_posts` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `discussion` bigint NOT NULL DEFAULT '0',
  `parent` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `created` bigint NOT NULL DEFAULT '0',
  `modified` bigint NOT NULL DEFAULT '0',
  `mailed` tinyint NOT NULL DEFAULT '0',
  `subject` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `message` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `messageformat` tinyint NOT NULL DEFAULT '0',
  `messagetrust` tinyint NOT NULL DEFAULT '0',
  `attachment` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `totalscore` smallint NOT NULL DEFAULT '0',
  `mailnow` bigint NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `privatereplyto` bigint NOT NULL DEFAULT '0',
  `wordcount` bigint DEFAULT NULL,
  `charcount` bigint 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 NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL DEFAULT '0',
  `discussionid` bigint NOT NULL DEFAULT '0',
  `postid` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint 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';

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

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

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

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

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

CREATE TABLE `[[dbprefix]]forum_subscriptions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL DEFAULT '0',
  `forum` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]forum_track_prefs` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `userid` bigint NOT NULL DEFAULT '0',
  `forumid` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]glossary` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `introformat` smallint NOT NULL DEFAULT '0',
  `allowduplicatedentries` tinyint NOT NULL DEFAULT '0',
  `displayformat` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT 'dictionary',
  `mainglossary` tinyint NOT NULL DEFAULT '0',
  `showspecial` tinyint NOT NULL DEFAULT '1',
  `showalphabet` tinyint NOT NULL DEFAULT '1',
  `showall` tinyint NOT NULL DEFAULT '1',
  `allowcomments` tinyint NOT NULL DEFAULT '0',
  `allowprintview` tinyint NOT NULL DEFAULT '1',
  `usedynalink` tinyint NOT NULL DEFAULT '1',
  `defaultapproval` tinyint NOT NULL DEFAULT '1',
  `approvaldisplayformat` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT 'default',
  `globalglossary` tinyint NOT NULL DEFAULT '0',
  `entbypage` smallint NOT NULL DEFAULT '10',
  `editalways` tinyint NOT NULL DEFAULT '0',
  `rsstype` tinyint NOT NULL DEFAULT '0',
  `rssarticles` tinyint NOT NULL DEFAULT '0',
  `assessed` bigint NOT NULL DEFAULT '0',
  `assesstimestart` bigint NOT NULL DEFAULT '0',
  `assesstimefinish` bigint NOT NULL DEFAULT '0',
  `scale` bigint NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `completionentries` int 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 NOT NULL AUTO_INCREMENT,
  `entryid` bigint NOT NULL DEFAULT '0',
  `alias` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]glosalia_ent_ix` (`entryid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='entries alias';

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

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

CREATE TABLE `[[dbprefix]]glossary_categories` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `glossaryid` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `usedynalink` tinyint 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 NOT NULL AUTO_INCREMENT,
  `glossaryid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `concept` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `definition` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `definitionformat` tinyint NOT NULL DEFAULT '0',
  `definitiontrust` tinyint NOT NULL DEFAULT '0',
  `attachment` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `teacherentry` tinyint NOT NULL DEFAULT '0',
  `sourceglossaryid` bigint NOT NULL DEFAULT '0',
  `usedynalink` tinyint NOT NULL DEFAULT '1',
  `casesensitive` tinyint NOT NULL DEFAULT '0',
  `fullmatch` tinyint NOT NULL DEFAULT '1',
  `approved` tinyint 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';

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

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

CREATE TABLE `[[dbprefix]]glossary_entries_categories` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `categoryid` bigint NOT NULL DEFAULT '0',
  `entryid` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]glossary_formats` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `popupformatname` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `visible` tinyint NOT NULL DEFAULT '1',
  `showgroup` tinyint NOT NULL DEFAULT '1',
  `showtabs` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `defaultmode` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `defaulthook` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `sortkey` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `sortorder` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] 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]]gradepenalty_duedate_rule`
--

CREATE TABLE `[[dbprefix]]gradepenalty_duedate_rule` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contextid` bigint NOT NULL,
  `sortorder` bigint NOT NULL DEFAULT '0',
  `overdueby` bigint NOT NULL,
  `penalty` double(10,0) NOT NULL,
  `usermodified` bigint NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradduedrule_con_ix` (`contextid`),
  KEY `[[dbprefix]]gradduedrule_use_ix` (`usermodified`)
) ENGINE=InnoDB  DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Penalty rules' AUTO_INCREMENT=2 ;

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

INSERT INTO `[[dbprefix]]gradepenalty_duedate_rule` VALUES
(1, 1, 0, 1, 0, 0, [[timestamp]], [[timestamp]]);

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

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

CREATE TABLE `[[dbprefix]]grade_categories` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint NOT NULL,
  `parent` bigint DEFAULT NULL,
  `depth` bigint NOT NULL DEFAULT '0',
  `path` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `fullname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `aggregation` bigint NOT NULL DEFAULT '0',
  `keephigh` bigint NOT NULL DEFAULT '0',
  `droplow` bigint NOT NULL DEFAULT '0',
  `aggregateonlygraded` tinyint(1) NOT NULL DEFAULT '0',
  `aggregateoutcomes` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `hidden` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]grade_categories_history` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `action` bigint NOT NULL DEFAULT '0',
  `oldid` bigint NOT NULL,
  `source` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timemodified` bigint DEFAULT NULL,
  `loggeduser` bigint DEFAULT NULL,
  `courseid` bigint NOT NULL,
  `parent` bigint DEFAULT NULL,
  `depth` bigint NOT NULL DEFAULT '0',
  `path` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `fullname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `aggregation` bigint NOT NULL DEFAULT '0',
  `keephigh` bigint NOT NULL DEFAULT '0',
  `droplow` bigint 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 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';

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

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

CREATE TABLE `[[dbprefix]]grade_grades` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `itemid` bigint NOT NULL,
  `userid` bigint 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 DEFAULT NULL,
  `usermodified` bigint DEFAULT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `hidden` bigint NOT NULL DEFAULT '0',
  `locked` bigint NOT NULL DEFAULT '0',
  `locktime` bigint NOT NULL DEFAULT '0',
  `exported` bigint NOT NULL DEFAULT '0',
  `overridden` bigint NOT NULL DEFAULT '0',
  `excluded` bigint NOT NULL DEFAULT '0',
  `feedback` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `feedbackformat` bigint NOT NULL DEFAULT '0',
  `information` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `informationformat` bigint NOT NULL DEFAULT '0',
  `timecreated` bigint DEFAULT NULL,
  `timemodified` bigint DEFAULT NULL,
  `aggregationstatus` varchar(10) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT 'unknown',
  `aggregationweight` decimal(10,5) DEFAULT NULL,
  `deductedmark` decimal(10,5) NOT NULL DEFAULT '0.00000',
  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';

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

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

CREATE TABLE `[[dbprefix]]grade_grades_history` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `action` bigint NOT NULL DEFAULT '0',
  `oldid` bigint NOT NULL,
  `source` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timemodified` bigint DEFAULT NULL,
  `loggeduser` bigint DEFAULT NULL,
  `itemid` bigint NOT NULL,
  `userid` bigint 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 DEFAULT NULL,
  `usermodified` bigint DEFAULT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `hidden` bigint NOT NULL DEFAULT '0',
  `locked` bigint NOT NULL DEFAULT '0',
  `locktime` bigint NOT NULL DEFAULT '0',
  `exported` bigint NOT NULL DEFAULT '0',
  `overridden` bigint NOT NULL DEFAULT '0',
  `excluded` bigint NOT NULL DEFAULT '0',
  `feedback` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `feedbackformat` bigint NOT NULL DEFAULT '0',
  `information` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `informationformat` bigint NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `[[dbprefix]]gradgradhist_act_ix` (`action`),
  KEY `[[dbprefix]]gradgradhist_tim_ix` (`timemodified`),
  KEY `[[dbprefix]]gradgradhist_useiteti_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';

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

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

CREATE TABLE `[[dbprefix]]grade_import_newitem` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `itemname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `importcode` bigint NOT NULL,
  `importer` bigint 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 ';

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

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

CREATE TABLE `[[dbprefix]]grade_import_values` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `itemid` bigint DEFAULT NULL,
  `newgradeitem` bigint DEFAULT NULL,
  `userid` bigint NOT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `feedback` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `importcode` bigint NOT NULL,
  `importer` bigint 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`),
  KEY `[[dbprefix]]gradimpovalu_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=[[utf8]] COLLATE=[[collate]] [[row_format]] COMMENT='Temporary table for importing grades';

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

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

CREATE TABLE `[[dbprefix]]grade_items` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint DEFAULT NULL,
  `categoryid` bigint DEFAULT NULL,
  `itemname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `itemtype` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemmodule` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `iteminstance` bigint DEFAULT NULL,
  `itemnumber` bigint DEFAULT NULL,
  `iteminfo` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `idnumber` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `calculation` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `gradetype` smallint NOT NULL DEFAULT '1',
  `grademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `grademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `scaleid` bigint DEFAULT NULL,
  `outcomeid` bigint 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 NOT NULL DEFAULT '0',
  `display` bigint NOT NULL DEFAULT '0',
  `decimals` tinyint(1) DEFAULT NULL,
  `hidden` bigint NOT NULL DEFAULT '0',
  `locked` bigint NOT NULL DEFAULT '0',
  `locktime` bigint NOT NULL DEFAULT '0',
  `needsupdate` bigint NOT NULL DEFAULT '0',
  `weightoverride` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint DEFAULT NULL,
  `timemodified` bigint 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_iteiteitecou_ix` (`itemtype`,`itemmodule`,`iteminstance`,`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 NOT NULL AUTO_INCREMENT,
  `action` bigint NOT NULL DEFAULT '0',
  `oldid` bigint NOT NULL,
  `source` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timemodified` bigint DEFAULT NULL,
  `loggeduser` bigint DEFAULT NULL,
  `courseid` bigint DEFAULT NULL,
  `categoryid` bigint DEFAULT NULL,
  `itemname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `itemtype` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemmodule` varchar(30) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `iteminstance` bigint DEFAULT NULL,
  `itemnumber` bigint DEFAULT NULL,
  `iteminfo` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `idnumber` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `calculation` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `gradetype` smallint NOT NULL DEFAULT '1',
  `grademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `grademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `scaleid` bigint DEFAULT NULL,
  `outcomeid` bigint 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 NOT NULL DEFAULT '0',
  `hidden` bigint NOT NULL DEFAULT '0',
  `locked` bigint NOT NULL DEFAULT '0',
  `locktime` bigint NOT NULL DEFAULT '0',
  `needsupdate` bigint NOT NULL DEFAULT '0',
  `display` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]grade_letters` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contextid` bigint NOT NULL,
  `lowerboundary` decimal(10,5) NOT NULL,
  `letter` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]grade_outcomes` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint DEFAULT NULL,
  `shortname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `fullname` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `scaleid` bigint DEFAULT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint NOT NULL DEFAULT '0',
  `timecreated` bigint DEFAULT NULL,
  `timemodified` bigint DEFAULT NULL,
  `usermodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]grade_outcomes_courses` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint NOT NULL,
  `outcomeid` bigint 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.';

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

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

CREATE TABLE `[[dbprefix]]grade_outcomes_history` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `action` bigint NOT NULL DEFAULT '0',
  `oldid` bigint NOT NULL,
  `source` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timemodified` bigint DEFAULT NULL,
  `loggeduser` bigint DEFAULT NULL,
  `courseid` bigint DEFAULT NULL,
  `shortname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `fullname` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `scaleid` bigint DEFAULT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint 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';

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

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

CREATE TABLE `[[dbprefix]]grade_settings` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint NOT NULL,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `value` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  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';

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

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

CREATE TABLE `[[dbprefix]]gradingform_guide_comments` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `definitionid` bigint NOT NULL,
  `sortorder` bigint NOT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint 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';

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

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

CREATE TABLE `[[dbprefix]]gradingform_guide_criteria` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `definitionid` bigint NOT NULL,
  `sortorder` bigint NOT NULL,
  `shortname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint DEFAULT NULL,
  `descriptionmarkers` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionmarkersformat` tinyint 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.';

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

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

CREATE TABLE `[[dbprefix]]gradingform_guide_fillings` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `instanceid` bigint NOT NULL,
  `criterionid` bigint NOT NULL,
  `remark` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `remarkformat` tinyint 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';

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

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

CREATE TABLE `[[dbprefix]]gradingform_rubric_criteria` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `definitionid` bigint NOT NULL,
  `sortorder` bigint NOT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint 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.';

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

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

CREATE TABLE `[[dbprefix]]gradingform_rubric_fillings` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `instanceid` bigint NOT NULL,
  `criterionid` bigint NOT NULL,
  `levelid` bigint DEFAULT NULL,
  `remark` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `remarkformat` tinyint 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 ';

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

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

CREATE TABLE `[[dbprefix]]gradingform_rubric_levels` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `criterionid` bigint NOT NULL,
  `score` decimal(10,5) NOT NULL,
  `definition` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `definitionformat` bigint 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.';

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

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

CREATE TABLE `[[dbprefix]]grading_areas` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `contextid` bigint NOT NULL,
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `areaname` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `activemethod` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] 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.';

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

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

CREATE TABLE `[[dbprefix]]grading_definitions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `areaid` bigint NOT NULL,
  `method` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint DEFAULT NULL,
  `status` bigint NOT NULL DEFAULT '0',
  `copiedfromid` bigint DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `usercreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `usermodified` bigint NOT NULL,
  `timecopied` bigint DEFAULT '0',
  `options` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  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';

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

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

CREATE TABLE `[[dbprefix]]grading_instances` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `definitionid` bigint NOT NULL,
  `raterid` bigint NOT NULL,
  `itemid` bigint DEFAULT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `status` bigint NOT NULL DEFAULT '0',
  `feedback` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `feedbackformat` tinyint DEFAULT NULL,
  `timemodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]groupings` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `idnumber` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint NOT NULL DEFAULT '0',
  `configdata` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]groupings_groups` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `groupingid` bigint NOT NULL DEFAULT '0',
  `groupid` bigint NOT NULL DEFAULT '0',
  `timeadded` bigint 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 ';

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

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

CREATE TABLE `[[dbprefix]]groups` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `courseid` bigint NOT NULL,
  `idnumber` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `name` varchar(254) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `descriptionformat` tinyint NOT NULL DEFAULT '0',
  `enrolmentkey` varchar(50) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `picture` bigint NOT NULL DEFAULT '0',
  `visibility` tinyint(1) NOT NULL DEFAULT '0',
  `participation` tinyint(1) NOT NULL DEFAULT '1',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint 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 NOT NULL AUTO_INCREMENT,
  `groupid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `timeadded` bigint NOT NULL DEFAULT '0',
  `component` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `itemid` bigint 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 NOT NULL AUTO_INCREMENT,
  `jsoncontent` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `mainlibraryid` bigint NOT NULL,
  `displayoptions` smallint DEFAULT NULL,
  `pathnamehash` varchar(40) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contenthash` varchar(40) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `filtered` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]h5pactivity` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL,
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `introformat` smallint NOT NULL DEFAULT '0',
  `grade` bigint DEFAULT '0',
  `displayoptions` smallint NOT NULL DEFAULT '0',
  `enabletracking` tinyint(1) NOT NULL DEFAULT '1',
  `grademethod` smallint NOT NULL DEFAULT '1',
  `reviewmode` smallint 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.';

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

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

CREATE TABLE `[[dbprefix]]h5pactivity_attempts` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `h5pactivityid` bigint NOT NULL,
  `userid` bigint NOT NULL,
  `timecreated` bigint NOT NULL,
  `timemodified` bigint NOT NULL,
  `attempt` mediumint NOT NULL DEFAULT '1',
  `rawscore` bigint DEFAULT '0',
  `maxscore` bigint DEFAULT '0',
  `scaled` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `duration` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]h5pactivity_attempts_results` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `attemptid` bigint NOT NULL,
  `subcontent` varchar(128) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `timecreated` bigint NOT NULL,
  `interactiontype` varchar(128) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `description` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `correctpattern` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `response` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `additionals` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `rawscore` bigint NOT NULL DEFAULT '0',
  `maxscore` bigint NOT NULL DEFAULT '0',
  `duration` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]h5p_contents_libraries` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `h5pid` bigint NOT NULL,
  `libraryid` bigint NOT NULL,
  `dependencytype` varchar(10) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `dropcss` tinyint(1) NOT NULL,
  `weight` bigint 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.';

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

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

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

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

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

CREATE TABLE `[[dbprefix]]h5p_libraries_cachedassets` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `libraryid` bigint NOT NULL,
  `hash` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]h5p_library_dependencies` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `libraryid` bigint NOT NULL,
  `requiredlibraryid` bigint NOT NULL,
  `dependencytype` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

CREATE TABLE `[[dbprefix]]imscp` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `introformat` smallint NOT NULL DEFAULT '0',
  `revision` bigint NOT NULL DEFAULT '0',
  `keepold` bigint NOT NULL DEFAULT '-1',
  `structure` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timemodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]infected_files` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `filename` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `quarantinedfile` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `userid` bigint NOT NULL,
  `reason` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `timecreated` bigint 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.';

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

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

CREATE TABLE `[[dbprefix]]label` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `course` bigint NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `intro` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `introformat` smallint DEFAULT '0',
  `timemodified` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]lesson_answers` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `lessonid` bigint NOT NULL DEFAULT '0',
  `pageid` bigint NOT NULL DEFAULT '0',
  `jumpto` bigint NOT NULL DEFAULT '0',
  `grade` smallint NOT NULL DEFAULT '0',
  `score` bigint NOT NULL DEFAULT '0',
  `flags` smallint NOT NULL DEFAULT '0',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `answer` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `answerformat` tinyint NOT NULL DEFAULT '0',
  `response` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `responseformat` tinyint 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';

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

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

CREATE TABLE `[[dbprefix]]lesson_attempts` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `lessonid` bigint NOT NULL DEFAULT '0',
  `pageid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `answerid` bigint NOT NULL DEFAULT '0',
  `retry` smallint NOT NULL DEFAULT '0',
  `correct` bigint NOT NULL DEFAULT '0',
  `useranswer` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `timeseen` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]lesson_branch` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `lessonid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `pageid` bigint NOT NULL DEFAULT '0',
  `retry` bigint NOT NULL DEFAULT '0',
  `flag` smallint NOT NULL DEFAULT '0',
  `timeseen` bigint NOT NULL DEFAULT '0',
  `nextpageid` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]lesson_grades` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `lessonid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `grade` double NOT NULL DEFAULT '0',
  `late` smallint NOT NULL DEFAULT '0',
  `completed` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]lesson_pages` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `lessonid` bigint NOT NULL DEFAULT '0',
  `prevpageid` bigint NOT NULL DEFAULT '0',
  `nextpageid` bigint NOT NULL DEFAULT '0',
  `qtype` smallint NOT NULL DEFAULT '0',
  `qoption` smallint NOT NULL DEFAULT '0',
  `layout` smallint NOT NULL DEFAULT '1',
  `display` smallint NOT NULL DEFAULT '1',
  `timecreated` bigint NOT NULL DEFAULT '0',
  `timemodified` bigint NOT NULL DEFAULT '0',
  `title` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `contents` longtext CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL,
  `contentsformat` tinyint 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';

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

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

CREATE TABLE `[[dbprefix]]lesson_timer` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `lessonid` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `starttime` bigint NOT NULL DEFAULT '0',
  `lessontime` bigint NOT NULL DEFAULT '0',
  `completed` tinyint(1) DEFAULT '0',
  `timemodifiedoffline` bigint 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';

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

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

CREATE TABLE `[[dbprefix]]license` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `shortname` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `fullname` longtext CHARACTER SET [[utf8]] COLLATE [[collate]],
  `source` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `version` bigint NOT NULL DEFAULT '0',
  `custom` tinyint(1) NOT NULL DEFAULT '0',
  `sortorder` mediumint 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-4.0', 'Creative Commons - 4.0 International', 'https://creativecommons.org/licenses/by/4.0/', 1, 2022120100, 0, 4),
(5, 'cc-nc-4.0', 'Creative Commons - NonCommercial 4.0 International', 'https://creativecommons.org/licenses/by-nc/4.0/', 1, 2022120100, 0, 5),
(6, 'cc-nd-4.0', 'Creative Commons - NoDerivatives 4.0 International', 'https://creativecommons.org/licenses/by-nd/4.0/', 1, 2022120100, 0, 6),
(7, 'cc-nc-nd-4.0', 'Creative Commons - NonCommercial-NoDerivatives 4.0 International', 'https://creativecommons.org/licenses/by-nc-nd/4.0/', 1, 2022120100, 0, 7),
(8, 'cc-nc-sa-4.0', 'Creative Commons - NonCommercial-ShareAlike 4.0 International', 'https://creativecommons.org/licenses/by-nc-sa/4.0/', 1, 2022120100, 0, 8),
(9, 'cc-sa-4.0', 'Creative Commons - ShareAlike 4.0 International', 'https://creativecommons.org/licenses/by-sa/4.0/', 1, 2022120100, 0, 9);

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

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

CREATE TABLE `[[dbprefix]]lock_db` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `resourcekey` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `expires` bigint DEFAULT NULL,
  `owner` varchar(36) CHARACTER SET [[utf8]] COLLATE [[collate]] 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.';

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

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

CREATE TABLE `[[dbprefix]]log` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `time` bigint NOT NULL DEFAULT '0',
  `userid` bigint NOT NULL DEFAULT '0',
  `ip` varchar(45) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `course` bigint NOT NULL DEFAULT '0',
  `module` varchar(20) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `cmid` bigint NOT NULL DEFAULT '0',
  `action` varchar(40) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `url` varchar(100) CHARACTER SET [[utf8]] COLLATE [[collate]] NOT NULL DEFAULT '',
  `info` varchar(255) CHARACTER SET [[utf8]] COLLATE [[collate]] 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';

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

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

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

--
