This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function get_timeaccess_calc($userid, $courseid) | |
{ | |
global $DB; | |
$accesses = $DB->get_records_select('logstore_standard_log', "userid = ? and courseid = ?", ['userid' => $userid, 'courseid' => $courseid], '', 'timecreated'); | |
$timeaccess = 0; | |
$last = 0; | |
foreach ($accesses as $access) { | |
if (($access->timecreated - $last) < 60 * 10 && $last > 0) { | |
$timeaccess += ($access->timecreated - $last); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Relatório alunos ativos por período (dd/mm/aaaa até dd/mm/aaaa) | |
# | |
# > Ter feito login | |
# > ??? | |
SELECT DISTINCT u.id, u.firstname, u.lastname, u.email, | |
role.shortname, | |
FROM_UNIXTIME(log.timecreated) as last_access | |
FROM mdl_user u | |
JOIN mdl_logstore_standard_log log ON log.userid = u.id | |
JOIN mdl_role_assignments rassign ON rassign.userid = u.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO mdl_customcert_elements (name,data,font,fontsize,colour,width,refpoint,timemodified,element,pageid,sequence,timecreated) VALUES('Certificado Middag','{\"month\":\"6\",\"fileid\":\"0\",\"logofront\":\"0\",\"hours\":\"\",\"customtext1\":\"\",\"customtext2\":\"\",\"customtext3\":\"\",\"text\":{\"text\":\"\",\"format\":\"1\"},\"signfront\":\"0\",\"signyfront\":0,\"logoback\":\"0\",\"header\":{\"text\":\"\",\"format\":\"1\"},\"content\":{\"text\":\"\",\"format\":\"1\"},\"local\":\"\",\"registrodeata\":\"\",\"footer\":{\"text\":\"\",\"format\":\"1\"},\"signback\":\"0\",\"signyback\":0}',NULL,NULL,'#000000',NULL,NULL,'1613672832','middag','8','3','1613672833') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This class defines all code necessary manage user course enrollment. | |
* | |
* @link https://edwiser.org | |
* @since 1.0.0 | |
* @package Edwiser Bridge. | |
*/ | |
namespace app\wisdmlabs\edwiserBridge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Relatório alunos ativos por período (dd/mm/aaaa até dd/mm/aaaa) | |
# | |
# > Ter feito login | |
# > ??? | |
SELECT DISTINCT u.id, u.firstname, u.lastname, u.email, | |
CASE role.shortname | |
WHEN 'student' THEN 'Estudante' | |
WHEN 'editingteacher' THEN 'Professor' | |
WHEN 'teacher' THEN 'Moderador' | |
ELSE role.shortname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sql = "SELECT asub.id as submissionid, a.id as assignid, afc.commenttext as comment, | |
cm.id as cmid, c.id AS courseid, c.fullname AS coursename, | |
u.id, u.firstname, u.lastname | |
FROM {user} u | |
JOIN {user_enrolments} ue ON ue.userid = u.id | |
JOIN {enrol} e ON e.id = ue.enrolid | |
JOIN {course} c ON c.id = e.courseid | |
JOIN {course_modules} cm ON cm.course = c.id | |
JOIN {modules} m ON m.id = cm.module | |
JOIN {assign} a ON a.id = cm.instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom certificate Educere | |
* | |
* @package customcertelement_educere | |
* @copyright 2018 Michael Meneses <michael@michaelmeneses.com.br> | |
* @license Commercial | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom certificate Educere | |
* | |
* @package customcertelement_educere | |
* @copyright 2018 Michael Meneses <michael@michaelmeneses.com.br> | |
* @license Commercial | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom certificate Educere | |
* | |
* @package customcertelement_educere | |
* @copyright 2018 Michael Meneses <michael@michaelmeneses.com.br> | |
* @license Commercial | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ul.timemodified, ul.userid, ul.info, ul.version AS moodleversion, SUBSTRING(ul.version, 1, 8) AS moodleversion2, | |
CASE | |
WHEN SUBSTRING(ul.version, 1, 8) = 20200615 THEN '3.9' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20191118 THEN '3.8' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20190520 THEN '3.7' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20181203 THEN '3.6' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20180517 THEN '3.5' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20171113 THEN '3.4' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20170515 THEN '3.3' | |
WHEN SUBSTRING(ul.version, 1, 8) = 20161205 THEN '3.2' |