-- MySQL dump 10.13  Distrib 5.7.28, for Linux (x86_64)
--
-- Host: localhost    Database: moodle_DB
-- ------------------------------------------------------
-- Server version	5.7.28-0ubuntu0.18.04.4

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `mdl_kopere_dashboard_events`
--

DROP TABLE IF EXISTS `mdl_kopere_dashboard_events`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mdl_kopere_dashboard_events` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `module` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
  `event` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `userfrom` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `userto` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `message` longtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mdl_kopedasheven_modeve_uix` (`module`,`event`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mdl_kopere_dashboard_events`
--

LOCK TABLES `mdl_kopere_dashboard_events` WRITE;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_events` DISABLE KEYS */;
INSERT INTO `mdl_kopere_dashboard_events` VALUES (1,'local_kopere_dashboard','\\local_kopere_dashboard\\event\\import_course_enrol',0,'admin','student','Welcome Welcome - {[course.fullname]}','<p>Hello {[to.fullname]},</p>\n<p>You have been successfully enrolled in {[course.fullname]}. You can now login to the student area to begin studying when and where you want.</p>\n<p>It is with great satisfaction that {[moodle.fullname]} welcomes you.</p>\n<p>Access {{course.link}}, and good studies.</p>\n<p>If you have any doubts, help is available.</p>\n<p>Sincerely,<br>\n   Support Team</p>'),(2,'local_kopere_dashboard','\\local_kopere_dashboard\\event\\import_user_created',0,'admin','student','Welcome! - {[moodle.fullname]}','<p>Hello {[to.fullname]},</p>\n<p>An account was created for you on the site {[moodle.fullname]}.</p>\n<p>Now, I invite you to login to the student area with the following data:</p>\n<p><strong>Site:</strong> {[moodle.link]}<br>\n   <strong>Login:</strong> {[to.username]}<br>\n   <strong>Password:</strong> {[to.password]}</p>\n<p>If you have any doubts, help is available.</p>\n<p>Sincerely,<br>\n   Support Team</p>'),(3,'local_kopere_dashboard','\\local_kopere_dashboard\\event\\import_user_created_and_enrol',0,'admin','student','Welcome Welcome - {[course.fullname]}','<p>Hello {[to.fullname]},</p>\n<p>You have been successfully enrolled in {[course.fullname]}. You can now login to the student area to begin studying when and where you want.</p>\n<p>Now, I invite you to login to the student area with the following data:</p>\n<p><strong>Site:</strong> {[moodle.link]}<br>\n   <strong>Login:</strong> {[to.username]}<br>\n   <strong>Password:</strong> {[to.password]}</p>\n<p>If you have any doubts, help is available.</p>\n<p>Sincerely,<br>\n   Support Team</p>');
/*!40000 ALTER TABLE `mdl_kopere_dashboard_events` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mdl_kopere_dashboard_menu`
--

DROP TABLE IF EXISTS `mdl_kopere_dashboard_menu`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mdl_kopere_dashboard_menu` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `icon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mdl_kopedashmenu_lin_uix` (`link`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mdl_kopere_dashboard_menu`
--

LOCK TABLES `mdl_kopere_dashboard_menu` WRITE;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_menu` DISABLE KEYS */;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_menu` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mdl_kopere_dashboard_reportcat`
--

DROP TABLE IF EXISTS `mdl_kopere_dashboard_reportcat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mdl_kopere_dashboard_reportcat` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `enable` tinyint(1) DEFAULT NULL,
  `enablesql` longtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mdl_kopedashrepo_typ_uix` (`type`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mdl_kopere_dashboard_reportcat`
--

LOCK TABLES `mdl_kopere_dashboard_reportcat` WRITE;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_reportcat` DISABLE KEYS */;
INSERT INTO `mdl_kopere_dashboard_reportcat` VALUES (1,'[[reports_reportcat_badge]]','badge','assets/reports/badge.svg',1,'SELECT id AS status FROM {badge} LIMIT 1'),(2,'[[reports_reportcat_courses]]','courses','assets/reports/courses.svg',1,''),(3,'[[reports_reportcat_enrol_cohort]]','enrol_cohort','assets/reports/enrol_cohort.svg',1,'SELECT id AS status FROM {config}\n                                      WHERE `name` LIKE \'enrol_plugins_enabled\' AND `value` LIKE \'%cohort%\' LIMIT 1'),(4,'[[reports_reportcat_enrol_guest]]','enrol_guest','assets/reports/enrol_guest.svg',1,'SELECT id AS status FROM {config}\n                                      WHERE `name` LIKE \'enrol_plugins_enabled\' AND `value` LIKE \'%guest%\' LIMIT 1'),(5,'[[reports_reportcat_server]]','server','assets/reports/server.svg',1,''),(6,'[[reports_reportcat_user]]','user','assets/reports/user.svg',1,'');
/*!40000 ALTER TABLE `mdl_kopere_dashboard_reportcat` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mdl_kopere_dashboard_reports`
--

DROP TABLE IF EXISTS `mdl_kopere_dashboard_reports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mdl_kopere_dashboard_reports` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `reportcatid` bigint(10) NOT NULL,
  `reportkey` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `enable` tinyint(1) DEFAULT NULL,
  `enablesql` longtext COLLATE utf8_unicode_ci,
  `reportsql` longtext COLLATE utf8_unicode_ci,
  `prerequisit` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
  `columns` longtext COLLATE utf8_unicode_ci,
  `foreach` longtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mdl_kopedashrepo_rep_uix` (`reportkey`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mdl_kopere_dashboard_reports`
--

LOCK TABLES `mdl_kopere_dashboard_reports` WRITE;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_reports` DISABLE KEYS */;
INSERT INTO `mdl_kopere_dashboard_reports` VALUES (1,1,'badge-1','[[reports_report_badge-1]]',1,'',' SELECT b.id, b.name, b.description, b.type, b.status,\n                                      (SELECT COUNT(*) FROM {badge_issued} d WHERE d.badgeid = b.id )AS students\n                                 FROM {badge} b','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"name\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"context\",\"type\":\"text\",\"title\":\"[[reports_context]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"statustext\",\"type\":\"dataStatusRenderer\",\"title\":\"[[userenrolment_status_active]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"students\",\"type\":\"numeric-comma\",\"title\":\"[[courses_enrol]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::badge_status_text'),(2,1,'badge-2','[[reports_report_badge-2]]',1,'',' SELECT d.id, u.id AS userid, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.lastname, b.name AS badgename,\n                                      t.criteriatype, t.method, d.dateissued,\n                                      (SELECT c.shortname FROM {course} c WHERE c.id = b.courseid) as course\n                                 FROM {badge_issued}   d\n                                 JOIN {badge}          b ON d.badgeid = b.id\n                                 JOIN {user}           u ON d.userid  = u.id\n                                 JOIN {badge_criteria} t ON b.id      = t.badgeid\n                                WHERE t.criteriatype != 0\n                              ORDER BY u.username','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"name\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"badgename\",\"type\":\"text\",\"title\":\"[[reports_badgename]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"criteriatype\",\"type\":\"text\",\"title\":\"[[reports_criteriatype]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"course\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"dateissued\",\"type\":\"dataDatetimeRenderer\",\"title\":\"[[reports_dateissued]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::badge_criteria_type'),(3,2,'courses-1','[[reports_report_courses-1]]',1,'',' SELECT ue.id,\n                                      u.id AS userid,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.email,\n\n                                      c.id AS courseid,\n                                      c.fullname,\n                                      ue.timecreated,\n\n                                      IFNULL((SELECT COUNT(gg.finalgrade)\n                                        FROM {grade_grades}  gg\n                                        JOIN {grade_items}  gi ON gg.itemid=gi.id\n                                        WHERE gi.courseid=c.id\n                                         AND gg.userid=u.id\n                                         AND gi.itemtype=\'mod\'\n                                         GROUP BY u.id,c.id),\'0\') AS \'activities_completed\',\n\n                                      IFNULL((SELECT COUNT( gi.itemname )\n                                        FROM {grade_items}  gi\n                                        WHERE gi.courseid = c.id\n                                         AND gi.itemtype=\'mod\'), \'0\') AS \'activities_assigned\',\n\n                                      (\n                                          SELECT IF(activities_assigned!=\'0\', (\n                                              SELECT IF( activities_completed = activities_assigned,\n                                              (\n                                                  SELECT CONCAT(\'100% completo\',FROM_UNIXTIME(MAX(log.time),\'%m/%d/%Y\'))\n                                                    FROM {log} log\n                                                   WHERE log.course = c.id\n                                                     AND log.userid = u.id\n                                              ),\n                                              (\n                                                  SELECT CONCAT(IFNULL(ROUND((activities_completed)/(activities_assigned)*100,0),\n                                                        \'0\'),\'% complete\')))), \'n/a\')\n                                      ) AS \'course_completed\'\n\n                                    FROM {user} u\n                                    JOIN {user_enrolments}  ue  ON ue.userid = u.id\n                                    JOIN {enrol}            e   ON e.id = ue.enrolid\n                                    JOIN {course}           c   ON c.id = e.courseid\n                                    JOIN {context}          ctx ON ctx.instanceid = c.id AND ctx.instanceid = c.id\n                                    JOIN {role_assignments} ra  ON ra.contextid = ctx.id AND ra.userid = u.id\n                                    JOIN {role}             r   ON r.id = e.roleid\n\n                                    WHERE ra.roleid = 5\n                                      AND c.id      = :courseid\n                                  GROUP BY u.id, c.id','listCourses','{\"columns\":[{\"chave\":\"userid\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"email\",\"type\":\"text\",\"title\":\"[[courses_student_email]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"timecreated\",\"type\":\"dataDatetimeRenderer\",\"title\":\"[[reports_coursecreated]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"activities_completed\",\"type\":\"numeric-comma\",\"title\":\"[[reports_activitiescomplete]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"activities_assigned\",\"type\":\"numeric-comma\",\"title\":\"[[reports_activitiesassigned]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"course_completed\",\"type\":\"text\",\"title\":\"[[reports_coursecompleted]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}],\"header\":[{\"funcao\":null,\"title\":\"[[reports_datastudents]]\",\"type\":\"\",\"chave\":\"\",\"class\":\"\",\"styleheader\":\"\",\"stylecol\":\"\",\"cols\":3},{\"funcao\":null,\"title\":\"[[reports_datacourses]]\",\"type\":\"\",\"chave\":\"\",\"class\":\"\",\"styleheader\":\"\",\"stylecol\":\"\",\"cols\":5}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(4,2,'courses-2','[[reports_report_courses-2]]',1,'',' SELECT concat(c.id,g.id), c.id, c.fullname, c.shortname, g.name, c.visible, c.groupmode\n                                 FROM {course} c\n                                 JOIN {groups} g ON c.id = g.courseid\n                                WHERE c.groupmode > 0','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"visible\",\"type\":\"dataVisibleRenderer\",\"title\":\"[[courses_visible]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"groupname\",\"type\":\"text\",\"title\":\"[[reports_groupnode]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"name\",\"type\":\"text\",\"title\":\"[[reports_groupname]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::courses_group_mode'),(5,2,'courses-3','[[reports_report_courses-3]]',1,'','local_kopere_dashboard\\report\\custom\\course_access','listCourses','',''),(6,2,'courses-4','[[reports_report_courses-4]]',1,'','local_kopere_dashboard\\report\\custom\\course_access_grade','listCourses','',''),(7,2,'courses-5','[[reports_report_courses-5]]',1,'','local_kopere_dashboard\\report\\custom\\course_last_access','listCourses','',''),(8,3,'enrol_cohort-1','[[reports_report_enrol_cohort-1]]',1,'',' SELECT u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, h.idnumber, h.name\n                                 FROM {cohort} h\n                                 JOIN {cohort_members} hm ON h.id = hm.cohortid\n                                 JOIN {user} u ON hm.userid = u.id\n                               ORDER BY u.firstname','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"name\",\"type\":\"text\",\"title\":\"[[reports_cohort]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(9,4,'enrol_guest-1','[[reports_report_enrol_guest-1]]',1,'',' SELECT u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.id AS userid, lsl.timecreated, lsl.ip\n                                 FROM {logstore_standard_log} lsl\n                                 JOIN {user}                  u   ON u.id = lsl.userid\n                                WHERE lsl.action LIKE \'loggedin\'\n                                  AND u.id = 1\n                                  AND lsl.target LIKE \'user\'','','{\"columns\":[{\"chave\":\"userid\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"timecreated\",\"type\":\"dataDatetimeRenderer\",\"title\":\"[[reports_lastlogin]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"ip\",\"type\":\"text\",\"title\":\"IP\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(10,5,'server-1','[[reports_report_server-1]]',1,'',' SELECT c.id, c.fullname, c.shortname, c.visible, c.timecreated,\n                                      (SELECT SUM( f.filesize )\n                                         FROM {files} f, {context} ctx\n                                        WHERE ctx.id           = f.contextid\n                                          AND ctx.contextlevel = 50\n                                          AND ctx.instanceid   = c.id\n                                      GROUP BY ctx.instanceid) AS coursesize,\n                                      (SELECT SUM( f.filesize ) AS modulessize\n                                         FROM {course_modules} cm, {files} f, {context} ctx\n                                        WHERE ctx.id = f.contextid\n                                          AND ctx.instanceid   = cm.id\n                                          AND ctx.contextlevel = 70\n                                          AND cm.course        = c.id\n                                     GROUP BY cm.course) AS modulessize\n                                 FROM {course} c\n                                WHERE c.id > 1','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"shortname\",\"type\":\"text\",\"title\":\"[[courses_shortname]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"visible\",\"type\":\"dataVisibleRenderer\",\"title\":\"[[courses_visible]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"coursesize\",\"type\":\"file-size\",\"title\":\"[[reports_coursesize]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"modulessize\",\"type\":\"file-size\",\"title\":\"[[reports_modulessize]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}',''),(11,6,'user-1','[[reports_report_user-1]]',1,'',' SELECT DISTINCT c.id, c.fullname, c.shortname, ctx.id AS contextid,\n                                       (SELECT COUNT(userid) FROM {role_assignments}\n                                         WHERE contextid = asg.contextid GROUP BY contextid) AS alunos\n                                 FROM {role_assignments} asg\n                                 JOIN {context}          ctx ON asg.contextid = ctx.id\n                                 JOIN {course}           c   ON ctx.instanceid = c.id\n                                WHERE asg.roleid       = 5\n                                  AND ctx.contextlevel = 50 ','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"shortname\",\"type\":\"text\",\"title\":\"[[courses_shortname]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"alunos\",\"type\":\"text\",\"title\":\"[[courses_enrol]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}',''),(12,6,'user-2','[[reports_report_user-2]]',1,'',' SELECT concat(u.id, p.id), u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, c.fullname, c.shortname,\n                                      t.timecompleted, p.module, p.moduleinstance\n                                 FROM {course_completion_crit_compl} t\n                                 JOIN {user}    u ON t.userid = u.id\n                                 JOIN {course}  c ON t.course = c.id\n                                 JOIN {course_completion_criteria} p ON t.criteriaid = p.id','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"shortname\",\"type\":\"text\",\"title\":\"[[courses_shortname]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(13,6,'user-4','[[reports_report_user-4]]',1,'',' SELECT lsl.id, u.id AS userid, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.email, u.city, lsl.timecreated\n                                 FROM {logstore_standard_log}   lsl\n                                 JOIN {user}                    u    ON u.id = lsl.userid\n                                WHERE lsl.action LIKE \'loggedin\'\n                                  AND lsl.target LIKE \'user\'','','{\"columns\":[{\"chave\":\"userid\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"email\",\"type\":\"text\",\"title\":\"[[courses_student_email]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"city\",\"type\":\"text\",\"title\":\"[[user_table_city]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"timecreated\",\"type\":\"dataDatetimeRenderer\",\"title\":\"[[reports_timecreated]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(14,6,'user-5','[[reports_report_user-5]]',1,'',' SELECT u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.email, u.city, u.timecreated\n                                 FROM {user} u\n                                WHERE u.deleted    = 0\n                                  AND u.lastlogin  = 0\n                                  AND u.id         > 1\n                                  AND u.lastaccess = 0','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"email\",\"type\":\"text\",\"title\":\"[[courses_student_email]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"city\",\"type\":\"text\",\"title\":\"[[user_table_city]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"timecreated\",\"type\":\"dataDatetimeRenderer\",\"title\":\"[[reports_timecreated]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(15,6,'user-6','[[reports_report_user-6]]',1,'',' SELECT concat(u.id, p.id), u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname,\n                                      c.fullname, c.shortname, p.timecompleted\n                                 FROM {course_completions} p\n                                 JOIN {course} c ON p.course = c.id\n                                 JOIN {user}   u ON p.userid = u.id\n                                WHERE c.enablecompletion = 1\n                             ORDER BY u.username','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"shortname\",\"type\":\"text\",\"title\":\"[[courses_shortname]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(16,6,'user-7','[[reports_report_user-7]]',1,'','SELECT ue.id, u.id AS userid, ul.timeaccess, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.email, u.city, u.lastaccess,\n                                      c.fullname, c.shortname,\n                                      (SELECT r.name\n                                         FROM {user_enrolments} ue2\n                                         JOIN {enrol} e ON e.id = ue2.enrolid\n                                         JOIN {role}  r ON e.id = r.id\n                                        WHERE ue2.userid = u.id\n                                          AND e.courseid = c.id ) AS rolename\n                                 FROM {user_enrolments} ue\n                                 JOIN {enrol}  e ON e.id = ue.enrolid\n                                 JOIN {course} c ON c.id = e.courseid\n                                 JOIN {user}   u ON u.id = ue.userid\n                                 LEFT JOIN {user_lastaccess} ul ON ul.userid = u.id\n                                WHERE ul.timeaccess IS NULL','','{\"columns\":[{\"chave\":\"userid\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"fullname\",\"type\":\"text\",\"title\":\"[[courses_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"shortname\",\"type\":\"text\",\"title\":\"[[courses_shortname]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"rolename\",\"type\":\"text\",\"title\":\"rolename\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname'),(17,6,'user-8','[[reports_report_user-8]]',1,'','SELECT id, confirmed, username, firstname, lastname, email, phone1, phone2, city, country FROM {user} WHERE deleted = 0','','{\"columns\":[{\"chave\":\"id\",\"type\":\"numeric-comma\",\"title\":\"#\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"confirmed\",\"type\":\"numeric-comma\",\"title\":\"[[[confirmed]]]\",\"funcao\":null,\"style_header\":\"width:20px\",\"style_col\":null},{\"chave\":\"userfullname\",\"type\":\"text\",\"title\":\"[[courses_student_name]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"lastname\",\"type\":\"text\",\"title\":\"[[[lastname]]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"email\",\"type\":\"text\",\"title\":\"[[[email]]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"phone1\",\"type\":\"text\",\"title\":\"[[[phone1]]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"phone2\",\"type\":\"text\",\"title\":\"[[[phone2]]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"city\",\"type\":\"text\",\"title\":\"[[[city]]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null},{\"chave\":\"country\",\"type\":\"text\",\"title\":\"[[[country]]]\",\"funcao\":null,\"style_header\":null,\"style_col\":null}]}','local_kopere_dashboard\\report\\report_foreach::userfullname');
/*!40000 ALTER TABLE `mdl_kopere_dashboard_reports` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mdl_kopere_dashboard_webpages`
--

DROP TABLE IF EXISTS `mdl_kopere_dashboard_webpages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mdl_kopere_dashboard_webpages` (
  `id` bigint(10) NOT NULL AUTO_INCREMENT,
  `menuid` bigint(10) DEFAULT NULL,
  `courseid` bigint(10) DEFAULT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `text` longtext COLLATE utf8_unicode_ci,
  `theme` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `visible` tinyint(1) DEFAULT NULL,
  `pageorder` bigint(10) DEFAULT NULL,
  `config` longtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mdl_kopedashwebp_lin_uix` (`link`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mdl_kopere_dashboard_webpages`
--

LOCK TABLES `mdl_kopere_dashboard_webpages` WRITE;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_webpages` DISABLE KEYS */;
/*!40000 ALTER TABLE `mdl_kopere_dashboard_webpages` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2019-12-23 20:40:02
