
CREATE TABLE `eoay_assign` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `alwaysshowdescription` tinyint(2) NOT NULL DEFAULT '0',
  `nosubmissions` tinyint(2) NOT NULL DEFAULT '0',
  `submissiondrafts` tinyint(2) NOT NULL DEFAULT '0',
  `sendnotifications` tinyint(2) NOT NULL DEFAULT '0',
  `sendlatenotifications` tinyint(2) NOT NULL DEFAULT '0',
  `duedate` bigint(10) NOT NULL DEFAULT '0',
  `allowsubmissionsfromdate` bigint(10) NOT NULL DEFAULT '0',
  `grade` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `completionsubmit` tinyint(2) NOT NULL DEFAULT '0',
  `cutoffdate` bigint(10) NOT NULL DEFAULT '0',
  `teamsubmission` tinyint(2) NOT NULL DEFAULT '0',
  `requireallteammemberssubmit` tinyint(2) NOT NULL DEFAULT '0',
  `teamsubmissiongroupingid` bigint(10) NOT NULL DEFAULT '0',
  `blindmarking` tinyint(2) NOT NULL DEFAULT '0',
  `revealidentities` tinyint(2) NOT NULL DEFAULT '0',
  `attemptreopenmethod` varchar(10) NOT NULL DEFAULT 'none',
  `maxattempts` mediumint(6) NOT NULL DEFAULT '-1',
  `markingworkflow` tinyint(2) NOT NULL DEFAULT '0',
  `markingallocation` tinyint(2) NOT NULL DEFAULT '0',
  `sendstudentnotifications` tinyint(2) NOT NULL DEFAULT '1',
  `preventsubmissionnotingroup` tinyint(2) NOT NULL DEFAULT '0',
  `requiresubmissionstatement` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assi_cou_ix` (`course`),
  KEY `eoay_assi_tea_ix` (`teamsubmissiongroupingid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table saves information about an instance of mod_assign';

