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';

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

CREATE TABLE `eoay_lti_tool_proxies` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT 'Tool Provider',
  `regurl` longtext,
  `state` tinyint(2) NOT NULL DEFAULT '1',
  `guid` varchar(255) DEFAULT NULL,
  `secret` varchar(255) DEFAULT NULL,
  `vendorcode` varchar(255) DEFAULT NULL,
  `capabilityoffered` longtext NOT NULL,
  `serviceoffered` longtext NOT NULL,
  `toolproxy` longtext,
  `createdby` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_ltitoolprox_gui_uix` (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_lti_tool_settings` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `toolproxyid` bigint(10) NOT NULL,
  `course` bigint(10) DEFAULT NULL,
  `coursemoduleid` bigint(10) DEFAULT NULL,
  `settings` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_ltitoolsett_too_ix` (`toolproxyid`),
  KEY `eoay_ltitoolsett_cou_ix` (`course`),
  KEY `eoay_ltitoolsett_cou2_ix` (`coursemoduleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_lti_types` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT 'basiclti Activity',
  `baseurl` longtext NOT NULL,
  `tooldomain` varchar(255) NOT NULL DEFAULT '',
  `state` tinyint(2) NOT NULL DEFAULT '2',
  `course` bigint(10) NOT NULL,
  `coursevisible` tinyint(1) NOT NULL DEFAULT '0',
  `createdby` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `description` longtext,
  `toolproxyid` bigint(10) DEFAULT NULL,
  `enabledcapability` longtext,
  `parameter` longtext,
  `icon` longtext,
  `secureicon` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_ltitype_cou_ix` (`course`),
  KEY `eoay_ltitype_too_ix` (`tooldomain`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Basic LTI pre-configured activities';

CREATE TABLE `eoay_lti_types_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `typeid` bigint(10) NOT NULL,
  `name` varchar(100) NOT NULL DEFAULT '',
  `value` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_ltitypeconf_typ_ix` (`typeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Basic LTI types configuration';

CREATE TABLE `eoay_message` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridfrom` bigint(10) NOT NULL DEFAULT '0',
  `useridto` bigint(10) NOT NULL DEFAULT '0',
  `subject` longtext,
  `fullmessage` longtext,
  `fullmessageformat` smallint(4) DEFAULT '0',
  `fullmessagehtml` longtext,
  `smallmessage` longtext,
  `notification` tinyint(1) DEFAULT '0',
  `contexturl` longtext,
  `contexturlname` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timeusertodeleted` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) DEFAULT NULL,
  `eventtype` varchar(100) DEFAULT NULL,
  `timeuserfromdeleted` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_mess_use2_ix` (`useridto`),
  KEY `eoay_mess_useusetimtim_ix` (`useridfrom`,`useridto`,`timeuserfromdeleted`,`timeusertodeleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores all unread messages';

CREATE TABLE `eoay_message_airnotifier_devices` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userdeviceid` bigint(10) NOT NULL,
  `enable` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_messairndevi_use_uix` (`userdeviceid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Store information about the devices registered in Airnotifie';

CREATE TABLE `eoay_message_contacts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `contactid` bigint(10) NOT NULL DEFAULT '0',
  `blocked` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_messcont_usecon_uix` (`userid`,`contactid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Maintains lists of relationships between users';

CREATE TABLE `eoay_message_popup` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `messageid` bigint(10) NOT NULL,
  `isread` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_messpopu_mesisr_uix` (`messageid`,`isread`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_message_processors` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(166) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='List of message output plugins';
INSERT INTO `eoay_message_processors` VALUES (1,'email',1),(2,'jabber',1),(3,'popup',1),(4,'airnotifier',0);

CREATE TABLE `eoay_message_providers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL DEFAULT '',
  `component` varchar(200) NOT NULL DEFAULT '',
  `capability` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_messprov_comnam_uix` (`component`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='This table stores the message providers (modules and core sy';
INSERT INTO `eoay_message_providers` VALUES (1,'notices','moodle','moodle/site:config'),(2,'errors','moodle','moodle/site:config'),(3,'availableupdate','moodle','moodle/site:config'),(4,'instantmessage','moodle',NULL),(5,'backup','moodle','moodle/site:config'),(6,'courserequested','moodle','moodle/site:approvecourse'),(7,'courserequestapproved','moodle','moodle/course:request'),(8,'courserequestrejected','moodle','moodle/course:request'),(9,'assign_notification','mod_assign',NULL),(10,'assignment_updates','mod_assignment',NULL),(11,'submission','mod_feedback',NULL),(12,'message','mod_feedback',NULL),(13,'posts','mod_forum',NULL),(14,'graded_essay','mod_lesson',NULL),(15,'submission','mod_quiz','mod/quiz:emailnotifysubmission'),(16,'confirmation','mod_quiz','mod/quiz:emailconfirmsubmission'),(17,'attempt_overdue','mod_quiz','mod/quiz:emailwarnoverdue'),(19,'flatfile_enrolment','enrol_flatfile',NULL),(20,'imsenterprise_enrolment','enrol_imsenterprise',NULL),(21,'paypal_enrolment','enrol_paypal',NULL),(22,'expiry_notification','enrol_manual',NULL),(23,'expiry_notification','enrol_self',NULL),(24,'badgerecipientnotice','moodle','moodle/badges:earnbadge'),(25,'badgecreatornotice','moodle',NULL),(26,'invalidrecipienthandler','tool_messageinbound',NULL),(27,'messageprocessingerror','tool_messageinbound',NULL),(28,'messageprocessingsuccess','tool_messageinbound',NULL),(29,'notification','tool_monitor','tool/monitor:subscribe'),(30,'competencyplancomment','moodle',NULL),(31,'competencyusercompcomment','moodle',NULL),(32,'digests','mod_forum',NULL);

CREATE TABLE `eoay_message_read` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `useridfrom` bigint(10) NOT NULL DEFAULT '0',
  `useridto` bigint(10) NOT NULL DEFAULT '0',
  `subject` longtext,
  `fullmessage` longtext,
  `fullmessageformat` smallint(4) DEFAULT '0',
  `fullmessagehtml` longtext,
  `smallmessage` longtext,
  `notification` tinyint(1) DEFAULT '0',
  `contexturl` longtext,
  `contexturlname` longtext,
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timeusertodeleted` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) DEFAULT NULL,
  `eventtype` varchar(100) DEFAULT NULL,
  `timeuserfromdeleted` bigint(10) NOT NULL DEFAULT '0',
  `timeread` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_messread_use2_ix` (`useridto`),
  KEY `eoay_messread_useusetimtim_ix` (`useridfrom`,`useridto`,`timeuserfromdeleted`,`timeusertodeleted`),
  KEY `eoay_messread_nottim_ix` (`notification`,`timeread`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores all messages that have been read';

CREATE TABLE `eoay_message_working` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `unreadmessageid` bigint(10) NOT NULL,
  `processorid` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_messwork_unr_ix` (`unreadmessageid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Lists all the messages and processors that need to be proces';

CREATE TABLE `eoay_messageinbound_datakeys` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `handler` bigint(10) NOT NULL,
  `datavalue` bigint(10) NOT NULL,
  `datakey` varchar(64) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `expires` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_messdata_handat_uix` (`handler`,`datavalue`),
  KEY `eoay_messdata_han_ix` (`handler`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_messageinbound_handlers` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `component` varchar(100) NOT NULL DEFAULT '',
  `classname` varchar(255) NOT NULL DEFAULT '',
  `defaultexpiration` bigint(10) NOT NULL DEFAULT '86400',
  `validateaddress` tinyint(1) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_messhand_cla_uix` (`classname`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
INSERT INTO `eoay_messageinbound_handlers` VALUES (1,'core','\\core\\message\\inbound\\private_files_handler',0,1,0),(2,'mod_forum','\\mod_forum\\message\\inbound\\reply_handler',604800,1,0),(3,'tool_messageinbound','\\tool_messageinbound\\message\\inbound\\invalid_recipient_handler',604800,0,1);

CREATE TABLE `eoay_messageinbound_messagelist` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `messageid` longtext NOT NULL,
  `userid` bigint(10) NOT NULL,
  `address` longtext NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_messmess_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_mnet_application` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `display_name` varchar(50) NOT NULL DEFAULT '',
  `xmlrpc_server_url` varchar(255) NOT NULL DEFAULT '',
  `sso_land_url` varchar(255) NOT NULL DEFAULT '',
  `sso_jump_url` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Information about applications on remote hosts';
INSERT INTO `eoay_mnet_application` VALUES (1,'moodle','Moodle','/mnet/xmlrpc/server.php','/auth/mnet/land.php','/auth/mnet/jump.php'),(2,'mahara','Mahara','/api/xmlrpc/server.php','/auth/xmlrpc/land.php','/auth/xmlrpc/jump.php');

CREATE TABLE `eoay_mnet_host` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `wwwroot` varchar(255) NOT NULL DEFAULT '',
  `ip_address` varchar(45) NOT NULL DEFAULT '',
  `name` varchar(80) NOT NULL DEFAULT '',
  `public_key` longtext NOT NULL,
  `public_key_expires` bigint(10) NOT NULL DEFAULT '0',
  `transport` tinyint(2) NOT NULL DEFAULT '0',
  `portno` mediumint(5) NOT NULL DEFAULT '0',
  `last_connect_time` bigint(10) NOT NULL DEFAULT '0',
  `last_log_id` bigint(10) NOT NULL DEFAULT '0',
  `force_theme` tinyint(1) NOT NULL DEFAULT '0',
  `theme` varchar(100) DEFAULT NULL,
  `applicationid` bigint(10) NOT NULL DEFAULT '1',
  `sslverification` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_mnethost_app_ix` (`applicationid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Information about the local and remote hosts for RPC';
INSERT INTO `eoay_mnet_host` VALUES (1,0,'http://testing.installatron.com/moodleinstalltest01','67.19.67.235','','',0,0,0,0,0,0,NULL,1,0),(2,0,'','','All Hosts','',0,0,0,0,0,0,NULL,1,0);

CREATE TABLE `eoay_mnet_host2service` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hostid` bigint(10) NOT NULL DEFAULT '0',
  `serviceid` bigint(10) NOT NULL DEFAULT '0',
  `publish` tinyint(1) NOT NULL DEFAULT '0',
  `subscribe` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_mnethost_hosser_uix` (`hostid`,`serviceid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information about the services for a given host';

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

CREATE TABLE `eoay_mnet_remote_rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `functionname` varchar(40) NOT NULL DEFAULT '',
  `xmlrpcpath` varchar(80) NOT NULL DEFAULT '',
  `plugintype` varchar(20) NOT NULL DEFAULT '',
  `pluginname` varchar(20) NOT NULL DEFAULT '',
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='This table describes functions that might be called remotely';
INSERT INTO `eoay_mnet_remote_rpc` VALUES (1,'user_authorise','auth/mnet/auth.php/user_authorise','auth','mnet',1),(2,'keepalive_server','auth/mnet/auth.php/keepalive_server','auth','mnet',1),(3,'kill_children','auth/mnet/auth.php/kill_children','auth','mnet',1),(4,'refresh_log','auth/mnet/auth.php/refresh_log','auth','mnet',1),(5,'fetch_user_image','auth/mnet/auth.php/fetch_user_image','auth','mnet',1),(6,'fetch_theme_info','auth/mnet/auth.php/fetch_theme_info','auth','mnet',1),(7,'update_enrolments','auth/mnet/auth.php/update_enrolments','auth','mnet',1),(8,'keepalive_client','auth/mnet/auth.php/keepalive_client','auth','mnet',1),(9,'kill_child','auth/mnet/auth.php/kill_child','auth','mnet',1),(10,'available_courses','enrol/mnet/enrol.php/available_courses','enrol','mnet',1),(11,'user_enrolments','enrol/mnet/enrol.php/user_enrolments','enrol','mnet',1),(12,'enrol_user','enrol/mnet/enrol.php/enrol_user','enrol','mnet',1),(13,'unenrol_user','enrol/mnet/enrol.php/unenrol_user','enrol','mnet',1),(14,'course_enrolments','enrol/mnet/enrol.php/course_enrolments','enrol','mnet',1),(15,'send_content_intent','portfolio/mahara/lib.php/send_content_intent','portfolio','mahara',1),(16,'send_content_ready','portfolio/mahara/lib.php/send_content_ready','portfolio','mahara',1);

CREATE TABLE `eoay_mnet_remote_service2rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `serviceid` bigint(10) NOT NULL DEFAULT '0',
  `rpcid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_mnetremoserv_rpcser_uix` (`rpcid`,`serviceid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='Group functions or methods under a service';
INSERT INTO `eoay_mnet_remote_service2rpc` VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4),(5,1,5),(6,1,6),(7,1,7),(8,2,8),(9,2,9),(10,3,10),(11,3,11),(12,3,12),(13,3,13),(14,3,14),(15,4,15),(16,4,16);

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

CREATE TABLE `eoay_mnet_service` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(40) NOT NULL DEFAULT '',
  `description` varchar(40) NOT NULL DEFAULT '',
  `apiversion` varchar(10) NOT NULL DEFAULT '',
  `offer` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='A service is a group of functions';
INSERT INTO `eoay_mnet_service` VALUES (1,'sso_idp','','1',1),(2,'sso_sp','','1',1),(3,'mnet_enrol','','1',1),(4,'pf','','1',1);

CREATE TABLE `eoay_mnet_service2rpc` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `serviceid` bigint(10) NOT NULL DEFAULT '0',
  `rpcid` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_mnetserv_rpcser_uix` (`rpcid`,`serviceid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='Group functions or methods under a service';
INSERT INTO `eoay_mnet_service2rpc` VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4),(5,1,5),(6,1,6),(7,1,7),(8,2,8),(9,2,9),(10,3,10),(11,3,11),(12,3,12),(13,3,13),(14,3,14),(15,4,15);

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

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

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

CREATE TABLE `eoay_mnetservice_enrol_enrolments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hostid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `remotecourseid` bigint(10) NOT NULL,
  `rolename` varchar(255) NOT NULL DEFAULT '',
  `enroltime` bigint(10) NOT NULL DEFAULT '0',
  `enroltype` varchar(20) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_mnetenroenro_use_ix` (`userid`),
  KEY `eoay_mnetenroenro_hos_ix` (`hostid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Caches the information about enrolments of our local users i';

CREATE TABLE `eoay_modules` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `cron` bigint(10) NOT NULL DEFAULT '0',
  `lastcron` bigint(10) NOT NULL DEFAULT '0',
  `search` varchar(255) NOT NULL DEFAULT '',
  `visible` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `eoay_modu_nam_ix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='modules available in the site';
INSERT INTO `eoay_modules` VALUES (1,'assign',60,0,'',1),(2,'assignment',60,0,'',0),(3,'book',0,0,'',1),(4,'chat',300,0,'',1),(5,'choice',0,0,'',1),(6,'data',0,0,'',1),(7,'feedback',0,0,'',0),(8,'folder',0,0,'',1),(9,'forum',0,0,'',1),(10,'glossary',0,0,'',1),(11,'imscp',0,0,'',1),(12,'label',0,0,'',1),(13,'lesson',0,0,'',1),(14,'lti',0,0,'',1),(15,'page',0,0,'',1),(16,'quiz',60,0,'',1),(17,'resource',0,0,'',1),(18,'scorm',300,0,'',1),(19,'survey',0,0,'',1),(20,'url',0,0,'',1),(21,'wiki',0,0,'',1),(22,'workshop',60,0,'',1);

CREATE TABLE `eoay_my_pages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) DEFAULT '0',
  `name` varchar(200) NOT NULL DEFAULT '',
  `private` tinyint(1) NOT NULL DEFAULT '1',
  `sortorder` mediumint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_mypage_usepri_ix` (`userid`,`private`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Extra user pages for the My Moodle system';
INSERT INTO `eoay_my_pages` VALUES (1,NULL,'__default',0,0),(2,NULL,'__default',1,0);

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

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

CREATE TABLE `eoay_portfolio_instance_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instance` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_portinstconf_nam_ix` (`name`),
  KEY `eoay_portinstconf_ins_ix` (`instance`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='config for portfolio plugin instances';

CREATE TABLE `eoay_portfolio_instance_user` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instance` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_portinstuser_ins_ix` (`instance`),
  KEY `eoay_portinstuser_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='user data for portfolio instances.';

CREATE TABLE `eoay_portfolio_log` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `userid` bigint(10) NOT NULL,
  `time` bigint(10) NOT NULL,
  `portfolio` bigint(10) NOT NULL,
  `caller_class` varchar(150) NOT NULL DEFAULT '',
  `caller_file` varchar(255) NOT NULL DEFAULT '',
  `caller_component` varchar(255) DEFAULT NULL,
  `caller_sha1` varchar(255) NOT NULL DEFAULT '',
  `tempdataid` bigint(10) NOT NULL DEFAULT '0',
  `returnurl` varchar(255) NOT NULL DEFAULT '',
  `continueurl` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_portlog_use_ix` (`userid`),
  KEY `eoay_portlog_por_ix` (`portfolio`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='log of portfolio transfers (used to later check for duplicat';

CREATE TABLE `eoay_portfolio_mahara_queue` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `transferid` bigint(10) NOT NULL,
  `token` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_portmahaqueu_tok_ix` (`token`),
  KEY `eoay_portmahaqueu_tra_ix` (`transferid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='maps mahara tokens to transfer ids';

CREATE TABLE `eoay_portfolio_tempdata` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `data` longtext,
  `expirytime` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `instance` bigint(10) DEFAULT '0',
  `queued` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_porttemp_use_ix` (`userid`),
  KEY `eoay_porttemp_ins_ix` (`instance`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='stores temporary data for portfolio exports. the id of this ';

CREATE TABLE `eoay_post` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `module` varchar(20) NOT NULL DEFAULT '',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `courseid` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) NOT NULL DEFAULT '0',
  `moduleid` bigint(10) NOT NULL DEFAULT '0',
  `coursemoduleid` bigint(10) NOT NULL DEFAULT '0',
  `subject` varchar(128) NOT NULL DEFAULT '',
  `summary` longtext,
  `content` longtext,
  `uniquehash` varchar(255) NOT NULL DEFAULT '',
  `rating` bigint(10) NOT NULL DEFAULT '0',
  `format` bigint(10) NOT NULL DEFAULT '0',
  `summaryformat` tinyint(2) NOT NULL DEFAULT '0',
  `attachment` varchar(100) DEFAULT NULL,
  `publishstate` varchar(20) NOT NULL DEFAULT 'draft',
  `lastmodified` bigint(10) NOT NULL DEFAULT '0',
  `created` bigint(10) NOT NULL DEFAULT '0',
  `usermodified` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_post_iduse_uix` (`id`,`userid`),
  KEY `eoay_post_las_ix` (`lastmodified`),
  KEY `eoay_post_mod_ix` (`module`),
  KEY `eoay_post_sub_ix` (`subject`),
  KEY `eoay_post_use_ix` (`usermodified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Generic post table to hold data blog entries etc in differen';

CREATE TABLE `eoay_profiling` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `runid` varchar(32) NOT NULL DEFAULT '',
  `url` varchar(255) NOT NULL DEFAULT '',
  `data` longtext NOT NULL,
  `totalexecutiontime` bigint(10) NOT NULL,
  `totalcputime` bigint(10) NOT NULL,
  `totalcalls` bigint(10) NOT NULL,
  `totalmemory` bigint(10) NOT NULL,
  `runreference` tinyint(2) NOT NULL DEFAULT '0',
  `runcomment` varchar(255) NOT NULL DEFAULT '',
  `timecreated` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_prof_run_uix` (`runid`),
  KEY `eoay_prof_urlrun_ix` (`url`,`runreference`),
  KEY `eoay_prof_timrun_ix` (`timecreated`,`runreference`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the results of all the profiling runs';

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

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

CREATE TABLE `eoay_qtype_ddimageortext_drops` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `xleft` bigint(10) NOT NULL DEFAULT '0',
  `ytop` bigint(10) NOT NULL DEFAULT '0',
  `choice` bigint(10) NOT NULL DEFAULT '0',
  `label` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_qtypddimdrop_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Drop boxes';

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

CREATE TABLE `eoay_qtype_ddmarker_drags` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `label` longtext NOT NULL,
  `infinite` smallint(4) NOT NULL DEFAULT '0',
  `noofdrags` bigint(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `eoay_qtypddmadrag_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Labels for markers to drag.';

CREATE TABLE `eoay_qtype_ddmarker_drops` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `no` bigint(10) NOT NULL DEFAULT '0',
  `shape` varchar(255) DEFAULT NULL,
  `coords` longtext NOT NULL,
  `choice` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_qtypddmadrop_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='drop regions';

CREATE TABLE `eoay_qtype_essay_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL,
  `responseformat` varchar(16) NOT NULL DEFAULT 'editor',
  `responserequired` tinyint(2) NOT NULL DEFAULT '1',
  `responsefieldlines` smallint(4) NOT NULL DEFAULT '15',
  `attachments` smallint(4) NOT NULL DEFAULT '0',
  `attachmentsrequired` smallint(4) NOT NULL DEFAULT '0',
  `graderinfo` longtext,
  `graderinfoformat` smallint(4) NOT NULL DEFAULT '0',
  `responsetemplate` longtext,
  `responsetemplateformat` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_qtypessaopti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Extra options for essay questions.';

CREATE TABLE `eoay_qtype_match_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `shuffleanswers` smallint(4) NOT NULL DEFAULT '1',
  `correctfeedback` longtext NOT NULL,
  `correctfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `partiallycorrectfeedback` longtext NOT NULL,
  `partiallycorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `incorrectfeedback` longtext NOT NULL,
  `incorrectfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `shownumcorrect` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_qtypmatcopti_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines fixed matching questions';

CREATE TABLE `eoay_qtype_match_subquestions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `questiontext` longtext NOT NULL,
  `questiontextformat` tinyint(2) NOT NULL DEFAULT '0',
  `answertext` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_qtypmatcsubq_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines the subquestions that make up a matching question';

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

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

CREATE TABLE `eoay_qtype_shortanswer_options` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `usecase` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quesshor_que_uix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Options for short answer questions';

CREATE TABLE `eoay_question` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `category` bigint(10) NOT NULL DEFAULT '0',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `questiontext` longtext NOT NULL,
  `questiontextformat` tinyint(2) NOT NULL DEFAULT '0',
  `generalfeedback` longtext NOT NULL,
  `generalfeedbackformat` tinyint(2) NOT NULL DEFAULT '0',
  `defaultmark` decimal(12,7) NOT NULL DEFAULT '1.0000000',
  `penalty` decimal(12,7) NOT NULL DEFAULT '0.3333333',
  `qtype` varchar(20) NOT NULL DEFAULT '',
  `length` bigint(10) NOT NULL DEFAULT '1',
  `stamp` varchar(255) NOT NULL DEFAULT '',
  `version` varchar(255) NOT NULL DEFAULT '',
  `hidden` tinyint(1) NOT NULL DEFAULT '0',
  `timecreated` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `createdby` bigint(10) DEFAULT NULL,
  `modifiedby` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_ques_cat_ix` (`category`),
  KEY `eoay_ques_par_ix` (`parent`),
  KEY `eoay_ques_cre_ix` (`createdby`),
  KEY `eoay_ques_mod_ix` (`modifiedby`),
  KEY `eoay_ques_qty_ix` (`qtype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The questions themselves';

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

CREATE TABLE `eoay_question_attempt_step_data` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `attemptstepid` bigint(10) NOT NULL,
  `name` varchar(32) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`),
  KEY `eoay_quesattestepdata_att_ix` (`attemptstepid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Each question_attempt_step has an associative array of the d';

CREATE TABLE `eoay_question_attempt_steps` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionattemptid` bigint(10) NOT NULL,
  `sequencenumber` bigint(10) NOT NULL,
  `state` varchar(13) NOT NULL DEFAULT '',
  `fraction` decimal(12,7) DEFAULT NULL,
  `timecreated` bigint(10) NOT NULL,
  `userid` bigint(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quesattestep_queseq_uix` (`questionattemptid`,`sequencenumber`),
  KEY `eoay_quesattestep_que_ix` (`questionattemptid`),
  KEY `eoay_quesattestep_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores one step in in a question attempt. As well as the dat';

CREATE TABLE `eoay_question_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `questionusageid` bigint(10) NOT NULL,
  `slot` bigint(10) NOT NULL,
  `behaviour` varchar(32) NOT NULL DEFAULT '',
  `questionid` bigint(10) NOT NULL,
  `variant` bigint(10) NOT NULL DEFAULT '1',
  `maxmark` decimal(12,7) NOT NULL,
  `minfraction` decimal(12,7) NOT NULL,
  `maxfraction` decimal(12,7) NOT NULL DEFAULT '1.0000000',
  `flagged` tinyint(1) NOT NULL DEFAULT '0',
  `questionsummary` longtext,
  `rightanswer` longtext,
  `responsesummary` longtext,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quesatte_queslo_uix` (`questionusageid`,`slot`),
  KEY `eoay_quesatte_que_ix` (`questionid`),
  KEY `eoay_quesatte_que2_ix` (`questionusageid`),
  KEY `eoay_quesatte_beh_ix` (`behaviour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Each row here corresponds to an attempt at one question, as ';

CREATE TABLE `eoay_question_calculated` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `answer` bigint(10) NOT NULL DEFAULT '0',
  `tolerance` varchar(20) NOT NULL DEFAULT '0.0',
  `tolerancetype` bigint(10) NOT NULL DEFAULT '1',
  `correctanswerlength` bigint(10) NOT NULL DEFAULT '2',
  `correctanswerformat` bigint(10) NOT NULL DEFAULT '2',
  PRIMARY KEY (`id`),
  KEY `eoay_quescalc_ans_ix` (`answer`),
  KEY `eoay_quescalc_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Options for questions of type calculated';

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

CREATE TABLE `eoay_question_categories` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `contextid` bigint(10) NOT NULL DEFAULT '0',
  `info` longtext NOT NULL,
  `infoformat` tinyint(2) NOT NULL DEFAULT '0',
  `stamp` varchar(255) NOT NULL DEFAULT '',
  `parent` bigint(10) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL DEFAULT '999',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quescate_consta_uix` (`contextid`,`stamp`),
  KEY `eoay_quescate_con_ix` (`contextid`),
  KEY `eoay_quescate_par_ix` (`parent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categories are for grouping questions';

CREATE TABLE `eoay_question_dataset_definitions` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `category` bigint(10) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` bigint(10) NOT NULL DEFAULT '0',
  `options` varchar(255) NOT NULL DEFAULT '',
  `itemcount` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_quesdatadefi_cat_ix` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Organises and stores properties for dataset items';

CREATE TABLE `eoay_question_dataset_items` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `definition` bigint(10) NOT NULL DEFAULT '0',
  `itemnumber` bigint(10) NOT NULL DEFAULT '0',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_quesdataitem_def_ix` (`definition`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Individual dataset items';

CREATE TABLE `eoay_question_datasets` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `datasetdefinition` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_quesdata_quedat_ix` (`question`,`datasetdefinition`),
  KEY `eoay_quesdata_que_ix` (`question`),
  KEY `eoay_quesdata_dat_ix` (`datasetdefinition`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Many-many relation between questions and dataset definitions';

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

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

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

CREATE TABLE `eoay_question_multianswer` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `sequence` longtext NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_quesmult_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Options for multianswer questions';

CREATE TABLE `eoay_question_numerical` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `answer` bigint(10) NOT NULL DEFAULT '0',
  `tolerance` varchar(255) NOT NULL DEFAULT '0.0',
  PRIMARY KEY (`id`),
  KEY `eoay_quesnume_ans_ix` (`answer`),
  KEY `eoay_quesnume_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Options for numerical questions.';

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

CREATE TABLE `eoay_question_numerical_units` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `multiplier` decimal(40,20) NOT NULL DEFAULT '1.00000000000000000000',
  `unit` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quesnumeunit_queuni_uix` (`question`,`unit`),
  KEY `eoay_quesnumeunit_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Optional unit options for numerical questions. This table is';

CREATE TABLE `eoay_question_response_analysis` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hashcode` varchar(40) NOT NULL DEFAULT '',
  `whichtries` varchar(255) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL,
  `questionid` bigint(10) NOT NULL,
  `variant` bigint(10) DEFAULT NULL,
  `subqid` varchar(100) NOT NULL DEFAULT '',
  `aid` varchar(100) DEFAULT NULL,
  `response` longtext,
  `credit` decimal(15,5) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_question_response_count` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `analysisid` bigint(10) NOT NULL,
  `try` bigint(10) NOT NULL,
  `rcount` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_quesrespcoun_ana_ix` (`analysisid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_question_statistics` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hashcode` varchar(40) NOT NULL DEFAULT '',
  `timemodified` bigint(10) NOT NULL,
  `questionid` bigint(10) NOT NULL,
  `slot` bigint(10) DEFAULT NULL,
  `subquestion` smallint(4) NOT NULL,
  `variant` bigint(10) DEFAULT NULL,
  `s` bigint(10) NOT NULL DEFAULT '0',
  `effectiveweight` decimal(15,5) DEFAULT NULL,
  `negcovar` tinyint(2) NOT NULL DEFAULT '0',
  `discriminationindex` decimal(15,5) DEFAULT NULL,
  `discriminativeefficiency` decimal(15,5) DEFAULT NULL,
  `sd` decimal(15,10) DEFAULT NULL,
  `facility` decimal(15,10) DEFAULT NULL,
  `subquestions` longtext,
  `maxmark` decimal(12,7) DEFAULT NULL,
  `positions` longtext,
  `randomguessscore` decimal(12,7) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_question_truefalse` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `question` bigint(10) NOT NULL DEFAULT '0',
  `trueanswer` bigint(10) NOT NULL DEFAULT '0',
  `falseanswer` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_questrue_que_ix` (`question`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Options for True-False questions';

CREATE TABLE `eoay_question_usages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(255) NOT NULL DEFAULT '',
  `preferredbehaviour` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `eoay_quesusag_con_ix` (`contextid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='This table''s main purpose it to assign a unique id to each a';

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

CREATE TABLE `eoay_quiz_attempts` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quiz` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `attempt` mediumint(6) NOT NULL DEFAULT '0',
  `uniqueid` bigint(10) NOT NULL DEFAULT '0',
  `layout` longtext NOT NULL,
  `currentpage` bigint(10) NOT NULL DEFAULT '0',
  `preview` smallint(3) NOT NULL DEFAULT '0',
  `state` varchar(16) NOT NULL DEFAULT 'inprogress',
  `timestart` bigint(10) NOT NULL DEFAULT '0',
  `timefinish` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `timemodifiedoffline` bigint(10) NOT NULL DEFAULT '0',
  `timecheckstate` bigint(10) DEFAULT '0',
  `sumgrades` decimal(10,5) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quizatte_quiuseatt_uix` (`quiz`,`userid`,`attempt`),
  UNIQUE KEY `eoay_quizatte_uni_uix` (`uniqueid`),
  KEY `eoay_quizatte_qui_ix` (`quiz`),
  KEY `eoay_quizatte_use_ix` (`userid`),
  KEY `eoay_quizatte_statim_ix` (`state`,`timecheckstate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores users attempts at quizzes.';

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

CREATE TABLE `eoay_quiz_grades` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quiz` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `grade` decimal(10,5) NOT NULL DEFAULT '0.00000',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_quizgrad_use_ix` (`userid`),
  KEY `eoay_quizgrad_qui_ix` (`quiz`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the overall grade for each user on the quiz, based on';

CREATE TABLE `eoay_quiz_overrides` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quiz` bigint(10) NOT NULL DEFAULT '0',
  `groupid` bigint(10) DEFAULT NULL,
  `userid` bigint(10) DEFAULT NULL,
  `timeopen` bigint(10) DEFAULT NULL,
  `timeclose` bigint(10) DEFAULT NULL,
  `timelimit` bigint(10) DEFAULT NULL,
  `attempts` mediumint(6) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_quizover_qui_ix` (`quiz`),
  KEY `eoay_quizover_gro_ix` (`groupid`),
  KEY `eoay_quizover_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The overrides to quiz settings on a per-user and per-group b';

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

CREATE TABLE `eoay_quiz_reports` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `displayorder` bigint(10) NOT NULL,
  `capability` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quizrepo_nam_uix` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='Lists all the installed quiz reports and their display order';
INSERT INTO `eoay_quiz_reports` VALUES (1,'overview',10000,NULL),(2,'responses',9000,NULL),(3,'grading',6000,'mod/quiz:grade'),(4,'statistics',8000,'quiz/statistics:view');

CREATE TABLE `eoay_quiz_sections` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `quizid` bigint(10) NOT NULL,
  `firstslot` bigint(10) NOT NULL,
  `heading` varchar(1333) DEFAULT NULL,
  `shufflequestions` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quizsect_quifir_uix` (`quizid`,`firstslot`),
  KEY `eoay_quizsect_qui_ix` (`quizid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_quiz_slots` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `slot` bigint(10) NOT NULL,
  `quizid` bigint(10) NOT NULL DEFAULT '0',
  `page` bigint(10) NOT NULL,
  `requireprevious` smallint(4) NOT NULL DEFAULT '0',
  `questionid` bigint(10) NOT NULL DEFAULT '0',
  `maxmark` decimal(12,7) NOT NULL DEFAULT '0.0000000',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_quizslot_quislo_uix` (`quizid`,`slot`),
  KEY `eoay_quizquesinst_qui_ix` (`quizid`),
  KEY `eoay_quizquesinst_que_ix` (`questionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the maximum possible grade (weight) for each question';

CREATE TABLE `eoay_quiz_statistics` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `hashcode` varchar(40) NOT NULL DEFAULT '',
  `whichattempts` smallint(4) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  `firstattemptscount` bigint(10) NOT NULL,
  `highestattemptscount` bigint(10) NOT NULL,
  `lastattemptscount` bigint(10) NOT NULL,
  `allattemptscount` bigint(10) NOT NULL,
  `firstattemptsavg` decimal(15,5) DEFAULT NULL,
  `highestattemptsavg` decimal(15,5) DEFAULT NULL,
  `lastattemptsavg` decimal(15,5) DEFAULT NULL,
  `allattemptsavg` decimal(15,5) DEFAULT NULL,
  `median` decimal(15,5) DEFAULT NULL,
  `standarddeviation` decimal(15,5) DEFAULT NULL,
  `skewness` decimal(15,10) DEFAULT NULL,
  `kurtosis` decimal(15,5) DEFAULT NULL,
  `cic` decimal(15,10) DEFAULT NULL,
  `errorratio` decimal(15,10) DEFAULT NULL,
  `standarderror` decimal(15,10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `eoay_rating` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `contextid` bigint(10) NOT NULL,
  `component` varchar(100) NOT NULL DEFAULT '',
  `ratingarea` varchar(50) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL,
  `scaleid` bigint(10) NOT NULL,
  `rating` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL,
  `timecreated` bigint(10) NOT NULL,
  `timemodified` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `eoay_rati_comratconite_ix` (`component`,`ratingarea`,`contextid`,`itemid`),
  KEY `eoay_rati_con_ix` (`contextid`),
  KEY `eoay_rati_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='moodle ratings';

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

CREATE TABLE `eoay_repository` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL DEFAULT '',
  `visible` tinyint(1) DEFAULT '1',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='This table contains one entry for every configured external ';
INSERT INTO `eoay_repository` VALUES (1,'local',1,1),(2,'recent',1,2),(3,'upload',1,3),(4,'url',1,4),(5,'user',1,5),(6,'wikimedia',1,6),(7,'youtube',1,7),(8,'areafiles',1,8);

CREATE TABLE `eoay_repository_instance_config` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `instanceid` bigint(10) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The config for intances';

CREATE TABLE `eoay_repository_instances` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `typeid` bigint(10) NOT NULL,
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `contextid` bigint(10) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `timecreated` bigint(10) DEFAULT NULL,
  `timemodified` bigint(10) DEFAULT NULL,
  `readonly` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='This table contains one entry for every configured external ';
INSERT INTO `eoay_repository_instances` VALUES (1,'',1,0,1,NULL,NULL,1347240072,1347240072,0),(2,'',2,0,1,NULL,NULL,1347240072,1347240072,0),(3,'',3,0,1,NULL,NULL,1347240073,1347240073,0),(4,'',4,0,1,NULL,NULL,1347240073,1347240073,0),(5,'',5,0,1,NULL,NULL,1347240073,1347240073,0),(6,'',6,0,1,NULL,NULL,1347240073,1347240073,0),(7,'',7,0,1,NULL,NULL,1347240073,1347240073,0),(8,'',8,0,1,NULL,NULL,1464579108,1464579108,0);

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

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

CREATE TABLE `eoay_role` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `shortname` varchar(100) NOT NULL DEFAULT '',
  `description` longtext NOT NULL,
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  `archetype` varchar(30) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_role_sor_uix` (`sortorder`),
  UNIQUE KEY `eoay_role_sho_uix` (`shortname`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='moodle roles';
INSERT INTO `eoay_role` VALUES (1,'Manager','manager','Managers can access course and modify them, they usually do not participate in courses.',1,'manager'),(2,'Course creator','coursecreator','Course creators can create new courses.',2,'coursecreator'),(3,'Teacher','editingteacher','Teachers can do anything within a course, including changing the activities and grading students.',3,'editingteacher'),(4,'Non-editing teacher','teacher','Non-editing teachers can teach in courses and grade students, but may not alter activities.',4,'teacher'),(5,'Student','student','Students generally have fewer privileges within a course.',5,'student'),(6,'Guest','guest','Guests have minimal privileges and usually can not enter text anywhere.',6,'guest'),(7,'Authenticated user','user','All logged in users.',7,'user'),(8,'Authenticated user on frontpage','frontpage','All logged in users in the frontpage course.',8,'frontpage');

CREATE TABLE `eoay_role_allow_assign` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `allowassign` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_rolealloassi_rolall_uix` (`roleid`,`allowassign`),
  KEY `eoay_rolealloassi_rol_ix` (`roleid`),
  KEY `eoay_rolealloassi_all_ix` (`allowassign`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='this defines what role can assign what role';
INSERT INTO `eoay_role_allow_assign` VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4),(5,1,5),(6,3,4),(7,3,5);

CREATE TABLE `eoay_role_allow_override` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `allowoverride` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_rolealloover_rolall_uix` (`roleid`,`allowoverride`),
  KEY `eoay_rolealloover_rol_ix` (`roleid`),
  KEY `eoay_rolealloover_all_ix` (`allowoverride`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='this defines what role can override what role';
INSERT INTO `eoay_role_allow_override` VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4),(5,1,5),(6,1,6),(7,1,7),(8,1,8),(9,3,4),(10,3,5),(11,3,6);

CREATE TABLE `eoay_role_allow_switch` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL,
  `allowswitch` bigint(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `eoay_rolealloswit_rolall_uix` (`roleid`,`allowswitch`),
  KEY `eoay_rolealloswit_rol_ix` (`roleid`),
  KEY `eoay_rolealloswit_all_ix` (`allowswitch`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='This table stores which which other roles a user is allowed ';
INSERT INTO `eoay_role_allow_switch` VALUES (1,1,3),(2,1,4),(3,1,5),(4,1,6),(5,3,4),(6,3,5),(7,3,6),(8,4,5),(9,4,6);

CREATE TABLE `eoay_role_assignments` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `roleid` bigint(10) NOT NULL DEFAULT '0',
  `contextid` bigint(10) NOT NULL DEFAULT '0',
  `userid` bigint(10) NOT NULL DEFAULT '0',
  `timemodified` bigint(10) NOT NULL DEFAULT '0',
  `modifierid` bigint(10) NOT NULL DEFAULT '0',
  `component` varchar(100) NOT NULL DEFAULT '',
  `itemid` bigint(10) NOT NULL DEFAULT '0',
  `sortorder` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `eoay_roleassi_sor_ix` (`sortorder`),
  KEY `eoay_roleassi_rolcon_ix` (`roleid`,`contextid`),
  KEY `eoay_roleassi_useconrol_ix` (`userid`,`contextid`,`roleid`),
  KEY `eoay_roleassi_comiteuse_ix` (`component`,`itemid`,`userid`),
  KEY `eoay_roleassi_rol_ix` (`roleid`),
  KEY `eoay_roleassi_con_ix` (`contextid`),
  KEY `eoay_roleassi_use_ix` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='assigning roles in different context';

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