CREATE TABLE `eoay_assign_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `grader` bigint(10) NOT NULL DEFAULT '0',
  `grade` decimal(10,5) DEFAULT '0.00000',
  `attemptnumber` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_assigrad_assuseatt_uix` (`assignment`,`userid`,`attemptnumber`),
  KEY `eoay_assigrad_use_ix` (`userid`),
  KEY `eoay_assigrad_ass_ix` (`assignment`),
  KEY `eoay_assigrad_att_ix` (`attemptnumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Grading information about a single assignment submission.';

CREATE TABLE `eoay_assign_overrides` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) DEFAULT NULL,
  `userid` bigint(10) DEFAULT NULL,
  `sortorder` bigint(10) DEFAULT NULL,
  `allowsubmissionsfromdate` bigint(10) DEFAULT NULL,
  `duedate` bigint(10) DEFAULT NULL,
  `cutoffdate` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_assiover_ass_ix` (`assignid`),
  KEY `eoay_assiover_gro_ix` (`groupid`),
  KEY `eoay_assiover_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_assign_plugin_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `plugin` varchar(28) NOT NULL DEFAULT '',
  `subtype` varchar(28) NOT NULL DEFAULT '',
  `name` varchar(28) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_assiplugconf_plu_ix` (`plugin`),
  KEY `eoay_assiplugconf_sub_ix` (`subtype`),
  KEY `eoay_assiplugconf_nam_ix` (`name`),
  KEY `eoay_assiplugconf_ass_ix` (`assignment`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Config data for an instance of a plugin in an assignment.';

CREATE TABLE `eoay_assign_submission` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `status` varchar(10) DEFAULT NULL,
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `attemptnumber` bigint(10) NOT NULL DEFAULT '0',
  `latest` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_assisubm_assusegroatt_uix` (`assignment`,`userid`,`groupid`,`attemptnumber`),
  KEY `eoay_assisubm_use_ix` (`userid`),
  KEY `eoay_assisubm_ass_ix` (`assignment`),
  KEY `eoay_assisubm_att_ix` (`attemptnumber`),
  KEY `eoay_assisubm_assusegrolat_ix` (`assignment`,`userid`,`groupid`,`latest`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table keeps information about student interactions with';

CREATE TABLE `eoay_assign_user_flags` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `mailed` smallint(4) NOT NULL DEFAULT '0',
  `extensionduedate` bigint(10) NOT NULL DEFAULT '0',
  `workflowstate` varchar(20) DEFAULT NULL,
  `allocatedmarker` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assiuserflag_mai_ix` (`mailed`),
  KEY `eoay_assiuserflag_use_ix` (`userid`),
  KEY `eoay_assiuserflag_ass_ix` (`assignment`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_assign_user_mapping` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assiusermapp_ass_ix` (`assignment`),
  KEY `eoay_assiusermapp_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_assignfeedback_comments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `grade` bigint(10) NOT NULL DEFAULT '0',
  `commenttext` longtext,
  `commentformat` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assicomm_ass_ix` (`assignment`),
  KEY `eoay_assicomm_gra_ix` (`grade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Text feedback for submitted assignments';

CREATE TABLE `eoay_assignfeedback_editpdf_annot` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `gradeid` bigint(10) NOT NULL DEFAULT '0',
  `pageno` bigint(10) NOT NULL DEFAULT '0',
  `x` bigint(10) DEFAULT '0',
  `y` bigint(10) DEFAULT '0',
  `endx` bigint(10) DEFAULT '0',
  `endy` bigint(10) DEFAULT '0',
  `path` longtext,
  `type` varchar(10) DEFAULT 'line',
  `colour` varchar(10) DEFAULT 'black',
  `draft` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `eoay_assieditanno_grapag_ix` (`gradeid`,`pageno`),
  KEY `eoay_assieditanno_gra_ix` (`gradeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='stores annotations added to pdfs submitted by students';

CREATE TABLE `eoay_assignfeedback_editpdf_cmnt` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `gradeid` bigint(10) NOT NULL DEFAULT '0',
  `x` bigint(10) DEFAULT '0',
  `y` bigint(10) DEFAULT '0',
  `width` bigint(10) DEFAULT '120',
  `rawtext` longtext,
  `pageno` bigint(10) NOT NULL DEFAULT '0',
  `colour` varchar(10) DEFAULT 'black',
  `draft` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `eoay_assieditcmnt_grapag_ix` (`gradeid`,`pageno`),
  KEY `eoay_assieditcmnt_gra_ix` (`gradeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores comments added to pdfs';

CREATE TABLE `eoay_assignfeedback_editpdf_queue` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `submissionid` bigint(10) NOT NULL,
  `submissionattempt` bigint(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_assignfeedback_editpdf_quick` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `rawtext` longtext NOT NULL,
  `width` bigint(10) NOT NULL DEFAULT '120',
  `colour` varchar(10) DEFAULT 'yellow',
  PRIMARY KEY (`id`),
  KEY `eoay_assieditquic_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores teacher specified quicklist comments';

CREATE TABLE `eoay_assignfeedback_file` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `grade` bigint(10) NOT NULL DEFAULT '0',
  `numfiles` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assifile_ass2_ix` (`assignment`),
  KEY `eoay_assifile_gra_ix` (`grade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores info about the number of files submitted by a student';

CREATE TABLE `eoay_assignment` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `assignmenttype` varchar(50) NOT NULL DEFAULT '',
  `resubmit` tinyint(2) NOT NULL DEFAULT '0',
  `preventlate` tinyint(2) NOT NULL DEFAULT '0',
  `emailteachers` tinyint(2) NOT NULL DEFAULT '0',
  `var1` bigint(10) DEFAULT '0',
  `var2` bigint(10) DEFAULT '0',
  `var3` bigint(10) DEFAULT '0',
  `var4` bigint(10) DEFAULT '0',
  `var5` bigint(10) DEFAULT '0',
  `maxbytes` bigint(10) NOT NULL DEFAULT '100000',
  `timedue` bigint(10) NOT NULL DEFAULT '0',
  `timeavailable` bigint(10) NOT NULL DEFAULT '0',
  `grade` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assi_cou2_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines assignments';

CREATE TABLE `eoay_assignment_submissions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `numfiles` bigint(10) NOT NULL DEFAULT '0',
  `data1` longtext,
  `data2` longtext,
  `grade` bigint(11) NOT NULL DEFAULT '0',
  `submissioncomment` longtext NOT NULL,
  `format` smallint(4) NOT NULL DEFAULT '0',
  `teacher` bigint(10) NOT NULL DEFAULT '0',
  `timemarked` bigint(10) NOT NULL DEFAULT '0',
  `mailed` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assisubm_use2_ix` (`userid`),
  KEY `eoay_assisubm_mai_ix` (`mailed`),
  KEY `eoay_assisubm_tim_ix` (`timemarked`),
  KEY `eoay_assisubm_ass2_ix` (`assignment`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Info about submitted assignments';

CREATE TABLE `eoay_assignment_upgrade` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `oldcmid` bigint(10) NOT NULL DEFAULT '0',
  `oldinstance` bigint(10) NOT NULL DEFAULT '0',
  `newcmid` bigint(10) NOT NULL DEFAULT '0',
  `newinstance` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assiupgr_old_ix` (`oldcmid`),
  KEY `eoay_assiupgr_old2_ix` (`oldinstance`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_assignsubmission_file` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `submission` bigint(10) NOT NULL DEFAULT '0',
  `numfiles` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assifile_ass_ix` (`assignment`),
  KEY `eoay_assifile_sub_ix` (`submission`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Info about file submissions for assignments';

CREATE TABLE `eoay_assignsubmission_onlinetext` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `assignment` bigint(10) NOT NULL DEFAULT '0',
  `submission` bigint(10) NOT NULL DEFAULT '0',
  `onlinetext` longtext,
  `onlineformat` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_assionli_ass_ix` (`assignment`),
  KEY `eoay_assionli_sub_ix` (`submission`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Info about onlinetext submission';

CREATE TABLE `eoay_backup_controllers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `backupid` varchar(32) NOT NULL DEFAULT '',
  `operation` varchar(20) NOT NULL DEFAULT 'backup',
  `type` varchar(10) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `format` varchar(20) NOT NULL DEFAULT '',
  `interactive` smallint(4) NOT NULL,
  `purpose` smallint(4) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `status` smallint(4) NOT NULL,
  `execution` smallint(4) NOT NULL,
  `executiontime` bigint(10) NOT NULL,
  `checksum` varchar(32) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `controller` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_backcont_bac_uix` (`backupid`),
  KEY `eoay_backcont_typite_ix` (`type`,`itemid`),
  KEY `eoay_backcont_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='To store the backup_controllers as they are used';

CREATE TABLE `eoay_backup_courses` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `laststarttime` bigint(10) NOT NULL DEFAULT '0',
  `lastendtime` bigint(10) NOT NULL DEFAULT '0',
  `laststatus` varchar(1) NOT NULL DEFAULT '5',
  `nextstarttime` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_backcour_cou_uix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='To store every course backup status';

CREATE TABLE `eoay_backup_logs` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `backupid` varchar(32) NOT NULL DEFAULT '',
  `loglevel` smallint(4) NOT NULL,
  `message` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_backlogs_bacid_uix` (`backupid`,`id`),
  KEY `eoay_backlogs_bac_ix` (`backupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='To store all the logs from backup and restore operations (by';

CREATE TABLE `eoay_badge` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `usercreated` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `issuername` varchar(255) NOT NULL DEFAULT '',
  `issuerurl` varchar(255) NOT NULL DEFAULT '',
  `issuercontact` varchar(255) DEFAULT NULL,
  `expiredate` bigint(10) DEFAULT NULL,
  `expireperiod` bigint(10) DEFAULT NULL,
  `type` tinyint(1) NOT NULL DEFAULT '1',
  `courseid` bigint(10) DEFAULT NULL,
  `message` longtext NOT NULL,
  `messagesubject` longtext NOT NULL,
  `attachment` tinyint(1) NOT NULL DEFAULT '1',
  `notification` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `nextcron` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_badg_typ_ix` (`type`),
  KEY `eoay_badg_cou_ix` (`courseid`),
  KEY `eoay_badg_use_ix` (`usermodified`),
  KEY `eoay_badg_use2_ix` (`usercreated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_backpack` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `email` varchar(100) NOT NULL DEFAULT '',
  `backpackurl` varchar(255) NOT NULL DEFAULT '',
  `backpackuid` bigint(10) NOT NULL,
  `autosync` tinyint(1) NOT NULL DEFAULT '0',
  `password` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_badgback_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_criteria` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `badgeid` bigint(10) NOT NULL DEFAULT '0',
  `criteriatype` bigint(10) DEFAULT NULL,
  `method` tinyint(1) NOT NULL DEFAULT '1',
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_badgcrit_badcri_uix` (`badgeid`,`criteriatype`),
  KEY `eoay_badgcrit_cri_ix` (`criteriatype`),
  KEY `eoay_badgcrit_bad_ix` (`badgeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_criteria_met` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `issuedid` bigint(10) DEFAULT NULL,
  `critid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `datemet` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_badgcritmet_cri_ix` (`critid`),
  KEY `eoay_badgcritmet_use_ix` (`userid`),
  KEY `eoay_badgcritmet_iss_ix` (`issuedid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_criteria_param` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `critid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_badgcritpara_cri_ix` (`critid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_external` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `backpackid` bigint(10) NOT NULL,
  `collectionid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_badgexte_bac_ix` (`backpackid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_issued` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `badgeid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `uniquehash` longtext NOT NULL,
  `dateissued` bigint(10) NOT NULL DEFAULT '0',
  `dateexpire` bigint(10) DEFAULT NULL,
  `visible` tinyint(1) NOT NULL DEFAULT '0',
  `issuernotified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_badgissu_baduse_uix` (`badgeid`,`userid`),
  KEY `eoay_badgissu_bad_ix` (`badgeid`),
  KEY `eoay_badgissu_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_badge_manual_award` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `badgeid` bigint(10) NOT NULL,
  `recipientid` bigint(10) NOT NULL,
  `issuerid` bigint(10) NOT NULL,
  `issuerrole` bigint(10) NOT NULL,
  `datemet` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_badgmanuawar_bad_ix` (`badgeid`),
  KEY `eoay_badgmanuawar_rec_ix` (`recipientid`),
  KEY `eoay_badgmanuawar_iss_ix` (`issuerid`),
  KEY `eoay_badgmanuawar_iss2_ix` (`issuerrole`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_block` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(40) NOT NULL DEFAULT '',
  `cron` bigint(10) NOT NULL DEFAULT '0',
  `lastcron` bigint(10) NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_bloc_nam_uix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COMMENT='contains all installed blocks';
INSERT INTO `eoay_block` VALUES (1,'activity_modules',0,0,1),(2,'admin_bookmarks',0,0,1),(3,'blog_menu',0,0,1),(4,'blog_recent',0,0,1),(5,'blog_tags',0,0,1),(6,'calendar_month',0,0,1),(7,'calendar_upcoming',0,0,1),(8,'comments',0,0,1),(9,'community',0,0,1),(10,'completionstatus',0,0,1),(11,'course_list',0,0,1),(12,'course_overview',0,0,1),(13,'course_summary',0,0,1),(14,'feedback',0,0,0),(15,'glossary_random',0,0,1),(16,'html',0,0,1),(17,'login',0,0,1),(18,'mentees',0,0,1),(19,'messages',0,0,1),(20,'mnet_hosts',0,0,1),(21,'myprofile',0,0,1),(22,'navigation',0,0,1),(23,'news_items',0,0,1),(24,'online_users',0,0,1),(25,'participants',0,0,1),(26,'private_files',0,0,1),(27,'quiz_results',0,0,0),(28,'recent_activity',86400,0,1),(29,'rss_client',300,0,1),(30,'search_forums',0,0,1),(31,'section_links',0,0,1),(32,'selfcompletion',0,0,1),(33,'settings',0,0,1),(34,'site_main_menu',0,0,1),(35,'social_activities',0,0,1),(36,'tag_flickr',0,0,1),(37,'tag_youtube',0,0,1),(38,'tags',0,0,1),(39,'activity_results',0,0,1),(40,'badges',0,0,1),(41,'globalsearch',0,0,1),(42,'lp',0,0,1);

CREATE TABLE `eoay_block_community` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `coursename` varchar(255) NOT NULL DEFAULT '',
  `coursedescription` longtext,
  `courseurl` varchar(255) NOT NULL DEFAULT '',
  `imageurl` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Community block';

CREATE TABLE `eoay_block_instances` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `blockname` varchar(40) NOT NULL DEFAULT '',
  `parentcontextid` bigint(10) NOT NULL,
  `showinsubcontexts` smallint(4) NOT NULL,
  `requiredbytheme` smallint(4) NOT NULL DEFAULT '0',
  `pagetypepattern` varchar(64) NOT NULL DEFAULT '',
  `subpagepattern` varchar(16) DEFAULT NULL,
  `defaultregion` varchar(16) NOT NULL DEFAULT '',
  `defaultweight` bigint(10) NOT NULL,
  `configdata` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_blocinst_parshopagsub_ix` (`parentcontextid`,`showinsubcontexts`,`pagetypepattern`,`subpagepattern`),
  KEY `eoay_blocinst_par_ix` (`parentcontextid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='This table stores block instances. The type of block this is';
INSERT INTO `eoay_block_instances` VALUES (1,'site_main_menu',2,0,0,'site-index',NULL,'side-pre',0,''),(2,'course_summary',2,0,0,'site-index',NULL,'side-post',0,''),(3,'calendar_month',2,0,0,'site-index',NULL,'side-post',1,''),(4,'navigation',1,1,1,'*',NULL,'side-pre',0,''),(5,'settings',1,1,1,'*',NULL,'side-pre',1,''),(6,'admin_bookmarks',1,0,0,'admin-*',NULL,'side-pre',0,''),(7,'private_files',1,0,0,'my-index','2','side-post',0,''),(8,'online_users',1,0,0,'my-index','2','side-post',1,''),(9,'course_overview',1,0,0,'my-index','2','content',0,''),(10,'calendar_month',1,0,0,'my-index','2','side-post',0,''),(11,'calendar_upcoming',1,0,0,'my-index','2','side-post',0,'');

CREATE TABLE `eoay_block_positions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `blockinstanceid` bigint(10) NOT NULL,
  `contextid` bigint(10) NOT NULL,
  `pagetype` varchar(64) NOT NULL DEFAULT '',
  `subpage` varchar(16) NOT NULL DEFAULT '',
  `visible` smallint(4) NOT NULL,
  `region` varchar(16) NOT NULL DEFAULT '',
  `weight` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_blocposi_bloconpagsub_uix` (`blockinstanceid`,`contextid`,`pagetype`,`subpage`),
  KEY `eoay_blocposi_blo_ix` (`blockinstanceid`),
  KEY `eoay_blocposi_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the position of a sticky block_instance on a another ';

CREATE TABLE `eoay_block_recent_activity` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `cmid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `action` tinyint(1) NOT NULL,
  `modname` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_blocreceacti_coutim_ix` (`courseid`,`timecreated`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
INSERT INTO `eoay_block_recent_activity` VALUES (1,1,0,1464579106,0,3,NULL);

CREATE TABLE `eoay_block_rss_client` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `title` longtext NOT NULL,
  `preferredtitle` varchar(64) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `shared` tinyint(2) NOT NULL DEFAULT '0',
  `url` varchar(255) NOT NULL DEFAULT '',
  `skiptime` bigint(10) NOT NULL DEFAULT '0',
  `skipuntil` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Remote news feed information. Contains the news feed id, the';

CREATE TABLE `eoay_blog_association` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `blogid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_blogasso_con_ix` (`contextid`),
  KEY `eoay_blogasso_blo_ix` (`blogid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Associations of blog entries with courses and module instanc';

CREATE TABLE `eoay_blog_external` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` longtext,
  `url` longtext NOT NULL,
  `filtertags` varchar(255) DEFAULT NULL,
  `failedlastsync` tinyint(1) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) DEFAULT NULL,
  `timefetched` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_blogexte_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='External blog links used for RSS copying of blog entries to ';

CREATE TABLE `eoay_book` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `numbering` smallint(4) NOT NULL DEFAULT '0',
  `navstyle` smallint(4) NOT NULL DEFAULT '1',
  `customtitles` tinyint(2) NOT NULL DEFAULT '0',
  `revision` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines book';

CREATE TABLE `eoay_book_chapters` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `bookid` bigint(10) NOT NULL DEFAULT '0',
  `pagenum` bigint(10) NOT NULL DEFAULT '0',
  `subchapter` bigint(10) NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL DEFAULT '',
  `content` longtext NOT NULL,
  `contentformat` smallint(4) NOT NULL DEFAULT '0',
  `hidden` tinyint(2) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `importsrc` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines book_chapters';

CREATE TABLE `eoay_cache_filters` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) NOT NULL DEFAULT '',
  `version` bigint(10) NOT NULL DEFAULT '0',
  `md5key` varchar(32) NOT NULL DEFAULT '',
  `rawtext` longtext NOT NULL,
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_cachfilt_filmd5_ix` (`filter`,`md5key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='For keeping information about cached data';

CREATE TABLE `eoay_cache_flags` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `flagtype` varchar(255) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `value` longtext NOT NULL,
  `expiry` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_cachflag_fla_ix` (`flagtype`),
  KEY `eoay_cachflag_nam_ix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Cache of time-sensitive flags';
INSERT INTO `eoay_cache_flags` VALUES (1,'accesslib/dirtycontexts','/1',1490319048,'1',1490326248),(2,'userpreferenceschanged','2',1490319667,'1',1490326867);

CREATE TABLE `eoay_capabilities` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `captype` varchar(50) NOT NULL DEFAULT '',
  `contextlevel` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) NOT NULL DEFAULT '',
  `riskbitmask` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_capa_nam_uix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=602 DEFAULT CHARSET=utf8 COMMENT='this defines all capabilities';
INSERT INTO `eoay_capabilities` VALUES (1,'moodle/site:config','write',10,'moodle',62),(2,'moodle/site:readallmessages','read',10,'moodle',8),(3,'moodle/site:sendmessage','write',10,'moodle',16),(4,'moodle/site:approvecourse','write',10,'moodle',4),(5,'moodle/backup:backupcourse','write',50,'moodle',28),(6,'moodle/backup:backupsection','write',50,'moodle',28),(7,'moodle/backup:backupactivity','write',70,'moodle',28),(8,'moodle/backup:backuptargethub','write',50,'moodle',28),(9,'moodle/backup:backuptargetimport','write',50,'moodle',28),(10,'moodle/backup:downloadfile','write',50,'moodle',28),(11,'moodle/backup:configure','write',50,'moodle',28),(12,'moodle/backup:userinfo','read',50,'moodle',8),(13,'moodle/backup:anonymise','read',50,'moodle',8),(14,'moodle/restore:restorecourse','write',50,'moodle',28),(15,'moodle/restore:restoresection','write',50,'moodle',28),(16,'moodle/restore:restoreactivity','write',50,'moodle',28),(17,'moodle/restore:viewautomatedfilearea','write',50,'moodle',28),(18,'moodle/restore:restoretargethub','write',50,'moodle',28),(19,'moodle/restore:restoretargetimport','write',50,'moodle',28),(20,'moodle/restore:uploadfile','write',50,'moodle',28),(21,'moodle/restore:configure','write',50,'moodle',28),(22,'moodle/restore:rolldates','write',50,'moodle',0),(23,'moodle/restore:userinfo','write',50,'moodle',30),(24,'moodle/restore:createuser','write',10,'moodle',24),(25,'moodle/site:manageblocks','write',80,'moodle',20),(26,'moodle/site:accessallgroups','read',50,'moodle',0),(27,'moodle/site:viewfullnames','read',50,'moodle',0),(28,'moodle/site:viewuseridentity','read',50,'moodle',0),(29,'moodle/site:viewreports','read',50,'moodle',8),(30,'moodle/site:trustcontent','write',50,'moodle',4),(31,'moodle/site:uploadusers','write',10,'moodle',24),(32,'moodle/filter:manage','write',50,'moodle',0),(33,'moodle/user:create','write',10,'moodle',24),(34,'moodle/user:delete','write',10,'moodle',8),(35,'moodle/user:update','write',10,'moodle',24),(36,'moodle/user:viewdetails','read',50,'moodle',0),(37,'moodle/user:viewalldetails','read',30,'moodle',8),(38,'moodle/user:viewhiddendetails','read',50,'moodle',8),(39,'moodle/user:loginas','write',50,'moodle',30),(40,'moodle/user:managesyspages','write',10,'moodle',0),(41,'moodle/user:manageblocks','write',30,'moodle',0),(42,'moodle/user:manageownblocks','write',10,'moodle',0),(43,'moodle/user:manageownfiles','write',10,'moodle',0),(44,'moodle/my:configsyspages','write',10,'moodle',0),(45,'moodle/role:assign','write',50,'moodle',28),(46,'moodle/role:review','read',50,'moodle',8),(47,'moodle/role:override','write',50,'moodle',28),(48,'moodle/role:safeoverride','write',50,'moodle',16),(49,'moodle/role:manage','write',10,'moodle',28),(50,'moodle/role:switchroles','read',50,'moodle',12),(51,'moodle/category:manage','write',40,'moodle',4),(52,'moodle/category:viewhiddencategories','read',40,'moodle',0),(53,'moodle/cohort:manage','write',40,'moodle',0),(54,'moodle/cohort:assign','write',40,'moodle',0),(55,'moodle/cohort:view','read',50,'moodle',0),(56,'moodle/course:create','write',40,'moodle',4),(57,'moodle/course:request','write',10,'moodle',0),(58,'moodle/course:delete','write',50,'moodle',32),(59,'moodle/course:update','write',50,'moodle',4),(60,'moodle/course:view','read',50,'moodle',0),(61,'moodle/course:enrolreview','read',50,'moodle',8),(62,'moodle/course:enrolconfig','write',50,'moodle',8),(63,'moodle/course:bulkmessaging','write',50,'moodle',16),(64,'moodle/course:viewhiddenuserfields','read',50,'moodle',8),(65,'moodle/course:viewhiddencourses','read',50,'moodle',0),(66,'moodle/course:visibility','write',50,'moodle',0),(67,'moodle/course:managefiles','write',50,'moodle',4),(68,'moodle/course:ignorefilesizelimits','write',50,'moodle',0),(69,'moodle/course:manageactivities','write',70,'moodle',4),(70,'moodle/course:activityvisibility','write',70,'moodle',0),(71,'moodle/course:viewhiddenactivities','write',70,'moodle',0),(72,'moodle/course:viewparticipants','read',50,'moodle',0),(73,'moodle/course:changefullname','write',50,'moodle',4),(74,'moodle/course:changeshortname','write',50,'moodle',4),(75,'moodle/course:changeidnumber','write',50,'moodle',4),(76,'moodle/course:changecategory','write',50,'moodle',4),(77,'moodle/course:changesummary','write',50,'moodle',4),(78,'moodle/site:viewparticipants','read',10,'moodle',0),(79,'moodle/course:viewscales','read',50,'moodle',0),(80,'moodle/course:managescales','write',50,'moodle',0),(81,'moodle/course:managegroups','write',50,'moodle',0),(82,'moodle/course:reset','write',50,'moodle',32),(83,'moodle/blog:view','read',10,'moodle',0),(84,'moodle/blog:search','read',10,'moodle',0),(85,'moodle/blog:viewdrafts','read',10,'moodle',8),(86,'moodle/blog:create','write',10,'moodle',16),(87,'moodle/blog:manageentries','write',10,'moodle',16),(88,'moodle/blog:manageexternal','write',10,'moodle',16),(91,'moodle/calendar:manageownentries','write',50,'moodle',16),(92,'moodle/calendar:managegroupentries','write',50,'moodle',16),(93,'moodle/calendar:manageentries','write',50,'moodle',16),(94,'moodle/user:editprofile','write',30,'moodle',24),(95,'moodle/user:editownprofile','write',10,'moodle',16),(96,'moodle/user:changeownpassword','write',10,'moodle',0),(97,'moodle/user:readuserposts','read',30,'moodle',0),(98,'moodle/user:readuserblogs','read',30,'moodle',0),(99,'moodle/user:viewuseractivitiesreport','read',30,'moodle',8),(100,'moodle/user:editmessageprofile','write',30,'moodle',16),(101,'moodle/user:editownmessageprofile','write',10,'moodle',0),(102,'moodle/question:managecategory','write',50,'moodle',20),(103,'moodle/question:add','write',50,'moodle',20),(104,'moodle/question:editmine','write',50,'moodle',20),(105,'moodle/question:editall','write',50,'moodle',20),(106,'moodle/question:viewmine','read',50,'moodle',0),(107,'moodle/question:viewall','read',50,'moodle',0),(108,'moodle/question:usemine','read',50,'moodle',0),(109,'moodle/question:useall','read',50,'moodle',0),(110,'moodle/question:movemine','write',50,'moodle',0),(111,'moodle/question:moveall','write',50,'moodle',0),(112,'moodle/question:config','write',10,'moodle',2),(113,'moodle/question:flag','write',50,'moodle',0),(114,'moodle/site:doclinks','read',10,'moodle',0),(115,'moodle/course:sectionvisibility','write',50,'moodle',0),(116,'moodle/course:useremail','write',50,'moodle',0),(117,'moodle/course:viewhiddensections','write',50,'moodle',0),(118,'moodle/course:setcurrentsection','write',50,'moodle',0),(119,'moodle/site:mnetlogintoremote','read',10,'moodle',0),(120,'moodle/grade:viewall','read',50,'moodle',8),(121,'moodle/grade:view','read',50,'moodle',0),(122,'moodle/grade:viewhidden','read',50,'moodle',8),(123,'moodle/grade:import','write',50,'moodle',12),(124,'moodle/grade:export','read',50,'moodle',8),(125,'moodle/grade:manage','write',50,'moodle',12),(126,'moodle/grade:edit','write',50,'moodle',12),(127,'moodle/grade:managegradingforms','write',50,'moodle',12),(128,'moodle/grade:sharegradingforms','write',10,'moodle',4),(129,'moodle/grade:managesharedforms','write',10,'moodle',4),(130,'moodle/grade:manageoutcomes','write',50,'moodle',0),(131,'moodle/grade:manageletters','write',50,'moodle',0),(132,'moodle/grade:hide','write',50,'moodle',0),(133,'moodle/grade:lock','write',50,'moodle',0),(134,'moodle/grade:unlock','write',50,'moodle',0),(135,'moodle/my:manageblocks','write',10,'moodle',0),(136,'moodle/notes:view','read',50,'moodle',0),(137,'moodle/notes:manage','write',50,'moodle',16),(138,'moodle/tag:manage','write',10,'moodle',16),(140,'moodle/tag:edit','write',10,'moodle',16),(141,'moodle/tag:editblocks','write',10,'moodle',0),(142,'moodle/block:view','read',80,'moodle',0),(143,'moodle/block:edit','write',80,'moodle',20),(144,'moodle/portfolio:export','read',10,'moodle',0),(145,'moodle/comment:view','read',50,'moodle',0),(146,'moodle/comment:post','write',50,'moodle',24),(147,'moodle/comment:delete','write',50,'moodle',32),(148,'moodle/webservice:createtoken','write',10,'moodle',62),(149,'moodle/webservice:createmobiletoken','write',10,'moodle',24),(150,'moodle/rating:view','read',50,'moodle',0),(151,'moodle/rating:viewany','read',50,'moodle',8),(152,'moodle/rating:viewall','read',50,'moodle',8),(153,'moodle/rating:rate','write',50,'moodle',0),(154,'moodle/course:publish','write',10,'moodle',24),(155,'moodle/course:markcomplete','write',50,'moodle',0),(156,'moodle/community:add','write',10,'moodle',0),(157,'moodle/community:download','write',10,'moodle',0),(158,'mod/assign:view','read',70,'mod_assign',0),(159,'mod/assign:submit','write',70,'mod_assign',0),(160,'mod/assign:grade','write',70,'mod_assign',4),(161,'mod/assign:exportownsubmission','read',70,'mod_assign',0),(162,'mod/assign:addinstance','write',50,'mod_assign',4),(163,'mod/assignment:view','read',70,'mod_assignment',0),(164,'mod/assignment:addinstance','write',50,'mod_assignment',4),(165,'mod/assignment:submit','write',70,'mod_assignment',0),(166,'mod/assignment:grade','write',70,'mod_assignment',4),(167,'mod/assignment:exportownsubmission','read',70,'mod_assignment',0),(168,'mod/book:addinstance','write',50,'mod_book',4),(169,'mod/book:read','read',70,'mod_book',0),(170,'mod/book:viewhiddenchapters','read',70,'mod_book',0),(171,'mod/book:edit','write',70,'mod_book',4),(172,'mod/chat:addinstance','write',50,'mod_chat',4),(173,'mod/chat:chat','write',70,'mod_chat',16),(174,'mod/chat:readlog','read',70,'mod_chat',0),(175,'mod/chat:deletelog','write',70,'mod_chat',0),(176,'mod/chat:exportparticipatedsession','read',70,'mod_chat',8),(177,'mod/chat:exportsession','read',70,'mod_chat',8),(178,'mod/choice:addinstance','write',50,'mod_choice',4),(179,'mod/choice:choose','write',70,'mod_choice',0),(180,'mod/choice:readresponses','read',70,'mod_choice',0),(181,'mod/choice:deleteresponses','write',70,'mod_choice',0),(182,'mod/choice:downloadresponses','read',70,'mod_choice',0),(183,'mod/data:addinstance','write',50,'mod_data',4),(184,'mod/data:viewentry','read',70,'mod_data',0),(185,'mod/data:writeentry','write',70,'mod_data',16),(186,'mod/data:comment','write',70,'mod_data',16),(187,'mod/data:rate','write',70,'mod_data',0),(188,'mod/data:viewrating','read',70,'mod_data',0),(189,'mod/data:viewanyrating','read',70,'mod_data',8),(190,'mod/data:viewallratings','read',70,'mod_data',8),(191,'mod/data:approve','write',70,'mod_data',16),(192,'mod/data:manageentries','write',70,'mod_data',16),(193,'mod/data:managecomments','write',70,'mod_data',16),(194,'mod/data:managetemplates','write',70,'mod_data',20),(195,'mod/data:viewalluserpresets','read',70,'mod_data',0),(196,'mod/data:manageuserpresets','write',70,'mod_data',20),(197,'mod/data:exportentry','read',70,'mod_data',8),(198,'mod/data:exportownentry','read',70,'mod_data',0),(199,'mod/data:exportallentries','read',70,'mod_data',8),(200,'mod/feedback:addinstance','write',50,'mod_feedback',4),(201,'mod/feedback:view','read',70,'mod_feedback',0),(202,'mod/feedback:complete','write',70,'mod_feedback',16),(203,'mod/feedback:viewanalysepage','read',70,'mod_feedback',8),(204,'mod/feedback:deletesubmissions','write',70,'mod_feedback',0),(205,'mod/feedback:mapcourse','write',70,'mod_feedback',0),(206,'mod/feedback:edititems','write',70,'mod_feedback',20),(207,'mod/feedback:createprivatetemplate','write',70,'mod_feedback',16),(208,'mod/feedback:createpublictemplate','write',70,'mod_feedback',16),(209,'mod/feedback:deletetemplate','write',70,'mod_feedback',0),(210,'mod/feedback:viewreports','read',70,'mod_feedback',8),(211,'mod/feedback:receivemail','read',70,'mod_feedback',8),(212,'mod/folder:addinstance','write',50,'mod_folder',4),(213,'mod/folder:view','read',70,'mod_folder',0),(214,'mod/folder:managefiles','write',70,'mod_folder',16),(215,'mod/forum:addinstance','write',50,'mod_forum',4),(216,'mod/forum:viewdiscussion','read',70,'mod_forum',0),(217,'mod/forum:viewhiddentimedposts','read',70,'mod_forum',0),(218,'mod/forum:startdiscussion','write',70,'mod_forum',16),(219,'mod/forum:replypost','write',70,'mod_forum',16),(220,'mod/forum:addnews','write',70,'mod_forum',16),(221,'mod/forum:replynews','write',70,'mod_forum',16),(222,'mod/forum:viewrating','read',70,'mod_forum',0),(223,'mod/forum:viewanyrating','read',70,'mod_forum',8),(224,'mod/forum:viewallratings','read',70,'mod_forum',8),(225,'mod/forum:rate','write',70,'mod_forum',0),(226,'mod/forum:createattachment','write',70,'mod_forum',16),(227,'mod/forum:deleteownpost','read',70,'mod_forum',0),(228,'mod/forum:deleteanypost','read',70,'mod_forum',0),(229,'mod/forum:splitdiscussions','read',70,'mod_forum',0),(230,'mod/forum:movediscussions','read',70,'mod_forum',0),(231,'mod/forum:editanypost','write',70,'mod_forum',16),(232,'mod/forum:viewqandawithoutposting','read',70,'mod_forum',0),(233,'mod/forum:viewsubscribers','read',70,'mod_forum',0),(234,'mod/forum:managesubscriptions','read',70,'mod_forum',16),(235,'mod/forum:postwithoutthrottling','write',70,'mod_forum',16),(236,'mod/forum:exportdiscussion','read',70,'mod_forum',8),(237,'mod/forum:exportpost','read',70,'mod_forum',8),(238,'mod/forum:exportownpost','read',70,'mod_forum',8),(239,'mod/forum:addquestion','write',70,'mod_forum',16),(240,'mod/glossary:addinstance','write',50,'mod_glossary',4),(241,'mod/glossary:view','read',70,'mod_glossary',0),(242,'mod/glossary:write','write',70,'mod_glossary',16),(243,'mod/glossary:manageentries','write',70,'mod_glossary',16),(244,'mod/glossary:managecategories','write',70,'mod_glossary',16),(245,'mod/glossary:comment','write',70,'mod_glossary',16),(246,'mod/glossary:managecomments','write',70,'mod_glossary',16),(247,'mod/glossary:import','write',70,'mod_glossary',16),(248,'mod/glossary:export','read',70,'mod_glossary',0),(249,'mod/glossary:approve','write',70,'mod_glossary',16),(250,'mod/glossary:rate','write',70,'mod_glossary',0),(251,'mod/glossary:viewrating','read',70,'mod_glossary',0),(252,'mod/glossary:viewanyrating','read',70,'mod_glossary',8),(253,'mod/glossary:viewallratings','read',70,'mod_glossary',8),(254,'mod/glossary:exportentry','read',70,'mod_glossary',8),(255,'mod/glossary:exportownentry','read',70,'mod_glossary',0),(256,'mod/imscp:view','read',70,'mod_imscp',0),(257,'mod/imscp:addinstance','write',50,'mod_imscp',4),(258,'mod/label:addinstance','write',50,'mod_label',4),(259,'mod/lesson:addinstance','write',50,'mod_lesson',4),(260,'mod/lesson:edit','write',70,'mod_lesson',4),(261,'mod/lesson:manage','write',70,'mod_lesson',0),(262,'mod/lti:view','read',70,'mod_lti',0),(263,'mod/lti:addinstance','write',50,'mod_lti',4),(265,'mod/lti:manage','write',70,'mod_lti',8),(266,'mod/lti:addcoursetool','write',50,'mod_lti',0),(267,'mod/lti:requesttooladd','write',50,'mod_lti',0),(268,'mod/page:view','read',70,'mod_page',0),(269,'mod/page:addinstance','write',50,'mod_page',4),(270,'mod/quiz:view','read',70,'mod_quiz',0),(271,'mod/quiz:addinstance','write',50,'mod_quiz',4),(272,'mod/quiz:attempt','write',70,'mod_quiz',16),(273,'mod/quiz:reviewmyattempts','read',70,'mod_quiz',0),(274,'mod/quiz:manage','write',70,'mod_quiz',16),(275,'mod/quiz:manageoverrides','write',70,'mod_quiz',0),(276,'mod/quiz:preview','write',70,'mod_quiz',0),(277,'mod/quiz:grade','write',70,'mod_quiz',20),(278,'mod/quiz:regrade','write',70,'mod_quiz',16),(279,'mod/quiz:viewreports','read',70,'mod_quiz',8),(280,'mod/quiz:deleteattempts','write',70,'mod_quiz',32),(281,'mod/quiz:ignoretimelimits','read',70,'mod_quiz',0),(282,'mod/quiz:emailconfirmsubmission','read',70,'mod_quiz',0),(283,'mod/quiz:emailnotifysubmission','read',70,'mod_quiz',0),(284,'mod/quiz:emailwarnoverdue','read',70,'mod_quiz',0),(285,'mod/resource:view','read',70,'mod_resource',0),(286,'mod/resource:addinstance','write',50,'mod_resource',4),(287,'mod/scorm:addinstance','write',50,'mod_scorm',4),(288,'mod/scorm:viewreport','read',70,'mod_scorm',0),(289,'mod/scorm:skipview','read',70,'mod_scorm',0),(290,'mod/scorm:savetrack','write',70,'mod_scorm',0),(291,'mod/scorm:viewscores','read',70,'mod_scorm',0),(292,'mod/scorm:deleteresponses','write',70,'mod_scorm',0),(293,'mod/scorm:deleteownresponses','write',70,'mod_scorm',0),(294,'mod/survey:addinstance','write',50,'mod_survey',4),(295,'mod/survey:participate','read',70,'mod_survey',0),(296,'mod/survey:readresponses','read',70,'mod_survey',0),(297,'mod/survey:download','read',70,'mod_survey',0),(298,'mod/url:view','read',70,'mod_url',0),(299,'mod/url:addinstance','write',50,'mod_url',4),(300,'mod/wiki:addinstance','write',50,'mod_wiki',4),(301,'mod/wiki:viewpage','read',70,'mod_wiki',0),(302,'mod/wiki:editpage','write',70,'mod_wiki',16),(303,'mod/wiki:createpage','write',70,'mod_wiki',16),(304,'mod/wiki:viewcomment','read',70,'mod_wiki',0),(305,'mod/wiki:editcomment','write',70,'mod_wiki',16),(306,'mod/wiki:managecomment','write',70,'mod_wiki',0),(307,'mod/wiki:managefiles','write',70,'mod_wiki',0),(308,'mod/wiki:overridelock','write',70,'mod_wiki',0),(309,'mod/wiki:managewiki','write',70,'mod_wiki',0),(310,'mod/workshop:view','read',70,'mod_workshop',0),(311,'mod/workshop:addinstance','write',50,'mod_workshop',4),(312,'mod/workshop:switchphase','write',70,'mod_workshop',0),(313,'mod/workshop:editdimensions','write',70,'mod_workshop',4),(314,'mod/workshop:submit','write',70,'mod_workshop',0),(315,'mod/workshop:peerassess','write',70,'mod_workshop',0),(316,'mod/workshop:manageexamples','write',70,'mod_workshop',0),(317,'mod/workshop:allocate','write',70,'mod_workshop',0),(318,'mod/workshop:publishsubmissions','write',70,'mod_workshop',0),(319,'mod/workshop:viewauthornames','read',70,'mod_workshop',0),(320,'mod/workshop:viewreviewernames','read',70,'mod_workshop',0),(321,'mod/workshop:viewallsubmissions','read',70,'mod_workshop',0),(322,'mod/workshop:viewpublishedsubmissions','read',70,'mod_workshop',0),(323,'mod/workshop:viewauthorpublished','read',70,'mod_workshop',0),(324,'mod/workshop:viewallassessments','read',70,'mod_workshop',0),(325,'mod/workshop:overridegrades','write',70,'mod_workshop',0),(326,'mod/workshop:ignoredeadlines','write',70,'mod_workshop',0),(333,'enrol/category:synchronised','write',10,'enrol_category',0),(334,'enrol/cohort:config','write',50,'enrol_cohort',0),(335,'enrol/cohort:unenrol','write',50,'enrol_cohort',0),(336,'enrol/database:unenrol','write',50,'enrol_database',0),(337,'enrol/guest:config','write',50,'enrol_guest',0),(338,'enrol/ldap:manage','write',50,'enrol_ldap',0),(339,'enrol/manual:config','write',50,'enrol_manual',0),(340,'enrol/manual:enrol','write',50,'enrol_manual',0),(341,'enrol/manual:manage','write',50,'enrol_manual',0),(342,'enrol/manual:unenrol','write',50,'enrol_manual',0),(343,'enrol/manual:unenrolself','write',50,'enrol_manual',0),(344,'enrol/meta:config','write',50,'enrol_meta',0),(345,'enrol/meta:selectaslinked','read',50,'enrol_meta',0),(346,'enrol/meta:unenrol','write',50,'enrol_meta',0),(347,'enrol/paypal:config','write',50,'enrol_paypal',0),(348,'enrol/paypal:manage','write',50,'enrol_paypal',0),(349,'enrol/paypal:unenrol','write',50,'enrol_paypal',0),(350,'enrol/paypal:unenrolself','write',50,'enrol_paypal',0),(351,'enrol/self:config','write',50,'enrol_self',0),(352,'enrol/self:manage','write',50,'enrol_self',0),(353,'enrol/self:unenrolself','write',50,'enrol_self',0),(354,'enrol/self:unenrol','write',50,'enrol_self',0),(355,'block/online_users:viewlist','read',80,'block_online_users',0),(356,'block/rss_client:manageownfeeds','write',80,'block_rss_client',0),(357,'block/rss_client:manageanyfeeds','write',80,'block_rss_client',16),(358,'report/completion:view','read',50,'report_completion',8),(359,'report/courseoverview:view','read',10,'report_courseoverview',8),(360,'report/log:view','read',50,'report_log',8),(361,'report/log:viewtoday','read',50,'report_log',8),(362,'report/loglive:view','read',50,'report_loglive',8),(363,'report/outline:view','read',50,'report_outline',8),(364,'report/participation:view','read',50,'report_participation',8),(365,'report/progress:view','read',50,'report_progress',8),(366,'report/questioninstances:view','read',10,'report_questioninstances',0),(367,'report/security:view','read',10,'report_security',2),(368,'report/stats:view','read',50,'report_stats',8),(369,'gradeexport/ods:view','read',50,'gradeexport_ods',8),(370,'gradeexport/ods:publish','read',50,'gradeexport_ods',8),(371,'gradeexport/txt:view','read',50,'gradeexport_txt',8),(372,'gradeexport/txt:publish','read',50,'gradeexport_txt',8),(373,'gradeexport/xls:view','read',50,'gradeexport_xls',8),(374,'gradeexport/xls:publish','read',50,'gradeexport_xls',8),(375,'gradeexport/xml:view','read',50,'gradeexport_xml',8),(376,'gradeexport/xml:publish','read',50,'gradeexport_xml',8),(377,'gradeimport/csv:view','write',50,'gradeimport_csv',0),(378,'gradeimport/xml:view','write',50,'gradeimport_xml',0),(379,'gradeimport/xml:publish','write',50,'gradeimport_xml',0),(380,'gradereport/grader:view','read',50,'gradereport_grader',8),(381,'gradereport/outcomes:view','read',50,'gradereport_outcomes',8),(382,'gradereport/overview:view','read',50,'gradereport_overview',8),(383,'gradereport/user:view','read',50,'gradereport_user',8),(385,'webservice/rest:use','read',50,'webservice_rest',0),(386,'webservice/soap:use','read',50,'webservice_soap',0),(387,'webservice/xmlrpc:use','read',50,'webservice_xmlrpc',0),(389,'repository/boxnet:view','read',70,'repository_boxnet',0),(390,'repository/coursefiles:view','read',70,'repository_coursefiles',0),(391,'repository/dropbox:view','read',70,'repository_dropbox',0),(392,'repository/equella:view','read',70,'repository_equella',0),(393,'repository/filesystem:view','read',70,'repository_filesystem',0),(394,'repository/flickr:view','read',70,'repository_flickr',0),(395,'repository/flickr_public:view','read',70,'repository_flickr_public',0),(396,'repository/googledocs:view','read',70,'repository_googledocs',0),(397,'repository/local:view','read',70,'repository_local',0),(398,'repository/merlot:view','read',70,'repository_merlot',0),(399,'repository/picasa:view','read',70,'repository_picasa',0),(400,'repository/recent:view','read',70,'repository_recent',0),(401,'repository/s3:view','read',70,'repository_s3',0),(402,'repository/upload:view','read',70,'repository_upload',0),(403,'repository/url:view','read',70,'repository_url',0),(404,'repository/user:view','read',70,'repository_user',0),(405,'repository/webdav:view','read',70,'repository_webdav',0),(406,'repository/wikimedia:view','read',70,'repository_wikimedia',0),(407,'repository/youtube:view','read',70,'repository_youtube',0),(408,'tool/customlang:view','read',10,'tool_customlang',2),(409,'tool/customlang:edit','write',10,'tool_customlang',6),(411,'booktool/exportimscp:export','read',70,'booktool_exportimscp',0),(412,'booktool/importhtml:import','write',70,'booktool_importhtml',4),(413,'booktool/print:print','read',70,'booktool_print',0),(414,'quiz/grading:viewstudentnames','read',70,'quiz_grading',0),(415,'quiz/grading:viewidnumber','read',70,'quiz_grading',0),(416,'quiz/statistics:view','read',70,'quiz_statistics',0),(417,'moodle/course:isincompletionreports','read',50,'moodle',0),(418,'mod/forum:allowforcesubscribe','read',70,'mod_forum',0),(419,'moodle/user:ignoreuserquota','write',10,'moodle',0),(420,'moodle/course:movesections','write',50,'moodle',0),(421,'moodle/tag:flag','write',10,'moodle',16),(422,'mod/assign:grantextension','write',70,'mod_assign',0),(423,'mod/assign:revealidentities','write',70,'mod_assign',0),(424,'mod/data:exportuserinfo','read',70,'mod_data',8),(425,'block/activity_modules:addinstance','write',80,'block_activity_modules',20),(426,'block/admin_bookmarks:myaddinstance','write',10,'block_admin_bookmarks',0),(427,'block/admin_bookmarks:addinstance','write',80,'block_admin_bookmarks',20),(428,'block/blog_menu:addinstance','write',80,'block_blog_menu',20),(429,'block/blog_recent:addinstance','write',80,'block_blog_recent',20),(430,'block/blog_tags:addinstance','write',80,'block_blog_tags',20),(431,'block/calendar_month:myaddinstance','write',10,'block_calendar_month',0),(432,'block/calendar_month:addinstance','write',80,'block_calendar_month',20),(433,'block/calendar_upcoming:myaddinstance','write',10,'block_calendar_upcoming',0),(434,'block/calendar_upcoming:addinstance','write',80,'block_calendar_upcoming',20),(435,'block/comments:myaddinstance','write',10,'block_comments',0),(436,'block/comments:addinstance','write',80,'block_comments',20),(437,'block/community:myaddinstance','write',10,'block_community',0),(438,'block/community:addinstance','write',80,'block_community',20),(440,'block/completionstatus:addinstance','write',80,'block_completionstatus',20),(441,'block/course_list:myaddinstance','write',10,'block_course_list',0),(442,'block/course_list:addinstance','write',80,'block_course_list',20),(443,'block/course_overview:myaddinstance','write',10,'block_course_overview',0),(444,'block/course_overview:addinstance','write',80,'block_course_overview',20),(446,'block/course_summary:addinstance','write',80,'block_course_summary',20),(447,'block/feedback:addinstance','write',80,'block_feedback',20),(448,'block/glossary_random:myaddinstance','write',10,'block_glossary_random',0),(449,'block/glossary_random:addinstance','write',80,'block_glossary_random',20),(450,'block/html:myaddinstance','write',10,'block_html',0),(451,'block/html:addinstance','write',80,'block_html',20),(452,'block/login:addinstance','write',80,'block_login',20),(453,'block/mentees:myaddinstance','write',10,'block_mentees',0),(454,'block/mentees:addinstance','write',80,'block_mentees',20),(455,'block/messages:myaddinstance','write',10,'block_messages',0),(456,'block/messages:addinstance','write',80,'block_messages',20),(457,'block/mnet_hosts:myaddinstance','write',10,'block_mnet_hosts',0),(458,'block/mnet_hosts:addinstance','write',80,'block_mnet_hosts',20),(459,'block/myprofile:myaddinstance','write',10,'block_myprofile',0),(460,'block/myprofile:addinstance','write',80,'block_myprofile',20),(461,'block/navigation:myaddinstance','write',10,'block_navigation',0),(462,'block/navigation:addinstance','write',80,'block_navigation',20),(463,'block/news_items:myaddinstance','write',10,'block_news_items',0),(464,'block/news_items:addinstance','write',80,'block_news_items',20),(465,'block/online_users:myaddinstance','write',10,'block_online_users',0),(466,'block/online_users:addinstance','write',80,'block_online_users',20),(467,'block/participants:addinstance','write',80,'block_participants',20),(468,'block/private_files:myaddinstance','write',10,'block_private_files',0),(469,'block/private_files:addinstance','write',80,'block_private_files',20),(470,'block/quiz_results:addinstance','write',80,'block_quiz_results',20),(471,'block/recent_activity:addinstance','write',80,'block_recent_activity',20),(472,'block/rss_client:myaddinstance','write',10,'block_rss_client',0),(473,'block/rss_client:addinstance','write',80,'block_rss_client',20),(474,'block/search_forums:addinstance','write',80,'block_search_forums',20),(475,'block/section_links:addinstance','write',80,'block_section_links',20),(477,'block/selfcompletion:addinstance','write',80,'block_selfcompletion',20),(478,'block/settings:myaddinstance','write',10,'block_settings',0),(479,'block/settings:addinstance','write',80,'block_settings',20),(480,'block/site_main_menu:addinstance','write',80,'block_site_main_menu',20),(481,'block/social_activities:addinstance','write',80,'block_social_activities',20),(482,'block/tag_flickr:addinstance','write',80,'block_tag_flickr',20),(483,'block/tag_youtube:addinstance','write',80,'block_tag_youtube',20),(484,'block/tags:myaddinstance','write',10,'block_tags',0),(485,'block/tags:addinstance','write',80,'block_tags',20),(486,'tool/unittest:execute','write',10,'tool_unittest',32),(487,'moodle/site:deleteanymessage','write',10,'moodle',32),(488,'moodle/site:deleteownmessage','write',10,'moodle',0),(489,'moodle/user:viewlastip','read',30,'moodle',8),(490,'moodle/course:reviewotherusers','read',50,'moodle',0),(491,'moodle/course:viewsuspendedusers','read',10,'moodle',0),(492,'moodle/course:tag','write',50,'moodle',16),(493,'moodle/badges:manageglobalsettings','write',10,'moodle',34),(494,'moodle/badges:viewbadges','read',50,'moodle',0),(495,'moodle/badges:manageownbadges','write',30,'moodle',0),(496,'moodle/badges:viewotherbadges','read',30,'moodle',0),(497,'moodle/badges:earnbadge','write',50,'moodle',0),(498,'moodle/badges:createbadge','write',50,'moodle',16),(499,'moodle/badges:deletebadge','write',50,'moodle',32),(500,'moodle/badges:configuredetails','write',50,'moodle',16),(501,'moodle/badges:configurecriteria','write',50,'moodle',4),(502,'moodle/badges:configuremessages','write',50,'moodle',16),(503,'moodle/badges:awardbadge','write',50,'moodle',16),(504,'moodle/badges:viewawarded','read',50,'moodle',8),(505,'moodle/site:forcelanguage','read',10,'moodle',0),(506,'mod/assign:editothersubmission','write',70,'mod_assign',41),(507,'mod/assign:reviewgrades','write',70,'mod_assign',0),(508,'mod/assign:releasegrades','write',70,'mod_assign',0),(509,'mod/assign:managegrades','write',70,'mod_assign',0),(510,'mod/assign:manageallocations','write',70,'mod_assign',0),(511,'mod/assign:viewgrades','read',70,'mod_assign',0),(512,'mod/assign:viewblinddetails','write',70,'mod_assign',8),(513,'mod/assign:receivegradernotifications','read',70,'mod_assign',0),(514,'mod/forum:canposttomygroups','write',70,'mod_forum',0),(515,'mod/lesson:grade','write',70,'mod_lesson',20),(516,'mod/lesson:viewreports','read',70,'mod_lesson',8),(517,'mod/lesson:manageoverrides','write',70,'mod_lesson',0),(518,'enrol/category:config','write',50,'enrol_category',0),(519,'enrol/database:config','write',50,'enrol_database',0),(520,'enrol/flatfile:manage','write',50,'enrol_flatfile',0),(521,'enrol/flatfile:unenrol','write',50,'enrol_flatfile',0),(522,'enrol/imsenterprise:config','write',50,'enrol_imsenterprise',0),(523,'enrol/mnet:config','write',50,'enrol_mnet',0),(524,'enrol/self:holdkey','write',50,'enrol_self',0),(525,'message/airnotifier:managedevice','write',10,'message_airnotifier',0),(526,'block/activity_results:addinstance','write',80,'block_activity_results',20),(527,'block/badges:addinstance','read',80,'block_badges',0),(528,'block/badges:myaddinstance','read',10,'block_badges',8),(529,'block/recent_activity:viewaddupdatemodule','read',50,'block_recent_activity',0),(530,'block/recent_activity:viewdeletemodule','read',50,'block_recent_activity',0),(531,'report/performance:view','read',10,'report_performance',2),(532,'report/usersessions:manageownsessions','write',30,'report_usersessions',0),(533,'gradeimport/direct:view','write',50,'gradeimport_direct',0),(534,'gradereport/history:view','read',50,'gradereport_history',8),(535,'gradereport/singleview:view','read',50,'gradereport_singleview',8),(536,'repository/areafiles:view','read',70,'repository_areafiles',0),(537,'repository/skydrive:view','read',70,'repository_skydrive',0),(538,'tool/monitor:subscribe','read',50,'tool_monitor',8),(539,'tool/monitor:managerules','write',50,'tool_monitor',4),(540,'tool/monitor:managetool','write',10,'tool_monitor',4),(541,'tool/uploaduser:uploaduserpictures','write',10,'tool_uploaduser',16),(542,'moodle/site:configview','read',10,'moodle',0),(543,'moodle/site:manageallmessaging','write',10,'moodle',8),(544,'moodle/course:renameroles','write',50,'moodle',0),(545,'moodle/badges:revokebadge','write',50,'moodle',16),(546,'moodle/search:query','read',10,'moodle',0),(547,'moodle/competency:competencymanage','write',40,'moodle',0),(548,'moodle/competency:competencyview','read',40,'moodle',0),(549,'moodle/competency:competencygrade','write',50,'moodle',0),(550,'moodle/competency:coursecompetencymanage','write',50,'moodle',0),(551,'moodle/competency:coursecompetencyconfigure','write',70,'moodle',0),(552,'moodle/competency:coursecompetencygradable','read',50,'moodle',0),(553,'moodle/competency:coursecompetencyview','read',50,'moodle',0),(554,'moodle/competency:evidencedelete','write',30,'moodle',0),(555,'moodle/competency:planmanage','write',30,'moodle',0),(556,'moodle/competency:planmanagedraft','write',30,'moodle',0),(557,'moodle/competency:planmanageown','write',30,'moodle',0),(558,'moodle/competency:planmanageowndraft','write',30,'moodle',0),(559,'moodle/competency:planview','read',30,'moodle',0),(560,'moodle/competency:planviewdraft','read',30,'moodle',0),(561,'moodle/competency:planviewown','read',30,'moodle',0),(562,'moodle/competency:planviewowndraft','read',30,'moodle',0),(563,'moodle/competency:planrequestreview','write',30,'moodle',0),(564,'moodle/competency:planrequestreviewown','write',30,'moodle',0),(565,'moodle/competency:planreview','write',30,'moodle',0),(566,'moodle/competency:plancomment','write',30,'moodle',0),(567,'moodle/competency:plancommentown','write',30,'moodle',0),(568,'moodle/competency:usercompetencyview','read',30,'moodle',0),(569,'moodle/competency:usercompetencyrequestreview','write',30,'moodle',0),(570,'moodle/competency:usercompetencyrequestreviewown','write',30,'moodle',0),(571,'moodle/competency:usercompetencyreview','write',30,'moodle',0),(572,'moodle/competency:usercompetencycomment','write',30,'moodle',0),(573,'moodle/competency:usercompetencycommentown','write',30,'moodle',0),(574,'moodle/competency:templatemanage','write',40,'moodle',0),(575,'moodle/competency:templateview','read',40,'moodle',0),(576,'moodle/competency:userevidencemanage','write',30,'moodle',0),(577,'moodle/competency:userevidencemanageown','write',30,'moodle',0),(578,'moodle/competency:userevidenceview','read',30,'moodle',0),(579,'moodle/site:maintenanceaccess','write',10,'moodle',0),(580,'mod/assign:manageoverrides','write',70,'mod_assign',0),(581,'mod/chat:view','read',70,'mod_chat',0),(582,'mod/choice:view','read',70,'mod_choice',0),(583,'mod/data:view','read',70,'mod_data',0),(584,'mod/forum:pindiscussions','write',70,'mod_forum',0),(585,'mod/forum:canoverridediscussionlock','write',70,'mod_forum',0),(586,'mod/label:view','read',70,'mod_label',0),(587,'mod/lesson:view','read',70,'mod_lesson',0),(588,'mod/workshop:deletesubmissions','write',70,'mod_workshop',0),(589,'mod/workshop:exportsubmissions','read',70,'mod_workshop',0),(590,'enrol/lti:config','write',50,'enrol_lti',0),(591,'enrol/lti:unenrol','write',50,'enrol_lti',0),(592,'block/globalsearch:myaddinstance','write',10,'block_globalsearch',0),(593,'block/globalsearch:addinstance','write',80,'block_globalsearch',0),(594,'block/lp:addinstance','write',10,'block_lp',0),(595,'block/lp:myaddinstance','write',10,'block_lp',0),(596,'block/lp:view','read',10,'block_lp',0),(597,'tool/lpmigrate:frameworksmigrate','write',10,'tool_lpmigrate',0),(598,'tool/recyclebin:deleteitems','write',50,'tool_recyclebin',32),(599,'tool/recyclebin:restoreitems','write',50,'tool_recyclebin',0),(600,'tool/recyclebin:viewitems','read',50,'tool_recyclebin',0),(601,'tool/usertours:managetours','write',10,'tool_usertours',4);

CREATE TABLE `eoay_chat` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `keepdays` bigint(11) NOT NULL DEFAULT '0',
  `studentlogs` smallint(4) NOT NULL DEFAULT '0',
  `chattime` bigint(10) NOT NULL DEFAULT '0',
  `schedule` smallint(4) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_chat_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Each of these is a chat room';

CREATE TABLE `eoay_chat_messages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `chatid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `system` tinyint(1) NOT NULL DEFAULT '0',
  `message` longtext NOT NULL,
  `timestamp` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_chatmess_use_ix` (`userid`),
  KEY `eoay_chatmess_gro_ix` (`groupid`),
  KEY `eoay_chatmess_timcha_ix` (`timestamp`,`chatid`),
  KEY `eoay_chatmess_cha_ix` (`chatid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores all the actual chat messages';

CREATE TABLE `eoay_chat_messages_current` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `chatid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `system` tinyint(1) NOT NULL DEFAULT '0',
  `message` longtext NOT NULL,
  `timestamp` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_chatmesscurr_use_ix` (`userid`),
  KEY `eoay_chatmesscurr_gro_ix` (`groupid`),
  KEY `eoay_chatmesscurr_timcha_ix` (`timestamp`,`chatid`),
  KEY `eoay_chatmesscurr_cha_ix` (`chatid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores current session';

CREATE TABLE `eoay_chat_users` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `chatid` bigint(11) NOT NULL DEFAULT '0',
  `userid` bigint(11) NOT NULL DEFAULT '0',
  `groupid` bigint(11) NOT NULL DEFAULT '0',
  `version` varchar(16) NOT NULL DEFAULT '',
  `ip` varchar(45) NOT NULL DEFAULT '',
  `firstping` bigint(10) NOT NULL DEFAULT '0',
  `lastping` bigint(10) NOT NULL DEFAULT '0',
  `lastmessageping` bigint(10) NOT NULL DEFAULT '0',
  `sid` varchar(32) NOT NULL DEFAULT '',
  `course` bigint(10) NOT NULL DEFAULT '0',
  `lang` varchar(30) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_chatuser_use_ix` (`userid`),
  KEY `eoay_chatuser_las_ix` (`lastping`),
  KEY `eoay_chatuser_gro_ix` (`groupid`),
  KEY `eoay_chatuser_cha_ix` (`chatid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Keeps track of which users are in which chat rooms';

CREATE TABLE `eoay_choice` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) NOT NULL DEFAULT '0',
  `publish` tinyint(2) NOT NULL DEFAULT '0',
  `showresults` tinyint(2) NOT NULL DEFAULT '0',
  `display` smallint(4) NOT NULL DEFAULT '0',
  `allowupdate` tinyint(2) NOT NULL DEFAULT '0',
  `allowmultiple` tinyint(2) NOT NULL DEFAULT '0',
  `showunanswered` tinyint(2) NOT NULL DEFAULT '0',
  `includeinactive` tinyint(2) NOT NULL DEFAULT '1',
  `limitanswers` tinyint(2) NOT NULL DEFAULT '0',
  `timeopen` bigint(10) NOT NULL DEFAULT '0',
  `timeclose` bigint(10) NOT NULL DEFAULT '0',
  `showpreview` tinyint(2) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `completionsubmit` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_choi_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available choices are stored here';

CREATE TABLE `eoay_choice_answers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `choiceid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `optionid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_choiansw_use_ix` (`userid`),
  KEY `eoay_choiansw_cho_ix` (`choiceid`),
  KEY `eoay_choiansw_opt_ix` (`optionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='choices performed by users';

CREATE TABLE `eoay_choice_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `choiceid` bigint(10) NOT NULL DEFAULT '0',
  `text` longtext,
  `maxanswers` bigint(10) DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_choiopti_cho_ix` (`choiceid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='available options to choice';

CREATE TABLE `eoay_cohort` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `name` varchar(254) NOT NULL DEFAULT '',
  `idnumber` varchar(100) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL,
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `component` varchar(100) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_coho_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Each record represents one cohort (aka site-wide group).';

CREATE TABLE `eoay_cohort_members` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `cohortid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timeadded` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_cohomemb_cohuse_uix` (`cohortid`,`userid`),
  KEY `eoay_cohomemb_coh_ix` (`cohortid`),
  KEY `eoay_cohomemb_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Link a user to a cohort.';

CREATE TABLE `eoay_comments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(255) DEFAULT NULL,
  `commentarea` varchar(255) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `content` longtext NOT NULL,
  `format` tinyint(2) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='moodle comments module';

CREATE TABLE `eoay_competency` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `shortname` varchar(100) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` smallint(4) NOT NULL DEFAULT '0',
  `idnumber` varchar(100) DEFAULT NULL,
  `competencyframeworkid` bigint(10) NOT NULL,
  `parentid` bigint(10) NOT NULL DEFAULT '0',
  `path` varchar(255) NOT NULL DEFAULT '',
  `sortorder` bigint(10) NOT NULL,
  `ruletype` varchar(100) DEFAULT NULL,
  `ruleoutcome` tinyint(2) NOT NULL DEFAULT '0',
  `ruleconfig` longtext,
  `scaleid` bigint(10) DEFAULT NULL,
  `scaleconfiguration` longtext,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_comp_comidn_uix` (`competencyframeworkid`,`idnumber`),
  KEY `eoay_comp_rul_ix` (`ruleoutcome`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_coursecomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `ruleoutcome` tinyint(2) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compcour_coucom_uix` (`courseid`,`competencyid`),
  KEY `eoay_compcour_courul_ix` (`courseid`,`ruleoutcome`),
  KEY `eoay_compcour_cou_ix` (`courseid`),
  KEY `eoay_compcour_com_ix` (`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_coursecompsetting` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `pushratingstouserplans` tinyint(2) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compcour_cou_uix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_evidence` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `usercompetencyid` bigint(10) NOT NULL,
  `contextid` bigint(10) NOT NULL,
  `action` tinyint(2) NOT NULL,
  `actionuserid` bigint(10) DEFAULT NULL,
  `descidentifier` varchar(255) NOT NULL DEFAULT '',
  `desccomponent` varchar(255) NOT NULL DEFAULT '',
  `desca` longtext,
  `url` varchar(255) DEFAULT NULL,
  `grade` bigint(10) DEFAULT NULL,
  `note` longtext,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_compevid_use_ix` (`usercompetencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_framework` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `shortname` varchar(100) DEFAULT NULL,
  `contextid` bigint(10) NOT NULL,
  `idnumber` varchar(100) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` smallint(4) NOT NULL DEFAULT '0',
  `scaleid` bigint(11) DEFAULT NULL,
  `scaleconfiguration` longtext NOT NULL,
  `visible` tinyint(2) NOT NULL DEFAULT '1',
  `taxonomies` varchar(255) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compfram_idn_uix` (`idnumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_modulecomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `cmid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `ruleoutcome` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compmodu_cmicom_uix` (`cmid`,`competencyid`),
  KEY `eoay_compmodu_cmirul_ix` (`cmid`,`ruleoutcome`),
  KEY `eoay_compmodu_cmi_ix` (`cmid`),
  KEY `eoay_compmodu_com_ix` (`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_plan` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` smallint(4) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL,
  `templateid` bigint(10) DEFAULT NULL,
  `origtemplateid` bigint(10) DEFAULT NULL,
  `status` tinyint(1) NOT NULL,
  `duedate` bigint(10) DEFAULT '0',
  `reviewerid` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_compplan_usesta_ix` (`userid`,`status`),
  KEY `eoay_compplan_tem_ix` (`templateid`),
  KEY `eoay_compplan_stadue_ix` (`status`,`duedate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_plancomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `planid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `sortorder` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compplan_placom_uix` (`planid`,`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_relatedcomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `competencyid` bigint(10) NOT NULL,
  `relatedcompetencyid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_template` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `shortname` varchar(100) DEFAULT NULL,
  `contextid` bigint(10) NOT NULL,
  `description` longtext,
  `descriptionformat` smallint(4) NOT NULL DEFAULT '0',
  `visible` tinyint(2) NOT NULL DEFAULT '1',
  `duedate` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_templatecohort` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `templateid` bigint(10) NOT NULL,
  `cohortid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_comptemp_temcoh_uix` (`templateid`,`cohortid`),
  KEY `eoay_comptemp_tem2_ix` (`templateid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_templatecomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `templateid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `sortorder` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_comptemp_tem_ix` (`templateid`),
  KEY `eoay_comptemp_com_ix` (`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_usercomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `status` tinyint(2) NOT NULL DEFAULT '0',
  `reviewerid` bigint(10) DEFAULT NULL,
  `proficiency` tinyint(2) DEFAULT NULL,
  `grade` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compuser_usecom_uix` (`userid`,`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_usercompcourse` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `courseid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `proficiency` tinyint(2) DEFAULT NULL,
  `grade` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compuser_usecoucom_uix` (`userid`,`courseid`,`competencyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_usercompplan` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `planid` bigint(10) NOT NULL,
  `proficiency` tinyint(2) DEFAULT NULL,
  `grade` bigint(10) DEFAULT NULL,
  `sortorder` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compuser_usecompla_uix` (`userid`,`competencyid`,`planid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_userevidence` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `name` varchar(100) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `descriptionformat` tinyint(1) NOT NULL,
  `url` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_compuser_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_competency_userevidencecomp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userevidenceid` bigint(10) NOT NULL,
  `competencyid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_compuser_usecom2_uix` (`userevidenceid`,`competencyid`),
  KEY `eoay_compuser_use2_ix` (`userevidenceid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_conf_nam_uix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=516 DEFAULT CHARSET=utf8 COMMENT='Moodle configuration variables';
INSERT INTO `eoay_config` VALUES (2,'rolesactive','1'),(3,'auth','email'),(4,'auth_pop3mailbox','INBOX'),(5,'enrol_plugins_enabled','manual,guest,self,cohort'),(6,'theme','clean'),(7,'filter_multilang_converted','1'),(8,'siteidentifier','rJChlmR6aRqFBvf7448IBNLukxllwLvd'),(9,'backup_version','2008111700'),(10,'backup_release','2.0 dev'),(11,'mnet_dispatcher_mode','off'),(12,'sessiontimeout','7200'),(13,'stringfilters',''),(14,'filterall','0'),(15,'texteditors','atto,tinymce,textarea'),(16,'mnet_localhost_id','1'),(17,'mnet_all_hosts_id','2'),(18,'siteguest','1'),(19,'siteadmins','2'),(20,'themerev','1490319064'),(21,'jsrev','1490319064'),(22,'licenses','unknown,allrightsreserved,public,cc,cc-nd,cc-nc-nd,cc-nc,cc-nc-sa,cc-sa'),(23,'version','2016120501'),(24,'enableoutcomes','0'),(25,'usecomments','1'),(26,'usetags','1'),(27,'enablenotes','1'),(28,'enableportfolios','0'),(29,'enablewebservices','0'),(30,'messaging','1'),(31,'messaginghidereadnotifications','0'),(32,'messagingdeletereadnotificationsdelay','604800'),(33,'messagingallowemailoverride','0'),(34,'enablestats','0'),(35,'enablerssfeeds','0'),(36,'bloglevel','4'),(37,'enablecompletion','0'),(38,'enableavailability','0'),(39,'enableplagiarism','0'),(40,'autologinguests','0'),(41,'hiddenuserfields',''),(42,'showuseridentity','email'),(43,'enablegravatar','0'),(44,'enablecourserequests','0'),(45,'defaultrequestcategory','1'),(46,'courserequestnotify',''),(47,'grade_profilereport','user'),(48,'grade_aggregationposition','1'),(49,'grade_includescalesinaggregation','1'),(50,'grade_hiddenasdate','0'),(51,'gradepublishing','0'),(52,'grade_export_displaytype','1'),(53,'grade_export_decimalpoints','2'),(54,'grade_navmethod','0'),(55,'recovergradesdefault','0'),(56,'gradeexport',''),(57,'unlimitedgrades','0'),(58,'grade_hideforcedsettings','1'),(59,'grade_aggregation','11'),(60,'grade_aggregation_flag','0'),(61,'grade_aggregations_visible','0,10,11,12,2,4,6,8,13'),(62,'grade_aggregateonlygraded','1'),(63,'grade_aggregateonlygraded_flag','2'),(64,'grade_aggregateoutcomes','0'),(65,'grade_aggregateoutcomes_flag','2'),(66,'grade_aggregatesubcats','0'),(67,'grade_aggregatesubcats_flag','2'),(68,'grade_keephigh','0'),(69,'grade_keephigh_flag','3'),(70,'grade_droplow','0'),(71,'grade_droplow_flag','2'),(72,'grade_displaytype','1'),(73,'grade_decimalpoints','2'),(74,'grade_item_advanced','iteminfo,idnumber,gradepass,plusfactor,multfactor,display,decimals,hiddenuntil,locktime'),(75,'grade_report_studentsperpage','100'),(76,'grade_report_quickgrading','1'),(77,'grade_report_showquickfeedback','0'),(78,'grade_report_fixedstudents','0'),(79,'grade_report_meanselection','1'),(80,'grade_report_enableajax','0'),(81,'grade_report_showcalculations','0'),(82,'grade_report_showeyecons','0'),(83,'grade_report_showaverages','1'),(84,'grade_report_showlocks','0'),(85,'grade_report_showranges','0'),(86,'grade_report_showanalysisicon','1'),(87,'grade_report_showuserimage','1'),(88,'grade_report_showactivityicons','1'),(89,'grade_report_shownumberofgrades','0'),(90,'grade_report_averagesdisplaytype','inherit'),(91,'grade_report_rangesdisplaytype','inherit'),(92,'grade_report_averagesdecimalpoints','inherit'),(93,'grade_report_rangesdecimalpoints','inherit'),(94,'grade_report_overview_showrank','0'),(95,'grade_report_overview_showtotalsifcontainhidden','0'),(96,'grade_report_user_showrank','0'),(97,'grade_report_user_showpercentage','1'),(98,'grade_report_user_showgrade','1'),(99,'grade_report_user_showfeedback','1'),(100,'grade_report_user_showrange','1'),(101,'grade_report_user_showweight','1'),(102,'grade_report_user_showaverage','0'),(103,'grade_report_user_showlettergrade','0'),(104,'grade_report_user_rangedecimals','0'),(105,'grade_report_user_showhiddenitems','1'),(106,'grade_report_user_showtotalsifcontainhidden','0'),(108,'forcetimezone','99'),(109,'country','0'),(110,'defaultcity',''),(111,'geoipfile','/home/admin/domains/testing.installatron.com/public_html/moodlenv1/data/geoip/GeoLiteCity.dat'),(113,'googlemapkey3',''),(114,'allcountrycodes',''),(115,'autolang','1'),(116,'lang','en'),(117,'langmenu','1'),(118,'langlist',''),(119,'langcache','1'),(120,'langstringcache','1'),(121,'locale',''),(122,'latinexcelexport','0'),(123,'registerauth',''),(124,'authpreventaccountcreation','0'),(125,'loginpageautofocus','0'),(126,'guestloginbutton','1'),(127,'alternateloginurl',''),(128,'forgottenpasswordurl',''),(129,'auth_instructions',''),(130,'allowemailaddresses',''),(131,'denyemailaddresses',''),(132,'verifychangedemail','1'),(133,'recaptchapublickey',''),(134,'recaptchaprivatekey',''),(135,'sitedefaultlicense','allrightsreserved'),(137,'filteruploadedfiles','0'),(138,'filtermatchoneperpage','0'),(139,'filtermatchonepertext','0'),(140,'filter_multilang_force_old','0'),(148,'filter_censor_badwords',''),(149,'portfolio_moderate_filesize_threshold','1048576'),(150,'portfolio_high_filesize_threshold','5242880'),(151,'portfolio_moderate_db_threshold','20'),(152,'portfolio_high_db_threshold','50'),(153,'repositorycacheexpire','120'),(154,'repositoryallowexternallinks','1'),(155,'legacyfilesinnewcourses','0'),(156,'enablewsdocumentation','0'),(157,'allowbeforeblock','0'),(158,'allowedip',''),(159,'blockedip',''),(160,'protectusernames','1'),(161,'forcelogin','0'),(162,'forceloginforprofiles','1'),(163,'forceloginforprofileimage','0'),(164,'opentogoogle','0'),(165,'maxbytes','0'),(166,'userquota','104857600'),(167,'allowobjectembed','0'),(168,'enabletrusttext','0'),(169,'maxeditingtime','1800'),(170,'fullnamedisplay','language'),(171,'extendedusernamechars','0'),(172,'sitepolicy',''),(173,'sitepolicyguest',''),(174,'keeptagnamecase','1'),(175,'profilesforenrolledusersonly','1'),(176,'cronclionly','0'),(177,'cronremotepassword',''),(178,'passwordpolicy','1'),(179,'minpasswordlength','8'),(180,'minpassworddigits','1'),(181,'minpasswordlower','1'),(182,'minpasswordupper','1'),(183,'minpasswordnonalphanum','1'),(184,'maxconsecutiveidentchars','0'),(185,'groupenrolmentkeypolicy','1'),(186,'disableuserimages','0'),(187,'emailchangeconfirmation','1'),(188,'rememberusername','2'),(189,'strictformsrequired','0'),(190,'loginhttps','0'),(191,'cookiesecure','0'),(192,'cookiehttponly','0'),(193,'allowframembedding','0'),(194,'loginpasswordautocomplete','0'),(195,'displayloginfailures','0'),(196,'notifyloginfailures',''),(197,'notifyloginthreshold','10'),(202,'themelist',''),(203,'themedesignermode','0'),(204,'allowuserthemes','0'),(205,'allowcoursethemes','0'),(206,'allowcategorythemes','0'),(207,'allowthemechangeonurl','0'),(208,'allowuserblockhiding','1'),(209,'allowblockstodock','1'),(210,'custommenuitems',''),(211,'enabledevicedetection','1'),(212,'devicedetectregex','[]'),(213,'calendar_adminseesall','0'),(214,'calendar_site_timeformat','0'),(215,'calendar_startwday','0'),(216,'calendar_weekend','65'),(217,'calendar_lookahead','21'),(218,'calendar_maxevents','10'),(219,'enablecalendarexport','1'),(220,'calendar_exportsalt','Y3Z95qJMcJohyeRDvSqAW1pqw9Jp05u24TZHZc3KPuTAMc2r7ZnsRLhxXlCM'),(221,'useblogassociations','1'),(222,'useexternalblogs','1'),(223,'externalblogcrontime','86400'),(224,'maxexternalblogsperuser','1'),(225,'blogusecomments','1'),(226,'blogshowcommentscount','1'),(227,'defaulthomepage','0'),(228,'navshowcategories','1'),(229,'navshowmycoursecategories','0'),(230,'navshowallcourses','0'),(231,'navcourselimit','20'),(232,'usesitenameforsitepages','0'),(233,'linkadmincategories','0'),(234,'navshowfrontpagemods','1'),(235,'navadduserpostslinks','1'),(236,'formatstringstriptags','1'),(237,'emoticons','[{\"text\":\":-)\",\"imagename\":\"s\\/smiley\",\"imagecomponent\":\"core\",\"altidentifier\":\"smiley\",\"altcomponent\":\"core_pix\"},{\"text\":\":)\",\"imagename\":\"s\\/smiley\",\"imagecomponent\":\"core\",\"altidentifier\":\"smiley\",\"altcomponent\":\"core_pix\"},{\"text\":\":-D\",\"imagename\":\"s\\/biggrin\",\"imagecomponent\":\"core\",\"altidentifier\":\"biggrin\",\"altcomponent\":\"core_pix\"},{\"text\":\";-)\",\"imagename\":\"s\\/wink\",\"imagecomponent\":\"core\",\"altidentifier\":\"wink\",\"altcomponent\":\"core_pix\"},{\"text\":\":-\\/\",\"imagename\":\"s\\/mixed\",\"imagecomponent\":\"core\",\"altidentifier\":\"mixed\",\"altcomponent\":\"core_pix\"},{\"text\":\"V-.\",\"imagename\":\"s\\/thoughtful\",\"imagecomponent\":\"core\",\"altidentifier\":\"thoughtful\",\"altcomponent\":\"core_pix\"},{\"text\":\":-P\",\"imagename\":\"s\\/tongueout\",\"imagecomponent\":\"core\",\"altidentifier\":\"tongueout\",\"altcomponent\":\"core_pix\"},{\"text\":\":-p\",\"imagename\":\"s\\/tongueout\",\"imagecomponent\":\"core\",\"altidentifier\":\"tongueout\",\"altcomponent\":\"core_pix\"},{\"text\":\"B-)\",\"imagename\":\"s\\/cool\",\"imagecomponent\":\"core\",\"altidentifier\":\"cool\",\"altcomponent\":\"core_pix\"},{\"text\":\"^-)\",\"imagename\":\"s\\/approve\",\"imagecomponent\":\"core\",\"altidentifier\":\"approve\",\"altcomponent\":\"core_pix\"},{\"text\":\"8-)\",\"imagename\":\"s\\/wideeyes\",\"imagecomponent\":\"core\",\"altidentifier\":\"wideeyes\",\"altcomponent\":\"core_pix\"},{\"text\":\":o)\",\"imagename\":\"s\\/clown\",\"imagecomponent\":\"core\",\"altidentifier\":\"clown\",\"altcomponent\":\"core_pix\"},{\"text\":\":-(\",\"imagename\":\"s\\/sad\",\"imagecomponent\":\"core\",\"altidentifier\":\"sad\",\"altcomponent\":\"core_pix\"},{\"text\":\":(\",\"imagename\":\"s\\/sad\",\"imagecomponent\":\"core\",\"altidentifier\":\"sad\",\"altcomponent\":\"core_pix\"},{\"text\":\"8-.\",\"imagename\":\"s\\/shy\",\"imagecomponent\":\"core\",\"altidentifier\":\"shy\",\"altcomponent\":\"core_pix\"},{\"text\":\":-I\",\"imagename\":\"s\\/blush\",\"imagecomponent\":\"core\",\"altidentifier\":\"blush\",\"altcomponent\":\"core_pix\"},{\"text\":\":-X\",\"imagename\":\"s\\/kiss\",\"imagecomponent\":\"core\",\"altidentifier\":\"kiss\",\"altcomponent\":\"core_pix\"},{\"text\":\"8-o\",\"imagename\":\"s\\/surprise\",\"imagecomponent\":\"core\",\"altidentifier\":\"surprise\",\"altcomponent\":\"core_pix\"},{\"text\":\"P-|\",\"imagename\":\"s\\/blackeye\",\"imagecomponent\":\"core\",\"altidentifier\":\"blackeye\",\"altcomponent\":\"core_pix\"},{\"text\":\"8-[\",\"imagename\":\"s\\/angry\",\"imagecomponent\":\"core\",\"altidentifier\":\"angry\",\"altcomponent\":\"core_pix\"},{\"text\":\"(grr)\",\"imagename\":\"s\\/angry\",\"imagecomponent\":\"core\",\"altidentifier\":\"angry\",\"altcomponent\":\"core_pix\"},{\"text\":\"xx-P\",\"imagename\":\"s\\/dead\",\"imagecomponent\":\"core\",\"altidentifier\":\"dead\",\"altcomponent\":\"core_pix\"},{\"text\":\"|-.\",\"imagename\":\"s\\/sleepy\",\"imagecomponent\":\"core\",\"altidentifier\":\"sleepy\",\"altcomponent\":\"core_pix\"},{\"text\":\"}-]\",\"imagename\":\"s\\/evil\",\"imagecomponent\":\"core\",\"altidentifier\":\"evil\",\"altcomponent\":\"core_pix\"},{\"text\":\"(h)\",\"imagename\":\"s\\/heart\",\"imagecomponent\":\"core\",\"altidentifier\":\"heart\",\"altcomponent\":\"core_pix\"},{\"text\":\"(heart)\",\"imagename\":\"s\\/heart\",\"imagecomponent\":\"core\",\"altidentifier\":\"heart\",\"altcomponent\":\"core_pix\"},{\"text\":\"(y)\",\"imagename\":\"s\\/yes\",\"imagecomponent\":\"core\",\"altidentifier\":\"yes\",\"altcomponent\":\"core\"},{\"text\":\"(n)\",\"imagename\":\"s\\/no\",\"imagecomponent\":\"core\",\"altidentifier\":\"no\",\"altcomponent\":\"core\"},{\"text\":\"(martin)\",\"imagename\":\"s\\/martin\",\"imagecomponent\":\"core\",\"altidentifier\":\"martin\",\"altcomponent\":\"core_pix\"},{\"text\":\"( )\",\"imagename\":\"s\\/egg\",\"imagecomponent\":\"core\",\"altidentifier\":\"egg\",\"altcomponent\":\"core_pix\"}]'),(245,'core_media_enable_qt','1'),(246,'core_media_enable_wmp','1'),(247,'core_media_enable_rm','1'),(248,'docroot','http://docs.moodle.org'),(249,'doctonewwindow','0'),(250,'courselistshortnames','0'),(251,'enableajax','1'),(252,'useexternalyui','0'),(253,'yuicomboloading','1'),(254,'cachejs','1'),(255,'modchooserdefault','1'),(256,'additionalhtmlhead',''),(257,'additionalhtmltopofbody',''),(258,'additionalhtmlfooter',''),(259,'gdversion','2'),(260,'pathtodu',''),(261,'aspellpath',''),(262,'pathtodot',''),(263,'supportpage',''),(264,'dbsessions','1'),(265,'sessioncookie',''),(266,'sessioncookiepath',''),(267,'sessioncookiedomain',''),(268,'statsfirstrun','none'),(269,'statsmaxruntime','0'),(270,'statsruntimedays','31'),(273,'statsuserthreshold','0'),(274,'slasharguments','1'),(275,'getremoteaddrconf','0'),(276,'proxyhost',''),(277,'proxyport','0'),(278,'proxytype','HTTP'),(279,'proxyuser',''),(280,'proxypassword',''),(281,'proxybypass','localhost, 127.0.0.1'),(282,'maintenance_enabled','0'),(283,'maintenance_message',''),(284,'deleteunconfirmed','168'),(285,'deleteincompleteusers','0'),(286,'logguests','1'),(287,'loglifetime','0'),(288,'disablegradehistory','0'),(289,'gradehistorylifetime','0'),(291,'extramemorylimit','512M'),(292,'curlcache','120'),(293,'curltimeoutkbitrate','56'),(294,'updateautocheck','1'),(295,'updateminmaturity','200'),(296,'updatenotifybuilds','0'),(297,'enablesafebrowserintegration','0'),(299,'dndallowtextandlinks','0'),(301,'debug','0'),(302,'debugdisplay','1'),(304,'debugsmtp','0'),(305,'perfdebug','7'),(306,'debugstringids','0'),(307,'debugvalidators','0'),(308,'debugpageinfo','0'),(309,'release','3.2.1 (Build: 20170109)'),(310,'branch','32'),(311,'notloggedinroleid','6'),(312,'guestroleid','6'),(313,'defaultuserroleid','7'),(314,'creatornewroleid','3'),(315,'restorernewroleid','3'),(316,'gradebookroles','5'),(317,'assignment_maxbytes','1048576'),(318,'assignment_itemstocount','1'),(319,'assignment_showrecentsubmissions','1'),(320,'chat_method','ajax'),(321,'chat_refresh_userlist','10'),(322,'chat_old_ping','35'),(323,'chat_refresh_room','5'),(324,'chat_normal_updatemode','jsupdate'),(325,'chat_serverhost','testing.installatron.com'),(326,'chat_serverip','127.0.0.1'),(327,'chat_serverport','9111'),(328,'chat_servermax','100'),(329,'data_enablerssfeeds','0'),(330,'feedback_allowfullanonymous','0'),(331,'forum_displaymode','3'),(332,'forum_replytouser','1'),(333,'forum_shortpost','300'),(334,'forum_longpost','600'),(335,'forum_manydiscussions','100'),(336,'forum_maxbytes','512000'),(337,'forum_maxattachments','9'),(338,'forum_trackreadposts','1'),(339,'forum_oldpostdays','14'),(340,'forum_usermarksread','0'),(341,'forum_cleanreadtime','2'),(342,'digestmailtime','17'),(343,'forum_enablerssfeeds','0'),(344,'forum_enabletimedposts','0'),(345,'glossary_entbypage','10'),(346,'glossary_dupentries','0'),(347,'glossary_allowcomments','0'),(348,'glossary_linkbydefault','1'),(349,'glossary_defaultapproval','1'),(350,'glossary_enablerssfeeds','0'),(351,'glossary_linkentries','0'),(352,'glossary_casesensitive','0'),(353,'glossary_fullmatch','0'),(363,'block_course_list_adminview','all'),(364,'block_course_list_hideallcourseslink','0'),(365,'block_online_users_timetosee','5'),(366,'block_rss_client_num_entries','5'),(367,'block_rss_client_timeout','30'),(368,'block_tags_showcoursetags','0'),(369,'jabberhost',''),(370,'jabberserver',''),(371,'jabberusername',''),(372,'jabberpassword',''),(373,'jabberport','5222'),(374,'smtphosts',''),(375,'smtpsecure',''),(376,'smtpuser',''),(377,'smtppass',''),(378,'smtpmaxbulk','1'),(379,'noreplyaddress','admin@da01.dev.installatron.com'),(380,'sitemailcharset','0'),(381,'allowusermailcharset','0'),(382,'mailnewline','LF'),(383,'enablemobilewebservice','0'),(384,'profileroles','5,4,3'),(385,'coursecontact','3'),(386,'frontpage','6'),(387,'frontpageloggedin','5,7'),(388,'maxcategorydepth','0'),(389,'commentsperpage','15'),(390,'coursesperpage','20'),(391,'defaultfrontpageroleid','8'),(392,'supportname','Admin User'),(393,'supportemail',''),(395,'gravatardefaulturl','mm'),(396,'langrev','1490319064'),(398,'enableblogs','1'),(399,'requestcategoryselection','0'),(400,'grade_export_userprofilefields','firstname,lastname,idnumber,institution,department,email'),(401,'grade_export_customprofilefields',''),(402,'block_html_allowcssclasses','0'),(403,'mobilecssurl',''),(404,'allowguestmymoodle','1'),(405,'courseswithsummarieslimit','10'),(407,'localcachedirpurged','1490319064'),(408,'scheduledtaskreset','1490319064'),(410,'filesrootrecordsfixed','1'),(411,'movingmoduleupgradescriptwasrun','1'),(412,'grades_sumofgrades_upgrade_flagged','1'),(413,'upgrade_minmaxgradestepignored','1'),(415,'customusermenuitems','grades,grades|/grade/report/mygrades.php|grades\nmessages,message|/message/index.php|message\npreferences,moodle|/user/preferences.php|preferences'),(416,'upgrade_extracreditweightsstepignored','1'),(417,'upgrade_calculatedgradeitemsignored','1'),(418,'allversionshash','03862bcd622665a998878770c9a84883607e18d1'),(419,'completiondefault','1'),(420,'enablebadges','1'),(421,'defaultpreference_maildisplay','2'),(422,'defaultpreference_mailformat','1'),(423,'defaultpreference_maildigest','0'),(424,'defaultpreference_autosubscribe','1'),(425,'defaultpreference_trackforums','0'),(426,'alternativefullnameformat','language'),(427,'maxusersperpage','100'),(428,'grade_report_showmin','1'),(429,'gradepointmax','100'),(430,'gradepointdefault','100'),(431,'grade_minmaxtouse','1'),(432,'grade_mygrades_report','overview'),(433,'gradereport_mygradeurl',''),(434,'grade_overridecat','1'),(435,'grade_report_showonlyactiveenrol','1'),(436,'grade_report_historyperpage','50'),(437,'grade_report_user_showcontributiontocoursetotal','1'),(438,'badges_defaultissuername','My education'),(439,'badges_defaultissuercontact',''),(440,'badges_badgesalt','badges1347240007'),(441,'badges_allowexternalbackpack','1'),(442,'badges_allowcoursebadges','1'),(443,'timezone','Europe/London'),(444,'requiremodintro','0'),(445,'forum_trackingtype','1'),(446,'forum_allowforcedreadtracking','0'),(447,'authloginviaemail','0'),(448,'allowaccountssameemail','0'),(449,'limitconcurrentlogins','0'),(450,'airnotifierurl','https://messages.moodle.net'),(451,'airnotifierport','443'),(452,'airnotifiermobileappname','com.moodle.moodlemobile'),(453,'airnotifierappname','commoodlemoodlemobile'),(454,'airnotifieraccesskey',''),(455,'smtpauthtype','LOGIN'),(456,'emailonlyfromnoreplyaddress','0'),(457,'allowattachments','1'),(458,'repositorygetfiletimeout','30'),(459,'repositorysyncfiletimeout','1'),(460,'repositorysyncimagetimeout','3'),(461,'legacyfilesaddallowed','1'),(462,'lockoutthreshold','0'),(463,'lockoutwindow','1800'),(464,'lockoutduration','1800'),(465,'passwordreuselimit','0'),(466,'pwresettime','1800'),(467,'passwordchangelogout','0'),(468,'calendartype','gregorian'),(469,'calendar_customexport','1'),(470,'calendar_exportlookahead','365'),(471,'calendar_exportlookback','5'),(472,'calendar_showicalsource','1'),(473,'navshowfullcoursenames','0'),(474,'navexpandmycourses','1'),(475,'navsortmycoursessort','sortorder'),(476,'linkcoursesections','0'),(477,'doclang',''),(478,'courseoverviewfileslimit','1'),(479,'courseoverviewfilesext','.jpg,.gif,.png'),(480,'modeditingmenu','1'),(481,'blockeditingmenu','1'),(482,'frontpagecourselimit','200'),(483,'pathtogs','/usr/bin/gs'),(484,'tempdatafoldercleanup','168'),(485,'maxtimelimit','0'),(486,'messageinbound_enabled','0'),(487,'messageinbound_mailbox',''),(488,'messageinbound_domain',''),(489,'messageinbound_host',''),(490,'messageinbound_hostssl','ssl'),(491,'messageinbound_hostuser',''),(492,'messageinbound_hostpass',''),(493,'profilingenabled','0'),(494,'profilingincluded',''),(495,'profilingexcluded',''),(496,'profilingautofrec','0'),(497,'profilingallowme','0'),(498,'profilingallowall','0'),(499,'profilinglifetime','1440'),(500,'profilingimportprefix','(I)'),(502,'antiviruses',''),(503,'upgrade_letterboundarycourses','1'),(504,'media_plugins_sortorder','videojs,youtube,swf'),(505,'enableglobalsearch','0'),(506,'geoip2file','/home/admin/domains/testing.installatron.com/public_html/moodlenv1/data/geoip/GeoLite2-City.mmdb'),(507,'media_default_width','400'),(508,'media_default_height','300'),(509,'searchengine','solr'),(510,'passwordchangetokendeletion','0'),(511,'curlsecurityblockedhosts',''),(512,'curlsecurityallowedport',''),(513,'pathtounoconv','/usr/bin/unoconv'),(514,'allowedemaildomains',''),(515,'emailfromvia','1');

CREATE TABLE `eoay_config_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `plugin` varchar(100) DEFAULT NULL,
  `name` varchar(100) NOT NULL DEFAULT '',
  `value` longtext,
  `oldvalue` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_conflog_tim_ix` (`timemodified`),
  KEY `eoay_conflog_use_ix` (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=1178 DEFAULT CHARSET=utf8 COMMENT='Changes done in server configuration through admin UI';



CREATE TABLE `eoay_config_plugins` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `plugin` varchar(100) NOT NULL DEFAULT 'core',
  `name` varchar(100) NOT NULL DEFAULT '',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_confplug_plunam_uix` (`plugin`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1451 DEFAULT CHARSET=utf8 COMMENT='Moodle modules and plugins configuration variables';

INSERT INTO `eoay_config_plugins` VALUES (1384,'mod_lesson','password_adv','1'),(1385,'mod_lesson','modattempts','0'),(1386,'mod_lesson','modattempts_adv',''),(1387,'mod_lesson','displayreview','0'),(1388,'mod_lesson','displayreview_adv',''),(1389,'mod_lesson','maximumnumberofattempts','1'),(1390,'mod_lesson','maximumnumberofattempts_adv',''),(1391,'mod_lesson','numberofpagestoshow','1'),(1392,'mod_lesson','numberofpagestoshow_adv','1'),(1393,'mod_lesson','practice','0'),(1394,'mod_lesson','practice_adv',''),(1395,'mod_lesson','customscoring','1'),(1396,'mod_lesson','customscoring_adv','1'),(1397,'mod_lesson','retakesallowed','0'),(1398,'mod_lesson','retakesallowed_adv',''),(1399,'mod_lesson','handlingofretakes','0'),(1400,'mod_lesson','handlingofretakes_adv','1'),(1401,'mod_lesson','minimumnumberofquestions','0'),(1402,'mod_lesson','minimumnumberofquestions_adv','1'),(1403,'scorm','masteryoverride','1'),(1404,'tool_recyclebin','coursebinenable','1'),(1405,'tool_recyclebin','coursebinexpiry','604800'),(1406,'tool_recyclebin','categorybinenable','1'),(1407,'tool_recyclebin','categorybinexpiry','604800'),(1408,'tool_recyclebin','autohide','1'),(1409,'antivirus_clamav','runningmethod','commandline'),(1410,'antivirus_clamav','pathtounixsocket',''),(1411,'block_activity_results','config_showbest','3'),(1412,'block_activity_results','config_showbest_locked',''),(1413,'block_activity_results','config_showworst','0'),(1414,'block_activity_results','config_showworst_locked',''),(1415,'block_activity_results','config_usegroups','0'),(1416,'block_activity_results','config_usegroups_locked',''),(1417,'block_activity_results','config_nameformat','1'),(1418,'block_activity_results','config_nameformat_locked',''),(1419,'block_activity_results','config_gradeformat','1'),(1420,'block_activity_results','config_gradeformat_locked',''),(1421,'block_activity_results','config_decimalpoints','2'),(1422,'block_activity_results','config_decimalpoints_locked',''),(1423,'cachestore_apcu','testperformance','0'),(1424,'cachestore_redis','test_server',''),(1425,'enrol_imsenterprise','imsupdateusers','0'),(1426,'enrol_imsenterprise','updatecourses','0'),(1427,'enrol_imsenterprise','nestedcategories','0'),(1428,'enrol_imsenterprise','categoryidnumber','0'),(1429,'enrol_imsenterprise','categoryseparator',''),(1430,'enrol_lti','emaildisplay','2'),(1431,'enrol_lti','city',''),(1432,'enrol_lti','country',''),(1433,'enrol_lti','timezone','99'),(1434,'enrol_lti','lang','en'),(1435,'enrol_lti','institution',''),(1436,'media_videojs','youtube','1'),(1437,'media_videojs','videocssclass','video-js'),(1438,'media_videojs','audiocssclass','video-js'),(1439,'media_videojs','limitsize','1'),(1440,'theme_boost','preset','default.scss'),(1441,'theme_boost','presetfiles',''),(1442,'theme_boost','brandcolor',''),(1443,'theme_boost','scsspre',''),(1444,'theme_boost','scss',''),(1445,'theme_clean','smalllogo',''),(1446,'theme_clean','sitename','1'),(1447,'theme_more','smalllogo',''),(1448,'theme_more','sitename','1'),(1449,'core_admin','logo',''),(1450,'core_admin','logocompact','');

CREATE TABLE `eoay_context` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextlevel` bigint(10) NOT NULL DEFAULT '0',
  `instanceid` bigint(10) NOT NULL DEFAULT '0',
  `path` varchar(255) DEFAULT NULL,
  `depth` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_cont_conins_uix` (`contextlevel`,`instanceid`),
  KEY `eoay_cont_ins_ix` (`instanceid`),
  KEY `eoay_cont_pat_ix` (`path`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='one of these must be set';
INSERT INTO `eoay_context` VALUES (1,10,0,'/1',1),(2,50,1,'/1/2',2),(3,40,1,'/1/3',2),(4,30,1,'/1/4',2),(5,30,2,'/1/5',2),(6,80,1,'/1/2/6',3),(7,80,2,'/1/2/7',3),(8,80,3,'/1/2/8',3),(9,80,4,'/1/9',2),(10,80,5,'/1/10',2),(11,80,6,'/1/11',2),(12,80,7,'/1/12',2),(13,80,8,'/1/13',2),(14,80,9,'/1/14',2),(15,80,10,'/1/15',2),(16,80,11,'/1/16',2);

CREATE TABLE `eoay_context_temp` (
  `id` bigint(10) NOT NULL,
  `path` varchar(255) NOT NULL DEFAULT '',
  `depth` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Used by build_context_path() in upgrade and cron to keep con';

CREATE TABLE `eoay_course` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `category` bigint(10) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `fullname` varchar(254) NOT NULL DEFAULT '',
  `shortname` varchar(255) NOT NULL DEFAULT '',
  `idnumber` varchar(100) NOT NULL DEFAULT '',
  `summary` longtext,
  `summaryformat` tinyint(2) NOT NULL DEFAULT '0',
  `format` varchar(21) NOT NULL DEFAULT 'topics',
  `showgrades` tinyint(2) NOT NULL DEFAULT '1',
  `newsitems` mediumint(5) NOT NULL DEFAULT '1',
  `startdate` bigint(10) NOT NULL DEFAULT '0',
  `enddate` bigint(10) NOT NULL DEFAULT '0',
  `marker` bigint(10) NOT NULL DEFAULT '0',
  `maxbytes` bigint(10) NOT NULL DEFAULT '0',
  `legacyfiles` smallint(4) NOT NULL DEFAULT '0',
  `showreports` smallint(4) NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `visibleold` tinyint(1) NOT NULL DEFAULT '1',
  `groupmode` smallint(4) NOT NULL DEFAULT '0',
  `groupmodeforce` smallint(4) NOT NULL DEFAULT '0',
  `defaultgroupingid` bigint(10) NOT NULL DEFAULT '0',
  `lang` varchar(30) NOT NULL DEFAULT '',
  `theme` varchar(50) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) 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(10) NOT NULL DEFAULT '0',
  `calendartype` varchar(30) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_cour_cat_ix` (`category`),
  KEY `eoay_cour_idn_ix` (`idnumber`),
  KEY `eoay_cour_sho_ix` (`shortname`),
  KEY `eoay_cour_sor_ix` (`sortorder`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Central course table';
INSERT INTO `eoay_course` VALUES (1,0,0,'My education','My education','','<p></p>',0,'site',1,3,0,0,0,0,0,0,1,1,0,0,0,'','',1347240007,1490319672,0,0,0,1490319064,'');

CREATE TABLE `eoay_course_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `idnumber` varchar(100) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `coursecount` bigint(10) NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `visibleold` tinyint(1) NOT NULL DEFAULT '1',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `depth` bigint(10) NOT NULL DEFAULT '0',
  `path` varchar(255) NOT NULL DEFAULT '',
  `theme` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_courcate_par_ix` (`parent`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Course categories';
INSERT INTO `eoay_course_categories` VALUES (1,'Miscellaneous',NULL,NULL,0,0,10000,0,1,1,1347240007,1,'/1',NULL);

CREATE TABLE `eoay_course_completion_aggr_methd` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `criteriatype` bigint(20) DEFAULT NULL,
  `method` tinyint(1) NOT NULL DEFAULT '0',
  `value` decimal(10,5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_courcompaggrmeth_couc_uix` (`course`,`criteriatype`),
  KEY `eoay_courcompaggrmeth_cou_ix` (`course`),
  KEY `eoay_courcompaggrmeth_cri_ix` (`criteriatype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Course completion aggregation methods for criteria';

CREATE TABLE `eoay_course_completion_crit_compl` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `course` bigint(10) NOT NULL DEFAULT '0',
  `criteriaid` bigint(10) NOT NULL DEFAULT '0',
  `gradefinal` decimal(10,5) DEFAULT NULL,
  `unenroled` bigint(10) DEFAULT NULL,
  `timecompleted` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_courcompcritcomp_usec_uix` (`userid`,`course`,`criteriaid`),
  KEY `eoay_courcompcritcomp_use_ix` (`userid`),
  KEY `eoay_courcompcritcomp_cou_ix` (`course`),
  KEY `eoay_courcompcritcomp_cri_ix` (`criteriaid`),
  KEY `eoay_courcompcritcomp_tim_ix` (`timecompleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Course completion user records';

CREATE TABLE `eoay_course_completion_criteria` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `criteriatype` bigint(20) NOT NULL DEFAULT '0',
  `module` varchar(100) DEFAULT NULL,
  `moduleinstance` bigint(10) DEFAULT NULL,
  `courseinstance` bigint(10) DEFAULT NULL,
  `enrolperiod` bigint(10) DEFAULT NULL,
  `timeend` bigint(10) DEFAULT NULL,
  `gradepass` decimal(10,5) DEFAULT NULL,
  `role` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_courcompcrit_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Course completion criteria';

CREATE TABLE `eoay_course_completions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `course` bigint(10) NOT NULL DEFAULT '0',
  `timeenrolled` bigint(10) NOT NULL DEFAULT '0',
  `timestarted` bigint(10) NOT NULL DEFAULT '0',
  `timecompleted` bigint(10) DEFAULT NULL,
  `reaggregate` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_courcomp_usecou_uix` (`userid`,`course`),
  KEY `eoay_courcomp_use_ix` (`userid`),
  KEY `eoay_courcomp_cou_ix` (`course`),
  KEY `eoay_courcomp_tim_ix` (`timecompleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Course completion records';

CREATE TABLE `eoay_course_format_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `format` varchar(21) NOT NULL DEFAULT '',
  `sectionid` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(100) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_courformopti_couforse_uix` (`courseid`,`format`,`sectionid`,`name`),
  KEY `eoay_courformopti_cou_ix` (`courseid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
INSERT INTO `eoay_course_format_options` VALUES (1,1,'site',0,'coursedisplay','0'),(2,1,'site',0,'numsections','1'),(3,1,'site',0,'hiddensections','0');

CREATE TABLE `eoay_course_modules` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `module` bigint(10) NOT NULL DEFAULT '0',
  `instance` bigint(10) NOT NULL DEFAULT '0',
  `section` bigint(10) NOT NULL DEFAULT '0',
  `idnumber` varchar(100) DEFAULT NULL,
  `added` bigint(10) NOT NULL DEFAULT '0',
  `score` smallint(4) NOT NULL DEFAULT '0',
  `indent` mediumint(5) NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `visibleold` tinyint(1) NOT NULL DEFAULT '1',
  `groupmode` smallint(4) NOT NULL DEFAULT '0',
  `groupingid` bigint(10) NOT NULL DEFAULT '0',
  `completion` tinyint(1) NOT NULL DEFAULT '0',
  `completiongradeitemnumber` bigint(10) DEFAULT NULL,
  `completionview` tinyint(1) NOT NULL DEFAULT '0',
  `completionexpected` bigint(10) NOT NULL DEFAULT '0',
  `showdescription` tinyint(1) NOT NULL DEFAULT '0',
  `availability` longtext,
  `deletioninprogress` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_courmodu_vis_ix` (`visible`),
  KEY `eoay_courmodu_cou_ix` (`course`),
  KEY `eoay_courmodu_mod_ix` (`module`),
  KEY `eoay_courmodu_ins_ix` (`instance`),
  KEY `eoay_courmodu_idncou_ix` (`idnumber`,`course`),
  KEY `eoay_courmodu_gro_ix` (`groupingid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='course_modules table retrofitted from MySQL';

CREATE TABLE `eoay_course_modules_completion` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `coursemoduleid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `completionstate` tinyint(1) NOT NULL,
  `viewed` tinyint(1) DEFAULT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_courmoducomp_usecou_uix` (`userid`,`coursemoduleid`),
  KEY `eoay_courmoducomp_cou_ix` (`coursemoduleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the completion state (completed or not completed, etc';

CREATE TABLE `eoay_course_published` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `huburl` varchar(255) DEFAULT NULL,
  `courseid` bigint(10) NOT NULL,
  `timepublished` bigint(10) NOT NULL,
  `enrollable` tinyint(1) NOT NULL DEFAULT '1',
  `hubcourseid` bigint(10) NOT NULL,
  `status` tinyint(1) DEFAULT '0',
  `timechecked` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information about how and when an local courses were publish';

CREATE TABLE `eoay_course_request` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `fullname` varchar(254) NOT NULL DEFAULT '',
  `shortname` varchar(100) NOT NULL DEFAULT '',
  `summary` longtext NOT NULL,
  `summaryformat` tinyint(2) NOT NULL DEFAULT '0',
  `category` bigint(10) NOT NULL DEFAULT '0',
  `reason` longtext NOT NULL,
  `requester` bigint(10) NOT NULL DEFAULT '0',
  `password` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_courrequ_sho_ix` (`shortname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='course requests';

CREATE TABLE `eoay_course_sections` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `section` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `summary` longtext,
  `summaryformat` tinyint(2) NOT NULL DEFAULT '0',
  `sequence` longtext,
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  `availability` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_coursect_cousec_uix` (`course`,`section`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='to define the sections for each course';

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

CREATE TABLE `eoay_data_content` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `fieldid` bigint(10) NOT NULL DEFAULT '0',
  `recordid` bigint(10) NOT NULL DEFAULT '0',
  `content` longtext,
  `content1` longtext,
  `content2` longtext,
  `content3` longtext,
  `content4` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_datacont_rec_ix` (`recordid`),
  KEY `eoay_datacont_fie_ix` (`fieldid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='the content introduced in each record/fields';

CREATE TABLE `eoay_data_fields` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `dataid` bigint(10) NOT NULL DEFAULT '0',
  `type` varchar(255) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `param1` longtext,
  `param2` longtext,
  `param3` longtext,
  `param4` longtext,
  `param5` longtext,
  `param6` longtext,
  `param7` longtext,
  `param8` longtext,
  `param9` longtext,
  `param10` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_datafiel_typdat_ix` (`type`,`dataid`),
  KEY `eoay_datafiel_dat_ix` (`dataid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='every field available';

CREATE TABLE `eoay_data_records` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `dataid` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `approved` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_datareco_dat_ix` (`dataid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='every record introduced';

CREATE TABLE `eoay_editor_atto_autosave` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `elementid` varchar(255) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `pagehash` varchar(64) NOT NULL DEFAULT '',
  `userid` bigint(10) NOT NULL,
  `drafttext` longtext NOT NULL,
  `draftid` bigint(10) DEFAULT NULL,
  `pageinstance` varchar(64) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_editattoauto_eleconus_uix` (`elementid`,`contextid`,`userid`,`pagehash`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Draft text that is auto-saved every 5 seconds while an edito';

CREATE TABLE `eoay_enrol` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `enrol` varchar(20) NOT NULL DEFAULT '',
  `status` bigint(10) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `enrolperiod` bigint(10) DEFAULT '0',
  `enrolstartdate` bigint(10) DEFAULT '0',
  `enrolenddate` bigint(10) DEFAULT '0',
  `expirynotify` tinyint(1) DEFAULT '0',
  `expirythreshold` bigint(10) DEFAULT '0',
  `notifyall` tinyint(1) DEFAULT '0',
  `password` varchar(50) DEFAULT NULL,
  `cost` varchar(20) DEFAULT NULL,
  `currency` varchar(3) DEFAULT NULL,
  `roleid` bigint(10) DEFAULT '0',
  `customint1` bigint(10) DEFAULT NULL,
  `customint2` bigint(10) DEFAULT NULL,
  `customint3` bigint(10) DEFAULT NULL,
  `customint4` bigint(10) DEFAULT NULL,
  `customint5` bigint(10) DEFAULT NULL,
  `customint6` bigint(10) DEFAULT NULL,
  `customint7` bigint(10) DEFAULT NULL,
  `customint8` bigint(10) DEFAULT NULL,
  `customchar1` varchar(255) DEFAULT NULL,
  `customchar2` varchar(255) DEFAULT NULL,
  `customchar3` varchar(1333) DEFAULT NULL,
  `customdec1` decimal(12,7) DEFAULT NULL,
  `customdec2` decimal(12,7) DEFAULT NULL,
  `customtext1` longtext,
  `customtext2` longtext,
  `customtext3` longtext,
  `customtext4` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_enro_enr_ix` (`enrol`),
  KEY `eoay_enro_cou_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Instances of enrolment plugins used in courses, fields marke';

CREATE TABLE `eoay_enrol_flatfile` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` varchar(30) NOT NULL DEFAULT '',
  `roleid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `courseid` bigint(10) NOT NULL,
  `timestart` bigint(10) NOT NULL DEFAULT '0',
  `timeend` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_enroflat_cou_ix` (`courseid`),
  KEY `eoay_enroflat_use_ix` (`userid`),
  KEY `eoay_enroflat_rol_ix` (`roleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='enrol_flatfile table retrofitted from MySQL';

CREATE TABLE `eoay_enrol_lti_lti2_consumer` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `consumerkey256` varchar(255) NOT NULL DEFAULT '',
  `consumerkey` longtext,
  `secret` varchar(1024) NOT NULL DEFAULT '',
  `ltiversion` varchar(10) DEFAULT NULL,
  `consumername` varchar(255) DEFAULT NULL,
  `consumerversion` varchar(255) DEFAULT NULL,
  `consumerguid` varchar(1024) DEFAULT NULL,
  `profile` longtext,
  `toolproxy` longtext,
  `settings` longtext,
  `protected` tinyint(1) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `enablefrom` bigint(10) DEFAULT NULL,
  `enableuntil` bigint(10) DEFAULT NULL,
  `lastaccess` bigint(10) DEFAULT NULL,
  `created` bigint(10) NOT NULL,
  `updated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_enroltilti2cons_con_uix` (`consumerkey256`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='LTI consumers interacting with moodle';

CREATE TABLE `eoay_enrol_lti_lti2_context` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `consumerid` bigint(11) NOT NULL,
  `lticontextkey` varchar(255) NOT NULL DEFAULT '',
  `type` varchar(100) DEFAULT NULL,
  `settings` longtext,
  `created` bigint(10) NOT NULL,
  `updated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltilti2cont_con_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information about a specific LTI contexts from the consumers';

CREATE TABLE `eoay_enrol_lti_lti2_nonce` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `consumerid` bigint(11) NOT NULL,
  `value` varchar(32) NOT NULL DEFAULT '',
  `expires` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltilti2nonc_con_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Nonce used for authentication between moodle and a consumer';

CREATE TABLE `eoay_enrol_lti_lti2_resource_link` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(11) DEFAULT NULL,
  `consumerid` bigint(11) DEFAULT NULL,
  `ltiresourcelinkkey` varchar(255) NOT NULL DEFAULT '',
  `settings` longtext,
  `primaryresourcelinkid` bigint(11) DEFAULT NULL,
  `shareapproved` tinyint(1) DEFAULT NULL,
  `created` bigint(10) NOT NULL,
  `updated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltilti2resolink_co_ix` (`contextid`),
  KEY `eoay_enroltilti2resolink_pr_ix` (`primaryresourcelinkid`),
  KEY `eoay_enroltilti2resolink_c2_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Link from the consumer to the tool';

CREATE TABLE `eoay_enrol_lti_lti2_share_key` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `sharekey` varchar(32) NOT NULL DEFAULT '',
  `resourcelinkid` bigint(11) NOT NULL,
  `autoapprove` tinyint(1) NOT NULL,
  `expires` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_enroltilti2sharkey_sh_uix` (`sharekey`),
  UNIQUE KEY `eoay_enroltilti2sharkey_re_uix` (`resourcelinkid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Resource link share key';

CREATE TABLE `eoay_enrol_lti_lti2_tool_proxy` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `toolproxykey` varchar(32) NOT NULL DEFAULT '',
  `consumerid` bigint(11) NOT NULL,
  `toolproxy` longtext NOT NULL,
  `created` bigint(10) NOT NULL,
  `updated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_enroltilti2toolprox_t_uix` (`toolproxykey`),
  KEY `eoay_enroltilti2toolprox_co_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='A tool proxy between moodle and a consumer';

CREATE TABLE `eoay_enrol_lti_lti2_user_result` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `resourcelinkid` bigint(11) NOT NULL,
  `ltiuserkey` varchar(255) NOT NULL DEFAULT '',
  `ltiresultsourcedid` varchar(1024) NOT NULL DEFAULT '',
  `created` bigint(10) NOT NULL,
  `updated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltilti2userresu_re_ix` (`resourcelinkid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Results for each user for each resource link';

CREATE TABLE `eoay_enrol_lti_tool_consumer_map` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `toolid` bigint(11) NOT NULL,
  `consumerid` bigint(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltitoolconsmap_too_ix` (`toolid`),
  KEY `eoay_enroltitoolconsmap_con_ix` (`consumerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table that maps the published tool to tool consumers.';

CREATE TABLE `eoay_enrol_lti_tools` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `enrolid` bigint(10) NOT NULL,
  `contextid` bigint(10) NOT NULL,
  `institution` varchar(40) NOT NULL DEFAULT '',
  `lang` varchar(30) NOT NULL DEFAULT 'en',
  `timezone` varchar(100) NOT NULL DEFAULT '99',
  `maxenrolled` bigint(10) NOT NULL DEFAULT '0',
  `maildisplay` tinyint(2) NOT NULL DEFAULT '2',
  `city` varchar(120) NOT NULL DEFAULT '',
  `country` varchar(2) NOT NULL DEFAULT '',
  `gradesync` tinyint(1) NOT NULL DEFAULT '0',
  `gradesynccompletion` tinyint(1) NOT NULL DEFAULT '0',
  `membersync` tinyint(1) NOT NULL DEFAULT '0',
  `membersyncmode` tinyint(1) NOT NULL DEFAULT '0',
  `roleinstructor` bigint(10) NOT NULL,
  `rolelearner` bigint(10) NOT NULL,
  `secret` longtext,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltitool_enr_ix` (`enrolid`),
  KEY `eoay_enroltitool_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='List of tools provided to the remote system';

CREATE TABLE `eoay_enrol_lti_users` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `toolid` bigint(10) NOT NULL,
  `serviceurl` longtext,
  `sourceid` longtext,
  `consumerkey` longtext,
  `consumersecret` longtext,
  `membershipsurl` longtext,
  `membershipsid` longtext,
  `lastgrade` decimal(10,5) DEFAULT NULL,
  `lastaccess` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_enroltiuser_use_ix` (`userid`),
  KEY `eoay_enroltiuser_too_ix` (`toolid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='User access log and gradeback data';

CREATE TABLE `eoay_enrol_paypal` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `business` varchar(255) NOT NULL DEFAULT '',
  `receiver_email` varchar(255) NOT NULL DEFAULT '',
  `receiver_id` varchar(255) NOT NULL DEFAULT '',
  `item_name` varchar(255) NOT NULL DEFAULT '',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `instanceid` bigint(10) NOT NULL DEFAULT '0',
  `memo` varchar(255) NOT NULL DEFAULT '',
  `tax` varchar(255) NOT NULL DEFAULT '',
  `option_name1` varchar(255) NOT NULL DEFAULT '',
  `option_selection1_x` varchar(255) NOT NULL DEFAULT '',
  `option_name2` varchar(255) NOT NULL DEFAULT '',
  `option_selection2_x` varchar(255) NOT NULL DEFAULT '',
  `payment_status` varchar(255) NOT NULL DEFAULT '',
  `pending_reason` varchar(255) NOT NULL DEFAULT '',
  `reason_code` varchar(30) NOT NULL DEFAULT '',
  `txn_id` varchar(255) NOT NULL DEFAULT '',
  `parent_txn_id` varchar(255) NOT NULL DEFAULT '',
  `payment_type` varchar(30) NOT NULL DEFAULT '',
  `timeupdated` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Holds all known information about PayPal transactions';

CREATE TABLE `eoay_event` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` longtext NOT NULL,
  `description` longtext NOT NULL,
  `format` smallint(4) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `repeatid` bigint(10) NOT NULL DEFAULT '0',
  `modulename` varchar(20) NOT NULL DEFAULT '',
  `instance` bigint(10) NOT NULL DEFAULT '0',
  `eventtype` varchar(20) NOT NULL DEFAULT '',
  `timestart` bigint(10) NOT NULL DEFAULT '0',
  `timeduration` bigint(10) NOT NULL DEFAULT '0',
  `visible` smallint(4) NOT NULL DEFAULT '1',
  `uuid` varchar(255) NOT NULL DEFAULT '',
  `sequence` bigint(10) NOT NULL DEFAULT '1',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `subscriptionid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_even_cou_ix` (`courseid`),
  KEY `eoay_even_use_ix` (`userid`),
  KEY `eoay_even_tim_ix` (`timestart`),
  KEY `eoay_even_tim2_ix` (`timeduration`),
  KEY `eoay_even_grocouvisuse_ix` (`groupid`,`courseid`,`visible`,`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='For everything with a time associated to it';

CREATE TABLE `eoay_event_subscriptions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `url` varchar(255) NOT NULL DEFAULT '',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `eventtype` varchar(20) NOT NULL DEFAULT '',
  `pollinterval` bigint(10) NOT NULL DEFAULT '0',
  `lastupdated` bigint(10) DEFAULT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_events_handlers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `eventname` varchar(166) NOT NULL DEFAULT '',
  `component` varchar(166) NOT NULL DEFAULT '',
  `handlerfile` varchar(255) NOT NULL DEFAULT '',
  `handlerfunction` longtext,
  `schedule` varchar(255) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `internal` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_evenhand_evecom_uix` (`eventname`,`component`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table is for storing which components requests what typ';

CREATE TABLE `eoay_events_queue` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `eventdata` longtext NOT NULL,
  `stackdump` longtext,
  `userid` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_evenqueu_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table is for storing queued events. It stores only one ';

CREATE TABLE `eoay_events_queue_handlers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `queuedeventid` bigint(10) NOT NULL,
  `handlerid` bigint(10) NOT NULL,
  `status` bigint(10) DEFAULT NULL,
  `errormessage` longtext,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_evenqueuhand_que_ix` (`queuedeventid`),
  KEY `eoay_evenqueuhand_han_ix` (`handlerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This is the list of queued handlers for processing. The even';

CREATE TABLE `eoay_external_functions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL DEFAULT '',
  `classname` varchar(100) NOT NULL DEFAULT '',
  `methodname` varchar(100) NOT NULL DEFAULT '',
  `classpath` varchar(255) DEFAULT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `capabilities` varchar(255) DEFAULT NULL,
  `services` varchar(1333) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_extefunc_nam_uix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=406 DEFAULT CHARSET=utf8 COMMENT='list of all external functions';
INSERT INTO `eoay_external_functions` VALUES (2,'core_group_create_groups','core_group_external','create_groups','group/externallib.php','moodle','moodle/course:managegroups',NULL),(4,'core_group_get_groups','core_group_external','get_groups','group/externallib.php','moodle','moodle/course:managegroups',NULL),(6,'core_group_get_course_groups','core_group_external','get_course_groups','group/externallib.php','moodle','moodle/course:managegroups',NULL),(8,'core_group_delete_groups','core_group_external','delete_groups','group/externallib.php','moodle','moodle/course:managegroups',NULL),(10,'core_group_get_group_members','core_group_external','get_group_members','group/externallib.php','moodle','moodle/course:managegroups',NULL),(12,'core_group_add_group_members','core_group_external','add_group_members','group/externallib.php','moodle','moodle/course:managegroups',NULL),(14,'core_group_delete_group_members','core_group_external','delete_group_members','group/externallib.php','moodle','moodle/course:managegroups',NULL),(15,'core_group_create_groupings','core_group_external','create_groupings','group/externallib.php','moodle','',NULL),(16,'core_group_update_groupings','core_group_external','update_groupings','group/externallib.php','moodle','',NULL),(17,'core_group_get_groupings','core_group_external','get_groupings','group/externallib.php','moodle','',NULL),(18,'core_group_get_course_groupings','core_group_external','get_course_groupings','group/externallib.php','moodle','',NULL),(19,'core_group_delete_groupings','core_group_external','delete_groupings','group/externallib.php','moodle','',NULL),(20,'core_group_assign_grouping','core_group_external','assign_grouping','group/externallib.php','moodle','',NULL),(21,'core_group_unassign_grouping','core_group_external','unassign_grouping','group/externallib.php','moodle','',NULL),(23,'core_files_get_files','core_files_external','get_files','files/externallib.php','moodle','','moodle_mobile_app'),(25,'core_files_upload','core_files_external','upload','files/externallib.php','moodle','',NULL),(27,'core_user_create_users','core_user_external','create_users','user/externallib.php','moodle','moodle/user:create',NULL),(32,'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'),(34,'core_user_delete_users','core_user_external','delete_users','user/externallib.php','moodle','moodle/user:delete',NULL),(36,'core_user_update_users','core_user_external','update_users','user/externallib.php','moodle','moodle/user:update',NULL),(38,'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'),(40,'core_enrol_get_users_courses','core_enrol_external','get_users_courses','enrol/externallib.php','moodle','moodle/course:viewparticipants','moodle_mobile_app'),(42,'core_role_assign_roles','core_role_external','assign_roles','enrol/externallib.php','moodle','moodle/role:assign',NULL),(44,'core_role_unassign_roles','core_role_external','unassign_roles','enrol/externallib.php','moodle','moodle/role:assign',NULL),(45,'core_course_get_contents','core_course_external','get_course_contents','course/externallib.php','moodle','moodle/course:update, moodle/course:viewhiddencourses','moodle_mobile_app'),(47,'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'),(49,'core_course_create_courses','core_course_external','create_courses','course/externallib.php','moodle','moodle/course:create, moodle/course:visibility',NULL),(50,'core_course_delete_courses','core_course_external','delete_courses','course/externallib.php','moodle','moodle/course:delete',NULL),(51,'core_course_duplicate_course','core_course_external','duplicate_course','course/externallib.php','moodle','moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create',NULL),(52,'core_course_get_categories','core_course_external','get_categories','course/externallib.php','moodle','moodle/category:viewhiddencategories','moodle_mobile_app'),(53,'core_course_create_categories','core_course_external','create_categories','course/externallib.php','moodle','moodle/category:manage',NULL),(54,'core_course_update_categories','core_course_external','update_categories','course/externallib.php','moodle','moodle/category:manage',NULL),(55,'core_course_delete_categories','core_course_external','delete_categories','course/externallib.php','moodle','moodle/category:manage',NULL),(57,'core_message_send_instant_messages','core_message_external','send_instant_messages','message/externallib.php','moodle','moodle/site:sendmessage','moodle_mobile_app'),(59,'core_notes_create_notes','core_notes_external','create_notes','notes/externallib.php','moodle','moodle/notes:manage','moodle_mobile_app'),(61,'core_webservice_get_site_info','core_webservice_external','get_site_info','webservice/externallib.php','moodle','','moodle_mobile_app'),(63,'enrol_manual_enrol_users','enrol_manual_external','enrol_users','enrol/manual/externallib.php','enrol_manual','enrol/manual:enrol',NULL),(64,'core_enrol_get_enrolled_users_with_capability','core_enrol_external','get_enrolled_users_with_capability','enrol/externallib.php','moodle','',NULL),(65,'core_course_import_course','core_course_external','import_course','course/externallib.php','moodle','moodle/backup:backuptargetimport, moodle/restore:restoretargetimport',NULL),(66,'core_get_string','core_external','get_string','lib/external/externallib.php','moodle','',NULL),(67,'core_get_strings','core_external','get_strings','lib/external/externallib.php','moodle','',NULL),(68,'core_get_component_strings','core_external','get_component_strings','lib/external/externallib.php','moodle','','moodle_mobile_app'),(69,'mod_assign_get_grades','mod_assign_external','get_grades','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(70,'mod_assign_get_assignments','mod_assign_external','get_assignments','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(71,'core_cohort_create_cohorts','core_cohort_external','create_cohorts','cohort/externallib.php','moodle','moodle/cohort:manage',NULL),(72,'core_cohort_delete_cohorts','core_cohort_external','delete_cohorts','cohort/externallib.php','moodle','moodle/cohort:manage',NULL),(73,'core_cohort_get_cohorts','core_cohort_external','get_cohorts','cohort/externallib.php','moodle','moodle/cohort:view',NULL),(74,'core_cohort_update_cohorts','core_cohort_external','update_cohorts','cohort/externallib.php','moodle','moodle/cohort:manage',NULL),(75,'core_cohort_add_cohort_members','core_cohort_external','add_cohort_members','cohort/externallib.php','moodle','moodle/cohort:assign',NULL),(76,'core_cohort_delete_cohort_members','core_cohort_external','delete_cohort_members','cohort/externallib.php','moodle','moodle/cohort:assign',NULL),(77,'core_cohort_get_cohort_members','core_cohort_external','get_cohort_members','cohort/externallib.php','moodle','moodle/cohort:view',NULL),(78,'core_comment_get_comments','core_comment_external','get_comments',NULL,'moodle','moodle/comment:view','moodle_mobile_app'),(79,'core_grades_get_grades','core_grades_external','get_grades',NULL,'moodle','moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden',NULL),(80,'core_grades_update_grades','core_grades_external','update_grades',NULL,'moodle','',NULL),(81,'core_group_get_course_user_groups','core_group_external','get_course_user_groups','group/externallib.php','moodle','moodle/course:managegroups','moodle_mobile_app'),(82,'core_group_get_activity_allowed_groups','core_group_external','get_activity_allowed_groups','group/externallib.php','moodle','','moodle_mobile_app'),(83,'core_group_get_activity_groupmode','core_group_external','get_activity_groupmode','group/externallib.php','moodle','','moodle_mobile_app'),(84,'core_notes_get_course_notes','core_notes_external','get_course_notes','notes/externallib.php','moodle','moodle/notes:view','moodle_mobile_app'),(85,'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),(86,'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'),(87,'core_user_add_user_device','core_user_external','add_user_device','user/externallib.php','moodle','','moodle_mobile_app'),(88,'core_user_remove_user_device','core_user_external','remove_user_device','user/externallib.php','moodle','','moodle_mobile_app'),(89,'core_user_view_user_list','core_user_external','view_user_list','user/externallib.php','moodle','moodle/course:viewparticipants','moodle_mobile_app'),(90,'core_user_view_user_profile','core_user_external','view_user_profile','user/externallib.php','moodle','moodle/user:viewdetails','moodle_mobile_app'),(91,'core_user_add_user_private_files','core_user_external','add_user_private_files','user/externallib.php','moodle','moodle/user:manageownfiles','moodle_mobile_app'),(92,'core_enrol_get_course_enrolment_methods','core_enrol_external','get_course_enrolment_methods','enrol/externallib.php','moodle','','moodle_mobile_app'),(93,'core_course_search_courses','core_course_external','search_courses','course/externallib.php','moodle','','moodle_mobile_app'),(94,'core_course_delete_modules','core_course_external','delete_modules','course/externallib.php','moodle','moodle/course:manageactivities',NULL),(95,'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),(96,'core_course_view_course','core_course_external','view_course','course/externallib.php','moodle','','moodle_mobile_app'),(97,'core_course_get_course_module','core_course_external','get_course_module','course/externallib.php','moodle','','moodle_mobile_app'),(98,'core_course_get_course_module_by_instance','core_course_external','get_course_module_by_instance','course/externallib.php','moodle','','moodle_mobile_app'),(99,'core_message_create_contacts','core_message_external','create_contacts','message/externallib.php','moodle','','moodle_mobile_app'),(100,'core_message_delete_contacts','core_message_external','delete_contacts','message/externallib.php','moodle','','moodle_mobile_app'),(101,'core_message_block_contacts','core_message_external','block_contacts','message/externallib.php','moodle','','moodle_mobile_app'),(102,'core_message_unblock_contacts','core_message_external','unblock_contacts','message/externallib.php','moodle','','moodle_mobile_app'),(103,'core_message_get_contacts','core_message_external','get_contacts','message/externallib.php','moodle','','moodle_mobile_app'),(104,'core_message_search_contacts','core_message_external','search_contacts','message/externallib.php','moodle','','moodle_mobile_app'),(105,'core_message_get_messages','core_message_external','get_messages','message/externallib.php','moodle','','moodle_mobile_app'),(106,'core_message_get_blocked_users','core_message_external','get_blocked_users','message/externallib.php','moodle','','moodle_mobile_app'),(107,'core_message_mark_message_read','core_message_external','mark_message_read','message/externallib.php','moodle','','moodle_mobile_app'),(108,'core_notes_delete_notes','core_notes_external','delete_notes','notes/externallib.php','moodle','moodle/notes:manage','moodle_mobile_app'),(109,'core_notes_get_notes','core_notes_external','get_notes','notes/externallib.php','moodle','moodle/notes:view',NULL),(110,'core_notes_update_notes','core_notes_external','update_notes','notes/externallib.php','moodle','moodle/notes:manage',NULL),(111,'core_notes_view_notes','core_notes_external','view_notes','notes/externallib.php','moodle','moodle/notes:view','moodle_mobile_app'),(112,'core_grading_get_definitions','core_grading_external','get_definitions',NULL,'moodle','',NULL),(114,'core_grading_save_definitions','core_grading_external','save_definitions',NULL,'moodle','',NULL),(115,'core_grading_get_gradingform_instances','core_grading_external','get_gradingform_instances',NULL,'moodle','',NULL),(116,'core_calendar_delete_calendar_events','core_calendar_external','delete_calendar_events','calendar/externallib.php','moodle','moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',NULL),(117,'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'),(118,'core_calendar_create_calendar_events','core_calendar_external','create_calendar_events','calendar/externallib.php','moodle','moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',NULL),(119,'core_output_load_template','core\\output\\external','load_template',NULL,'moodle','',NULL),(120,'core_completion_update_activity_completion_status_manually','core_completion_external','update_activity_completion_status_manually',NULL,'moodle','','moodle_mobile_app'),(121,'core_completion_mark_course_self_completed','core_completion_external','mark_course_self_completed',NULL,'moodle','','moodle_mobile_app'),(122,'core_completion_get_activities_completion_status','core_completion_external','get_activities_completion_status',NULL,'moodle','','moodle_mobile_app'),(123,'core_completion_get_course_completion_status','core_completion_external','get_course_completion_status',NULL,'moodle','report/completion:view','moodle_mobile_app'),(124,'core_rating_get_item_ratings','core_rating_external','get_item_ratings',NULL,'moodle','moodle/rating:view','moodle_mobile_app'),(125,'core_tag_update_tags','core_tag_external','update_tags',NULL,'moodle','',NULL),(126,'core_tag_get_tags','core_tag_external','get_tags',NULL,'moodle','',NULL),(127,'mod_assign_get_submissions','mod_assign_external','get_submissions','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(128,'mod_assign_get_user_flags','mod_assign_external','get_user_flags','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(129,'mod_assign_set_user_flags','mod_assign_external','set_user_flags','mod/assign/externallib.php','mod_assign','mod/assign:grade','moodle_mobile_app'),(130,'mod_assign_get_user_mappings','mod_assign_external','get_user_mappings','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(131,'mod_assign_revert_submissions_to_draft','mod_assign_external','revert_submissions_to_draft','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(132,'mod_assign_lock_submissions','mod_assign_external','lock_submissions','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(133,'mod_assign_unlock_submissions','mod_assign_external','unlock_submissions','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(134,'mod_assign_save_submission','mod_assign_external','save_submission','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(135,'mod_assign_submit_for_grading','mod_assign_external','submit_for_grading','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(136,'mod_assign_save_grade','mod_assign_external','save_grade','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(137,'mod_assign_save_grades','mod_assign_external','save_grades','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(138,'mod_assign_save_user_extensions','mod_assign_external','save_user_extensions','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(139,'mod_assign_reveal_identities','mod_assign_external','reveal_identities','mod/assign/externallib.php','mod_assign','','moodle_mobile_app'),(140,'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'),(141,'mod_book_view_book','mod_book_external','view_book',NULL,'mod_book','mod/book:read','moodle_mobile_app'),(142,'mod_book_get_books_by_courses','mod_book_external','get_books_by_courses',NULL,'mod_book','','moodle_mobile_app'),(143,'mod_chat_login_user','mod_chat_external','login_user',NULL,'mod_chat','mod/chat:chat','moodle_mobile_app'),(144,'mod_chat_get_chat_users','mod_chat_external','get_chat_users',NULL,'mod_chat','mod/chat:chat','moodle_mobile_app'),(145,'mod_chat_send_chat_message','mod_chat_external','send_chat_message',NULL,'mod_chat','mod/chat:chat','moodle_mobile_app'),(146,'mod_chat_get_chat_latest_messages','mod_chat_external','get_chat_latest_messages',NULL,'mod_chat','mod/chat:chat','moodle_mobile_app'),(147,'mod_chat_view_chat','mod_chat_external','view_chat',NULL,'mod_chat','mod/chat:chat','moodle_mobile_app'),(148,'mod_chat_get_chats_by_courses','mod_chat_external','get_chats_by_courses',NULL,'mod_chat','','moodle_mobile_app'),(149,'mod_choice_get_choice_results','mod_choice_external','get_choice_results',NULL,'mod_choice','','moodle_mobile_app'),(150,'mod_choice_get_choice_options','mod_choice_external','get_choice_options',NULL,'mod_choice','mod/choice:choose','moodle_mobile_app'),(151,'mod_choice_submit_choice_response','mod_choice_external','submit_choice_response',NULL,'mod_choice','mod/choice:choose','moodle_mobile_app'),(152,'mod_choice_view_choice','mod_choice_external','view_choice',NULL,'mod_choice','','moodle_mobile_app'),(153,'mod_choice_get_choices_by_courses','mod_choice_external','get_choices_by_courses',NULL,'mod_choice','','moodle_mobile_app'),(154,'mod_choice_delete_choice_responses','mod_choice_external','delete_choice_responses',NULL,'mod_choice','mod/choice:choose','moodle_mobile_app'),(155,'mod_data_get_databases_by_courses','mod_data_external','get_databases_by_courses',NULL,'mod_data','mod/data:viewentry','moodle_mobile_app'),(156,'mod_folder_view_folder','mod_folder_external','view_folder',NULL,'mod_folder','mod/folder:view','moodle_mobile_app'),(157,'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'),(159,'mod_forum_get_forum_discussion_posts','mod_forum_external','get_forum_discussion_posts','mod/forum/externallib.php','mod_forum','mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting','moodle_mobile_app'),(160,'mod_forum_get_forum_discussions_paginated','mod_forum_external','get_forum_discussions_paginated','mod/forum/externallib.php','mod_forum','mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting','moodle_mobile_app'),(161,'mod_forum_view_forum','mod_forum_external','view_forum','mod/forum/externallib.php','mod_forum','mod/forum:viewdiscussion','moodle_mobile_app'),(162,'mod_forum_view_forum_discussion','mod_forum_external','view_forum_discussion','mod/forum/externallib.php','mod_forum','mod/forum:viewdiscussion','moodle_mobile_app'),(163,'mod_forum_add_discussion_post','mod_forum_external','add_discussion_post','mod/forum/externallib.php','mod_forum','mod/forum:replypost','moodle_mobile_app'),(164,'mod_forum_add_discussion','mod_forum_external','add_discussion','mod/forum/externallib.php','mod_forum','mod/forum:startdiscussion','moodle_mobile_app'),(165,'mod_imscp_view_imscp','mod_imscp_external','view_imscp',NULL,'mod_imscp','mod/imscp:view','moodle_mobile_app'),(166,'mod_imscp_get_imscps_by_courses','mod_imscp_external','get_imscps_by_courses',NULL,'mod_imscp','mod/imscp:view','moodle_mobile_app'),(167,'mod_lti_get_tool_launch_data','mod_lti_external','get_tool_launch_data',NULL,'mod_lti','mod/lti:view','moodle_mobile_app'),(168,'mod_lti_get_ltis_by_courses','mod_lti_external','get_ltis_by_courses',NULL,'mod_lti','mod/lti:view','moodle_mobile_app'),(169,'mod_lti_view_lti','mod_lti_external','view_lti',NULL,'mod_lti','mod/lti:view','moodle_mobile_app'),(170,'mod_page_view_page','mod_page_external','view_page',NULL,'mod_page','mod/page:view','moodle_mobile_app'),(171,'mod_resource_view_resource','mod_resource_external','view_resource',NULL,'mod_resource','mod/resource:view','moodle_mobile_app'),(172,'mod_scorm_view_scorm','mod_scorm_external','view_scorm',NULL,'mod_scorm','','moodle_mobile_app'),(173,'mod_scorm_get_scorm_attempt_count','mod_scorm_external','get_scorm_attempt_count',NULL,'mod_scorm','','moodle_mobile_app'),(174,'mod_scorm_get_scorm_scoes','mod_scorm_external','get_scorm_scoes',NULL,'mod_scorm','','moodle_mobile_app'),(175,'mod_scorm_get_scorm_user_data','mod_scorm_external','get_scorm_user_data',NULL,'mod_scorm','','moodle_mobile_app'),(176,'mod_scorm_insert_scorm_tracks','mod_scorm_external','insert_scorm_tracks',NULL,'mod_scorm','mod/scorm:savetrack','moodle_mobile_app'),(177,'mod_scorm_get_scorm_sco_tracks','mod_scorm_external','get_scorm_sco_tracks',NULL,'mod_scorm','','moodle_mobile_app'),(178,'mod_scorm_get_scorms_by_courses','mod_scorm_external','get_scorms_by_courses',NULL,'mod_scorm','','moodle_mobile_app'),(179,'mod_survey_get_surveys_by_courses','mod_survey_external','get_surveys_by_courses',NULL,'mod_survey','','moodle_mobile_app'),(180,'mod_survey_view_survey','mod_survey_external','view_survey',NULL,'mod_survey','mod/survey:participate','moodle_mobile_app'),(181,'mod_survey_get_questions','mod_survey_external','get_questions',NULL,'mod_survey','mod/survey:participate','moodle_mobile_app'),(182,'mod_survey_submit_answers','mod_survey_external','submit_answers',NULL,'mod_survey','mod/survey:participate','moodle_mobile_app'),(183,'mod_url_view_url','mod_url_external','view_url',NULL,'mod_url','mod/url:view','moodle_mobile_app'),(184,'enrol_manual_unenrol_users','enrol_manual_external','unenrol_users','enrol/manual/externallib.php','enrol_manual','enrol/manual:unenrol',NULL),(185,'enrol_self_get_instance_info','enrol_self_external','get_instance_info','enrol/self/externallib.php','enrol_self','','moodle_mobile_app'),(186,'enrol_self_enrol_user','enrol_self_external','enrol_user','enrol/self/externallib.php','enrol_self','','moodle_mobile_app'),(187,'message_airnotifier_is_system_configured','message_airnotifier_external','is_system_configured','message/output/airnotifier/externallib.php','message_airnotifier','','moodle_mobile_app'),(188,'message_airnotifier_are_notification_preferences_configured','message_airnotifier_external','are_notification_preferences_configured','message/output/airnotifier/externallib.php','message_airnotifier','','moodle_mobile_app'),(189,'gradereport_user_get_grades_table','gradereport_user_external','get_grades_table','grade/report/user/externallib.php','gradereport_user','gradereport/user:view','moodle_mobile_app'),(190,'gradereport_user_view_grade_report','gradereport_user_external','view_grade_report','grade/report/user/externallib.php','gradereport_user','gradereport/user:view','moodle_mobile_app'),(191,'tool_templatelibrary_list_templates','tool_templatelibrary\\external','list_templates',NULL,'tool_templatelibrary','',NULL),(192,'tool_templatelibrary_load_canonical_template','tool_templatelibrary\\external','load_canonical_template',NULL,'tool_templatelibrary','',NULL),(193,'core_auth_confirm_user','core_auth_external','confirm_user',NULL,'moodle','',NULL),(194,'core_badges_get_user_badges','core_badges_external','get_user_badges',NULL,'moodle','moodle/badges:viewotherbadges','moodle_mobile_app'),(195,'core_course_get_activities_overview','core_course_external','get_activities_overview','course/externallib.php','moodle','','moodle_mobile_app'),(196,'core_course_get_user_navigation_options','core_course_external','get_user_navigation_options','course/externallib.php','moodle','','moodle_mobile_app'),(197,'core_course_get_user_administration_options','core_course_external','get_user_administration_options','course/externallib.php','moodle','','moodle_mobile_app'),(198,'core_course_get_courses_by_field','core_course_external','get_courses_by_field','course/externallib.php','moodle','','moodle_mobile_app'),(199,'core_course_check_updates','core_course_external','check_updates','course/externallib.php','moodle','','moodle_mobile_app'),(200,'core_fetch_notifications','core_external','fetch_notifications','lib/external/externallib.php','moodle','',NULL),(201,'core_get_fragment','core_external','get_fragment','lib/external/externallib.php','moodle','',NULL),(202,'core_message_delete_conversation','core_message_external','delete_conversation','message/externallib.php','moodle','moodle/site:deleteownmessage','moodle_mobile_app'),(203,'core_message_delete_message','core_message_external','delete_message','message/externallib.php','moodle','moodle/site:deleteownmessage','moodle_mobile_app'),(204,'core_message_data_for_messagearea_search_messages','core_message_external','data_for_messagearea_search_messages','message/externallib.php','moodle','','moodle_mobile_app'),(205,'core_message_data_for_messagearea_search_users','core_message_external','data_for_messagearea_search_users','message/externallib.php','moodle','',NULL),(206,'core_message_data_for_messagearea_search_users_in_course','core_message_external','data_for_messagearea_search_users_in_course','message/externallib.php','moodle','',NULL),(207,'core_message_data_for_messagearea_conversations','core_message_external','data_for_messagearea_conversations','message/externallib.php','moodle','',NULL),(208,'core_message_data_for_messagearea_contacts','core_message_external','data_for_messagearea_contacts','message/externallib.php','moodle','',NULL),(209,'core_message_data_for_messagearea_messages','core_message_external','data_for_messagearea_messages','message/externallib.php','moodle','',NULL),(210,'core_message_data_for_messagearea_get_most_recent_message','core_message_external','data_for_messagearea_get_most_recent_message','message/externallib.php','moodle','',NULL),(211,'core_message_data_for_messagearea_get_profile','core_message_external','data_for_messagearea_get_profile','message/externallib.php','moodle','',NULL),(212,'core_message_get_unread_conversations_count','core_message_external','get_unread_conversations_count','message/externallib.php','moodle','','moodle_mobile_app'),(213,'core_message_mark_all_notifications_as_read','core_message_external','mark_all_notifications_as_read','message/externallib.php','moodle','','moodle_mobile_app'),(214,'core_message_mark_all_messages_as_read','core_message_external','mark_all_messages_as_read','message/externallib.php','moodle','','moodle_mobile_app'),(215,'core_message_message_processor_config_form','core_message_external','message_processor_config_form','message/externallib.php','moodle','','moodle_mobile_app'),(216,'core_message_get_message_processor','core_message_external','get_message_processor','message/externallib.php','moodle','',NULL),(217,'core_message_get_user_notification_preferences','core_message_external','get_user_notification_preferences','message/externallib.php','moodle','moodle/user:editownmessageprofile','moodle_mobile_app'),(218,'core_message_get_user_message_preferences','core_message_external','get_user_message_preferences','message/externallib.php','moodle','moodle/user:editownmessageprofile','moodle_mobile_app'),(219,'core_question_update_flag','core_question_external','update_flag',NULL,'moodle','moodle/question:flag','moodle_mobile_app'),(220,'core_rating_add_rating','core_rating_external','add_rating',NULL,'moodle','moodle/rating:rate','moodle_mobile_app'),(221,'core_tag_get_tagindex','core_tag_external','get_tagindex',NULL,'moodle','',NULL),(222,'core_update_inplace_editable','core_external','update_inplace_editable','lib/external/externallib.php','moodle','',NULL),(223,'core_user_update_user_preferences','core_user_external','update_user_preferences','user/externallib.php','moodle','moodle/user:editownmessageprofile, moodle/user:editmessageprofile','moodle_mobile_app'),(224,'core_user_get_user_preferences','core_user_external','get_user_preferences','user/externallib.php','moodle','','moodle_mobile_app'),(225,'core_user_update_picture','core_user_external','update_picture','user/externallib.php','moodle','moodle/user:editownprofile, moodle/user:editprofile','moodle_mobile_app'),(226,'core_user_set_user_preferences','core_user_external','set_user_preferences','user/externallib.php','moodle','moodle/site:config',NULL),(227,'core_user_agree_site_policy','core_user_external','agree_site_policy','user/externallib.php','moodle','','moodle_mobile_app'),(228,'core_competency_create_competency_framework','core_competency\\external','create_competency_framework',NULL,'moodle','moodle/competency:competencymanage',NULL),(229,'core_competency_read_competency_framework','core_competency\\external','read_competency_framework',NULL,'moodle','moodle/competency:competencyview',NULL),(230,'core_competency_duplicate_competency_framework','core_competency\\external','duplicate_competency_framework',NULL,'moodle','moodle/competency:competencymanage',NULL),(231,'core_competency_delete_competency_framework','core_competency\\external','delete_competency_framework',NULL,'moodle','moodle/competency:competencymanage',NULL),(232,'core_competency_update_competency_framework','core_competency\\external','update_competency_framework',NULL,'moodle','moodle/competency:competencymanage',NULL),(233,'core_competency_list_competency_frameworks','core_competency\\external','list_competency_frameworks',NULL,'moodle','moodle/competency:competencyview',NULL),(234,'core_competency_count_competency_frameworks','core_competency\\external','count_competency_frameworks',NULL,'moodle','moodle/competency:competencyview',NULL),(235,'core_competency_competency_framework_viewed','core_competency\\external','competency_framework_viewed',NULL,'moodle','moodle/competency:competencyview',NULL),(236,'core_competency_create_competency','core_competency\\external','create_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(237,'core_competency_read_competency','core_competency\\external','read_competency',NULL,'moodle','moodle/competency:competencyview',NULL),(238,'core_competency_competency_viewed','core_competency\\external','competency_viewed',NULL,'moodle','moodle/competency:competencyview','moodle_mobile_app'),(239,'core_competency_delete_competency','core_competency\\external','delete_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(240,'core_competency_update_competency','core_competency\\external','update_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(241,'core_competency_list_competencies','core_competency\\external','list_competencies',NULL,'moodle','moodle/competency:competencyview',NULL),(242,'core_competency_list_competencies_in_template','core_competency\\external','list_competencies_in_template',NULL,'moodle','moodle/competency:competencyview',NULL),(243,'core_competency_count_competencies','core_competency\\external','count_competencies',NULL,'moodle','moodle/competency:competencyview',NULL),(244,'core_competency_count_competencies_in_template','core_competency\\external','count_competencies_in_template',NULL,'moodle','moodle/competency:competencyview',NULL),(245,'core_competency_search_competencies','core_competency\\external','search_competencies',NULL,'moodle','moodle/competency:competencyview',NULL),(246,'core_competency_set_parent_competency','core_competency\\external','set_parent_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(247,'core_competency_move_up_competency','core_competency\\external','move_up_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(248,'core_competency_move_down_competency','core_competency\\external','move_down_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(249,'core_competency_list_course_competencies','core_competency\\external','list_course_competencies',NULL,'moodle','moodle/competency:coursecompetencyview','moodle_mobile_app'),(250,'core_competency_count_competencies_in_course','core_competency\\external','count_competencies_in_course',NULL,'moodle','moodle/competency:coursecompetencyview',NULL),(251,'core_competency_count_courses_using_competency','core_competency\\external','count_courses_using_competency',NULL,'moodle','moodle/competency:coursecompetencyview',NULL),(252,'core_competency_add_competency_to_course','core_competency\\external','add_competency_to_course',NULL,'moodle','moodle/competency:coursecompetencymanage',NULL),(253,'core_competency_add_competency_to_template','core_competency\\external','add_competency_to_template',NULL,'moodle','moodle/competency:templatemanage',NULL),(254,'core_competency_remove_competency_from_course','core_competency\\external','remove_competency_from_course',NULL,'moodle','moodle/competency:coursecompetencymanage',NULL),(255,'core_competency_set_course_competency_ruleoutcome','core_competency\\external','set_course_competency_ruleoutcome',NULL,'moodle','moodle/competency:coursecompetencymanage',NULL),(256,'core_competency_remove_competency_from_template','core_competency\\external','remove_competency_from_template',NULL,'moodle','moodle/competency:templatemanage',NULL),(257,'core_competency_reorder_course_competency','core_competency\\external','reorder_course_competency',NULL,'moodle','moodle/competency:coursecompetencymanage',NULL),(258,'core_competency_reorder_template_competency','core_competency\\external','reorder_template_competency',NULL,'moodle','moodle/competency:templatemanage',NULL),(259,'core_competency_create_template','core_competency\\external','create_template',NULL,'moodle','moodle/competency:templatemanage',NULL),(260,'core_competency_duplicate_template','core_competency\\external','duplicate_template',NULL,'moodle','moodle/competency:templatemanage',NULL),(261,'core_competency_read_template','core_competency\\external','read_template',NULL,'moodle','moodle/competency:templateview',NULL),(262,'core_competency_delete_template','core_competency\\external','delete_template',NULL,'moodle','moodle/competency:templatemanage',NULL),(263,'core_competency_update_template','core_competency\\external','update_template',NULL,'moodle','moodle/competency:templatemanage',NULL),(264,'core_competency_list_templates','core_competency\\external','list_templates',NULL,'moodle','moodle/competency:templateview',NULL),(265,'core_competency_list_templates_using_competency','core_competency\\external','list_templates_using_competency',NULL,'moodle','moodle/competency:templateview',NULL),(266,'core_competency_count_templates','core_competency\\external','count_templates',NULL,'moodle','moodle/competency:templateview',NULL),(267,'core_competency_count_templates_using_competency','core_competency\\external','count_templates_using_competency',NULL,'moodle','moodle/competency:templateview',NULL),(268,'core_competency_create_plan','core_competency\\external','create_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(269,'core_competency_update_plan','core_competency\\external','update_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(270,'core_competency_complete_plan','core_competency\\external','complete_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(271,'core_competency_reopen_plan','core_competency\\external','reopen_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(272,'core_competency_read_plan','core_competency\\external','read_plan',NULL,'moodle','moodle/competency:planviewown',NULL),(273,'core_competency_delete_plan','core_competency\\external','delete_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(274,'core_competency_list_user_plans','core_competency\\external','list_user_plans',NULL,'moodle','moodle/competency:planviewown',NULL),(275,'core_competency_list_plan_competencies','core_competency\\external','list_plan_competencies',NULL,'moodle','moodle/competency:planviewown',NULL),(276,'core_competency_add_competency_to_plan','core_competency\\external','add_competency_to_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(277,'core_competency_remove_competency_from_plan','core_competency\\external','remove_competency_from_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(278,'core_competency_reorder_plan_competency','core_competency\\external','reorder_plan_competency',NULL,'moodle','moodle/competency:planmanage',NULL),(279,'core_competency_plan_request_review','core_competency\\external','plan_request_review',NULL,'moodle','moodle/competency:planmanagedraft',NULL),(280,'core_competency_plan_start_review','core_competency\\external','plan_start_review',NULL,'moodle','moodle/competency:planmanage',NULL),(281,'core_competency_plan_stop_review','core_competency\\external','plan_stop_review',NULL,'moodle','moodle/competency:planmanage',NULL),(282,'core_competency_plan_cancel_review_request','core_competency\\external','plan_cancel_review_request',NULL,'moodle','moodle/competency:planmanagedraft',NULL),(283,'core_competency_approve_plan','core_competency\\external','approve_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(284,'core_competency_unapprove_plan','core_competency\\external','unapprove_plan',NULL,'moodle','moodle/competency:planmanage',NULL),(285,'core_competency_template_has_related_data','core_competency\\external','template_has_related_data',NULL,'moodle','moodle/competency:templateview',NULL),(286,'core_competency_get_scale_values','core_competency\\external','get_scale_values',NULL,'moodle','moodle/competency:competencymanage','moodle_mobile_app'),(287,'core_competency_add_related_competency','core_competency\\external','add_related_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(288,'core_competency_remove_related_competency','core_competency\\external','remove_related_competency',NULL,'moodle','moodle/competency:competencymanage',NULL),(289,'core_competency_read_user_evidence','core_competency\\external','read_user_evidence',NULL,'moodle','moodle/competency:userevidenceview',NULL),(290,'core_competency_delete_user_evidence','core_competency\\external','delete_user_evidence',NULL,'moodle','moodle/competency:userevidencemanageown',NULL),(291,'core_competency_create_user_evidence_competency','core_competency\\external','create_user_evidence_competency',NULL,'moodle','moodle/competency:userevidencemanageown, moodle/competency:competencyview',NULL),(292,'core_competency_delete_user_evidence_competency','core_competency\\external','delete_user_evidence_competency',NULL,'moodle','moodle/competency:userevidencemanageown',NULL),(293,'core_competency_user_competency_cancel_review_request','core_competency\\external','user_competency_cancel_review_request',NULL,'moodle','moodle/competency:userevidencemanageown',NULL),(294,'core_competency_user_competency_request_review','core_competency\\external','user_competency_request_review',NULL,'moodle','moodle/competency:userevidencemanageown',NULL),(295,'core_competency_user_competency_start_review','core_competency\\external','user_competency_start_review',NULL,'moodle','moodle/competency:competencygrade',NULL),(296,'core_competency_user_competency_stop_review','core_competency\\external','user_competency_stop_review',NULL,'moodle','moodle/competency:competencygrade',NULL),(297,'core_competency_user_competency_viewed','core_competency\\external','user_competency_viewed',NULL,'moodle','moodle/competency:usercompetencyview','moodle_mobile_app'),(298,'core_competency_user_competency_viewed_in_plan','core_competency\\external','user_competency_viewed_in_plan',NULL,'moodle','moodle/competency:usercompetencyview','moodle_mobile_app'),(299,'core_competency_user_competency_viewed_in_course','core_competency\\external','user_competency_viewed_in_course',NULL,'moodle','moodle/competency:usercompetencyview','moodle_mobile_app'),(300,'core_competency_user_competency_plan_viewed','core_competency\\external','user_competency_plan_viewed',NULL,'moodle','moodle/competency:usercompetencyview','moodle_mobile_app'),(301,'core_competency_grade_competency','core_competency\\external','grade_competency',NULL,'moodle','moodle/competency:competencygrade',NULL),(302,'core_competency_grade_competency_in_plan','core_competency\\external','grade_competency_in_plan',NULL,'moodle','moodle/competency:competencygrade',NULL),(303,'core_competency_grade_competency_in_course','core_competency\\external','grade_competency_in_course',NULL,'moodle','moodle/competency:competencygrade','moodle_mobile_app'),(304,'core_competency_unlink_plan_from_template','core_competency\\external','unlink_plan_from_template',NULL,'moodle','moodle/competency:planmanage',NULL),(305,'core_competency_template_viewed','core_competency\\external','template_viewed',NULL,'moodle','moodle/competency:templateview',NULL),(306,'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),(307,'core_competency_update_course_competency_settings','core_competency\\external','update_course_competency_settings',NULL,'moodle','moodle/competency:coursecompetencyconfigure',NULL),(308,'core_competency_delete_evidence','core_competency\\external','delete_evidence',NULL,'moodle','moodle/competency:evidencedelete','moodle_mobile_app'),(309,'mod_assign_copy_previous_attempt','mod_assign_external','copy_previous_attempt','mod/assign/externallib.php','mod_assign','mod/assign:view, mod/assign:submit',NULL),(310,'mod_assign_view_submission_status','mod_assign_external','view_submission_status','mod/assign/externallib.php','mod_assign','mod/assign:view','moodle_mobile_app'),(311,'mod_assign_get_submission_status','mod_assign_external','get_submission_status','mod/assign/externallib.php','mod_assign','mod/assign:view','moodle_mobile_app'),(312,'mod_assign_list_participants','mod_assign_external','list_participants','mod/assign/externallib.php','mod_assign','mod/assign:view, mod/assign:viewgrades','moodle_mobile_app'),(313,'mod_assign_submit_grading_form','mod_assign_external','submit_grading_form','mod/assign/externallib.php','mod_assign','mod/assign:grade','moodle_mobile_app'),(314,'mod_assign_get_participant','mod_assign_external','get_participant','mod/assign/externallib.php','mod_assign','mod/assign:view, mod/assign:viewgrades','moodle_mobile_app'),(315,'mod_assign_view_assign','mod_assign_external','view_assign','mod/assign/externallib.php','mod_assign','mod/assign:view','moodle_mobile_app'),(316,'mod_forum_can_add_discussion','mod_forum_external','can_add_discussion','mod/forum/externallib.php','mod_forum','','moodle_mobile_app'),(317,'mod_glossary_get_glossaries_by_courses','mod_glossary_external','get_glossaries_by_courses',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(318,'mod_glossary_view_glossary','mod_glossary_external','view_glossary',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(319,'mod_glossary_view_entry','mod_glossary_external','view_entry',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(320,'mod_glossary_get_entries_by_letter','mod_glossary_external','get_entries_by_letter',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(321,'mod_glossary_get_entries_by_date','mod_glossary_external','get_entries_by_date',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(322,'mod_glossary_get_categories','mod_glossary_external','get_categories',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(323,'mod_glossary_get_entries_by_category','mod_glossary_external','get_entries_by_category',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(324,'mod_glossary_get_authors','mod_glossary_external','get_authors',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(325,'mod_glossary_get_entries_by_author','mod_glossary_external','get_entries_by_author',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(326,'mod_glossary_get_entries_by_author_id','mod_glossary_external','get_entries_by_author_id',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(327,'mod_glossary_get_entries_by_search','mod_glossary_external','get_entries_by_search',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(328,'mod_glossary_get_entries_by_term','mod_glossary_external','get_entries_by_term',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(329,'mod_glossary_get_entries_to_approve','mod_glossary_external','get_entries_to_approve',NULL,'mod_glossary','mod/glossary:approve','moodle_mobile_app'),(330,'mod_glossary_get_entry_by_id','mod_glossary_external','get_entry_by_id',NULL,'mod_glossary','mod/glossary:view','moodle_mobile_app'),(331,'mod_glossary_add_entry','mod_glossary_external','add_entry',NULL,'mod_glossary','mod/glossary:write','moodle_mobile_app'),(332,'mod_lti_get_tool_proxies','mod_lti_external','get_tool_proxies',NULL,'mod_lti','moodle/site:config',NULL),(333,'mod_lti_create_tool_proxy','mod_lti_external','create_tool_proxy',NULL,'mod_lti','moodle/site:config',NULL),(334,'mod_lti_delete_tool_proxy','mod_lti_external','delete_tool_proxy',NULL,'mod_lti','moodle/site:config',NULL),(335,'mod_lti_get_tool_proxy_registration_request','mod_lti_external','get_tool_proxy_registration_request',NULL,'mod_lti','moodle/site:config',NULL),(336,'mod_lti_get_tool_types','mod_lti_external','get_tool_types',NULL,'mod_lti','moodle/site:config',NULL),(337,'mod_lti_create_tool_type','mod_lti_external','create_tool_type',NULL,'mod_lti','moodle/site:config',NULL),(338,'mod_lti_update_tool_type','mod_lti_external','update_tool_type',NULL,'mod_lti','moodle/site:config',NULL),(339,'mod_lti_delete_tool_type','mod_lti_external','delete_tool_type',NULL,'mod_lti','moodle/site:config',NULL),(340,'mod_lti_is_cartridge','mod_lti_external','is_cartridge',NULL,'mod_lti','moodle/site:config',NULL),(341,'mod_quiz_get_quizzes_by_courses','mod_quiz_external','get_quizzes_by_courses',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(342,'mod_quiz_view_quiz','mod_quiz_external','view_quiz',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(343,'mod_quiz_get_user_attempts','mod_quiz_external','get_user_attempts',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(344,'mod_quiz_get_user_best_grade','mod_quiz_external','get_user_best_grade',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(345,'mod_quiz_get_combined_review_options','mod_quiz_external','get_combined_review_options',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(346,'mod_quiz_start_attempt','mod_quiz_external','start_attempt',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(347,'mod_quiz_get_attempt_data','mod_quiz_external','get_attempt_data',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(348,'mod_quiz_get_attempt_summary','mod_quiz_external','get_attempt_summary',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(349,'mod_quiz_save_attempt','mod_quiz_external','save_attempt',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(350,'mod_quiz_process_attempt','mod_quiz_external','process_attempt',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(351,'mod_quiz_get_attempt_review','mod_quiz_external','get_attempt_review',NULL,'mod_quiz','mod/quiz:reviewmyattempts','moodle_mobile_app'),(352,'mod_quiz_view_attempt','mod_quiz_external','view_attempt',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(353,'mod_quiz_view_attempt_summary','mod_quiz_external','view_attempt_summary',NULL,'mod_quiz','mod/quiz:attempt','moodle_mobile_app'),(354,'mod_quiz_view_attempt_review','mod_quiz_external','view_attempt_review',NULL,'mod_quiz','mod/quiz:reviewmyattempts','moodle_mobile_app'),(355,'mod_quiz_get_quiz_feedback_for_grade','mod_quiz_external','get_quiz_feedback_for_grade',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(356,'mod_quiz_get_quiz_access_information','mod_quiz_external','get_quiz_access_information',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(357,'mod_quiz_get_attempt_access_information','mod_quiz_external','get_attempt_access_information',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(358,'mod_quiz_get_quiz_required_qtypes','mod_quiz_external','get_quiz_required_qtypes',NULL,'mod_quiz','mod/quiz:view','moodle_mobile_app'),(359,'mod_scorm_launch_sco','mod_scorm_external','launch_sco',NULL,'mod_scorm','','moodle_mobile_app'),(360,'mod_wiki_get_wikis_by_courses','mod_wiki_external','get_wikis_by_courses',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(361,'mod_wiki_view_wiki','mod_wiki_external','view_wiki',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(362,'mod_wiki_view_page','mod_wiki_external','view_page',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(363,'mod_wiki_get_subwikis','mod_wiki_external','get_subwikis',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(364,'mod_wiki_get_subwiki_pages','mod_wiki_external','get_subwiki_pages',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(365,'mod_wiki_get_subwiki_files','mod_wiki_external','get_subwiki_files',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(366,'mod_wiki_get_page_contents','mod_wiki_external','get_page_contents',NULL,'mod_wiki','mod/wiki:viewpage','moodle_mobile_app'),(367,'mod_wiki_get_page_for_editing','mod_wiki_external','get_page_for_editing',NULL,'mod_wiki','mod/wiki:editpage','moodle_mobile_app'),(368,'mod_wiki_new_page','mod_wiki_external','new_page',NULL,'mod_wiki','mod/wiki:editpage','moodle_mobile_app'),(369,'mod_wiki_edit_page','mod_wiki_external','edit_page',NULL,'mod_wiki','mod/wiki:editpage','moodle_mobile_app'),(370,'auth_email_get_signup_settings','auth_email_external','get_signup_settings',NULL,'auth_email','',NULL),(371,'auth_email_signup_user','auth_email_external','signup_user',NULL,'auth_email','',NULL),(372,'enrol_guest_get_instance_info','enrol_guest_external','get_instance_info',NULL,'enrol_guest','','moodle_mobile_app'),(373,'message_airnotifier_get_user_devices','message_airnotifier_external','get_user_devices','message/output/airnotifier/externallib.php','message_airnotifier','','moodle_mobile_app'),(374,'message_airnotifier_enable_device','message_airnotifier_external','enable_device','message/output/airnotifier/externallib.php','message_airnotifier','message/airnotifier:managedevice','moodle_mobile_app'),(375,'message_popup_get_popup_notifications','message_popup_external','get_popup_notifications','message/output/popup/externallib.php','message_popup','','moodle_mobile_app'),(376,'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'),(377,'report_competency_data_for_report','report_competency\\external','data_for_report',NULL,'report_competency','moodle/competency:coursecompetencyview',NULL),(378,'gradereport_overview_get_course_grades','gradereport_overview_external','get_course_grades',NULL,'gradereport_overview','','moodle_mobile_app'),(379,'gradereport_overview_view_grade_report','gradereport_overview_external','view_grade_report',NULL,'gradereport_overview','gradereport/overview:view','moodle_mobile_app'),(380,'gradereport_user_get_grade_items','gradereport_user_external','get_grade_items','grade/report/user/externallib.php','gradereport_user','gradereport/user:view','moodle_mobile_app'),(381,'tool_lp_data_for_competency_frameworks_manage_page','tool_lp\\external','data_for_competency_frameworks_manage_page',NULL,'tool_lp','moodle/competency:competencyview',NULL),(382,'tool_lp_data_for_competency_summary','tool_lp\\external','data_for_competency_summary',NULL,'tool_lp','moodle/competency:competencyview',NULL),(383,'tool_lp_data_for_competencies_manage_page','tool_lp\\external','data_for_competencies_manage_page',NULL,'tool_lp','moodle/competency:competencyview',NULL),(384,'tool_lp_list_courses_using_competency','tool_lp\\external','list_courses_using_competency',NULL,'tool_lp','moodle/competency:coursecompetencyview',NULL),(385,'tool_lp_data_for_course_competencies_page','tool_lp\\external','data_for_course_competencies_page',NULL,'tool_lp','moodle/competency:coursecompetencyview','moodle_mobile_app'),(386,'tool_lp_data_for_template_competencies_page','tool_lp\\external','data_for_template_competencies_page',NULL,'tool_lp','moodle/competency:templateview',NULL),(387,'tool_lp_data_for_templates_manage_page','tool_lp\\external','data_for_templates_manage_page',NULL,'tool_lp','moodle/competency:templateview',NULL),(388,'tool_lp_data_for_plans_page','tool_lp\\external','data_for_plans_page',NULL,'tool_lp','moodle/competency:planviewown','moodle_mobile_app'),(389,'tool_lp_data_for_plan_page','tool_lp\\external','data_for_plan_page',NULL,'tool_lp','moodle/competency:planview','moodle_mobile_app'),(390,'tool_lp_data_for_related_competencies_section','tool_lp\\external','data_for_related_competencies_section',NULL,'tool_lp','moodle/competency:competencyview',NULL),(391,'tool_lp_search_users','tool_lp\\external','search_users',NULL,'tool_lp','',NULL),(392,'tool_lp_search_cohorts','tool_lp\\external','search_cohorts',NULL,'tool_lp','moodle/cohort:view',NULL),(393,'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'),(394,'tool_lp_data_for_user_evidence_page','tool_lp\\external','data_for_user_evidence_page',NULL,'tool_lp','moodle/competency:userevidenceview','moodle_mobile_app'),(395,'tool_lp_data_for_user_competency_summary','tool_lp\\external','data_for_user_competency_summary',NULL,'tool_lp','moodle/competency:planview','moodle_mobile_app'),(396,'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'),(397,'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'),(398,'tool_mobile_get_plugins_supporting_mobile','tool_mobile\\external','get_plugins_supporting_mobile',NULL,'tool_mobile','','moodle_mobile_app'),(399,'tool_mobile_get_public_config','tool_mobile\\external','get_public_config',NULL,'tool_mobile','','moodle_mobile_app'),(400,'tool_mobile_get_config','tool_mobile\\external','get_config',NULL,'tool_mobile','','moodle_mobile_app'),(401,'tool_mobile_get_autologin_key','tool_mobile\\external','get_autologin_key',NULL,'tool_mobile','','moodle_mobile_app'),(402,'tool_usertours_fetch_and_start_tour','tool_usertours\\external\\tour','fetch_and_start_tour',NULL,'tool_usertours','',NULL),(403,'tool_usertours_step_shown','tool_usertours\\external\\tour','step_shown',NULL,'tool_usertours','',NULL),(404,'tool_usertours_complete_tour','tool_usertours\\external\\tour','complete_tour',NULL,'tool_usertours','',NULL),(405,'tool_usertours_reset_tour','tool_usertours\\external\\tour','reset_tour',NULL,'tool_usertours','',NULL);

CREATE TABLE `eoay_external_services` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL,
  `requiredcapability` varchar(150) DEFAULT NULL,
  `restrictedusers` tinyint(1) NOT NULL,
  `component` varchar(100) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `shortname` varchar(255) DEFAULT NULL,
  `downloadfiles` tinyint(1) NOT NULL DEFAULT '0',
  `uploadfiles` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_exteserv_nam_uix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='built in and custom external services';
INSERT INTO `eoay_external_services` VALUES (1,'Moodle mobile web service',0,NULL,0,'moodle',1347240012,1347240097,'moodle_mobile_app',1,1);

CREATE TABLE `eoay_external_services_functions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `externalserviceid` bigint(10) NOT NULL,
  `functionname` varchar(200) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_exteservfunc_ext_ix` (`externalserviceid`)
) ENGINE=InnoDB AUTO_INCREMENT=325 DEFAULT CHARSET=utf8 COMMENT='lists functions available in each service group';
INSERT INTO `eoay_external_services_functions` VALUES (116,1,'core_files_get_files'),(117,1,'core_user_get_course_user_profiles'),(118,1,'core_enrol_get_enrolled_users'),(119,1,'core_enrol_get_users_courses'),(120,1,'core_course_get_contents'),(121,1,'core_course_get_courses'),(122,1,'core_course_get_categories'),(123,1,'core_message_send_instant_messages'),(124,1,'core_notes_create_notes'),(125,1,'core_webservice_get_site_info'),(126,1,'core_get_component_strings'),(127,1,'mod_assign_get_grades'),(128,1,'mod_assign_get_assignments'),(129,1,'core_comment_get_comments'),(130,1,'core_group_get_course_user_groups'),(131,1,'core_group_get_activity_allowed_groups'),(132,1,'core_group_get_activity_groupmode'),(133,1,'core_notes_get_course_notes'),(134,1,'core_user_get_users_by_field'),(135,1,'core_user_add_user_device'),(136,1,'core_user_remove_user_device'),(137,1,'core_user_view_user_list'),(138,1,'core_user_view_user_profile'),(139,1,'core_user_add_user_private_files'),(140,1,'core_enrol_get_course_enrolment_methods'),(141,1,'core_course_search_courses'),(142,1,'core_course_view_course'),(143,1,'core_course_get_course_module'),(144,1,'core_course_get_course_module_by_instance'),(145,1,'core_message_create_contacts'),(146,1,'core_message_delete_contacts'),(147,1,'core_message_block_contacts'),(148,1,'core_message_unblock_contacts'),(149,1,'core_message_get_contacts'),(150,1,'core_message_search_contacts'),(151,1,'core_message_get_messages'),(152,1,'core_message_get_blocked_users'),(153,1,'core_message_mark_message_read'),(154,1,'core_notes_delete_notes'),(155,1,'core_notes_view_notes'),(156,1,'core_calendar_get_calendar_events'),(157,1,'core_completion_update_activity_completion_status_manually'),(158,1,'core_completion_mark_course_self_completed'),(159,1,'core_completion_get_activities_completion_status'),(160,1,'core_completion_get_course_completion_status'),(161,1,'core_rating_get_item_ratings'),(162,1,'mod_assign_get_submissions'),(163,1,'mod_assign_get_user_flags'),(164,1,'mod_assign_set_user_flags'),(165,1,'mod_assign_get_user_mappings'),(166,1,'mod_assign_revert_submissions_to_draft'),(167,1,'mod_assign_lock_submissions'),(168,1,'mod_assign_unlock_submissions'),(169,1,'mod_assign_save_submission'),(170,1,'mod_assign_submit_for_grading'),(171,1,'mod_assign_save_grade'),(172,1,'mod_assign_save_grades'),(173,1,'mod_assign_save_user_extensions'),(174,1,'mod_assign_reveal_identities'),(175,1,'mod_assign_view_grading_table'),(176,1,'mod_book_view_book'),(177,1,'mod_book_get_books_by_courses'),(178,1,'mod_chat_login_user'),(179,1,'mod_chat_get_chat_users'),(180,1,'mod_chat_send_chat_message'),(181,1,'mod_chat_get_chat_latest_messages'),(182,1,'mod_chat_view_chat'),(183,1,'mod_chat_get_chats_by_courses'),(184,1,'mod_choice_get_choice_results'),(185,1,'mod_choice_get_choice_options'),(186,1,'mod_choice_submit_choice_response'),(187,1,'mod_choice_view_choice'),(188,1,'mod_choice_get_choices_by_courses'),(189,1,'mod_choice_delete_choice_responses'),(190,1,'mod_data_get_databases_by_courses'),(191,1,'mod_folder_view_folder'),(192,1,'mod_forum_get_forums_by_courses'),(193,1,'mod_forum_get_forum_discussion_posts'),(194,1,'mod_forum_get_forum_discussions_paginated'),(195,1,'mod_forum_view_forum'),(196,1,'mod_forum_view_forum_discussion'),(197,1,'mod_forum_add_discussion_post'),(198,1,'mod_forum_add_discussion'),(199,1,'mod_imscp_view_imscp'),(200,1,'mod_imscp_get_imscps_by_courses'),(201,1,'mod_lti_get_tool_launch_data'),(202,1,'mod_lti_get_ltis_by_courses'),(203,1,'mod_lti_view_lti'),(204,1,'mod_page_view_page'),(205,1,'mod_resource_view_resource'),(206,1,'mod_scorm_view_scorm'),(207,1,'mod_scorm_get_scorm_attempt_count'),(208,1,'mod_scorm_get_scorm_scoes'),(209,1,'mod_scorm_get_scorm_user_data'),(210,1,'mod_scorm_insert_scorm_tracks'),(211,1,'mod_scorm_get_scorm_sco_tracks'),(212,1,'mod_scorm_get_scorms_by_courses'),(213,1,'mod_survey_get_surveys_by_courses'),(214,1,'mod_survey_view_survey'),(215,1,'mod_survey_get_questions'),(216,1,'mod_survey_submit_answers'),(217,1,'mod_url_view_url'),(218,1,'enrol_self_get_instance_info'),(219,1,'enrol_self_enrol_user'),(220,1,'message_airnotifier_is_system_configured'),(221,1,'message_airnotifier_are_notification_preferences_configured'),(222,1,'gradereport_user_get_grades_table'),(223,1,'gradereport_user_view_grade_report'),(224,1,'core_badges_get_user_badges'),(225,1,'core_course_get_activities_overview'),(226,1,'core_course_get_user_navigation_options'),(227,1,'core_course_get_user_administration_options'),(228,1,'core_course_get_courses_by_field'),(229,1,'core_course_check_updates'),(230,1,'core_message_delete_conversation'),(231,1,'core_message_delete_message'),(232,1,'core_message_data_for_messagearea_search_messages'),(233,1,'core_message_get_unread_conversations_count'),(234,1,'core_message_mark_all_notifications_as_read'),(235,1,'core_message_mark_all_messages_as_read'),(236,1,'core_message_message_processor_config_form'),(237,1,'core_message_get_user_notification_preferences'),(238,1,'core_message_get_user_message_preferences'),(239,1,'core_question_update_flag'),(240,1,'core_rating_add_rating'),(241,1,'core_user_update_user_preferences'),(242,1,'core_user_get_user_preferences'),(243,1,'core_user_update_picture'),(244,1,'core_user_agree_site_policy'),(245,1,'core_competency_competency_viewed'),(246,1,'core_competency_list_course_competencies'),(247,1,'core_competency_get_scale_values'),(248,1,'core_competency_user_competency_viewed'),(249,1,'core_competency_user_competency_viewed_in_plan'),(250,1,'core_competency_user_competency_viewed_in_course'),(251,1,'core_competency_user_competency_plan_viewed'),(252,1,'core_competency_grade_competency_in_course'),(253,1,'core_competency_delete_evidence'),(254,1,'mod_assign_view_submission_status'),(255,1,'mod_assign_get_submission_status'),(256,1,'mod_assign_list_participants'),(257,1,'mod_assign_submit_grading_form'),(258,1,'mod_assign_get_participant'),(259,1,'mod_assign_view_assign'),(260,1,'mod_forum_can_add_discussion'),(261,1,'mod_glossary_get_glossaries_by_courses'),(262,1,'mod_glossary_view_glossary'),(263,1,'mod_glossary_view_entry'),(264,1,'mod_glossary_get_entries_by_letter'),(265,1,'mod_glossary_get_entries_by_date'),(266,1,'mod_glossary_get_categories'),(267,1,'mod_glossary_get_entries_by_category'),(268,1,'mod_glossary_get_authors'),(269,1,'mod_glossary_get_entries_by_author'),(270,1,'mod_glossary_get_entries_by_author_id'),(271,1,'mod_glossary_get_entries_by_search'),(272,1,'mod_glossary_get_entries_by_term'),(273,1,'mod_glossary_get_entries_to_approve'),(274,1,'mod_glossary_get_entry_by_id'),(275,1,'mod_glossary_add_entry'),(276,1,'mod_quiz_get_quizzes_by_courses'),(277,1,'mod_quiz_view_quiz'),(278,1,'mod_quiz_get_user_attempts'),(279,1,'mod_quiz_get_user_best_grade'),(280,1,'mod_quiz_get_combined_review_options'),(281,1,'mod_quiz_start_attempt'),(282,1,'mod_quiz_get_attempt_data'),(283,1,'mod_quiz_get_attempt_summary'),(284,1,'mod_quiz_save_attempt'),(285,1,'mod_quiz_process_attempt'),(286,1,'mod_quiz_get_attempt_review'),(287,1,'mod_quiz_view_attempt'),(288,1,'mod_quiz_view_attempt_summary'),(289,1,'mod_quiz_view_attempt_review'),(290,1,'mod_quiz_get_quiz_feedback_for_grade'),(291,1,'mod_quiz_get_quiz_access_information'),(292,1,'mod_quiz_get_attempt_access_information'),(293,1,'mod_quiz_get_quiz_required_qtypes'),(294,1,'mod_scorm_launch_sco'),(295,1,'mod_wiki_get_wikis_by_courses'),(296,1,'mod_wiki_view_wiki'),(297,1,'mod_wiki_view_page'),(298,1,'mod_wiki_get_subwikis'),(299,1,'mod_wiki_get_subwiki_pages'),(300,1,'mod_wiki_get_subwiki_files'),(301,1,'mod_wiki_get_page_contents'),(302,1,'mod_wiki_get_page_for_editing'),(303,1,'mod_wiki_new_page'),(304,1,'mod_wiki_edit_page'),(305,1,'enrol_guest_get_instance_info'),(306,1,'message_airnotifier_get_user_devices'),(307,1,'message_airnotifier_enable_device'),(308,1,'message_popup_get_popup_notifications'),(309,1,'message_popup_get_unread_popup_notification_count'),(310,1,'gradereport_overview_get_course_grades'),(311,1,'gradereport_overview_view_grade_report'),(312,1,'gradereport_user_get_grade_items'),(313,1,'tool_lp_data_for_course_competencies_page'),(314,1,'tool_lp_data_for_plans_page'),(315,1,'tool_lp_data_for_plan_page'),(316,1,'tool_lp_data_for_user_evidence_list_page'),(317,1,'tool_lp_data_for_user_evidence_page'),(318,1,'tool_lp_data_for_user_competency_summary'),(319,1,'tool_lp_data_for_user_competency_summary_in_plan'),(320,1,'tool_lp_data_for_user_competency_summary_in_course'),(321,1,'tool_mobile_get_plugins_supporting_mobile'),(322,1,'tool_mobile_get_public_config'),(323,1,'tool_mobile_get_config'),(324,1,'tool_mobile_get_autologin_key');

CREATE TABLE `eoay_external_services_users` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `externalserviceid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `iprestriction` varchar(255) DEFAULT NULL,
  `validuntil` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_exteservuser_ext_ix` (`externalserviceid`),
  KEY `eoay_exteservuser_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='users allowed to use services with restricted users flag';

CREATE TABLE `eoay_external_tokens` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `token` varchar(128) NOT NULL DEFAULT '',
  `tokentype` smallint(4) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `externalserviceid` bigint(10) NOT NULL,
  `sid` varchar(128) DEFAULT NULL,
  `contextid` bigint(10) NOT NULL,
  `creatorid` bigint(20) NOT NULL DEFAULT '1',
  `iprestriction` varchar(255) DEFAULT NULL,
  `validuntil` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `lastaccess` bigint(10) DEFAULT NULL,
  `privatetoken` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_extetoke_use_ix` (`userid`),
  KEY `eoay_extetoke_ext_ix` (`externalserviceid`),
  KEY `eoay_extetoke_con_ix` (`contextid`),
  KEY `eoay_extetoke_cre_ix` (`creatorid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Security tokens for accessing of external services';

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

CREATE TABLE `eoay_feedback_completed` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedback` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `random_response` bigint(10) NOT NULL DEFAULT '0',
  `anonymous_response` tinyint(1) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_feedcomp_use_ix` (`userid`),
  KEY `eoay_feedcomp_fee_ix` (`feedback`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='filled out feedback';

CREATE TABLE `eoay_feedback_completedtmp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedback` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `guestid` varchar(255) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `random_response` bigint(10) NOT NULL DEFAULT '0',
  `anonymous_response` tinyint(1) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_feedcomp_use2_ix` (`userid`),
  KEY `eoay_feedcomp_fee2_ix` (`feedback`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='filled out feedback';

CREATE TABLE `eoay_feedback_item` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedback` bigint(10) NOT NULL DEFAULT '0',
  `template` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `label` varchar(255) NOT NULL DEFAULT '',
  `presentation` longtext NOT NULL,
  `typ` varchar(255) NOT NULL DEFAULT '',
  `hasvalue` tinyint(1) NOT NULL DEFAULT '0',
  `position` smallint(3) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `dependitem` bigint(10) NOT NULL DEFAULT '0',
  `dependvalue` varchar(255) NOT NULL DEFAULT '',
  `options` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_feeditem_fee_ix` (`feedback`),
  KEY `eoay_feeditem_tem_ix` (`template`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='feedback_items';

CREATE TABLE `eoay_feedback_sitecourse_map` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `feedbackid` bigint(10) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_feedsitemap_cou_ix` (`courseid`),
  KEY `eoay_feedsitemap_fee_ix` (`feedbackid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='feedback sitecourse map';

CREATE TABLE `eoay_feedback_template` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `ispublic` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_feedtemp_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='templates of feedbackstructures';

CREATE TABLE `eoay_feedback_value` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course_id` bigint(10) NOT NULL DEFAULT '0',
  `item` bigint(10) NOT NULL DEFAULT '0',
  `completed` bigint(10) NOT NULL DEFAULT '0',
  `tmp_completed` bigint(10) NOT NULL DEFAULT '0',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_feedvalu_comitecou_uix` (`completed`,`item`,`course_id`),
  KEY `eoay_feedvalu_cou_ix` (`course_id`),
  KEY `eoay_feedvalu_ite_ix` (`item`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='values of the completeds';

CREATE TABLE `eoay_feedback_valuetmp` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course_id` bigint(10) NOT NULL DEFAULT '0',
  `item` bigint(10) NOT NULL DEFAULT '0',
  `completed` bigint(10) NOT NULL DEFAULT '0',
  `tmp_completed` bigint(10) NOT NULL DEFAULT '0',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_feedvalu_comitecou2_uix` (`completed`,`item`,`course_id`),
  KEY `eoay_feedvalu_cou2_ix` (`course_id`),
  KEY `eoay_feedvalu_ite2_ix` (`item`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='values of the completedstmp';

CREATE TABLE `eoay_files` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contenthash` varchar(40) NOT NULL DEFAULT '',
  `pathnamehash` varchar(40) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `filearea` varchar(50) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `filepath` varchar(255) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `userid` bigint(10) DEFAULT NULL,
  `filesize` bigint(10) NOT NULL,
  `mimetype` varchar(100) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `source` longtext,
  `author` varchar(255) DEFAULT NULL,
  `license` varchar(255) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `referencefileid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_file_pat_uix` (`pathnamehash`),
  KEY `eoay_file_comfilconite_ix` (`component`,`filearea`,`contextid`,`itemid`),
  KEY `eoay_file_con_ix` (`contenthash`),
  KEY `eoay_file_con2_ix` (`contextid`),
  KEY `eoay_file_use_ix` (`userid`),
  KEY `eoay_file_ref_ix` (`referencefileid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='description of files, content is stored in sha1 file pool';
INSERT INTO `eoay_files` VALUES (1,'41cfeee5884a43a4650a851f4f85e7b28316fcc9','a48e186a2cc853a9e94e9305f4e9bc086391212d',1,'theme_more','backgroundimage',0,'/','background.jpg',2,4451,'image/jpeg',0,NULL,NULL,NULL,1464579111,1464579111,0,NULL),(2,'da39a3ee5e6b4b0d3255bfef95601890afd80709','d1da7ab1bb9c08a926037367bf8ce9a838034ead',1,'theme_more','backgroundimage',0,'/','.',2,0,NULL,0,NULL,NULL,NULL,1464579111,1464579111,0,NULL),(3,'fb262df98d67c4e2a5c9802403821e00cf2992af','508e674d49c30d4fde325fe6c7f6fd3d56b247e1',1,'assignfeedback_editpdf','stamps',0,'/','smile.png',2,1600,'image/png',0,NULL,NULL,NULL,1464579111,1464579111,0,NULL),(4,'da39a3ee5e6b4b0d3255bfef95601890afd80709','70b7cdade7b4e27d4e83f0cdaad10d6a3c0cccb5',1,'assignfeedback_editpdf','stamps',0,'/','.',2,0,NULL,0,NULL,NULL,NULL,1464579111,1464579111,0,NULL),(5,'a4f146f120e7e00d21291b924e26aaabe9f4297a','68317eab56c67d32aeaee5acf509a0c4aa828b6b',1,'assignfeedback_editpdf','stamps',0,'/','sad.png',2,1702,'image/png',0,NULL,NULL,NULL,1464579111,1464579111,0,NULL),(6,'33957e31ba9c763a74638b825f0a9154acf475e1','695a55ff780e61c9e59428aa425430b0d6bde53b',1,'assignfeedback_editpdf','stamps',0,'/','tick.png',2,1187,'image/png',0,NULL,NULL,NULL,1464579111,1464579111,0,NULL),(7,'d613d55f37bb76d38d4ffb4b7b83e6c694778c30','373e63af262a9b8466ba8632551520be793c37ff',1,'assignfeedback_editpdf','stamps',0,'/','cross.png',2,1230,'image/png',0,NULL,NULL,NULL,1464579111,1464579111,0,NULL);

CREATE TABLE `eoay_files_reference` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `repositoryid` bigint(10) NOT NULL,
  `lastsync` bigint(10) DEFAULT NULL,
  `reference` longtext,
  `referencehash` varchar(40) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_filerefe_refrep_uix` (`referencehash`,`repositoryid`),
  KEY `eoay_filerefe_rep_ix` (`repositoryid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Store files references';

CREATE TABLE `eoay_filter_active` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `active` smallint(4) NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_filtacti_confil_uix` (`contextid`,`filter`),
  KEY `eoay_filtacti_con_ix` (`contextid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='Stores information about which filters are active in which c';
INSERT INTO `eoay_filter_active` VALUES (1,'activitynames',1,1,1),(2,'mediaplugin',1,1,3),(3,'algebra',1,-9999,4),(4,'urltolink',1,-9999,13),(5,'data',1,-9999,6),(6,'emoticon',1,-9999,8),(7,'emailprotect',1,-9999,7),(8,'glossary',1,-9999,9),(9,'tidy',1,-9999,12),(10,'multilang',1,-9999,10),(11,'tex',1,-9999,11),(12,'censor',1,-9999,5),(13,'mathjaxloader',1,1,2);

CREATE TABLE `eoay_filter_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `filter` varchar(32) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_filtconf_confilnam_uix` (`contextid`,`filter`,`name`),
  KEY `eoay_filtconf_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores per-context configuration settings for filters which ';

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

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

CREATE TABLE `eoay_forum_digests` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `forum` bigint(10) NOT NULL,
  `maildigest` tinyint(1) NOT NULL DEFAULT '-1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_forudige_forusemai_uix` (`forum`,`userid`,`maildigest`),
  KEY `eoay_forudige_use_ix` (`userid`),
  KEY `eoay_forudige_for_ix` (`forum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_forum_discussion_subs` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `forum` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `discussion` bigint(10) NOT NULL,
  `preference` bigint(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_forudiscsubs_usedis_uix` (`userid`,`discussion`),
  KEY `eoay_forudiscsubs_for_ix` (`forum`),
  KEY `eoay_forudiscsubs_use_ix` (`userid`),
  KEY `eoay_forudiscsubs_dis_ix` (`discussion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_forum_discussions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `forum` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `firstpost` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '-1',
  `assessed` tinyint(1) NOT NULL DEFAULT '1',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `usermodified` bigint(10) NOT NULL DEFAULT '0',
  `timestart` bigint(10) NOT NULL DEFAULT '0',
  `timeend` bigint(10) NOT NULL DEFAULT '0',
  `pinned` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_forudisc_use_ix` (`userid`),
  KEY `eoay_forudisc_for_ix` (`forum`),
  KEY `eoay_forudisc_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Forums are composed of discussions';

CREATE TABLE `eoay_forum_posts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `discussion` bigint(10) NOT NULL DEFAULT '0',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `created` bigint(10) NOT NULL DEFAULT '0',
  `modified` bigint(10) NOT NULL DEFAULT '0',
  `mailed` tinyint(2) NOT NULL DEFAULT '0',
  `subject` varchar(255) NOT NULL DEFAULT '',
  `message` longtext NOT NULL,
  `messageformat` tinyint(2) NOT NULL DEFAULT '0',
  `messagetrust` tinyint(2) NOT NULL DEFAULT '0',
  `attachment` varchar(100) NOT NULL DEFAULT '',
  `totalscore` smallint(4) NOT NULL DEFAULT '0',
  `mailnow` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_forupost_use_ix` (`userid`),
  KEY `eoay_forupost_cre_ix` (`created`),
  KEY `eoay_forupost_mai_ix` (`mailed`),
  KEY `eoay_forupost_dis_ix` (`discussion`),
  KEY `eoay_forupost_par_ix` (`parent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='All posts are stored in this table';

CREATE TABLE `eoay_forum_queue` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `discussionid` bigint(10) NOT NULL DEFAULT '0',
  `postid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_foruqueu_use_ix` (`userid`),
  KEY `eoay_foruqueu_dis_ix` (`discussionid`),
  KEY `eoay_foruqueu_pos_ix` (`postid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='For keeping track of posts that will be mailed in digest for';

CREATE TABLE `eoay_forum_read` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `forumid` bigint(10) NOT NULL DEFAULT '0',
  `discussionid` bigint(10) NOT NULL DEFAULT '0',
  `postid` bigint(10) NOT NULL DEFAULT '0',
  `firstread` bigint(10) NOT NULL DEFAULT '0',
  `lastread` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_foruread_usefor_ix` (`userid`,`forumid`),
  KEY `eoay_foruread_usedis_ix` (`userid`,`discussionid`),
  KEY `eoay_foruread_posuse_ix` (`postid`,`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tracks each users read posts';

CREATE TABLE `eoay_forum_subscriptions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `forum` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_forusubs_use_ix` (`userid`),
  KEY `eoay_forusubs_for_ix` (`forum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Keeps track of who is subscribed to what forum';

CREATE TABLE `eoay_forum_track_prefs` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `forumid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_forutracpref_usefor_ix` (`userid`,`forumid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tracks each users untracked forums';

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

CREATE TABLE `eoay_glossary_alias` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `entryid` bigint(10) NOT NULL DEFAULT '0',
  `alias` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_glosalia_ent_ix` (`entryid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='entries alias';

CREATE TABLE `eoay_glossary_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `glossaryid` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `usedynalink` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `eoay_gloscate_glo_ix` (`glossaryid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='all categories for glossary entries';

CREATE TABLE `eoay_glossary_entries` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `glossaryid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `concept` varchar(255) NOT NULL DEFAULT '',
  `definition` longtext NOT NULL,
  `definitionformat` tinyint(2) NOT NULL DEFAULT '0',
  `definitiontrust` tinyint(2) NOT NULL DEFAULT '0',
  `attachment` varchar(100) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `teacherentry` tinyint(2) NOT NULL DEFAULT '0',
  `sourceglossaryid` bigint(10) NOT NULL DEFAULT '0',
  `usedynalink` tinyint(2) NOT NULL DEFAULT '1',
  `casesensitive` tinyint(2) NOT NULL DEFAULT '0',
  `fullmatch` tinyint(2) NOT NULL DEFAULT '1',
  `approved` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `eoay_glosentr_use_ix` (`userid`),
  KEY `eoay_glosentr_con_ix` (`concept`),
  KEY `eoay_glosentr_glo_ix` (`glossaryid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='all glossary entries';

CREATE TABLE `eoay_glossary_entries_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `categoryid` bigint(10) NOT NULL DEFAULT '0',
  `entryid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_glosentrcate_cat_ix` (`categoryid`),
  KEY `eoay_glosentrcate_ent_ix` (`entryid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='categories of each glossary entry';

CREATE TABLE `eoay_glossary_formats` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `popupformatname` varchar(50) NOT NULL DEFAULT '',
  `visible` tinyint(2) NOT NULL DEFAULT '1',
  `showgroup` tinyint(2) NOT NULL DEFAULT '1',
  `showtabs` varchar(100) DEFAULT NULL,
  `defaultmode` varchar(50) NOT NULL DEFAULT '',
  `defaulthook` varchar(50) NOT NULL DEFAULT '',
  `sortkey` varchar(50) NOT NULL DEFAULT '',
  `sortorder` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='Setting of the display formats';
INSERT INTO `eoay_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','','','','');

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

CREATE TABLE `eoay_grade_categories_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) NOT NULL,
  `parent` bigint(10) DEFAULT NULL,
  `depth` bigint(10) NOT NULL DEFAULT '0',
  `path` varchar(255) DEFAULT NULL,
  `fullname` varchar(255) NOT NULL DEFAULT '',
  `aggregation` bigint(10) NOT NULL DEFAULT '0',
  `keephigh` bigint(10) NOT NULL DEFAULT '0',
  `droplow` bigint(10) NOT NULL DEFAULT '0',
  `aggregateonlygraded` tinyint(1) NOT NULL DEFAULT '0',
  `aggregateoutcomes` tinyint(1) NOT NULL DEFAULT '0',
  `aggregatesubcats` tinyint(1) NOT NULL DEFAULT '0',
  `hidden` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_gradcatehist_act_ix` (`action`),
  KEY `eoay_gradcatehist_old_ix` (`oldid`),
  KEY `eoay_gradcatehist_cou_ix` (`courseid`),
  KEY `eoay_gradcatehist_par_ix` (`parent`),
  KEY `eoay_gradcatehist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='History of grade_categories';

CREATE TABLE `eoay_grade_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `itemid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `rawgrademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `rawgrademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `rawscaleid` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `exported` bigint(10) NOT NULL DEFAULT '0',
  `overridden` bigint(10) NOT NULL DEFAULT '0',
  `excluded` bigint(10) NOT NULL DEFAULT '0',
  `feedback` longtext,
  `feedbackformat` bigint(10) NOT NULL DEFAULT '0',
  `information` longtext,
  `informationformat` bigint(10) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `aggregationstatus` varchar(10) NOT NULL DEFAULT 'unknown',
  `aggregationweight` decimal(10,5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradgrad_useite_uix` (`userid`,`itemid`),
  KEY `eoay_gradgrad_locloc_ix` (`locked`,`locktime`),
  KEY `eoay_gradgrad_ite_ix` (`itemid`),
  KEY `eoay_gradgrad_use_ix` (`userid`),
  KEY `eoay_gradgrad_raw_ix` (`rawscaleid`),
  KEY `eoay_gradgrad_use2_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='grade_grades  This table keeps individual grades for each us';

CREATE TABLE `eoay_grade_grades_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `itemid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `rawgrademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `rawgrademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `rawscaleid` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `exported` bigint(10) NOT NULL DEFAULT '0',
  `overridden` bigint(10) NOT NULL DEFAULT '0',
  `excluded` bigint(10) NOT NULL DEFAULT '0',
  `feedback` longtext,
  `feedbackformat` bigint(10) NOT NULL DEFAULT '0',
  `information` longtext,
  `informationformat` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_gradgradhist_act_ix` (`action`),
  KEY `eoay_gradgradhist_old_ix` (`oldid`),
  KEY `eoay_gradgradhist_ite_ix` (`itemid`),
  KEY `eoay_gradgradhist_use_ix` (`userid`),
  KEY `eoay_gradgradhist_raw_ix` (`rawscaleid`),
  KEY `eoay_gradgradhist_use2_ix` (`usermodified`),
  KEY `eoay_gradgradhist_log_ix` (`loggeduser`),
  KEY `eoay_gradgradhist_tim_ix` (`timemodified`),
  KEY `eoay_gradgradhist_useitetim_ix` (`userid`,`itemid`,`timemodified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='History table';

CREATE TABLE `eoay_grade_import_newitem` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `itemname` varchar(255) NOT NULL DEFAULT '',
  `importcode` bigint(10) NOT NULL,
  `importer` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_gradimponewi_imp_ix` (`importer`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='temporary table for storing new grade_item names from grade ';

CREATE TABLE `eoay_grade_import_values` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `itemid` bigint(10) DEFAULT NULL,
  `newgradeitem` bigint(10) DEFAULT NULL,
  `userid` bigint(10) NOT NULL,
  `finalgrade` decimal(10,5) DEFAULT NULL,
  `feedback` longtext,
  `importcode` bigint(10) NOT NULL,
  `importer` bigint(10) DEFAULT NULL,
  `importonlyfeedback` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_gradimpovalu_ite_ix` (`itemid`),
  KEY `eoay_gradimpovalu_new_ix` (`newgradeitem`),
  KEY `eoay_gradimpovalu_imp_ix` (`importer`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Temporary table for importing grades';

CREATE TABLE `eoay_grade_items` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) DEFAULT NULL,
  `categoryid` bigint(10) DEFAULT NULL,
  `itemname` varchar(255) DEFAULT NULL,
  `itemtype` varchar(30) NOT NULL DEFAULT '',
  `itemmodule` varchar(30) DEFAULT NULL,
  `iteminstance` bigint(10) DEFAULT NULL,
  `itemnumber` bigint(10) DEFAULT NULL,
  `iteminfo` longtext,
  `idnumber` varchar(255) DEFAULT NULL,
  `calculation` longtext,
  `gradetype` smallint(4) NOT NULL DEFAULT '1',
  `grademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `grademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `scaleid` bigint(10) DEFAULT NULL,
  `outcomeid` bigint(10) DEFAULT NULL,
  `gradepass` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `multfactor` decimal(10,5) NOT NULL DEFAULT '1.00000',
  `plusfactor` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef2` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `display` bigint(10) NOT NULL DEFAULT '0',
  `decimals` tinyint(1) DEFAULT NULL,
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `needsupdate` bigint(10) NOT NULL DEFAULT '0',
  `weightoverride` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_graditem_locloc_ix` (`locked`,`locktime`),
  KEY `eoay_graditem_itenee_ix` (`itemtype`,`needsupdate`),
  KEY `eoay_graditem_gra_ix` (`gradetype`),
  KEY `eoay_graditem_idncou_ix` (`idnumber`,`courseid`),
  KEY `eoay_graditem_cou_ix` (`courseid`),
  KEY `eoay_graditem_cat_ix` (`categoryid`),
  KEY `eoay_graditem_sca_ix` (`scaleid`),
  KEY `eoay_graditem_out_ix` (`outcomeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table keeps information about gradeable items (ie colum';

CREATE TABLE `eoay_grade_items_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `categoryid` bigint(10) DEFAULT NULL,
  `itemname` varchar(255) DEFAULT NULL,
  `itemtype` varchar(30) NOT NULL DEFAULT '',
  `itemmodule` varchar(30) DEFAULT NULL,
  `iteminstance` bigint(10) DEFAULT NULL,
  `itemnumber` bigint(10) DEFAULT NULL,
  `iteminfo` longtext,
  `idnumber` varchar(255) DEFAULT NULL,
  `calculation` longtext,
  `gradetype` smallint(4) NOT NULL DEFAULT '1',
  `grademax` decimal(10,5) NOT NULL DEFAULT '100.00000',
  `grademin` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `scaleid` bigint(10) DEFAULT NULL,
  `outcomeid` bigint(10) DEFAULT NULL,
  `gradepass` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `multfactor` decimal(10,5) NOT NULL DEFAULT '1.00000',
  `plusfactor` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `aggregationcoef2` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `hidden` bigint(10) NOT NULL DEFAULT '0',
  `locked` bigint(10) NOT NULL DEFAULT '0',
  `locktime` bigint(10) NOT NULL DEFAULT '0',
  `needsupdate` bigint(10) NOT NULL DEFAULT '0',
  `display` bigint(10) NOT NULL DEFAULT '0',
  `decimals` tinyint(1) DEFAULT NULL,
  `weightoverride` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_graditemhist_act_ix` (`action`),
  KEY `eoay_graditemhist_old_ix` (`oldid`),
  KEY `eoay_graditemhist_cou_ix` (`courseid`),
  KEY `eoay_graditemhist_cat_ix` (`categoryid`),
  KEY `eoay_graditemhist_sca_ix` (`scaleid`),
  KEY `eoay_graditemhist_out_ix` (`outcomeid`),
  KEY `eoay_graditemhist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='History of grade_items';

CREATE TABLE `eoay_grade_letters` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `lowerboundary` decimal(10,5) NOT NULL,
  `letter` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradlett_conlowlet_uix` (`contextid`,`lowerboundary`,`letter`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Repository for grade letters, for courses and other moodle e';

CREATE TABLE `eoay_grade_outcomes` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) DEFAULT NULL,
  `shortname` varchar(255) NOT NULL DEFAULT '',
  `fullname` longtext NOT NULL,
  `scaleid` bigint(10) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradoutc_cousho_uix` (`courseid`,`shortname`),
  KEY `eoay_gradoutc_cou_ix` (`courseid`),
  KEY `eoay_gradoutc_sca_ix` (`scaleid`),
  KEY `eoay_gradoutc_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table describes the outcomes used in the system. An out';

CREATE TABLE `eoay_grade_outcomes_courses` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `outcomeid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradoutccour_couout_uix` (`courseid`,`outcomeid`),
  KEY `eoay_gradoutccour_cou_ix` (`courseid`),
  KEY `eoay_gradoutccour_out_ix` (`outcomeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='stores what outcomes are used in what courses.';

CREATE TABLE `eoay_grade_outcomes_history` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `action` bigint(10) NOT NULL DEFAULT '0',
  `oldid` bigint(10) NOT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `loggeduser` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `shortname` varchar(255) NOT NULL DEFAULT '',
  `fullname` longtext NOT NULL,
  `scaleid` bigint(10) DEFAULT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_gradoutchist_act_ix` (`action`),
  KEY `eoay_gradoutchist_old_ix` (`oldid`),
  KEY `eoay_gradoutchist_cou_ix` (`courseid`),
  KEY `eoay_gradoutchist_sca_ix` (`scaleid`),
  KEY `eoay_gradoutchist_log_ix` (`loggeduser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='History table';

CREATE TABLE `eoay_grade_settings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradsett_counam_uix` (`courseid`,`name`),
  KEY `eoay_gradsett_cou_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='gradebook settings';

CREATE TABLE `eoay_grading_areas` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `areaname` varchar(100) NOT NULL DEFAULT '',
  `activemethod` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradarea_concomare_uix` (`contextid`,`component`,`areaname`),
  KEY `eoay_gradarea_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Identifies gradable areas where advanced grading can happen.';

CREATE TABLE `eoay_grading_definitions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `areaid` bigint(10) NOT NULL,
  `method` varchar(100) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `copiedfromid` bigint(10) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `usercreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `usermodified` bigint(10) NOT NULL,
  `timecopied` bigint(10) DEFAULT '0',
  `options` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_graddefi_aremet_uix` (`areaid`,`method`),
  KEY `eoay_graddefi_are_ix` (`areaid`),
  KEY `eoay_graddefi_use_ix` (`usermodified`),
  KEY `eoay_graddefi_use2_ix` (`usercreated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains the basic information about an advanced grading for';

CREATE TABLE `eoay_grading_instances` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `raterid` bigint(10) NOT NULL,
  `itemid` bigint(10) DEFAULT NULL,
  `rawgrade` decimal(10,5) DEFAULT NULL,
  `status` bigint(10) NOT NULL DEFAULT '0',
  `feedback` longtext,
  `feedbackformat` tinyint(2) DEFAULT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_gradinst_def_ix` (`definitionid`),
  KEY `eoay_gradinst_rat_ix` (`raterid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Grading form instance is an assessment record for one gradab';

CREATE TABLE `eoay_gradingform_guide_comments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_gradguidcomm_def_ix` (`definitionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='frequently used comments used in marking guide';

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

CREATE TABLE `eoay_gradingform_guide_fillings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instanceid` bigint(10) NOT NULL,
  `criterionid` bigint(10) NOT NULL,
  `remark` longtext,
  `remarkformat` tinyint(2) DEFAULT NULL,
  `score` decimal(10,5) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradguidfill_inscri_uix` (`instanceid`,`criterionid`),
  KEY `eoay_gradguidfill_ins_ix` (`instanceid`),
  KEY `eoay_gradguidfill_cri_ix` (`criterionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the data of how the guide is filled by a particular r';

CREATE TABLE `eoay_gradingform_rubric_criteria` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definitionid` bigint(10) NOT NULL,
  `sortorder` bigint(10) NOT NULL,
  `description` longtext,
  `descriptionformat` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_gradrubrcrit_def_ix` (`definitionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the rows of the rubric grid.';

CREATE TABLE `eoay_gradingform_rubric_fillings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instanceid` bigint(10) NOT NULL,
  `criterionid` bigint(10) NOT NULL,
  `levelid` bigint(10) DEFAULT NULL,
  `remark` longtext,
  `remarkformat` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_gradrubrfill_inscri_uix` (`instanceid`,`criterionid`),
  KEY `eoay_gradrubrfill_lev_ix` (`levelid`),
  KEY `eoay_gradrubrfill_ins_ix` (`instanceid`),
  KEY `eoay_gradrubrfill_cri_ix` (`criterionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the data of how the rubric is filled by a particular ';

CREATE TABLE `eoay_gradingform_rubric_levels` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `criterionid` bigint(10) NOT NULL,
  `score` decimal(10,5) NOT NULL,
  `definition` longtext,
  `definitionformat` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_gradrubrleve_cri_ix` (`criterionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the columns of the rubric grid.';

CREATE TABLE `eoay_groupings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `idnumber` varchar(100) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `configdata` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_grou_idn2_ix` (`idnumber`),
  KEY `eoay_grou_cou2_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='A grouping is a collection of groups. WAS: groups_groupings';

CREATE TABLE `eoay_groupings_groups` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `groupingid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `timeadded` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_grougrou_gro_ix` (`groupingid`),
  KEY `eoay_grougrou_gro2_ix` (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Link a grouping to a group (note, groups can be in multiple ';

CREATE TABLE `eoay_groups` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `courseid` bigint(10) NOT NULL,
  `idnumber` varchar(100) NOT NULL DEFAULT '',
  `name` varchar(254) NOT NULL DEFAULT '',
  `description` longtext,
  `descriptionformat` tinyint(2) NOT NULL DEFAULT '0',
  `enrolmentkey` varchar(50) DEFAULT NULL,
  `picture` bigint(10) NOT NULL DEFAULT '0',
  `hidepicture` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_grou_idn_ix` (`idnumber`),
  KEY `eoay_grou_cou_ix` (`courseid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Each record represents a group.';

CREATE TABLE `eoay_groups_members` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timeadded` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_groumemb_gro_ix` (`groupid`),
  KEY `eoay_groumemb_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Link a user to a group.';

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

CREATE TABLE `eoay_label` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `course` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `intro` longtext NOT NULL,
  `introformat` smallint(4) DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_labe_cou_ix` (`course`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines labels';

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

CREATE TABLE `eoay_lesson_answers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `pageid` bigint(10) NOT NULL DEFAULT '0',
  `jumpto` bigint(11) NOT NULL DEFAULT '0',
  `grade` smallint(4) NOT NULL DEFAULT '0',
  `score` bigint(10) NOT NULL DEFAULT '0',
  `flags` smallint(3) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `answer` longtext,
  `answerformat` tinyint(2) NOT NULL DEFAULT '0',
  `response` longtext,
  `responseformat` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_lessansw_les_ix` (`lessonid`),
  KEY `eoay_lessansw_pag_ix` (`pageid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines lesson_answers';

CREATE TABLE `eoay_lesson_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `pageid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `answerid` bigint(10) NOT NULL DEFAULT '0',
  `retry` smallint(3) NOT NULL DEFAULT '0',
  `correct` bigint(10) NOT NULL DEFAULT '0',
  `useranswer` longtext,
  `timeseen` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_lessatte_use_ix` (`userid`),
  KEY `eoay_lessatte_les_ix` (`lessonid`),
  KEY `eoay_lessatte_pag_ix` (`pageid`),
  KEY `eoay_lessatte_ans_ix` (`answerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines lesson_attempts';

CREATE TABLE `eoay_lesson_branch` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `pageid` bigint(10) NOT NULL DEFAULT '0',
  `retry` bigint(10) NOT NULL DEFAULT '0',
  `flag` smallint(3) NOT NULL DEFAULT '0',
  `timeseen` bigint(10) NOT NULL DEFAULT '0',
  `nextpageid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_lessbran_use_ix` (`userid`),
  KEY `eoay_lessbran_les_ix` (`lessonid`),
  KEY `eoay_lessbran_pag_ix` (`pageid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='branches for each lesson/user';

CREATE TABLE `eoay_lesson_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `grade` double NOT NULL DEFAULT '0',
  `late` smallint(3) NOT NULL DEFAULT '0',
  `completed` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_lessgrad_use_ix` (`userid`),
  KEY `eoay_lessgrad_les_ix` (`lessonid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines lesson_grades';

CREATE TABLE `eoay_lesson_overrides` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) DEFAULT NULL,
  `userid` bigint(10) DEFAULT NULL,
  `available` bigint(10) DEFAULT NULL,
  `deadline` bigint(10) DEFAULT NULL,
  `timelimit` bigint(10) DEFAULT NULL,
  `review` smallint(3) DEFAULT NULL,
  `maxattempts` smallint(3) DEFAULT NULL,
  `retake` smallint(3) DEFAULT NULL,
  `password` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_lessover_les_ix` (`lessonid`),
  KEY `eoay_lessover_gro_ix` (`groupid`),
  KEY `eoay_lessover_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

CREATE TABLE `eoay_lesson_timer` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `lessonid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `starttime` bigint(10) NOT NULL DEFAULT '0',
  `lessontime` bigint(10) NOT NULL DEFAULT '0',
  `completed` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_lesstime_use_ix` (`userid`),
  KEY `eoay_lesstime_les_ix` (`lessonid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='lesson timer for each lesson';

CREATE TABLE `eoay_license` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `shortname` varchar(255) DEFAULT NULL,
  `fullname` longtext,
  `source` varchar(255) DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `version` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='store licenses used by moodle';
INSERT INTO `eoay_license` VALUES (1,'unknown','Unknown license','',1,2010033100),(2,'allrightsreserved','All rights reserved','http://en.wikipedia.org/wiki/All_rights_reserved',1,2010033100),(3,'public','Public Domain','http://creativecommons.org/licenses/publicdomain/',1,2010033100),(4,'cc','Creative Commons','http://creativecommons.org/licenses/by/3.0/',1,2010033100),(5,'cc-nd','Creative Commons - NoDerivs','http://creativecommons.org/licenses/by-nd/3.0/',1,2010033100),(6,'cc-nc-nd','Creative Commons - No Commercial NoDerivs','http://creativecommons.org/licenses/by-nc-nd/3.0/',1,2010033100),(7,'cc-nc','Creative Commons - No Commercial','http://creativecommons.org/licenses/by-nc/3.0/',1,2013051500),(8,'cc-nc-sa','Creative Commons - No Commercial ShareAlike','http://creativecommons.org/licenses/by-nc-sa/3.0/',1,2010033100),(9,'cc-sa','Creative Commons - ShareAlike','http://creativecommons.org/licenses/by-sa/3.0/',1,2010033100);

CREATE TABLE `eoay_lock_db` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `resourcekey` varchar(255) NOT NULL DEFAULT '',
  `expires` bigint(10) DEFAULT NULL,
  `owner` varchar(36) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_lockdb_res_uix` (`resourcekey`),
  KEY `eoay_lockdb_exp_ix` (`expires`),
  KEY `eoay_lockdb_own_ix` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `time` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `ip` varchar(45) NOT NULL DEFAULT '',
  `course` bigint(10) NOT NULL DEFAULT '0',
  `module` varchar(20) NOT NULL DEFAULT '',
  `cmid` bigint(10) NOT NULL DEFAULT '0',
  `action` varchar(40) NOT NULL DEFAULT '',
  `url` varchar(100) NOT NULL DEFAULT '',
  `info` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_log_coumodact_ix` (`course`,`module`,`action`),
  KEY `eoay_log_tim_ix` (`time`),
  KEY `eoay_log_act_ix` (`action`),
  KEY `eoay_log_usecou_ix` (`userid`,`course`),
  KEY `eoay_log_cmi_ix` (`cmid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Every action is logged as far as possible';

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

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

CREATE TABLE `eoay_logstore_standard_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `eventname` varchar(255) NOT NULL DEFAULT '',
  `component` varchar(100) NOT NULL DEFAULT '',
  `action` varchar(100) NOT NULL DEFAULT '',
  `target` varchar(100) NOT NULL DEFAULT '',
  `objecttable` varchar(50) DEFAULT NULL,
  `objectid` bigint(10) DEFAULT NULL,
  `crud` varchar(1) NOT NULL DEFAULT '',
  `edulevel` tinyint(1) NOT NULL,
  `contextid` bigint(10) NOT NULL,
  `contextlevel` bigint(10) NOT NULL,
  `contextinstanceid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `relateduserid` bigint(10) DEFAULT NULL,
  `anonymous` tinyint(1) NOT NULL DEFAULT '0',
  `other` longtext,
  `timecreated` bigint(10) NOT NULL,
  `origin` varchar(10) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `realuserid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_logsstanlog_tim_ix` (`timecreated`),
  KEY `eoay_logsstanlog_couanotim_ix` (`courseid`,`anonymous`,`timecreated`),
  KEY `eoay_logsstanlog_useconconc_ix` (`userid`,`contextlevel`,`contextinstanceid`,`crud`,`edulevel`,`timecreated`),
  KEY `eoay_logsstanlog_con_ix` (`contextid`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='Standard log table';
INSERT INTO `eoay_logstore_standard_log` VALUES (1,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1464579123,'web','23.254.101.64',NULL),(2,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1464579129,'web','50.63.85.70',NULL),(3,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1464579133,'web','136.243.93.30',NULL),(4,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1464579135,'web','103.252.152.3',NULL),(5,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1490319073,'web','23.254.101.64',NULL),(6,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1490319074,'web','50.63.85.70',NULL),(7,'\\core\\event\\course_viewed','core','viewed','course',NULL,NULL,'r',2,2,50,1,0,1,NULL,0,'N;',1490319077,'web','138.201.125.171',NULL),(8,'\\core\\event\\user_password_updated','core','updated','user_password',NULL,NULL,'u',0,5,30,2,0,0,2,0,'a:1:{s:14:\"forgottenreset\";b:0;}',1490319667,'web','98.235.227.249',NULL),(9,'\\core\\event\\user_password_updated','core','updated','user_password',NULL,NULL,'u',0,5,30,2,0,0,2,0,'a:1:{s:14:\"forgottenreset\";b:0;}',1490319667,'web','98.235.227.249',NULL),(10,'\\core\\event\\user_loggedin','core','loggedin','user','user',2,'r',0,1,10,0,2,0,NULL,0,'a:1:{s:8:\"username\";s:5:\"admin\";}',1490319667,'web','98.235.227.249',NULL);

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

