List of all SQL mentioned in the code..
Value | Count | File:Line |
---|---|---|
"UPDATE $table SET path = REPLACE(path, ?, ?) WHERE " . $like | 1 |
|
"UPDATE $table SET sortorder = sortorder -1 " . " WHERE competencyframeworkid = ? AND parentid = ? AND sortorder > ?" | 1 |
|
"UPDATE $table SET sortorder = sortorder -1 WHERE competencyframeworkid = ? AND parentid = ? AND sortorder > ?" | 1 |
|
"SELECT COUNT('x') FROM (SELECT DISTINCT(competencyframeworkid) FROM {" . self::TABLE . "} WHERE id {$insql}) f" | 1 |
|
"SELECT ($totallength - $trimmedlength - 1) AS depth FROM {" . self::TABLE . "} WHERE competencyframeworkid = :id ORDER BY depth DESC" | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} plancomp ON plancomp.competencyid = comp.id WHERE plancomp.planid = ? ORDER BY plancomp.sortorder ASC, plancomp.id ASC' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} plncomp ON plncomp.competencyid = comp.id WHERE plncomp.planid = ? AND plncomp.competencyid = ?' | 1 |
|
"UPDATE $table SET sortorder = sortorder -1 WHERE planid = ? AND sortorder > ?" | 1 |
|
"SELECT c.* FROM {" . self::TABLE . "} uc JOIN {" . competency::TABLE . "} c ON c.id = uc.competencyid WHERE uc.id = ?" | 1 |
|
"SELECT 'x' FROM {" . self::TABLE . "} uc JOIN {" . competency::TABLE . "} c ON uc.competencyid = c.id WHERE c.competencyframeworkid = ?" | 1 |
|
'SELECT COUNT(comp.id) FROM {' . self::TABLE . '} usercoursecomp JOIN {' . course_competency::TABLE . '} cc ON usercoursecomp.competencyid = cc.competencyid AND cc.courseid = usercoursecomp.courseid JOIN {' . competency::TABLE . '} comp ON usercoursecomp.competencyid = comp.id WHERE usercoursecomp.courseid = ? AND usercoursecomp.userid = ? AND usercoursecomp.proficiency = ?' | 1 |
|
'SELECT ' . $fields . ' FROM (SELECT cc.competencyid, SUM(COALESCE(ucc.proficiency, 0)) AS timesproficient FROM {' . course_competency::TABLE . '} cc LEFT JOIN {' . self::TABLE . '} ucc ON ucc.competencyid = cc.competencyid AND ucc.courseid = cc.courseid WHERE cc.courseid = :courseid GROUP BY cc.competencyid ) p JOIN {' . competency::TABLE . '} c ON c.id = p.competencyid ORDER BY p.timesproficient ASC, c.id DESC' | 1 |
|
"SELECT c.*, $ctxfields FROM {course} c JOIN {" . static::TABLE . "} cc ON cc.courseid = c.id AND cc.competencyid = :competencyid JOIN ( SELECT DISTINCT c.id FROM {enrol} e JOIN {user_enrolments} ue ON ue.enrolid = e.id AND ue.status = :active AND ue.userid = :userid JOIN {course} c ON c.id = e.courseid WHERE e.status = :enabled AND e.enrol $plugins ) ec ON ec.id = c.id LEFT JOIN {context} ctx ON ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel ORDER BY c.id" | 1 |
|
'SELECT course.id as id, course.visible as visible FROM {' . self::TABLE . '} coursecomp JOIN {course} course ON coursecomp.courseid = course.id WHERE coursecomp.competencyid = ? ' | 1 |
|
'SELECT ' . implode(',', $coursefields) . ', course.category FROM {course} course JOIN {' . self::TABLE . '} coursecomp ON coursecomp.courseid = course.id WHERE coursecomp.competencyid = ? ' | 1 |
|
'SELECT COUNT(comp.id) FROM {' . self::TABLE . '} coursecomp JOIN {' . competency::TABLE . '} comp ON coursecomp.competencyid = comp.id WHERE coursecomp.courseid = ? ' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} coursecomp ON coursecomp.competencyid = comp.id WHERE coursecomp.courseid = ?' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} crscomp ON crscomp.competencyid = comp.id WHERE crscomp.courseid = ? AND crscomp.competencyid = ?' | 1 |
|
"UPDATE $table SET sortorder = sortorder -1 WHERE courseid = ? AND sortorder > ?" | 1 |
|
'SELECT crscomp.* FROM {' . self::TABLE . '} crscomp WHERE crscomp.courseid = ? AND crscomp.competencyid = ?' | 1 |
|
'SELECT coursecomp.* FROM {' . self::TABLE . '} coursecomp JOIN {' . competency::TABLE . '} comp ON coursecomp.competencyid = comp.id WHERE coursecomp.courseid = ?' | 1 |
|
'SELECT coursemodules.id as id FROM {' . self::TABLE . '} modcomp JOIN {course_modules} coursemodules ON modcomp.cmid = coursemodules.id WHERE modcomp.competencyid = ? AND coursemodules.course = ?' | 1 |
|
'SELECT COUNT(comp.id) FROM {' . self::TABLE . '} coursemodulecomp JOIN {' . competency::TABLE . '} comp ON coursemodulecomp.competencyid = comp.id WHERE coursemodulecomp.cmid = ? ' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} coursemodulecomp ON coursemodulecomp.competencyid = comp.id WHERE coursemodulecomp.cmid = ? ORDER BY coursemodulecomp.sortorder ASC' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} crsmodcomp ON crsmodcomp.competencyid = comp.id WHERE crsmodcomp.cmid = ? AND crsmodcomp.competencyid = ?' | 1 |
|
"UPDATE $table SET sortorder = sortorder -1 WHERE cmid = ? AND sortorder > ?" | 1 |
|
'SELECT coursemodcomp.* FROM {' . self::TABLE . '} coursemodcomp JOIN {' . competency::TABLE . '} comp ON coursemodcomp.competencyid = comp.id WHERE coursemodcomp.cmid = ? ORDER BY coursemodcomp.sortorder ASC' | 1 |
|
'SELECT cmc.* FROM {' . self::TABLE . '} cmc JOIN {course_modules} cm ON cm.course = ? AND cmc.cmid = cm.id WHERE cmc.competencyid = ? ORDER BY cmc.sortorder ASC' | 1 |
|
"SELECT cm.userid FROM {cohort_members} cm LEFT JOIN {" . plan::TABLE . "} p ON p.userid = cm.userid AND (p.templateid = :templateid $skipsql) WHERE cm.cohortid = :cohortid AND p.id IS NULL" | 1 |
|
"SELECT " . $DB->sql_concat('cm.userid', 'tc.templateid') . " as uniqueid, cm.userid, t.* FROM {cohort_members} cm JOIN {" . self::TABLE . "} tc ON cm.cohortid = tc.cohortid JOIN {" . template::TABLE . "} t ON (tc.templateid = t.id AND t.visible = 1) AND (t.duedate = 0 OR t.duedate > :time1) LEFT JOIN {" . plan::TABLE . "} p ON (cm.userid = p.userid AND (t.id = p.templateid OR t.id = p.origtemplateid)) $planwhereclause ORDER BY t.id" | 1 |
|
'SELECT e.* FROM {' . static::TABLE . '} e JOIN {context} c ON c.id = e.contextid WHERE (c.path LIKE :path OR c.id = :contextid) AND e.usercompetencyid = :usercompid ' . $sort | 1 |
|
"SELECT s.id FROM {scale} s LEFT JOIN {" . competency_framework::TABLE . "} f ON f.scaleid = :scaleid1 LEFT JOIN {" . competency::TABLE . "} c ON c.scaleid = :scaleid2 WHERE f.id IS NOT NULL OR c.id IS NOT NULL" | 1 |
|
"SELECT $ucfields, $compfields, $userfields" | 1 |
|
"SELECT $planfields, $tplfields, $userfields" | 1 |
|
'SELECT ' . $fields . ' FROM {context} ctx WHERE ctx.contextlevel = :level AND ctx.id ' . $insql . ' ORDER BY ctx.id' | 1 |
|
"SELECT c.* FROM {" . self::TABLE . "} uec JOIN {" . competency::TABLE . "} c ON uec.userevidenceid = ? AND uec.competencyid = c.id ORDER BY c.shortname" | 1 |
|
"SELECT uc.* FROM {" . user_competency::TABLE . "} uc JOIN {" . self::TABLE . "} uec ON uc.competencyid = uec.competencyid JOIN {" . user_evidence::TABLE . "} ue ON uec.userevidenceid = ue.id AND uc.userid = ue.userid AND ue.id = ? ORDER BY uc.id ASC" | 1 |
|
'SELECT c.* FROM {' . competency::TABLE . '} c JOIN {' . self::TABLE . '} ucp ON ucp.competencyid = c.id AND ucp.userid = :userid WHERE ucp.planid = :planid ORDER BY ucp.sortorder ASC, ucp.id ASC' | 1 |
|
"SELECT c.* FROM {" . self::TABLE . "} ucp JOIN {" . competency::TABLE . "} c ON c.id = ucp.competencyid WHERE ucp.planid = ? AND ucp.competencyid = ?" | 1 |
|
"SELECT 'x' FROM {" . self::TABLE . "} ucp JOIN {" . competency::TABLE . "} c ON ucp.competencyid = c.id WHERE c.competencyframeworkid = ?" | 1 |
|
'SELECT ' . " COUNT('x') " . 'FROM {' . self::TABLE . '} ucp JOIN {' . plan::TABLE . '} p ON ucp.planid = p.id WHERE p.templateid = :templateid' | 1 |
|
'SELECT ' . $fields . ' FROM (SELECT ucp.competencyid, COUNT(ucp.competencyid) AS timesnotproficient FROM {' . self::TABLE . '} ucp JOIN {' . plan::TABLE . '} p ON p.id = ucp.planid WHERE p.templateid = :templateid AND (ucp.proficiency = :notproficient OR ucp.proficiency IS NULL) GROUP BY ucp.competencyid ) p JOIN {' . competency::TABLE . '} c ON c.id = p.competencyid ORDER BY p.timesnotproficient DESC, c.id ASC' | 1 |
|
'SELECT COUNT(tpl.id) FROM {' . self::TABLE . '} tplcomp JOIN {' . template::TABLE . '} tpl ON tplcomp.templateid = tpl.id WHERE tplcomp.competencyid = ? ' | 1 |
|
'SELECT tpl.* FROM {' . template::TABLE . '} tpl JOIN {' . self::TABLE . '} tplcomp ON tplcomp.templateid = tpl.id WHERE tplcomp.competencyid = ? ' | 1 |
|
'SELECT COUNT(comp.id) FROM {' . self::TABLE . '} tplcomp JOIN {' . competency::TABLE . '} comp ON tplcomp.competencyid = comp.id WHERE tplcomp.templateid = ? ' | 1 |
|
'SELECT COUNT(comp.id) FROM {' . self::TABLE . '} tplcomp JOIN {' . competency::TABLE . '} comp ON tplcomp.competencyid = comp.id LEFT JOIN {' . course_competency::TABLE . '} crscomp ON crscomp.competencyid = comp.id WHERE tplcomp.templateid = ? AND crscomp.id IS NULL' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} tplcomp ON tplcomp.competencyid = comp.id WHERE tplcomp.templateid = ? AND tplcomp.competencyid = ?' | 1 |
|
'SELECT comp.* FROM {' . competency::TABLE . '} comp JOIN {' . self::TABLE . '} tplcomp ON tplcomp.competencyid = comp.id WHERE tplcomp.templateid = ? ORDER BY tplcomp.sortorder ASC, tplcomp.id ASC' | 1 |
|
"UPDATE $table SET sortorder = sortorder -1 WHERE templateid = ? AND sortorder > ?" | 1 |
|
'SELECT p.* FROM {' . self::TABLE . '} p LEFT JOIN {' . plan_competency::TABLE . '} pc ON pc.planid = p.id AND pc.competencyid = :competencyid1 LEFT JOIN {' . user_competency_plan::TABLE . '} ucp ON ucp.planid = p.id AND ucp.competencyid = :competencyid2 LEFT JOIN {' . template_competency::TABLE . '} tc ON tc.templateid = p.templateid AND tc.competencyid = :competencyid3 WHERE p.userid = :userid AND (pc.id IS NOT NULL OR ucp.id IS NOT NULL OR tc.id IS NOT NULL) ORDER BY p.id ASC' | 1 |
|
"UPDATE {" . self::TABLE . "} SET name = :name, description = :description, descriptionformat = :descriptionformat, duedate = :duedate WHERE templateid = :templateid AND status != :status" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . competency_framework::TABLE . "} cf ON cf.contextid = ctx.id WHERE cf.usermodified = :userid1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . competency_framework::TABLE . "} cf ON cf.contextid = ctx.id JOIN {" . competency::TABLE . "} c ON c.competencyframeworkid = cf.id WHERE c.usermodified = :userid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . competency_framework::TABLE . "} cf ON cf.contextid = ctx.id JOIN {" . competency::TABLE . "} c ON c.competencyframeworkid = cf.id JOIN {" . related_competency::TABLE . "} cr ON cr.competencyid = c.id WHERE cr.usermodified = :userid3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . template::TABLE . "} tpl ON tpl.contextid = ctx.id WHERE tpl.usermodified = :userid1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . template::TABLE . "} tpl ON tpl.contextid = ctx.id JOIN {" . template_cohort::TABLE . "} tch ON tch.templateid = tpl.id AND tch.usermodified = :userid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . template::TABLE . "} tpl ON tpl.contextid = ctx.id JOIN {" . template_competency::TABLE . "} tc ON tc.templateid = tpl.id AND tc.usermodified = :userid3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . course_competency::TABLE . "} cc JOIN {context} ctx ON ctx.instanceid = cc.courseid AND ctx.contextlevel = :courselevel WHERE cc.usermodified = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . course_competency_settings::TABLE . "} ccs JOIN {context} ctx ON ctx.instanceid = ccs.courseid AND ctx.contextlevel = :courselevel WHERE ccs.usermodified = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . user_competency_course::TABLE . "} ucc JOIN {context} ctx ON ctx.instanceid = ucc.courseid AND ctx.contextlevel = :courselevel WHERE ucc.usermodified = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . course_module_competency::TABLE . "} cmc JOIN {context} ctx ON ctx.instanceid = cmc.cmid AND ctx.contextlevel = :modulelevel WHERE cmc.usermodified = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . plan::TABLE . "} p JOIN {context} ctx ON ctx.instanceid = p.userid AND ctx.contextlevel = :userlevel WHERE p.usermodified = :userid1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . plan::TABLE . "} p JOIN {context} ctx ON ctx.instanceid = p.userid AND ctx.contextlevel = :userlevel WHERE p.reviewerid = :userid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . plan::TABLE . "} p JOIN {context} ctx ON ctx.instanceid = p.userid AND ctx.contextlevel = :userlevel JOIN {" . plan_competency::TABLE . "} pc ON pc.planid = p.id AND pc.usermodified = :userid3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {" . plan::TABLE . "} p JOIN {context} ctx ON ctx.instanceid = p.userid AND ctx.contextlevel = :userlevel JOIN {" . user_competency_plan::TABLE . "} upc ON upc.planid = p.id AND upc.usermodified = :userid4" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_competency::TABLE . "} uc ON uc.userid = ctx.instanceid AND ctx.contextlevel = :userlevel1 WHERE uc.usermodified = :userid1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_competency::TABLE . "} uc ON uc.userid = ctx.instanceid AND ctx.contextlevel = :userlevel1 WHERE uc.reviewerid = :userid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_competency::TABLE . "} uc ON uc.userid = ctx.instanceid AND ctx.contextlevel = :userlevel1 JOIN {" . evidence::TABLE . "} e ON e.usercompetencyid = uc.id AND e.usermodified = :userid3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_competency::TABLE . "} uc ON uc.userid = ctx.instanceid AND ctx.contextlevel = :userlevel1 JOIN {" . evidence::TABLE . "} e ON e.usercompetencyid = uc.id AND e.actionuserid = :userid4" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_evidence::TABLE . "} ue ON ue.userid = ctx.instanceid AND ctx.contextlevel = :userlevel2 AND ue.usermodified = :userid5" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_evidence::TABLE . "} ue ON ue.userid = ctx.instanceid AND ctx.contextlevel = :userlevel2 JOIN {" . user_evidence_competency::TABLE . "} uec ON uec.userevidenceid = ue.id AND uec.usermodified = :userid6" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . plan::TABLE . "} p ON p.userid = ctx.instanceid AND ctx.contextlevel = :userlevel1 WHERE p.userid = :userid1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_competency::TABLE . "} uc ON uc.userid = ctx.instanceid AND ctx.contextlevel = :userlevel2 AND uc.userid = :userid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_evidence::TABLE . "} ue ON ue.userid = ctx.instanceid AND ctx.contextlevel = :userlevel3 AND ue.userid = :userid3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {" . user_competency_course::TABLE . "} ucc ON ucc.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel AND ucc.userid = :userid4" | 1 |
|
" SELECT ctx.id FROM {context} ctx JOIN {comments} c ON c.contextid = ctx.id WHERE c.component = :component AND c.commentarea IN (:planarea, :usercomparea) AND c.userid = :userid" | 1 |
|
" SELECT cf.usermodified FROM {" . competency_framework::TABLE . "} cf WHERE cf.contextid = :contextid" | 1 |
|
" SELECT c.usermodified FROM {" . competency_framework::TABLE . "} cf JOIN {" . competency::TABLE . "} c ON c.competencyframeworkid = cf.id WHERE cf.contextid = :contextid" | 1 |
|
" SELECT cr.usermodified FROM {" . competency_framework::TABLE . "} cf JOIN {" . competency::TABLE . "} c ON c.competencyframeworkid = cf.id JOIN {" . related_competency::TABLE . "} cr ON cr.competencyid = c.id WHERE cf.contextid = :contextid" | 1 |
|
" SELECT tpl.usermodified FROM {" . template::TABLE . "} tpl WHERE tpl.contextid = :contextid" | 1 |
|
" SELECT tch.usermodified FROM {" . template::TABLE . "} tpl JOIN {" . template_cohort::TABLE . "} tch ON tch.templateid = tpl.id WHERE tpl.contextid = :contextid" | 1 |
|
" SELECT tc.usermodified FROM {" . template::TABLE . "} tpl JOIN {" . template_competency::TABLE . "} tc ON tc.templateid = tpl.id WHERE tpl.contextid = :contextid" | 1 |
|
" SELECT cc.usermodified FROM {" . course_competency::TABLE . "} cc WHERE cc.courseid = :courseid" | 1 |
|
" SELECT ccs.usermodified FROM {" . course_competency_settings::TABLE . "} ccs WHERE ccs.courseid = :courseid" | 1 |
|
" SELECT ucc.userid, ucc.usermodified FROM {" . user_competency_course::TABLE . "} ucc WHERE ucc.courseid = :courseid" | 1 |
|
" SELECT cmc.usermodified FROM {" . course_module_competency::TABLE . "} cmc WHERE cmc.cmid = :moduleid" | 1 |
|
" SELECT p.userid, p.usermodified, p.reviewerid FROM {" . plan::TABLE . "} p WHERE p.userid = :userid" | 1 |
|
" SELECT pc.usermodified FROM {" . plan::TABLE . "} p JOIN {" . plan_competency::TABLE . "} pc ON pc.planid = p.id WHERE p.userid = :userid" | 1 |
|
" SELECT upc.usermodified FROM {" . user_competency_plan::TABLE . "} upc WHERE upc.userid = :userid" | 1 |
|
" SELECT uc.userid, uc.usermodified, uc.reviewerid FROM {" . user_competency::TABLE . "} uc WHERE uc.userid = :userid" | 1 |
|
" SELECT e.usermodified, e.actionuserid FROM {" . user_competency::TABLE . "} uc JOIN {" . evidence::TABLE . "} e ON e.usercompetencyid = uc.id WHERE uc.userid = :userid" | 1 |
|
" SELECT ue.userid, ue.usermodified FROM {" . user_evidence::TABLE . "} ue WHERE ue.userid = :userid" | 1 |
|
" SELECT ue.usermodified FROM {" . user_evidence::TABLE . "} ue JOIN {" . user_evidence_competency::TABLE . "} uec ON uec.userevidenceid = ue.id WHERE ue.userid = :userid" | 1 |
|
" SELECT $ffields, $compfields, $uccfields, $ctxfields FROM {" . user_competency_course::TABLE . "} ucc JOIN {" . competency::TABLE . "} c ON c.id = ucc.competencyid JOIN {" . competency_framework::TABLE . "} f ON f.id = c.competencyframeworkid JOIN {context} ctx ON ctx.id = f.contextid WHERE ucc.userid = :userid AND ucc.courseid $insql ORDER BY ucc.courseid, c.id" | 1 |
|
" SELECT $ffields, $compfields, $uccfields, $ctxfields FROM {" . user_competency_course::TABLE . "} ucc JOIN {" . competency::TABLE . "} c ON c.id = ucc.competencyid JOIN {" . competency_framework::TABLE . "} f ON f.id = c.competencyframeworkid JOIN {context} ctx ON ctx.id = f.contextid WHERE ucc.usermodified = :userid AND ucc.courseid $insql ORDER BY ucc.courseid, ucc.id" | 1 |
|
" SELECT $compfields, $ccfields, $ctxfields FROM {" . course_competency::TABLE . "} cc JOIN {" . competency::TABLE . "} c ON c.id = cc.competencyid JOIN {" . competency_framework::TABLE . "} f ON f.id = c.competencyframeworkid JOIN {context} ctx ON ctx.id = f.contextid WHERE cc.usermodified = :userid AND cc.courseid $insql ORDER BY cc.courseid, c.id" | 1 |
|
" SELECT $ccsfields FROM {" . course_competency_settings::TABLE . "} ccs WHERE ccs.usermodified = :userid AND ccs.courseid $insql ORDER BY ccs.courseid" | 1 |
|
" SELECT $compfields, $cmcfields, $ctxfields FROM {" . course_module_competency::TABLE . "} cmc JOIN {" . competency::TABLE . "} c ON c.id = cmc.competencyid JOIN {" . competency_framework::TABLE . "} f ON f.id = c.competencyframeworkid JOIN {context} ctx ON ctx.id = f.contextid WHERE cmc.usermodified = :userid AND cmc.cmid $insql ORDER BY cmc.cmid" | 1 |
|
" SELECT $cfields, $ucfields, $efields FROM {" . user_competency::TABLE . "} uc JOIN {" . competency::TABLE . "} c ON c.id = uc.competencyid LEFT JOIN {" . evidence::TABLE . "} e ON uc.id = e.usercompetencyid WHERE uc.userid = :userid ORDER BY c.id, e.timecreated DESC, e.id DESC" | 1 |
|
" SELECT $pfields, $pcfields, $cfields, $ucfields, $ucpfields FROM {" . plan::TABLE . "} p LEFT JOIN {" . plan_competency::TABLE . "} pc ON p.id = pc.planid AND p.templateid IS NULL AND p.status != :complete1 LEFT JOIN {" . template_competency::TABLE . "} tc ON tc.templateid = p.templateid AND p.templateid IS NOT NULL AND p.status != :complete2 LEFT JOIN {" . user_competency_plan::TABLE . "} ucp ON ucp.planid = p.id AND p.status = :complete3 LEFT JOIN {" . competency::TABLE . "} c ON c.id = pc.competencyid OR c.id = tc.competencyid OR c.id = ucp.competencyid LEFT JOIN {" . user_competency::TABLE . "} uc ON uc.userid = p.userid AND (uc.competencyid = pc.competencyid OR uc.competencyid = tc.competencyid) WHERE p.userid = :userid ORDER BY p.id, c.id" | 1 |
|
" SELECT $pfields, $pcfields, $cfields FROM {" . plan_competency::TABLE . "} pc JOIN {" . plan::TABLE . "} p ON p.id = pc.planid JOIN {" . competency::TABLE . "} c ON c.id = pc.competencyid WHERE p.userid = :targetuserid AND pc.usermodified = :userid ORDER BY p.id, c.id" | 1 |
|
" SELECT $pfields, $ucpfields, $cfields FROM {" . user_competency_plan::TABLE . "} ucp JOIN {" . plan::TABLE . "} p ON p.id = ucp.planid JOIN {" . competency::TABLE . "} c ON c.id = ucp.competencyid WHERE p.userid = :targetuserid AND ucp.usermodified = :userid ORDER BY p.id, c.id" | 1 |
|
" SELECT $pfields FROM {" . plan::TABLE . "} p LEFT JOIN {comments} c ON c.contextid = :contextid AND c.commentarea = :planarea AND c.component = :competency AND c.itemid = p.id WHERE p.userid = :targetuserid AND (p.usermodified = :userid1 OR p.reviewerid = :userid2 OR c.userid = :userid3) AND p.id $insql ORDER BY p.id" | 1 |
|
" SELECT $efields, $ucfields, $cfields FROM {" . evidence::TABLE . "} e JOIN {" . user_competency::TABLE . "} uc ON uc.id = e.usercompetencyid JOIN {" . competency::TABLE . "} c ON c.id = uc.competencyid WHERE uc.userid = :targetuserid AND (e.usermodified = :userid1 OR e.actionuserid = :userid2) ORDER BY c.id, e.id" | 1 |
|
" SELECT $ucfields, $cfields FROM {" . user_competency::TABLE . "} uc JOIN {" . competency::TABLE . "} c ON c.id = uc.competencyid LEFT JOIN {comments} cmt ON cmt.contextid = :contextid AND cmt.commentarea = :ucarea AND cmt.component = :competency AND cmt.itemid = uc.id WHERE uc.userid = :targetuserid AND (uc.usermodified = :userid1 OR uc.reviewerid = :userid2 OR cmt.userid = :userid3) AND uc.competencyid $insql ORDER BY c.id, uc.id" | 1 |
|
" SELECT $uefields, $uecfields, $cfields FROM {" . user_evidence_competency::TABLE . "} uec JOIN {" . user_evidence::TABLE . "} ue ON ue.id = uec.userevidenceid JOIN {" . competency::TABLE . "} c ON c.id = uec.competencyid WHERE ue.userid = :targetuserid AND uec.usermodified = :userid ORDER BY ue.id, c.id" | 1 |
|
" SELECT $uefields FROM {" . user_evidence::TABLE . "} ue WHERE ue.userid = :targetuserid AND ue.usermodified = :userid AND ue.id $insql ORDER BY ue.id" | 1 |
|
" SELECT $uefields, $cfields FROM {" . user_evidence::TABLE . "} ue LEFT JOIN {" . user_evidence_competency::TABLE . "} uec ON uec.userevidenceid = ue.id LEFT JOIN {" . competency::TABLE . "} c ON c.id = uec.competencyid WHERE ue.userid = :userid ORDER BY ue.id" | 1 |
|
" SELECT $ffields, $cfields, $c2fields, $rcfields FROM {" . related_competency::TABLE . "} rc JOIN {" . competency::TABLE . "} c ON c.id = rc.competencyid JOIN {" . competency::TABLE . "} c2 ON c2.id = rc.relatedcompetencyid JOIN {" . competency_framework::TABLE . "} f ON f.id = c.competencyframeworkid WHERE rc.usermodified = :userid AND f.contextid = :contextid ORDER BY rc.id, c.id" | 1 |
|
" SELECT $ffields, $cfields FROM {" . competency::TABLE . "} c JOIN {" . competency_framework::TABLE . "} f ON f.id = c.competencyframeworkid WHERE c.usermodified = :userid AND f.contextid = :contextid AND c.id $insql ORDER BY c.id" | 1 |
|
" SELECT $ffields FROM {" . competency_framework::TABLE . "} f WHERE f.usermodified = :userid AND f.contextid = :contextid AND f.id $insql ORDER BY f.id" | 1 |
|
" SELECT $tfields, $cfields, $tcfields FROM {" . template_competency::TABLE . "} tc JOIN {" . template::TABLE . "} t ON t.id = tc.templateid JOIN {" . competency::TABLE . "} c ON c.id = tc.competencyid WHERE t.contextid = :contextid AND tc.usermodified = :userid ORDER BY t.id, tc.id" | 1 |
|
" SELECT $tfields, $tchfields, c.name AS cohortname FROM {" . template_cohort::TABLE . "} tch JOIN {" . template::TABLE . "} t ON t.id = tch.templateid JOIN {cohort} c ON c.id = tch.cohortid WHERE t.contextid = :contextid AND tch.usermodified = :userid ORDER BY t.id, tch.id" | 1 |
|
" SELECT $tfields FROM {" . template::TABLE . "} t WHERE t.contextid = :contextid AND t.usermodified = :userid AND t.id $insql ORDER BY t.id" | 1 |
|
"UPDATE {" . evidence::TABLE . "} SET timecreated = :currenttime WHERE id = :evidenceid" | 1 |
|
"UPDATE {cohort_members} SET timeadded = :currenttime WHERE cohortid = :cohortid AND userid = :userid" | 1 |
|
"UPDATE {" . template::TABLE . "} SET timemodified = :currenttime WHERE id = :templateid" | 1 |
|
"UPDATE {" . plan::TABLE . "} SET timemodified = :currenttime WHERE id = :planid" | 1 |
|
" SELECT id, $titlesql FROM {block_rss_client} WHERE userid = :userid OR shared = 1 $insql ORDER BY $titlesql" | 1 |
|
"SELECT ctx.id FROM {block_rss_client} brc JOIN {user} u ON brc.userid = u.id JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel WHERE brc.userid = :userid" | 1 |
|
"SELECT userid FROM {block_rss_client} WHERE userid = ?" | 1 |
|
'Show channel image if available :' | 1 |
|
'Update a news feed URL:' | 1 |
|
" SELECT * FROM {block_rss_client} WHERE id $in_sql" | 1 |
|
"SELECT contextid FROM {comments} WHERE component = :component AND userid = :userid" | 1 |
|
"SELECT m.name FROM {modules} m JOIN {course_modules} cm on cm.module = m.id WHERE cm.id = ?" | 1 |
|
" SELECT f.id FROM {customfield_field} f JOIN {customfield_category} c ON c.id = f.categoryid WHERE f.shortname = :shortname AND c.component = 'core_course' AND c.area = 'course' " | 1 |
|
'Show all courses' | 1 |
|
'Show all courses except courses removed from view' | 1 |
|
'Show {$a} courses' | 1 |
|
'Show starred courses only' | 1 |
|
'Show future courses' | 1 |
|
'Show courses in progress' | 1 |
|
'Show past courses' | 1 |
|
'Show courses removed from view' | 1 |
|
'Show background colouring only' | 1 |
|
'Show both background colour and status icons' | 1 |
|
'Show count icons only' | 1 |
|
"SELECT c.instanceid, c.instanceid, $allusernames FROM {role_assignments} ra, {context} c, {user} u WHERE ra.userid = ? AND ra.contextid = c.id AND c.instanceid = u.id AND c.contextlevel = " . CONTEXT_USER | 1 |
|
" SELECT ctx.id FROM {context} ctx WHERE ctx.instanceid $insql AND ctx.contextlevel = :blocklevel" | 1 |
|
"SELECT userid FROM {user_preferences} WHERE name = :hidden OR name = :docked" | 1 |
|
" SELECT bi.id, h.value AS prefhidden, d.value AS prefdocked FROM {block_instances} bi LEFT JOIN {user_preferences} h ON h.userid = :userid1 AND h.name = $hiddenkey LEFT JOIN {user_preferences} d ON d.userid = :userid2 AND d.name = $dockedkey WHERE bi.id $insql AND (h.id IS NOT NULL OR d.id IS NOT NULL)" | 1 |
|
"SELECT c.id FROM {block_instances} b INNER JOIN {context} c ON c.instanceid = b.id AND c.contextlevel = :contextblock INNER JOIN {context} bpc ON bpc.id = b.parentcontextid WHERE b.blockname = 'html' AND bpc.contextlevel = :contextuser AND bpc.instanceid = :userid" | 1 |
|
"SELECT bpc.instanceid AS userid FROM {block_instances} bi JOIN {context} bpc ON bpc.id = bi.parentcontextid WHERE bi.blockname = 'html' AND bpc.contextlevel = :contextuser AND bi.id = :blockinstanceid" | 1 |
|
"SELECT t.id, $fieldslist FROM {" . $this->tablename . "} t JOIN {backup_ids_temp} b ON b.newitemid = t.id WHERE b.backupid = ? AND b.itemname = ? AND t.blockname = 'html'" | 1 |
|
'Select tag collection to display tags from. If you choose "Any" ' . 'the tags from all collections except for those marked with * will be displayed' | 1 |
|
"SELECT t.id, t.isstandard, t.rawname, t.name, COUNT(DISTINCT ti.id) AS ct FROM {tag} t, {tag_instance} ti, {post} p, {blog_association} ba WHERE t.id = ti.tagid AND p.id = ti.itemid $type AND ti.itemtype = 'post' AND ti.component = 'core' AND ti.timemodified > $timewithin" | 1 |
|
'SELECT id, itemname FROM {grade_items} WHERE courseid = ? and itemtype = ? and (gradetype = ? or gradetype = ?)' | 1 |
|
'SELECT * FROM {grade_grades} WHERE itemid = ? AND finalgrade is not NULL ORDER BY finalgrade, timemodified DESC' | 1 |
|
' SELECT gm.id, gm.userid, gm.groupid, g.name FROM {groups} g LEFT JOIN {groups_members} gm ON g.id = gm.groupid WHERE gm.userid ' . $usertest . ' AND g.courseid = ?' | 1 |
|
'SELECT DISTINCT userid, 1 FROM {groups_members} WHERE groupid ' . $grouptest | 1 |
|
'Show groups instead of students (only if the activity supports groups)?' | 1 |
|
'Show groups instead of students by default (only if the activity supports groups)' | 1 |
|
"SELECT id, concept, definition, definitionformat, definitiontrust FROM {glossary_entries} WHERE glossaryid = ? AND approved = 1 ORDER BY $orderby" | 1 |
|
"SELECT cm.id, cm.visible AS uservisible FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module JOIN {glossary} g ON g.id = cm.instance WHERE g.id = :instance AND md.name = :modulename AND g.globalglossary = 1" | 1 |
|
'Show concept (heading) for each entry' | 1 |
|
"SELECT id FROM {glossary} " . "WHERE id = ? AND (course = ? OR globalglossary = 1)" | 1 |
|
"SELECT rai.* FROM {block_recentlyaccesseditems} rai JOIN {course} c ON c.id = rai.courseid WHERE userid = :userid ORDER BY rai.timeaccess DESC" | 1 |
|
"SELECT c.id FROM {context} c JOIN {block_recentlyaccesseditems} b ON b.userid = c.instanceid WHERE c.instanceid = :userid AND c.contextlevel = :contextuser" | 1 |
|
"SELECT ra.id, c.fullname, ra.timeaccess, m.name, ra.cmid FROM {block_recentlyaccesseditems} ra JOIN {course} c ON c.id = ra.courseid JOIN {course_modules} cm on cm.id = ra.cmid JOIN {modules} m ON m.id = cm.module WHERE ra.userid = :userid" | 1 |
|
'Show more items' | 1 |
|
'Show more activities' | 1 |
|
'Show more courses' | 1 |
|
"SELECT parentcontextid, subpagepattern FROM {block_instances} WHERE pagetypepattern = 'my-index' AND blockname = 'myoverview' AND parentcontextid != ?" | 1 |
|
"SELECT parentcontextid, subpagepattern FROM {block_instances} WHERE pagetypepattern = 'my-index' AND parentcontextid != ?" | 1 |
|
"SELECT $userfields $lastaccess $uservisibility FROM {user} u $groupmembers LEFT JOIN {user_preferences} up ON up.userid = u.id AND up.name = :name WHERE u.lastaccess > :timefrom AND u.lastaccess <= :now AND u.deleted = 0 $uservisibilityselect $groupselect $groupby ORDER BY lastaccess DESC " | 1 |
|
"SELECT COUNT(u.id) FROM {user} u $groupmembers LEFT JOIN {user_preferences} up ON up.userid = u.id AND up.name = :name WHERE u.lastaccess > :timefrom AND u.lastaccess <= :now AND u.deleted = 0 $uservisibilityselect $groupselect" | 1 |
|
"SELECT $userfields $timeaccess $uservisibility FROM {user_lastaccess} ul $groupmembers, {user} u JOIN ($esqljoin) euj ON euj.id = u.id LEFT JOIN {user_preferences} up ON up.userid = u.id AND up.name = :name WHERE ul.timeaccess > :timefrom AND u.id = ul.userid AND ul.courseid = :courseid AND ul.timeaccess <= :now AND u.deleted = 0 $uservisibilityselect $groupselect $groupby ORDER BY lastaccess DESC" | 1 |
|
"SELECT COUNT(u.id) FROM {user_lastaccess} ul $groupmembers, {user} u JOIN ($esqljoin) euj ON euj.id = u.id LEFT JOIN {user_preferences} up ON up.userid = u.id AND up.name = :name WHERE ul.timeaccess > :timefrom AND u.id = ul.userid AND ul.courseid = :courseid AND ul.timeaccess <= :now AND u.deleted = 0 $uservisibilityselect $groupselect" | 1 |
|
'Show my online status to other users' | 1 |
|
" SELECT DISTINCT h.id, h.name, h.wwwroot, a.name as application, a.display_name FROM {mnet_host} h, {mnet_application} a, {mnet_host2service} h2s_IDP, {mnet_service} s_IDP, {mnet_host2service} h2s_SP, {mnet_service} s_SP WHERE h.id <> ? AND h.id <> ? AND h.id = h2s_IDP.hostid AND h.deleted = 0 AND h.applicationid = a.id AND h2s_IDP.serviceid = s_IDP.id AND s_IDP.name = 'sso_idp' AND h2s_IDP.publish = '1' AND h.id = h2s_SP.hostid AND h2s_SP.serviceid = s_SP.id AND s_SP.name = 'sso_idp' AND h2s_SP.publish = '1' ORDER BY a.display_name, h.name" | 1 |
|
"SELECT i.*, r.type AS repositorytype, r.sortorder, r.visible FROM {repository} r, {repository_instances} i WHERE i.typeid = r.id and i.id = ?" | 1 |
|
"SELECT i.*, r.type AS repositorytype, r.visible, r.sortorder FROM {repository_instances} i JOIN {repository} r ON r.id = i.typeid WHERE i.id = ?" | 1 |
|
"SELECT i.*, r.type AS repositorytype, r.sortorder, r.visible FROM {repository} r, {repository_instances} i WHERE i.typeid = r.id " | 1 |
|
"SELECT count('x') FROM {repository_instances} i, {repository} r WHERE r.type=:plugin AND r.id=i.typeid AND i.name=:name AND i.contextid=:contextid" | 1 |
|
'SELECT i.name, i.typeid, r.type, i.contextid FROM {repository} r, {repository_instances} i ' . 'WHERE i.id=? AND i.typeid=r.id' | 1 |
|
"SELECT c.id FROM {repository_instances} ri JOIN {context} c ON c.instanceid = ri.userid AND c.contextlevel = :contextuser WHERE ri.userid = :userid GROUP BY c.id" | 1 |
|
"SELECT userid FROM {repository_instances} WHERE userid = ?" | 1 |
|
"SELECT DISTINCT ri.id as id, r.type as type, ri.name as name, ri.timecreated as timecreated, ri.timemodified as timemodified FROM {repository_instances} ri JOIN {repository} r ON r.id = ri.typeid WHERE ri.userid = :userid" | 1 |
|
"SELECT c.id FROM {repository_onedrive_access} roa JOIN {context} c ON c.instanceid = roa.usermodified AND c.contextlevel = :contextuser WHERE roa.usermodified = :userid GROUP BY c.id" | 1 |
|
"SELECT usermodified AS userid FROM {repository_onedrive_access} WHERE usermodified = ?" | 1 |
|
"SELECT roa.id as id, roa.itemid as itemid, roa.permissionid as permissionid, roa.timecreated as timecreated, roa.timemodified as timemodified FROM {repository_onedrive_access} roa WHERE roa.usermodified = :userid" | 1 |
|
"SELECT roa.id FROM {repository_onedrive_access} roa JOIN {context} c ON c.instanceid = roa.usermodified AND c.contextlevel = :contextuser AND c.id = :contextid WHERE roa.usermodified {$insql}" | 1 |
|
'Select the OAuth 2 service that is configured to talk to the OneDrive API. If the service does not exist yet, you will need to create it.' | 1 |
|
'Select a subdirectory' | 1 |
|
'SELECT id FROM {files_reference} WHERE reference = :reference AND referencehash = :hash AND repositoryid = :repoid' | 1 |
|
'SELECT id FROM {files_reference} WHERE reference = :newreference AND referencehash = :newhash AND repositoryid = :repoid' | 1 |
|
'UPDATE {files} SET referencefileid = :refid WHERE referencefileid = :existingrefid' | 1 |
|
'UPDATE {files_reference} SET reference = :newreference, referencehash = :newhash WHERE id = :refid' | 1 |
|
'Select the OAuth 2 service that is configured to talk to the Dropbox API. If the service doesn\'t exist yet, you will need to create it.' | 1 |
|
'Select the OAuth 2 service that is configured to talk to the Google Drive API. If the service does not exist yet, you will need to create it.' | 1 |
|
"SELECT files1.id, files1.contextid, files1.component, files1.filearea, files1.itemid, files1.filepath, files1.filename, files1.pathnamehash FROM {files} files1 JOIN ( SELECT contenthash, filename, MAX(id) AS id FROM {files} WHERE userid = :userid AND referencefileid is NULL AND filename != :filename AND ((filearea = :filearea1 AND itemid = :itemid) OR filearea != :filearea2) $timelimitsql GROUP BY contenthash, filename ) files2 ON files1.id = files2.id ORDER BY files1.timemodified DESC" | 1 |
|
"SELECT l.*, u.firstname, u.lastname, u.picture FROM {mnet_log} l LEFT JOIN {user} u ON l.userid = u.id WHERE " | 1 |
|
"SELECT COUNT('x') FROM {mnet_log} l WHERE $where" | 1 |
|
'SELECT section from {course_sections} WHERE course = ?' | 1 |
|
'SELECT id from {course} WHERE idnumber = ? AND id <> ?' | 1 |
|
"SELECT DISTINCT ue.userid, e.courseid FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid JOIN {course} c ON c.id = e.courseid " | 1 |
|
"SELECT COUNT(*) FROM ($sql) total" | 1 |
|
'SELECT COUNT(*) FROM ( SELECT cm.course, cm.module FROM {course} c, {course_modules} cm WHERE c.id = cm.course AND c.id <> :siteid AND cm.visible = 1 AND c.visible = 1) total' | 1 |
|
'SELECT sortorder FROM {course} WHERE category = :categoryid ORDER BY sortorder' | 1 |
|
'UPDATE {course} SET sortorder = sortorder + 1 WHERE category = :categoryid AND id <> :id' | 1 |
|
'UPDATE {course} SET sortorder = sortorder + 1 WHERE category = :categoryid AND sortorder > :sortorder' | 1 |
|
"SELECT cm.id AS cmid, c.id AS courseid, $ctxselect FROM {course_modules} cm JOIN {tag_instance} tt ON cm.id = tt.itemid JOIN {course} c ON cm.course = c.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component AND cm.deletioninprogress = 0 AND c.id %COURSEFILTER% AND cm.id %ITEMFILTER%" | 1 |
|
" SELECT f.id FROM {customfield_field} f JOIN {customfield_category} cat ON cat.id = f.categoryid WHERE f.shortname = ? AND cat.component = 'core_course' AND cat.area = 'course' " | 1 |
|
" SELECT c.id FROM {course} c LEFT JOIN {customfield_data} cd ON cd.instanceid = c.id AND cd.fieldid = :fieldid WHERE c.id $csql AND (cd.value IS NULL OR $comparevalue = '' OR $comparevalue = '0') " | 1 |
|
"SELECT $coursefields, $ctxfields FROM {course} c JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = c.id JOIN {user_lastaccess} ul ON ul.courseid = c.id $favsql LEFT JOIN {enrol} eg ON eg.courseid = c.id AND eg.status = :statusenrolg AND eg.enrol = :guestenrol WHERE ul.userid = :userid AND c.visible = :visible AND (eg.id IS NOT NULL OR EXISTS (SELECT e.id FROM {enrol} e JOIN {user_enrolments} ue ON ue.enrolid = e.id WHERE e.courseid = c.id AND e.status = :statusenrol AND ue.status = :status AND ue.userid = :userid2 AND ue.timestart < :now1 AND (ue.timeend = 0 OR ue.timeend > :now2) )) ORDER BY $sort" | 1 |
|
" SELECT DISTINCT cc.id FROM {course} c JOIN {course_categories} cc ON cc.id = c.category WHERE c.id $listsql" | 1 |
|
"SELECT cc.*, {$catcontextsql} FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid" | 1 |
|
"SELECT cc.id, cc.parent, cc.visible FROM {course_categories} cc ORDER BY cc.sortorder" | 1 |
|
"SELECT cc." . join(',cc.', $fields) . ", $ctxselect FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid AND ctx.contextlevel = :contextcoursecat WHERE " . $whereclause . " ORDER BY cc.sortorder" | 1 |
|
"SELECT ctx.instanceid FROM {context} ctx WHERE ctx.path LIKE ? AND ctx.contextlevel = ?" | 1 |
|
"SELECT ra.contextid, ra.id AS raid, r.id AS roleid, r.name AS rolename, r.shortname AS roleshortname, rn.name AS rolecoursealias, u.id, u.username, $allnames FROM {role_assignments} ra JOIN {user} u ON ra.userid = u.id JOIN {role} r ON ra.roleid = r.id LEFT JOIN {role_names} rn ON (rn.contextid = ra.contextid AND rn.roleid = r.id) WHERE ra.contextid " . $sql1 . " AND ra.roleid " . $sql2 . " AND u.deleted = :notdeleted ORDER BY r.sortorder, $sort" | 1 |
|
"SELECT DISTINCT e.courseid, ue.userid FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE ue.status = :active AND e.status = :enabled AND ue.timestart < :now1 AND (ue.timeend = 0 OR ue.timeend > :now2)" | 1 |
|
"SELECT " . join(',', $fields) . ", $ctxselect FROM {course} c JOIN {context} ctx ON c.id = ctx.instanceid AND ctx.contextlevel = :contextcourse WHERE " . $whereclause . " ORDER BY c.sortorder" | 1 |
|
"SELECT $ctxselect FROM {context} ctx WHERE ctx.contextlevel = :contextcoursecat AND ctx.instanceid " . $sql | 1 |
|
"SELECT ctx.instanceid AS categoryid, $fields FROM {context} ctx WHERE contextlevel = :contextlevel ORDER BY depth ASC" | 1 |
|
"select 1 from {course} where category = ?" | 1 |
|
'SELECT c.id, c.visible, ' . $sql . ' FROM {context} ctx ' . ' JOIN {course_categories} c ON c.id = ctx.instanceid' . ' WHERE ctx.path like ? AND ctx.contextlevel = ?' | 1 |
|
'SELECT ctx.instanceid AS courseid, ' . $sql . ' FROM {context} ctx ' . 'WHERE ctx.path like :pathmask and ctx.contextlevel = :courselevel' | 1 |
|
"SELECT cc.id, cc.sortorder, cc.name, cc.visible, cc.parent, cc.path, $ctxselect FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid AND ctx.contextlevel = :contextcoursecat ORDER BY cc.sortorder" | 1 |
|
"SELECT ctx.instanceid AS id, $ctxselect FROM {context} ctx WHERE ctx.contextlevel = :contextcoursecat" | 1 |
|
"SELECT c.id, c.sortorder, c.{$field}, $ctxfields FROM {course} c LEFT JOIN {context} ctx ON ctx.instanceid = c.id WHERE ctx.contextlevel = :ctxlevel AND c.category = :categoryid" | 1 |
|
" SELECT cc." . join(',cc.', $fields) . ", $ctxselect FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid AND ctx.contextlevel = :contextcoursecat1 JOIN {role_assignments} ra ON ra.contextid = ctx.id WHERE ctx.path LIKE :parentpath1 AND ra.userid = :userid1 UNION SELECT cc." . join(',cc.', $fields) . ", $ctxselect FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid AND ctx.contextlevel = :contextcoursecat2 JOIN {role_capabilities} rc ON rc.contextid = ctx.id JOIN {role_assignments} rc_ra ON rc_ra.roleid = rc.roleid JOIN {context} rc_ra_ctx ON rc_ra_ctx.id = rc_ra.contextid WHERE ctx.path LIKE :parentpath2 AND rc_ra.userid = :userid2 AND (ctx.path = rc_ra_ctx.path OR ctx.path LIKE " . $DB->sql_concat("rc_ra_ctx.path", "'/%'") . ") " | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {course} c ON ctx.instanceid = c.id AND ctx.contextlevel = :contextcourse {$join} WHERE {$where}" | 1 |
|
"SELECT c.* FROM {course} c JOIN {context} ctx ON c.id = ctx.instanceid AND ctx.contextlevel = :contextcourse WHERE ctx.id $select" | 1 |
|
" SELECT grs.*, grms.userid FROM {groups} grs JOIN {groups_members} grms ON grms.groupid = grs.id" | 1 |
|
'SELECT ra.roleid, COUNT(ra.id) AS rolecount FROM {role_assignments} ra WHERE ra.contextid = :contextid GROUP BY ra.roleid' | 1 |
|
"SELECT c.id FROM {course} c WHERE c.id {$where} AND c.category <> :categoryid" | 1 |
|
"SELECT c.id, c.category FROM {course} c WHERE c.id {$where}" | 1 |
|
"SELECT c.id, c.visible FROM {course} c WHERE c.category = :category" | 1 |
|
"SELECT c.id, c.visible FROM {course_categories} c WHERE " . $select | 1 |
|
" SELECT cs.id, cs.course, cs.section, cs.name, cs.summary, cs.summaryformat, cs.timemodified FROM {course_sections} cs JOIN {course} c ON c.id = cs.course $contextjoin WHERE cs.timemodified >= ? AND (cs.name != ? OR $comparetext != ?) ORDER BY cs.timemodified ASC" | 1 |
|
" SELECT c.* FROM {course} c $contextjoin WHERE c.timemodified >= ? ORDER BY c.timemodified ASC" | 1 |
|
"SELECT d.* FROM {customfield_data} d JOIN {course} c ON c.id = d.instanceid JOIN {context} cnt ON cnt.instanceid = c.id $contextjoin WHERE d.timemodified >= :modifiedfrom AND cnt.contextlevel = :contextlevel AND d.fieldid $fieldsql ORDER BY d.timemodified ASC" | 1 |
|
' SELECT c.* FROM {course} c JOIN {customfield_data} d ON d.instanceid = c.id WHERE d.id = :dataid' | 1 |
|
'UPDATE ' . $CFG->phpunit_prefix . 'course_sections SET' | 1 |
|
'SELECT COUNT(q.id) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = ?' | 1 |
|
'select Option 1' | 1 |
|
'select Option 2' | 1 |
|
'select no select' | 1 |
|
'Select field' | 1 |
|
'SELECT max(id) from {course_categories}' | 1 |
|
'SELECT count(*) FROM {course_categories} WHERE id > ?' | 1 |
|
'SELECT max(id) FROM {course_categories}' | 1 |
|
'SELECT count(*) FROM {course} WHERE id <> ?' | 1 |
|
'SELECT id, category from {course} where id <> ?' | 1 |
|
'Show section link' | 1 |
|
'UPDATE {course_sections} SET timemodified = section' | 1 |
|
"SELECT c.id, c.format, c.startdate, c.enddate, MAX(s.section) AS lastsection FROM {course} c JOIN {course_sections} s ON s.course = c.id WHERE c.format = :format AND c.id = :courseid GROUP BY c.id, c.format, c.startdate, c.enddate" | 1 |
|
"SELECT co.id, co.format, co.startdate, co.enddate, co.lastsection, fo.value AS automaticenddate FROM ($insql) co LEFT JOIN {course_format_options} fo ON fo.courseid = co.id AND fo.format = co.format AND fo.name = :optionname AND fo.sectionid = 0" | 1 |
|
'SELECT max(section) from {course_sections} WHERE course = ?' . $delegtadefilter | 1 |
|
<<<EOF UPDATE {course_sections} SET name = $newsectionname WHERE section > 0 AND (name IS NULL OR name = '') AND course IN (SELECT id FROM {course} WHERE format = 'topics') EOF | 1 |
|
"SELECT r.id, r.rating, r.itemid, r.userid, r.timemodified, r.component, r.ratingarea, $userfields FROM {rating} r LEFT JOIN {user} u ON r.userid = u.id WHERE r.contextid = :contextid AND r.itemid = :itemid AND r.component = :component AND r.ratingarea = :ratingarea {$sortclause}" | 1 |
|
"SELECT r.id, r.itemid, r.userid, r.scaleid, r.rating AS usersrating FROM {rating} r WHERE r.userid = :userid AND r.contextid = :contextid AND r.itemid {$itemidtest} AND r.component = :component AND r.ratingarea = :ratingarea ORDER BY r.itemid" | 1 |
|
"SELECT r.itemid, {$aggregatestr}({$aggregatefield}) AS aggrrating, COUNT(r.rating) AS numratings FROM {rating} r WHERE r.contextid = :contextid AND r.itemid {$itemidtest} AND r.component = :component AND r.ratingarea = :ratingarea GROUP BY r.itemid, r.component, r.ratingarea, r.contextid ORDER BY r.itemid" | 1 |
|
"SELECT cm.* $ctxselect FROM {course_modules} cm LEFT JOIN {modules} mo ON mo.id = cm.module LEFT JOIN {{$modulename}} m ON m.id = cm.instance $ctxjoin WHERE mo.name=:modulename AND m.id=:moduleid" | 1 |
|
"SELECT u.id as id, u.id AS userid, {$aggregationstring}({$aggregationfield}) AS rawgrade FROM {user} u LEFT JOIN {{$itemtable}} i ON u.id=i.{$itemtableusercolumn} LEFT JOIN {rating} r ON r.itemid=i.id WHERE r.contextid = :contextid AND r.component = :component AND r.ratingarea = :ratingarea $singleuserwhere GROUP BY u.id" | 1 |
|
"SELECT {$alias}.userid FROM {rating} {$alias} WHERE {$alias}.component = :{$alias}component AND {$alias}.ratingarea = :{$alias}ratingarea AND {$alias}.itemid IN ({$insql})" | 1 |
|
"SELECT ctx.instanceid, " . context_helper::get_preload_record_columns_sql('ctx') . " FROM {context} ctx WHERE ctx.contextlevel = ? AND ctx.instanceid $insql" | 1 |
|
"SELECT * FROM {event_subscriptions} WHERE " . implode(' OR ', $searches) | 1 |
|
"UPDATE {event} SET $sqlset WHERE repeatid = ?" | 1 |
|
"SELECT id from {event} where repeatid = ? order by id ASC" | 1 |
|
"UPDATE {event} SET repeatid = ? WHERE repeatid = ?" | 1 |
|
"SELECT e.* FROM {event} e LEFT JOIN {modules} m ON e.modulename = m.name -- Non visible modules will have a value of 0. WHERE (m.visible = 1 OR m.visible IS NULL) AND $whereclause ORDER BY e.timestart" | 1 |
|
"SELECT c.id, " . context_helper::get_preload_record_columns_sql('ctx') . " FROM {course} c JOIN {context} ctx ON ctx.contextlevel = ? AND ctx.instanceid = c.id WHERE c.id IN ( SELECT DISTINCT courseid FROM {groups} )" | 1 |
|
"SELECT c.id, " . context_helper::get_preload_record_columns_sql('ctx') . " FROM {course} c JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = c.id WHERE c.id $insql AND c.id IN (SELECT DISTINCT courseid FROM {groups})" | 1 |
|
"SELECT c.id, " . context_helper::get_preload_record_columns_sql('ctx') . " FROM {course} c JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = c.id WHERE c.id $insql" | 1 |
|
'Delete comeplete series if repeated event' | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {event} e ON (e.eventtype = 'site' AND ctx.contextlevel = :sitecontext) OR (e.categoryid = ctx.instanceid AND e.eventtype = 'category' AND ctx.contextlevel = :categorycontext) OR (e.courseid = ctx.instanceid AND e.eventtype = 'course' AND ctx.contextlevel = :coursecontext) OR (e.courseid = ctx.instanceid AND e.eventtype = 'group' AND ctx.contextlevel = :groupcontext) OR (e.userid = ctx.instanceid AND e.eventtype = 'user' AND ctx.contextlevel = :usercontext) WHERE e.userid = :cuserid" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid AND ctx.contextlevel = :modulecontext JOIN {modules} m ON m.id = cm.module JOIN {event} e ON e.modulename = m.name AND e.courseid = cm.course AND e.instance = cm.instance WHERE e.userid = :muserid" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {event_subscriptions} s ON (s.eventtype = 'site' AND ctx.contextlevel = :sitecontext) OR (s.categoryid = ctx.instanceid AND s.eventtype = 'category' AND ctx.contextlevel = :categorycontext) OR (s.courseid = ctx.instanceid AND s.eventtype = 'course' AND ctx.contextlevel = :coursecontext) OR (s.courseid = ctx.instanceid AND s.eventtype = 'group' AND ctx.contextlevel = :groupcontext) OR (s.userid = ctx.instanceid AND s.eventtype = 'user' AND ctx.contextlevel = :usercontext) WHERE s.userid = :userid" | 1 |
|
"SELECT e.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module JOIN {event} e ON e.modulename = m.name AND e.courseid = cm.course AND e.instance = cm.instance WHERE cm.id = :cmid" | 1 |
|
"SELECT userid FROM {event} WHERE eventtype = 'site'" | 1 |
|
"SELECT userid FROM {event_subscriptions} WHERE eventtype = 'site'" | 1 |
|
"SELECT userid FROM {event} WHERE eventtype $eventtypesql AND $eventfield = :instanceid" | 1 |
|
"SELECT userid FROM {event_subscriptions} WHERE eventtype $eventtypesql AND $eventfield = :instanceid" | 1 |
|
"SELECT DISTINCT e.id AS eventid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module JOIN {event} e ON e.modulename = m.name AND e.courseid = cm.course AND e.instance = cm.instance WHERE cm.id = :cmid $whereusersql" | 1 |
|
"SELECT DISTINCT e.id AS eventid FROM {event} e WHERE e.eventtype = 'site' $whereusersql" | 1 |
|
"SELECT DISTINCT e.id AS eventid FROM {event} e WHERE e.eventtype $eventtypesql AND e.{$eventfield} = :instanceid $whereusersql" | 1 |
|
"SELECT DISTINCT s.id AS subscriptionid FROM {event_subscriptions} s WHERE s.eventtype = 'site' $whereusersql" | 1 |
|
"SELECT DISTINCT s.id AS subscriptionid FROM {event_subscriptions} s WHERE s.eventtype $eventtypesql AND s.{$eventfield} = :instanceid $whereusersql" | 1 |
|
"SELECT ctxid as contextid, details.id as eventid, details.name as name, details.description as description, details.location as location, details.eventtype as eventtype, details.timestart as timestart, details.timeduration as timeduration FROM ( SELECT e.id AS id, ctx.id AS ctxid FROM {context} ctx INNER JOIN {event} e ON (e.eventtype = 'site' AND ctx.contextlevel = :sitecontext) OR (e.categoryid = ctx.instanceid AND e.eventtype = 'category' AND ctx.contextlevel = :categorycontext) OR (e.courseid = ctx.instanceid AND e.eventtype = 'course' AND ctx.contextlevel = :coursecontext) OR (e.courseid = ctx.instanceid AND e.eventtype = 'group' AND ctx.contextlevel = :groupcontext) OR (e.userid = ctx.instanceid AND e.eventtype = 'user' AND ctx.contextlevel = :usercontext) WHERE e.userid = :cuserid AND ctx.id {$contextsql1} UNION SELECT e.id AS id, ctx.id AS ctxid FROM {context} ctx INNER JOIN {course_modules} cm ON cm.id = ctx.instanceid AND ctx.contextlevel = :modulecontext INNER JOIN {modules} m ON m.id = cm.module INNER JOIN {event} e ON e.modulename = m.name AND e.courseid = cm.course AND e.instance = cm.instance WHERE e.userid = :muserid AND ctx.id {$contextsql2} ) ids JOIN {event} details ON details.id = ids.id ORDER BY ids.id" | 1 |
|
"SELECT DISTINCT c.id as contextid, s.id as subscriptionid, s.name as name, s.url as url, s.eventtype as eventtype FROM {context} c INNER JOIN {event_subscriptions} s ON (s.eventtype = 'site' AND c.contextlevel = :sitecontext) OR (s.categoryid = c.instanceid AND s.eventtype = 'category' AND c.contextlevel = :categorycontext) OR (s.courseid = c.instanceid AND s.eventtype = 'course' AND c.contextlevel = :coursecontext) OR (s.courseid = c.instanceid AND s.eventtype = 'group' AND c.contextlevel = :groupcontext) OR (s.userid = c.instanceid AND s.eventtype = 'user' AND c.contextlevel = :usercontext) WHERE s.userid = :userid AND c.id {$contextsql}" | 1 |
|
"SELECT c.id FROM {course} c WHERE c.id NOT IN ( SELECT DISTINCT courseid FROM {groups} )" | 1 |
|
"SELECT * FROM {user} WHERE id $insqlusers" | 1 |
|
"SELECT modulename, instance, eventtype, priority FROM {event} ev WHERE " | 1 |
|
"SELECT ev.modulename, ev.instance, ev.eventtype, MIN(ev.priority) as priority FROM $subqueryunion ev GROUP BY ev.modulename, ev.instance, ev.eventtype" | 1 |
|
"SELECT e.*, c.fullname AS coursefullname, c.shortname AS courseshortname FROM {event} e INNER JOIN ($subquery) fe ON e.modulename = fe.modulename AND e.instance = fe.instance AND e.eventtype = fe.eventtype AND (e.priority = fe.priority OR (e.priority IS NULL AND fe.priority IS NULL)) LEFT JOIN {modules} m ON e.modulename = m.name LEFT JOIN {course} c ON c.id = e.courseid WHERE (m.visible = 1 OR m.visible IS NULL) AND $whereclause ORDER BY " . ($ordersql ? $ordersql : "e.timestart") | 1 |
|
"SELECT * FROM {course} WHERE id {$idsql}" | 1 |
|
"SELECT * FROM {groups} WHERE id {$idsql}" | 1 |
|
"SELECT * FROM {" . $modulename . "} WHERE id {$idsql}" | 1 |
|
" SELECT {$fields} FROM {context} ctx WHERE ctx.id = :fieldvalue" | 1 |
|
" SELECT {$fields} FROM {context} ctx JOIN ({$sql}) target ON ctx.id = target.{$fieldname}" | 1 |
|
" SELECT {$fields} FROM {context} ctx WHERE ctx.id IN ({$sql})" | 1 |
|
"SELECT DISTINCT ctx.id FROM {context} ctx WHERE ctx.contextlevel = :contextlevel AND ctx.instanceid = :instanceid" | 1 |
|
"SELECT DISTINCT ctx.id FROM {context} ctx WHERE ctx.contextlevel = :contextlevel AND ctx.instanceid $useridsql" | 1 |
|
" SELECT DISTINCT u.id FROM {user} u JOIN ({$sql}) target ON u.id = target.{$fieldname}" | 1 |
|
"SELECT DISTINCT u.id FROM {user} u WHERE u.id {$useridsql}" | 1 |
|
"SELECT c.id FROM {context} c" | 1 |
|
'SELECT contextid FROM {foo}' | 1 |
|
'SELECT DISTINCT contextid FROM {foo}' | 1 |
|
'SELECT cx.id FROM {foo} JOIN {context} cx ON blahblahblah' | 1 |
|
'Select ctxid From {foo} Where bar = ?' | 1 |
|
'SELECT foo.contextid AS ctx FROM {bar} JOIN {foo} ON bar.id = foo.barid' | 1 |
|
'SELECT 2' | 1 |
|
'SELECT 3;' | 1 |
|
'SELECT 4 FROM users' | 1 |
|
'SELECT id FROM table WHERE id IN ( SELECT x FROM xtable UNION SELECT y FROM ( SELECT y FROM ytable JOIN ztable ON (z = y)))' | 1 |
|
'SELECT id FROM table UNION SELECT 1 FROM table' | 1 |
|
'SELECT 1 FROM table UNION SELECT id FROM table' | 1 |
|
'SELECT 1 UNION SELECT id FROM table' | 1 |
|
'SELECT 1+1' | 1 |
|
"SELECT c.id FROM {user} c" | 1 |
|
"SELECT c.id FROM {context} c WHERE c.id = :id" | 1 |
|
"SELECT d.* FROM {customfield_field} f JOIN {customfield_data} d ON (f.id = d.fieldid AND d.instanceid {$sqlinstances}) WHERE f.id {$sqlfields}" | 1 |
|
"SELECT $fields FROM {customfield_category} c LEFT JOIN {customfield_field} f ON c.id = f.categoryid AND f.type $sqlfields WHERE c.component = :component AND c.area = :area AND c.itemid = :itemid ORDER BY c.sortorder, f.sortorder" | 1 |
|
" SELECT f.* FROM {customfield_field} f JOIN {customfield_category} cat ON cat.id = f.categoryid WHERE cat.component = 'core_course' AND cat.area = 'course' ORDER BY f.name " | 1 |
|
'SELECT 1 FROM {customfield_field} f ' . 'JOIN {customfield_category} c ON c.id = f.categoryid ' . 'WHERE f.shortname = ? AND f.id <> ? AND c.component = ? AND c.area = ? AND c.itemid = ?' | 1 |
|
"SELECT d.contextid FROM {customfield_category} c JOIN {customfield_field} f ON f.categoryid = c.id JOIN {customfield_data} d ON d.fieldid = f.id AND d.instanceid $instanceidstest WHERE c.component = :cfcomponent AND c.area = :cfarea AND c.itemid $itemidstest" | 1 |
|
"SELECT c.contextid FROM {customfield_category} c WHERE c.component = :cfcomponent AND c.area = :cfarea AND c.itemid $itemidstest" | 1 |
|
"SELECT d.*, f.type AS fieldtype, f.name as fieldname, f.shortname as fieldshortname, c.itemid FROM {customfield_category} c JOIN {customfield_field} f ON f.categoryid = c.id JOIN {customfield_data} d ON d.fieldid = f.id AND d.instanceid $instanceidstest AND d.contextid $contextidstest WHERE c.component = :cfcomponent AND c.area = :cfarea AND c.itemid $itemidstest ORDER BY c.itemid, c.sortorder, f.sortorder" | 1 |
|
"SELECT d.id FROM {customfield_category} c JOIN {customfield_field} f ON f.categoryid = c.id JOIN {customfield_data} d ON d.fieldid = f.id AND d.instanceid $instanceidstest AND d.contextid $contextidstest WHERE c.component = :cfcomponent AND c.area = :cfarea AND c.itemid $itemidstest" | 1 |
|
"DELETE FROM {customfield_data} WHERE instanceid $instanceidstest AND contextid $contextidstest AND fieldid IN (SELECT f.id FROM {customfield_category} c JOIN {customfield_field} f ON f.categoryid = c.id WHERE c.component = :cfcomponent AND c.area = :cfarea AND c.itemid $itemidstest)" | 1 |
|
"SELECT c.id FROM {customfield_category} c WHERE c.component = :cfcomponent AND c.area = :cfarea AND c.itemid $itemidstest AND c.contextid $contextidstest" | 1 |
|
"SELECT c.id FROM {customfield_category} c JOIN {context} ctx ON ctx.id = c.contextid AND ctx.path LIKE :ctxpath WHERE c.component = :cfcomponent AND c.area = :cfarea" | 1 |
|
"SELECT d.id FROM {customfield_category} c JOIN {customfield_field} f ON f.categoryid = c.id JOIN {customfield_data} d ON d.fieldid = f.id JOIN {context} ctx ON ctx.id = d.contextid AND ctx.path LIKE :ctxpath WHERE c.component = :cfcomponent AND c.area = :cfarea" | 1 |
|
"DELETE FROM {customfield_data} WHERE fieldid IN (SELECT f.id FROM {customfield_category} c JOIN {customfield_field} f ON f.categoryid = c.id WHERE c.component = :cfcomponent AND c.area = :cfarea) AND contextid IN (SELECT id FROM {context} WHERE path LIKE :ctxpath)" | 1 |
|
"SELECT d.id FROM {customfield_data} d JOIN {customfield_field} f ON f.id = d.fieldid " . "WHERE f.categoryid $categoryidstest" | 1 |
|
'DELETE FROM {customfield_data} WHERE fieldid IN (' . $fieldsql . ')' | 1 |
|
"DELETE FROM {customfield_field} WHERE categoryid $categoryidstest" | 1 |
|
"DELETE FROM {customfield_category} WHERE id $categoryidstest" | 1 |
|
"SELECT ff.type, dd.contextid FROM {customfield_data} dd JOIN {customfield_field} ff ON ff.id = dd.fieldid WHERE dd.id $dataidstest GROUP BY ff.type, dd.contextid" | 1 |
|
"SELECT f.type, c.contextid FROM {customfield_field} f JOIN {customfield_category} c ON c.id = f.categoryid WHERE c.id $categoryidstest" | 1 |
|
'INSERT INTO ' . $this->_getTable( ) . ' (pgt_iou, pgt) VALUES (:pgt_iou, :pgt)' | 1 |
|
'SELECT pgt FROM ' . $this->_getTable( ) . ' WHERE pgt_iou = :pgt_iou' | 1 |
|
'DELETE FROM ' . $this->_getTable( ) . ' WHERE pgt_iou = :pgt_iou' | 1 |
|
'Select \'yes\' if you want to validate the server certificate' | 1 |
|
'Select language for authentication pages' | 1 |
|
'Select \'yes\' if you want to logout from CAS when you disconnect from Moodle' | 1 |
|
'Select \'yes\' if you want to have multi-authentication (CAS + other authentication)' | 1 |
|
'Select \'yes\' if you use CAS in proxy-mode' | 1 |
|
'SELECT COUNT(username) AS count, 1 FROM {tmp_extuser}' | 1 |
|
"SELECT u.* FROM {user} u LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid) WHERE u.auth = :auth AND u.deleted = 0 AND e.username IS NULL" | 1 |
|
"SELECT u.* FROM {user} u LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid) WHERE u.auth = :auth AND u.deleted = 0 AND u.suspended = 0 AND e.username IS NULL" | 1 |
|
"SELECT u.id, u.username FROM {user} u JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid) WHERE (u.auth = 'nologin' OR (u.auth = ? AND u.suspended = 1)) AND u.deleted = 0" | 1 |
|
'SELECT u.username, u.id FROM {user} u WHERE u.deleted = 0 AND u.auth = ? AND u.mnethostid = ?' | 1 |
|
'SELECT e.id, e.username FROM {tmp_extuser} e LEFT JOIN {user} u ON (e.username = u.username AND e.mnethostid = u.mnethostid) WHERE u.id IS NULL' | 1 |
|
'Select \'{$a->no}\' to disable expired password checking or \'{$a->ldapserver}\' to read the password expiry time directly from the LDAP server.' | 1 |
|
'Select yes to prevent passwords from being stored in Moodle\'s DB.' | 1 |
|
'Update user information (firstname, lastname, address..) from LDAP to Moodle. Specify "Data mapping" settings as you need.' | 1 |
|
'Select how users are stored in LDAP. This setting also specifies how login expiry, grace logins and user creation will work.' | 1 |
|
'SELECT userid, sessdata FROM {sessions} WHERE timemodified > ?' | 1 |
|
"DELETE FROM {" . self::TABLE . "} WHERE issuerid NOT IN (SELECT id FROM {" . \core\oauth2\issuer::TABLE . "})" | 1 |
|
"SELECT ctx.id FROM {auth_oauth2_linked_login} ao JOIN {context} ctx ON ctx.instanceid = ao.userid AND ctx.contextlevel = :contextlevel WHERE ao.userid = :userid" | 1 |
|
"SELECT userid FROM {auth_oauth2_linked_login} WHERE userid = ?" | 1 |
|
"SELECT ll.id, ll.username, ll.email, ll.timecreated, ll.timemodified, oi.name as issuername FROM {auth_oauth2_linked_login} ll JOIN {oauth2_issuer} oi ON oi.id = ll.issuerid WHERE ll.userid = :userid" | 1 |
|
"SELECT h.name AS hostname, h.wwwroot, h.id AS hostid, COUNT(c.id) AS count FROM {mnetservice_enrol_courses} c JOIN {mnetservice_enrol_enrolments} e ON (e.hostid = c.hostid AND e.remotecourseid = c.remoteid) JOIN {mnet_host} h ON h.id = c.hostid WHERE e.userid = ? AND c.hostid = ? GROUP BY h.name, h.wwwroot, h.id" | 1 |
|
"SELECT c.id, cc.name AS cat_name, cc.description AS cat_description FROM {course} c JOIN {course_categories} cc ON c.category = cc.id WHERE c.id IN (" . join(',', array_keys($courses)) . ')' | 1 |
|
"SELECT c.remoteid, c.id, c.categoryid AS cat_id, c.categoryname AS cat_name, c.sortorder, c.fullname, c.shortname, c.idnumber, c.summary, c.summaryformat, c.startdate, e.id AS enrolmentid FROM {mnetservice_enrol_courses} c LEFT JOIN {mnetservice_enrol_enrolments} e ON (e.hostid = c.hostid AND e.remotecourseid = c.remoteid AND e.userid = ?) WHERE c.hostid = ?" | 1 |
|
"SELECT DISTINCT h.id, h.wwwroot, h.name, a.sso_jump_url, a.name as application FROM {mnet_host} h JOIN {mnet_host2service} m ON h.id = m.hostid JOIN {mnet_service} s ON s.id = m.serviceid JOIN {mnet_application} a ON h.applicationid = a.id WHERE s.name = ? AND h.deleted = ? AND m.publish = ?" | 1 |
|
"SELECT ctx.id FROM {mnet_log} ml JOIN {context} ctx ON ctx.instanceid = ml.userid AND ctx.contextlevel = :contextlevel WHERE ml.userid = :userid" | 1 |
|
"SELECT userid FROM {mnet_log} WHERE userid = ?" | 1 |
|
"SELECT ml.id, mh.wwwroot, mh.name, ml.remoteid, ml.time, ml.userid, ml.ip, ml.course, ml.coursename, ml.module, ml.cmid, ml.action, ml.url, ml.info FROM {mnet_log} ml JOIN {mnet_host} mh ON mh.id = ml.hostid WHERE ml.userid = :userid ORDER BY mh.name, ml.coursename" | 1 |
|
"SELECT ctx.id FROM {auth_lti_linked_login} ll JOIN {context} ctx ON ctx.instanceid = ll.userid AND ctx.contextlevel = :contextlevel WHERE ll.userid = :userid" | 1 |
|
"SELECT userid FROM {auth_lti_linked_login} WHERE userid = ?" | 1 |
|
"SELECT * FROM {$this->config->table} WHERE {$this->config->fielduser} = '" . $this->ext_addslashes($extusername) . "'" | 1 |
|
"SELECT {$this->config->fieldpass} FROM {$this->config->table} WHERE {$this->config->fielduser} = '" . $this->ext_addslashes($extusername) . "'" | 1 |
|
"SELECT $select FROM {$this->config->table} WHERE {$this->config->fielduser} = '" . $this->ext_addslashes($extusername) . "'" | 1 |
|
"SELECT u.id, u.username FROM {user} u WHERE u.auth=:authtype AND u.deleted=0 AND u.mnethostid=:mnethostid $suspendselect" | 1 |
|
"SELECT u.id, u.username FROM {user} u WHERE u.auth=:authtype AND u.deleted=0 AND u.mnethostid=:mnethostid $suspendselect" | 1 |
|
"SELECT u.id, u.username, u.suspended FROM {user} u WHERE u.auth = :authtype AND u.deleted = 0 AND u.mnethostid = :mnethostid AND u.username {$in_sql}" | 1 |
|
"SELECT u.id, u.username FROM {user} u WHERE u.auth=:authtype AND u.deleted='0' AND mnethostid=:mnethostid $suspendselect" | 1 |
|
"SELECT * FROM {$this->config->table} WHERE {$this->config->fielduser} = '" . $this->ext_addslashes($extusername) . "' " | 1 |
|
"SELECT {$this->config->fielduser} FROM {$this->config->table} " | 1 |
|
"UPDATE {$this->config->table} SET " . implode(',', $update) . " WHERE {$this->config->fielduser} = ?" | 1 |
|
"SELECT * FROM {$this->config->table} WHERE {$this->config->fielduser} <> 'random_unlikely_username'" | 1 |
|
"SELECT * FROM {$auth->config->table}" | 1 |
|
"select * from table WHERE column=:1 AND anothercolumn > :0" | 1 |
|
"select * from table WHERE column=? AND anothercolumn > ?" | 1 |
|
'Update users' | 1 |
|
"SELECT g.id AS groupid, gg.groupingid, u.id AS userid, $allnames, u.idnumber, u.username FROM {groups} g LEFT JOIN {groupings_groups} gg ON g.id = gg.groupid LEFT JOIN {groups_members} gm ON g.id = gm.groupid LEFT JOIN {user} u ON gm.userid = u.id $userfieldsjoin WHERE g.courseid = :courseid $groupwhere $groupingwhere ORDER BY g.name, $sort" | 1 |
|
"SELECT u.id, $allnames, u.idnumber, u.username FROM {user} u JOIN ($esql) e ON e.id = u.id LEFT JOIN ( SELECT gm.userid FROM {groups_members} gm JOIN {groups} g ON g.id = gm.groupid WHERE g.courseid = :courseid ) grouped ON grouped.userid = u.id $userfieldsjoin WHERE grouped.userid IS NULL ORDER BY $sort" | 1 |
|
"SELECT id FROM {groups} WHERE id <> :groupid AND courseid = :courseid AND enrolmentkey = :key" | 1 |
|
"SELECT gm.id as gmid, gm.userid, g.* FROM {groups_members} gm INNER JOIN {groups} g ON gm.groupid = g.id WHERE g.courseid = :courseid" | 1 |
|
"SELECT id FROM {groups} g WHERE g.courseid = ?" | 1 |
|
"SELECT DISTINCT u.id, u.username, $allusernamefields, u.idnumber FROM {user} u JOIN ($esql) e ON e.id = u.id $sourcejoin $where ORDER BY $orderby" | 1 |
|
"SELECT r.id AS roleid, u.id AS userid, $fields FROM {groups_members} gm JOIN {user} u ON u.id = gm.userid LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.contextid $relatedctxsql) LEFT JOIN {role} r ON r.id = ra.roleid $joins WHERE gm.groupid=:mgroupid " . $extrawheretest . " ORDER BY r.sortorder, $sort" | 1 |
|
"SELECT ue.userid, ue.enrolid, e.courseid, g.id AS groupid, g.name AS groupname FROM {groups_members} gm JOIN {groups} g ON (g.id = gm.groupid) JOIN {enrol} e ON (e.enrol = :enrolname AND e.courseid = g.courseid $onecourse) JOIN {user_enrolments} ue ON (ue.userid = gm.userid AND ue.enrolid = e.id) WHERE gm.component=:component AND gm.itemid = e.id AND g.id <> e.{$gidfield}" | 1 |
|
"SELECT ue.userid, ue.enrolid, e.courseid, g.id AS groupid, g.name AS groupname FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = :enrolname $onecourse) JOIN {groups} g ON (g.courseid = e.courseid AND g.id = e.{$gidfield}) JOIN {user} u ON (u.id = ue.userid AND u.deleted = 0) LEFT JOIN {groups_members} gm ON (gm.groupid = g.id AND gm.userid = ue.userid) WHERE gm.id IS NULL" | 1 |
|
"SELECT * FROM {groups} g INNER JOIN {groupings_groups} gg " . "ON g.id = gg.groupid WHERE gg.groupingid = ? " . "ORDER BY groupid" | 1 |
|
"SELECT gm.id, gm.timeadded, gm.userid, g.name, gm.groupid FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE g.courseid = :courseid AND gm.component = :component AND gm.userid = :userid" | 1 |
|
"SELECT g.id FROM {groups} g JOIN {context} ctx ON g.courseid = ctx.instanceid AND ctx.contextlevel = :contextcourse WHERE ctx.id $contextsql" | 1 |
|
"SELECT gm.userid FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE g.courseid = :courseid AND gm.component = :component" | 1 |
|
"SELECT id FROM {groups} WHERE courseid = :courseid" | 1 |
|
"SELECT ctx.id FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id JOIN {context} ctx ON g.courseid = ctx.instanceid AND ctx.contextlevel = :contextcourse WHERE gm.userid = :userid AND gm.component = :component" | 1 |
|
" SELECT gr.*, grg.groupid FROM {groupings} gr JOIN {groupings_groups} grg ON grg.groupingid = gr.id" | 1 |
|
"SELECT gm.userid FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE g.courseid = ?" | 1 |
|
' SELECT r.contextid FROM {' . report::TABLE . '} r WHERE r.type = 0 AND (r.usercreated = ? OR r.usermodified = ? OR r.id IN ( SELECT a.reportid FROM {' . audience::TABLE . '} a WHERE a.usercreated = ? OR a.usermodified = ? UNION SELECT s.reportid FROM {' . schedule::TABLE . '} s WHERE s.usercreated = ? OR s.usermodified = ? ) )' | 1 |
|
'SELECT r.usercreated, r.usermodified FROM {' . report::TABLE . '} r WHERE ' . $select | 1 |
|
'SELECT a.usercreated, a.usermodified FROM {' . audience::TABLE . '} a JOIN {' . report::TABLE . '} r ON r.id = a.reportid WHERE ' . $select | 1 |
|
'SELECT s.usercreated, s.usermodified FROM {' . schedule::TABLE . '} s JOIN {' . report::TABLE . '} r ON r.id = s.reportid WHERE ' . $select | 1 |
|
"SELECT DISTINCT t.id, t.name, t.rawname FROM {tag} t {$taginstancejoin} ORDER BY t.name" | 1 |
|
<<<EOF SELECT 1 FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.component = :{$paramcomponent} AND ti.itemtype = :{$paramitemtype} AND ti.itemid = {$fieldsql} EOF | 1 |
|
"SELECT DISTINCT(u.id) FROM {user} u WHERE (" . implode(' OR ', $wheres) . ") AND u.deleted = 0 AND u.id = :{$paramuserid}" | 1 |
|
"SELECT rb.id FROM {reportbuilder_report} rb WHERE {$select}" | 1 |
|
'SELECT u.* FROM {user} u WHERE (' . implode(' OR ', $wheres) . ') AND u.deleted = 0 ORDER BY ' . $userorder | 1 |
|
' UPDATE {' . column::TABLE . '} SET columnorder = columnorder - 1 WHERE reportid = :reportid AND columnorder > :columnorder' | 1 |
|
' UPDATE {' . filter::TABLE . '} SET filterorder = filterorder - 1 WHERE reportid = :reportid AND filterorder > :filterorder AND iscondition = 1' | 1 |
|
' UPDATE {' . filter::TABLE . '} SET filterorder = filterorder - 1 WHERE reportid = :reportid AND filterorder > :filterorder AND iscondition = 0' | 1 |
|
" SELECT COUNT(1) FROM (SELECT {$fields} FROM {$from} WHERE {$wheresql} {$this->groupbysql} ) {$counttablealias}" | 1 |
|
"SELECT {$this->sql->fields} FROM {$this->sql->from} WHERE {$this->sql->where} {$this->groupbysql}" | 1 |
|
" SELECT r.* FROM {" . report::TABLE . "} r WHERE r.type = 0 AND {$where} ORDER BY r.name, r.id" | 1 |
|
"SELECT u.id FROM {user} u {$join} WHERE {$select}" | 1 |
|
'SELECT c.fullname FROM {course} c LEFT JOIN {tag_instance} ti ON ti.itemid = c.id LEFT JOIN {tag} t ON t.id = ti.tagid WHERE c.id != ' . SITEID | 1 |
|
'SELECT r.name FROM {reportbuilder_report} r' | 1 |
|
"SELECT {$usertablealias}.id AS {$userfieldalias} FROM {user} {$usertablealias} WHERE {$usertablealias}.id = :{$paramuserid} AND {$usertablealias}.deleted = :{$paramuserdeleted}" | 1 |
|
"SELECT :{$param0} AS field0, :{$param1} AS field1, :{$param10} AS field10" | 1 |
|
SELECT : | 1 |
|
"SELECT :{$param0} AS field0, :{$param1} AS field1, :{$param10} AS field10" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT c.id, c.contextid, c.itemid, c.component, c.commentarea, c.userid, c.content, $usernamefields, c.timecreated FROM {comments} c JOIN {user} u ON u.id=c.userid ORDER BY c.timecreated ASC" | 1 |
|
SELECT c.id, c.contextid, c.itemid, c.component, c.commentarea, c.userid, c.content, | 1 |
|
"SELECT $ufields, c.id AS cid, c.content AS ccontent, c.format AS cformat, c.timecreated AS ctimecreated FROM {comments} c JOIN {user} u ON u.id = c.userid WHERE c.contextid = :contextid AND c.commentarea = :commentarea AND c.itemid = :itemid AND $componentwhere ORDER BY c.timecreated $sortdirection, c.id $sortdirection" | 1 |
|
"SELECT c.id, c.content, c.format, c.timecreated, c.userid FROM {comments} c WHERE c.contextid = :contextid AND c.commentarea = :commentarea AND c.itemid = :itemid AND (c.component IS NULL OR c.component = :component)" | 1 |
|
"SELECT {$alias}.userid FROM {comments} {$alias} WHERE {$alias}.component = :{$alias}component AND {$alias}.commentarea = :{$alias}commentarea $contextsql $insql" | 1 |
|
"SELECT id FROM {context} WHERE id {$insql}" | 1 |
|
SELECT id FROM {context} WHERE id | 1 |
|
"SELECT p.userid FROM {payments} p WHERE component $notinsql" | 1 |
|
SELECT p.userid FROM {payments} p WHERE component | 1 |
|
"SELECT * FROM {payments} WHERE userid = :userid AND component $notinsql" | 1 |
|
SELECT * FROM {payments} WHERE userid = :userid AND component | 1 |
|
"SELECT id FROM {payments} WHERE component $notinsql" | 1 |
|
SELECT id FROM {payments} WHERE component | 1 |
|
"SELECT id FROM {payments} WHERE userid = :userid AND component $notinsql" | 1 |
|
SELECT id FROM {payments} WHERE userid = :userid AND component | 1 |
|
"SELECT id FROM {payments} WHERE component $notinsql AND userid $usersql" | 1 |
|
SELECT id FROM {payments} WHERE component | 1 |
|
"SELECT ctx.id FROM {user_private_key} k JOIN {user} u ON k.userid = u.id JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel WHERE k.userid = :userid AND k.script = 'rss'" | 1 |
|
" SELECT behaviour, COUNT(1) FROM {question_attempts} GROUP BY behaviour" | 1 |
|
'SELECT DISTINCT component FROM {events_handlers}' | 1 |
|
"UPDATE {user} SET timezone = ?" | 1 |
|
" SELECT q.qtype, COUNT(qv.id) AS numquestions, SUM(CASE WHEN qv.status = :hiddenstatus THEN 1 ELSE 0 END) AS numhidden, SUM(CASE WHEN qv.status = :draftstatus THEN 1 ELSE 0 END) AS numdraft FROM {question} q JOIN {question_versions} qv ON q.id = qv.questionid LEFT JOIN {question_versions} qv2 ON qv.questionbankentryid = qv2.questionbankentryid AND qv.version < qv2.version WHERE qv2.questionbankentryid IS NULL GROUP BY q.qtype " | 1 |
|
'SELECT DISTINCT classname FROM {task_log} ORDER BY classname ASC' | 1 |
|
'SELECT b.name, b.id, COUNT(DISTINCT binst.id) as totalcount FROM {block} b LEFT JOIN {block_instances} binst ON binst.blockname = b.name GROUP BY b.id, b.name ORDER BY b.name ASC' | 1 |
|
"SELECT blockname FROM {block_instances} WHERE pagetypepattern = 'course-view-*' GROUP BY blockname" | 1 |
|
"SELECT ra.id, ra.userid, ra.contextid, ra.roleid, ra.component, ra.itemid, c.path FROM {role_assignments} ra JOIN {context} c ON ra.contextid = c.id JOIN {role} r ON ra.roleid = r.id WHERE ra.userid = ? ORDER BY contextlevel DESC, contextid ASC, r.sortorder ASC" | 1 |
|
"SELECT capability, permission FROM {role_capabilities} WHERE contextid = :syscontext AND roleid = :roleid ORDER BY capability ASC" | 1 |
|
"SELECT ra.id AS raid, u.id, " . $this->userfieldsselects . ", ra.contextid, ra.component " | 1 |
|
"SELECT COUNT(1) " | 1 |
|
"SELECT r.* FROM {role} r JOIN {role_allow_{$type}} a ON a.allow{$type} = r.id WHERE a.roleid = :roleid ORDER BY r.sortorder ASC" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {role_capabilities} rc ON rc.contextid = ctx.id AND ((ctx.contextlevel {$insql} AND rc.modifierid = :modifierid) OR (ctx.contextlevel = :contextlevel AND ctx.instanceid = :userid))" | 1 |
|
"SELECT ctx.id FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel {$insql} WHERE (ra.userid = :userid OR ra.modifierid = :modifierid) AND ra.component != 'tool_cohortroles'" | 1 |
|
"SELECT modifierid as userid FROM {role_capabilities} WHERE contextid = :contextid" | 1 |
|
"SELECT userid FROM {role_assignments} WHERE contextid = :contextid" | 1 |
|
"SELECT modifierid as userid FROM {role_assignments} WHERE contextid = :contextid AND component != 'tool_cohortroles'" | 1 |
|
"SELECT ra.id, ra.contextid, ra.roleid, ra.userid, ra.timemodified, ra.modifierid, $ctxfields FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel {$inctxsql} AND (ra.userid = :userid OR ra.modifierid = :modifierid) AND ra.component != 'tool_cohortroles' JOIN {role} r ON r.id = ra.roleid WHERE ctx.id {$insql}" | 1 |
|
"SELECT rc.id, rc.contextid, rc.capability, rc.permission, rc.timemodified, rc.roleid, $ctxfields FROM {context} ctx JOIN {role_capabilities} rc ON rc.contextid = ctx.id AND ((ctx.contextlevel {$inctxsql} AND rc.modifierid = :modifierid) OR (ctx.contextlevel = :contextlevel AND ctx.instanceid = :userid)) WHERE ctx.id {$insql}" | 1 |
|
"SELECT ra.id, ra.contextid, ra.roleid, ra.userid, ra.timemodified, ra.modifierid, r.id as roleid FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :contextlevel AND ra.component = 'tool_cohortroles' JOIN {role} r ON r.id = ra.roleid WHERE ctx.instanceid = :instanceid OR ra.userid = :userid" | 1 |
|
"SELECT * FROM {role_capabilities} WHERE contextid = :syscontext AND roleid = :roleid ORDER BY capability ASC" | 1 |
|
"SELECT * FROM {user} WHERE deleted = 1 AND email LIKE '%@%' AND username NOT LIKE '%@%'" | 1 |
|
"SHOW VARIABLES LIKE 'collation_database'" | 1 |
|
"SHOW VARIABLES LIKE 'character_set_database'" | 1 |
|
"SHOW FULL COLUMNS FROM `$table->name` WHERE collation IS NOT NULL" | 1 |
|
"SHOW COLLATION WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8' OR Collation LIKE 'utf8mb4\_%' AND Charset = 'utf8mb4'" | 1 |
|
"SELECT column_name, collation_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() AND table_name = ? AND collation_name IS NOT NULL" | 1 |
|
"SELECT row_format FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name = ?" | 1 |
|
'SELECT count(id) FROM {course} ' . $where | 1 |
|
'SELECT id FROM {course} ' . $where | 1 |
|
'Update user ' . $user->{$argname} . ($argname !== 'id' ? ' (' . $user->id . ')' : '') . ' - ' | 1 |
|
'SELECT qc.id, qc.contextid, qc.name FROM {question_categories} qc LEFT JOIN {context} c ON qc.contextid = c.id WHERE c.id IS NULL' | 1 |
|
' SELECT DISTINCT ' . $DB->sql_concat('r.plugintype', "'_'", 'r.pluginname', "'_'", 's.name') . ' AS uniqueid, s.name, r.plugintype, r.pluginname FROM {mnet_service} s JOIN {mnet_remote_service2rpc} s2r ON s2r.serviceid = s.id JOIN {mnet_remote_rpc} r ON r.id = s2r.rpcid' | 1 |
|
"SELECT cl.id, cl.plugin, cl.name, cl.value, cl.oldvalue, ap.adminpresetapplyid FROM {adminpresets_app_it} ap JOIN {config_log} cl ON cl.id = ap.configlogid WHERE ap.adminpresetapplyid = :presetid" | 1 |
|
"SELECT cl.id, cl.plugin, cl.name, cl.value, cl.oldvalue, ap.itemname, ap.adminpresetapplyid FROM {adminpresets_app_it_a} ap JOIN {config_log} cl ON cl.id = ap.configlogid WHERE ap.adminpresetapplyid = :presetid" | 1 |
|
'Delete licence' | 1 |
|
'Delete licence \'{$a}\'' | 1 |
|
"SELECT * FROM {user} WHERE deleted = 0 AND id <> :userid AND $conditions" | 1 |
|
"SELECT u.*, p.summary FROM {user} u, {post} p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid" | 1 |
|
"SELECT u.*, p.subject AS postsubject FROM {user} u, {post} p WHERE $conditions3 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid" | 1 |
|
"SELECT u.*, c.content FROM {user} u, {comments} c WHERE $conditions4 AND u.deleted = 0 AND u.id=c.userid AND u.id <> :userid" | 1 |
|
"SELECT u.*, m.fullmessage FROM {user} u, {message} m WHERE $conditions5 AND u.deleted = 0 AND u.id=m.useridfrom AND u.id <> :userid" | 1 |
|
"SELECT u.*, fp.message FROM {user} u, {forum_posts} fp WHERE $conditions6 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid" | 1 |
|
"SELECT u.*, fp.subject FROM {user} u, {forum_posts} fp WHERE $conditions7 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid" | 1 |
|
'Delete all these user accounts' | 1 |
|
'Delete index' | 1 |
|
'Delete key' | 1 |
|
'Delete XML file' | 1 |
|
'Select action:' | 1 |
|
'Select database:' | 1 |
|
'Select field/key/index:' | 1 |
|
'Select table:' | 1 |
|
'SELECT count(1) FROM {' . $xmldb_table->getName( ) . '} t1 LEFT JOIN {' . $reftable . '} t2 ON ' . implode(' AND ', $joinconditions) . ' WHERE ' . implode(' AND ', $nullnessconditions) | 1 |
|
' SELECT char_used FROM user_tab_columns WHERE table_name = :table_name AND column_name = :column_name AND data_type = :data_type' | 1 |
|
"SELECT COUNT(id) FROM {tool_monitor_events} " | 1 |
|
"UPDATE {tool_monitor_subscriptions} SET lastnotificationsent = :now WHERE id $sql" | 1 |
|
"SELECT COUNT(s.id) " | 1 |
|
"SELECT s.*, r.description, r.descriptionformat, r.name, r.userid as ruleuserid, r.courseid as rulecourseid, r.plugin, r.eventname, r.template, r.templateformat, r.frequency, r.timewindow" | 1 |
|
"SELECT DISTINCT(r.eventname) FROM {tool_monitor_subscriptions} s INNER JOIN {tool_monitor_rules} r ON s.ruleid = r.id WHERE s.courseid = :courseid" | 1 |
|
"SELECT DISTINCT ctx.id FROM {context} ctx LEFT JOIN {tool_monitor_rules} mr ON ctx.instanceid = mr.userid AND ctx.contextlevel = :contextuserrule AND mr.userid = :useridsubscriptions LEFT JOIN {tool_monitor_subscriptions} ms ON ctx.instanceid = ms.userid AND ctx.contextlevel = :contextusersub AND ms.userid = :useridrules WHERE ms.id IS NOT NULL OR mr.id IS NOT NULL" | 1 |
|
"SELECT userid FROM {tool_monitor_rules} WHERE userid = :userid" | 1 |
|
"SELECT userid FROM {tool_monitor_subscriptions} WHERE userid = :userid" | 1 |
|
"SELECT u.id AS userid, u.firstname AS userfirstname, u.lastname AS userlastname, u.suspended AS usersuspended, u.email AS useremail, c.visible as coursevisible, c.cacherev as coursecacherev, s.courseid AS subcourseid, s.userid AS subuserid, s.cmid AS subcmid, s.inactivedate AS subinactivedate, s.id AS subid FROM {user} u JOIN {tool_monitor_subscriptions} s ON (s.userid = u.id) LEFT JOIN {course} c ON (c.id = s.courseid) WHERE u.id = s.userid ORDER BY s.userid, s.courseid" | 1 |
|
'Delete rule' | 1 |
|
'Delete subscription' | 1 |
|
'Select a course' | 1 |
|
'Update of \'{$a}\' language pack skipped' | 1 |
|
'Select languages to uninstall' | 1 |
|
'Update all installed language packs' | 1 |
|
'SELECT id, roleid, contextid, permission FROM {role_capabilities} WHERE capability = ? ' . $sqlroletest | 1 |
|
'SELECT DISTINCT con.path, 1 FROM {context} con JOIN {role_capabilities} rc ON rc.contextid = con.id WHERE capability = ? ' . $sqlroletest . ' AND con.path IS NOT NULL' | 1 |
|
'Show differences only' | 1 |
|
'SELECT c.id FROM {' . \core_competency\template_cohort::TABLE . '} tc JOIN {cohort} c ON c.id = tc.cohortid WHERE tc.templateid = :templateid' | 1 |
|
"SELECT COUNT('x') FROM {user} u WHERE $wheresql AND u.id $filtercapsql" | 1 |
|
"SELECT $fields FROM {user} u WHERE $wheresql AND u.id $filtercapsql ORDER BY $sortsql" | 1 |
|
"SELECT $select FROM {" . \core_competency\template_cohort::TABLE . "} tc JOIN {cohort} c ON c.id = tc.cohortid WHERE tc.templateid = :templateid" | 1 |
|
"SELECT $select FROM {" . \core_competency\plan::TABLE . "} p JOIN {user} u ON u.id = p.userid WHERE p.templateid = :templateid" | 1 |
|
'Delete competency \'{$a}\'?' | 1 |
|
'Delete competency framework \'{$a}\'?' | 1 |
|
'Delete competency \'{$a}\'? This will also remove the rule set for its parent.' | 1 |
|
'Delete learning plan \'{$a}\'?' | 1 |
|
'Delete the learning plans' | 1 |
|
'Delete learning plan template \'{$a}\'?' | 1 |
|
'Delete this learning plan' | 1 |
|
'Delete this evidence' | 1 |
|
'Delete the evidence of prior learning \'{$a}\'?' | 1 |
|
'Select learning plan template' | 1 |
|
'Select cohorts to sync' | 1 |
|
'Select a location to move this competency to:' | 1 |
|
'Select users to create learning plans for' | 1 |
|
'Show on login page' | 1 |
|
"SELECT ra.* FROM {role_assignments} ra JOIN {context} c ON c.id = ra.contextid LEFT JOIN {role_context_levels} rcl ON (rcl.roleid = ra.roleid AND rcl.contextlevel = c.contextlevel) WHERE rcl.id IS NULL AND ra.roleid = :roleid AND c.contextlevel = :contextlevel" | 1 |
|
"SELECT r.id AS roleid, c.contextlevel, r.sortorder, COUNT(ra.id) AS racount FROM {role} r JOIN {role_assignments} ra ON ra.roleid = r.id JOIN {context} c ON c.id = ra.contextid LEFT JOIN {role_context_levels} rcl ON (rcl.roleid = r.id AND rcl.contextlevel = c.contextlevel) WHERE rcl.id IS NULL GROUP BY r.id, c.contextlevel, r.sortorder ORDER BY c.contextlevel ASC, r.sortorder ASC" | 1 |
|
"SELECT DISTINCT(userid) FROM {tool_mfa} WHERE factor = ? AND lockcounter >= ? AND revoked = 0" | 1 |
|
" SELECT * FROM {tool_mfa}" | 1 |
|
"SELECT auth, COUNT(id) FROM {user} WHERE deleted = 0 AND suspended = 0 GROUP BY auth" | 1 |
|
"SELECT u.auth, COUNT(u.id) FROM {user} u LEFT JOIN {tool_mfa_auth} mfaa ON u.id = mfaa.userid WHERE u.lastlogin >= ? AND (mfaa.lastverified < ? OR mfaa.lastverified IS NULL) GROUP BY u.auth" | 1 |
|
"SELECT auth, COUNT(id) FROM {user} WHERE deleted = 0 AND suspended = 0 AND lastlogin < ? GROUP BY auth" | 1 |
|
"SELECT auth, COUNT(DISTINCT tm.userid) FROM {tool_mfa} tm JOIN {user} u ON u.id = tm.userid WHERE tm.lastverified >= ? AND u.deleted = 0 AND u.suspended = 0 GROUP BY u.auth" | 1 |
|
"SELECT CONCAT(u.auth, '_', tm.factor) as id, COUNT(*) FROM {tool_mfa} tm JOIN {user} u ON u.id = tm.userid WHERE tm.lastverified >= ? AND u.deleted = 0 AND u.suspended = 0 AND (tm.revoked = 0 OR (tm.revoked = 1 AND tm.timemodified > ?)) GROUP BY CONCAT(u.auth, '_', tm.factor)" | 1 |
|
"SELECT COUNT(DISTINCT(userid)) FROM {tool_mfa} WHERE factor = ? AND lockcounter >= ? AND revoked = 0" | 1 |
|
"SELECT mfa.id as mfaid, u.*, mfa.createdfromip, mfa.timemodified FROM {tool_mfa} mfa JOIN {user} u ON mfa.userid = u.id WHERE factor = ? AND lockcounter >= ? AND revoked = 0" | 1 |
|
"SELECT * FROM {tool_mfa_secrets} WHERE secret = :secret AND expiry > :now AND userid = :userid AND factor = :factor" | 1 |
|
"SELECT * FROM {tool_mfa_secrets} WHERE expiry > :now AND userid = :userid AND factor = :factor AND revoked = 0" | 1 |
|
'DELETE FROM {tool_mfa_secrets} WHERE userid = :userid AND factor = :factor' | 1 |
|
"SELECT MAX(lockcounter) FROM {tool_mfa} WHERE userid = ? AND factor = ? AND revoked = ?" | 1 |
|
"UPDATE {tool_mfa} SET revoked = 1, timemodified = :timemodified WHERE timecreated < :revoketime AND factor = :factor" | 1 |
|
'Select the roles that will not pass this factor. This allows you to force these roles to use other factors to authenticate.' | 1 |
|
'SELECT * FROM {tool_mfa} WHERE userid = ? AND factor = ? AND label IS NOT NULL AND revoked = 0' | 1 |
|
'Select all authentication types to use as a factor for MFA. Any types not selected will not be treated as a FAIL in MFA.' | 1 |
|
"SELECT DISTINCT tm.userid FROM {tool_mfa} tm JOIN {user} u ON u.id = tm.userid WHERE tm.factor = :factor AND u.suspended = 0 AND u.deleted = 0 AND ( SELECT COUNT(id) as count FROM {tool_mfa} WHERE userid = tm.userid AND factor <> :notfactor ) > 0" | 1 |
|
'Delete unusable Nosetup factors' | 1 |
|
"SELECT id, name FROM {cohort} WHERE id $insql" | 1 |
|
'Select the cohorts that will not pass this factor. This allows you to force these cohorts to use other factors to authenticate.' | 1 |
|
'Show mobile app setup link' | 1 |
|
'Select factor to reset:' | 1 |
|
'Select a lookback period for the report:' | 1 |
|
<<<EOF SELECT t.* FROM {tool_usertours_tours} t WHERE t.enabled = 1 AND t.id IN (SELECT s.tourid FROM {tool_usertours_steps} s GROUP BY s.tourid) ORDER BY t.sortorder ASC EOF | 1 |
|
<<<EOF SELECT s.* FROM {tool_usertours_steps} s WHERE s.tourid = :tourid ORDER BY s.sortorder ASC EOF | 1 |
|
'Show tour' | 1 |
|
'Show the tour on a page that is associated with a course in the selected category.' | 1 |
|
'Show the tour on a page that is associated with the selected course.' | 1 |
|
'Show the tour on a page that is associated with a course using the selected course format.' | 1 |
|
'Select the conditions under which the tour will be shown. All of the filters must match for a tour to be shown to a user.' | 1 |
|
'Show the tour when the user is using one of the selected themes.' | 1 |
|
'Select a block' | 1 |
|
'Show if target not found' | 1 |
|
'Show the step if the target could not be found on the page.' | 1 |
|
'Show with backdrop' | 1 |
|
'Select step type' | 1 |
|
'Delete a file type' | 1 |
|
'Select more activities that implement the course_backend_generator_create_activity function to include in the test course.' | 1 |
|
'Update course users password' | 1 |
|
"UPDATE {" . self::TABLE . "} SET status = ?, timemodified = ? WHERE id $insql" | 1 |
|
"SELECT dpctx.* FROM {tool_dataprivacy_ctxexpired} dpctx LEFT JOIN {context} ctx ON ctx.id = dpctx.contextid WHERE ctx.id IS NULL" | 1 |
|
"SELECT dpctx.* FROM {tool_dataprivacy_ctxexpired} dpctx WHERE dpctx.contextid IN ( SELECT ctx.id FROM {context} ctxuser JOIN {context} ctx ON ctx.path LIKE {$parentpath} WHERE ctxuser.contextlevel = :contextuser )" | 1 |
|
"SELECT $fields FROM {context} ctx JOIN ( SELECT c.enddate AS expirydate, subctx.path FROM {context} subctx JOIN {course} c ON subctx.contextlevel = :contextlevel AND subctx.instanceid = c.id AND c.format != 'site' ) ctxcourse ON ctx.path LIKE {$parentpath} OR ctx.path = ctxcourse.path LEFT JOIN {tool_dataprivacy_ctxinstance} dpctx ON dpctx.contextid = ctx.id LEFT JOIN {tool_dataprivacy_ctxexpired} expiredctx ON ctx.id = expiredctx.contextid {$where} ORDER BY ctx.path DESC" | 1 |
|
"SELECT $fields, u.deleted AS userdeleted FROM {context} ctx JOIN {user} u ON ctx.instanceid = u.id LEFT JOIN {tool_dataprivacy_ctxinstance} dpctx ON dpctx.contextid = ctx.id LEFT JOIN {tool_dataprivacy_ctxexpired} expiredctx ON ctx.id = expiredctx.contextid WHERE ctx.contextlevel = :contextlevel {$where} ORDER BY ctx.path DESC" | 1 |
|
"SELECT ctx.id, $fields FROM {context} ctxuser JOIN {context} ctx ON ctx.path LIKE {$parentpath} WHERE ctxuser.contextlevel = :contextlevel AND ctxuser.id = :contextid ORDER BY ctx.path DESC" | 1 |
|
"SELECT $fields FROM {context} ctx LEFT JOIN {tool_dataprivacy_ctxinstance} ctxins ON ctx.id = ctxins.contextid LEFT JOIN {course_modules} cm ON ctx.contextlevel = :contextmodule AND ctx.instanceid = cm.id LEFT JOIN {modules} m ON m.id = cm.module {$elementjoin} WHERE ctx.id {$insql} ORDER BY ctx.path DESC" | 1 |
|
"SELECT expiredctx.* FROM {" . self::TABLE . "} expiredctx JOIN {context} ctx ON ctx.id = expiredctx.contextid" | 1 |
|
"SELECT COUNT(1) FROM {" . self::TABLE . "} expiredctx JOIN {context} ctx ON ctx.id = expiredctx.contextid" | 1 |
|
"SELECT c.id as contextid FROM {context} c" | 1 |
|
"SELECT cl.component, ctx.contextid FROM {" . request_contextlist::TABLE . "} rcl JOIN {" . dataprivacy_contextlist::TABLE . "} cl ON rcl.contextlistid = cl.id JOIN {" . contextlist_context::TABLE . "} ctx ON cl.id = ctx.contextlistid WHERE rcl.requestid = ? AND ctx.status = ? ORDER BY cl.component, ctx.contextid" | 1 |
|
"SELECT ctx.id as id FROM {" . request_contextlist::TABLE . "} rcl JOIN {" . dataprivacy_contextlist::TABLE . "} cl ON rcl.contextlistid = cl.id JOIN {" . contextlist_context::TABLE . "} ctx ON cl.id = ctx.contextlistid WHERE rcl.requestid = ?" | 1 |
|
"UPDATE {" . contextlist_context::TABLE . "} SET status = ? WHERE id $insql" | 1 |
|
"SELECT clc.id as id, ctx.id as contextid, ctx.path, ctx.contextlevel FROM {" . request_contextlist::TABLE . "} rcl JOIN {" . dataprivacy_contextlist::TABLE . "} cl ON rcl.contextlistid = cl.id JOIN {" . contextlist_context::TABLE . "} clc ON cl.id = clc.contextlistid JOIN {context} ctx ON clc.contextid = ctx.id WHERE rcl.requestid = ?" | 1 |
|
"SELECT DISTINCT c.id as ctxid, c.contextlevel as ctxlevel, c.instanceid as ctxinstance, c.path as ctxpath, c.depth as ctxdepth, c.locked as ctxlocked FROM {" . \tool_dataprivacy\request_contextlist::TABLE . "} rcl JOIN {" . \tool_dataprivacy\dataprivacy_contextlist::TABLE . "} cl ON rcl.contextlistid = cl.id JOIN {" . \tool_dataprivacy\contextlist_context::TABLE . "} ctx ON cl.id = ctx.contextlistid JOIN {context} c ON c.id = ctx.contextid WHERE rcl.requestid = ? AND c.contextlevel = ? ORDER BY c.path ASC" | 1 |
|
"SELECT id FROM {context} WHERE instanceid = :userid AND contextlevel = :contextlevel" | 1 |
|
"SELECT instanceid AS userid FROM {context} WHERE id = :contextid AND contextlevel = :contextlevel" | 1 |
|
"SELECT {$ctxfields} FROM {context} ctx WHERE ctx.id {$insql}" | 1 |
|
"SELECT u.id, $allusernames FROM {role_assignments} ra, {context} c, {user} u WHERE ra.userid = :userid AND ra.contextid = c.id AND c.instanceid = u.id AND c.contextlevel = :contextlevel" | 1 |
|
"SELECT DISTINCT(u.id) FROM {user} u LEFT JOIN {tool_dataprivacy_request} r ON u.id = r.userid WHERE u.deleted = ? AND (r.id IS NULL OR r.type != ?)" | 1 |
|
'Delete request by user, automatic approval off' | 1 |
|
'Delete request by user, automatic approval on' | 1 |
|
'Delete request by PO, automatic approval off' | 1 |
|
'Delete request by PO, automatic approval on' | 1 |
|
'Delete my user data' | 1 |
|
'Delete defaults: {$a}' | 1 |
|
'Delete expired contexts' | 1 |
|
'Delete expired data request export files' | 1 |
|
'Delete my account' | 1 |
|
'Delete purpose' | 1 |
|
'Select at least one option that will serve as the lawful basis for processing personal data. For details on these lawful bases, please see <a href="https://gdpr-info.eu/art-6-gdpr/" target="_blank">GDPR Art. 6.1</a>' | 1 |
|
'Select the reason for contacting the privacy officer. Be aware that deletion of all personal data will result in you no longer being able to log in to the site.' | 1 |
|
'Delete all of my personal data' | 1 |
|
'Select {$a->username}\'s {$a->requesttype} data request.' | 1 |
|
'Select one or more applicable reasons that exempts the prohibition of processing sensitive personal data tied to this purpose. For more information, please see <a href="https://gdpr-info.eu/art-9-gdpr/" target="_blank">GDPR Art. 9.2</a>' | 1 |
|
'Show data retention summary' | 1 |
|
'Select courses to export' | 1 |
|
"SELECT ctx.id, ctx.contextlevel, ctx.instanceid, ctx.path, ctx.depth, ctx.locked FROM {context} ctx JOIN {role_assignments} r ON ctx.id = r.contextid WHERE r.userid = :userid AND ctx.contextlevel IN (:contextsystem, :contextcategory, :contextcourse) ORDER BY ctx.contextlevel ASC" | 1 |
|
'Select page' | 1 |
|
"SELECT cc.id, cc.courseid, cc.competencyid, cc.ruleoutcome FROM {" . course_competency::TABLE . "} cc JOIN {" . competency::TABLE . "} c ON c.id = cc.competencyid $joins WHERE $conditions ORDER BY cc.sortorder, cc.id" | 1 |
|
"SELECT mc.id, cm.course AS courseid, mc.cmid, mc.competencyid, mc.ruleoutcome FROM {" . course_module_competency::TABLE . "} mc JOIN {course_modules} cm ON cm.id = mc.cmid AND cm.course $incoursesql JOIN {" . competency::TABLE . "} c ON c.id = mc.competencyid WHERE c.id $inidsql ORDER BY mc.sortorder, mc.id" | 1 |
|
'Select courses to be migrated to the new framework. If no course is specified, then all courses will be migrated.' | 1 |
|
'Select any courses which should NOT be migrated to the new framework.' | 1 |
|
'Select the older framework currently in use.' | 1 |
|
'Select the newer version of the framework. It is only possible to select a framework which is not hidden.' | 1 |
|
"SELECT t.* FROM {external_tokens} t, {external_services} s WHERE t.externalserviceid = s.id AND s.enabled = 1 AND s.shortname IN ('moodle_mobile_app', 'local_mobile') AND t.userid = ?" | 1 |
|
"SELECT ctx.id FROM {user_private_key} k JOIN {user} u ON k.userid = u.id JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel WHERE k.userid = :userid AND k.script = 'tool_mobile'" | 1 |
|
'Select here the features you want to disable in the Mobile app for your site. Please note that some features listed here could be already disabled via other site settings. You will have to log out and log in again in the app to see the changes.' | 1 |
|
'Select all file types which are not for use on a mobile device. Such files will be listed in the course, then if a user attempts to open them, a warning will be displayed advising that the file type is not intended for use on a mobile device. The user can then cancel or ignore the warning and open the file anyway.' | 1 |
|
"SELECT $dbfields FROM {profiling} WHERE url = ? AND id = (SELECT MAX(id) FROM {profiling} WHERE url = ?)" | 1 |
|
"SELECT COUNT(*) FROM {profiling} WHERE $sqlconditions" | 1 |
|
'Delete all' | 1 |
|
'Delete recycle bin items' | 1 |
|
'Delete errors' | 1 |
|
'Select for bulk user actions' | 1 |
|
'Update existing users only' | 1 |
|
' SELECT count(*) cnt, MAX(? - nextruntime) age FROM {task_adhoc}' | 1 |
|
'Show failed only' | 1 |
|
'Show ad hoc tasks summary' | 1 |
|
"SELECT {course}.id FROM {course}, {course_categories} WHERE {course}.category = {course_categories}.id AND ( " . $DB->sql_like('path', ':categoryid1') . " OR " . $DB->sql_like('path', ':categoryid2') . " )" | 1 |
|
'SELECT component, COUNT(id) AS count FROM {' . manager::DB_AREAS . '} GROUP BY component' | 1 |
|
'SELECT ' . $DB->sql_concat_join("'_'", ['courseid', 'checkid']) . ' as tmpid, ca.courseid, ca.status, ca.checkid, ch.shortname, ca.checkcount, ca.errorcount FROM {' . manager::DB_CACHECHECK . '} ca INNER JOIN {' . manager::DB_CHECKS . '} ch on ch.id = ca.checkid ORDER BY courseid, checkid ASC' | 1 |
|
'SELECT 1 FROM {' . self::DB_CONTENT . '} ' . 'WHERE areaid = ? AND (status = 0 OR (iscurrent = 1 AND contenthash = ?))' | 1 |
|
'SELECT a.*, ch.id AS contentid FROM {' . self::DB_AREAS . '} a JOIN {' . self::DB_CONTENT . '} ch ON ch.areaid = a.id WHERE ch.status = ? ORDER BY a.id, ch.timecreated, ch.id' | 1 |
|
"SELECT areas.courseid, chx.checkgroup, COUNT(DISTINCT (" . $DB->sql_concat('areas.contextid', 'areas.component') . ")) AS failed, SUM(res.errorcount) AS errors FROM {" . self::DB_AREAS . "} areas INNER JOIN {" . self::DB_CONTENT . "} ch ON ch.areaid = areas.id INNER JOIN {" . self::DB_RESULTS . "} res ON res.contentid = ch.id INNER JOIN {" . self::DB_CHECKS . "} chx ON chx.id = res.checkid WHERE res.errorcount > ? AND ch.iscurrent = ? " . $extrasql . " GROUP BY courseid, chx.checkgroup" | 1 |
|
"SELECT areas.courseid, COUNT(DISTINCT (" . $DB->sql_concat('areas.contextid', 'areas.component') . ")) AS failed, SUM(res.errorcount) AS errors FROM {" . self::DB_AREAS . "} areas INNER JOIN {" . self::DB_CONTENT . "} ch ON ch.areaid = areas.id INNER JOIN {" . self::DB_RESULTS . "} res ON res.contentid = ch.id WHERE res.errorcount > ? AND ch.iscurrent = ? " . $extrasql . " GROUP BY courseid" | 1 |
|
"SELECT courseid, COUNT(DISTINCT (" . $DB->sql_concat('areas.contextid', 'areas.component') . ")) AS activities FROM {" . self::DB_AREAS . "} areas " . $extrasql . " GROUP BY areas.courseid" | 1 |
|
"SELECT area.courseid, " . self::STATUS_CHECKED . " AS status, res.checkid, COUNT(res.errorcount) as checkcount, SUM(res.errorcount) AS errorcount FROM {" . self::DB_AREAS . "} area INNER JOIN {" . self::DB_CONTENT . "} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {" . self::DB_RESULTS . "} res ON res.contentid = ch.id " . $extrasql . " GROUP BY area.courseid, res.checkid" | 1 |
|
"SELECT courseid, " . self::STATUS_CHECKED . " AS status, area.component, COUNT(DISTINCT area.contextid) AS totalactivities, 0 AS failedactivities, COUNT(DISTINCT area.contextid) AS passedactivities, 0 AS errorcount FROM {" . self::DB_AREAS . "} area " . $extrasql . " GROUP BY area.courseid, area.component" | 1 |
|
"SELECT area.courseid, area.component, area.contextid, SUM(res.errorcount) AS errorcount FROM {" . self::DB_AREAS . "} area INNER JOIN {" . self::DB_CONTENT . "} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {" . self::DB_RESULTS . "} res ON res.contentid = ch.id " . $extrasql . " AND res.errorcount != 0 GROUP BY area.courseid, area.component, area.contextid" | 1 |
|
'SELECT * ' . 'FROM {' . self::DATA_TABLE . '} sch ' . 'INNER JOIN {' . manager::DB_SUMMARY . '} sum ON sch.instanceid = sum.courseid ' . 'WHERE (sch.contextlevel = :contextlevel) AND (sch.instanceid = :instanceid) AND (sch.status = :status)' | 1 |
|
'SELECT component, SUM(errorcount) as errorsum, SUM(totalactivities) as total, ' . 'SUM(failedactivities) as failed, SUM(passedactivities) as passed ' . 'FROM {' . manager::DB_CACHEACTS . '} area ' . (empty($wheresql) ? '' : ('WHERE ' . $wheresql . ' ')) . 'GROUP BY area.component ' . 'ORDER BY area.component ASC' | 1 |
|
'SELECT DISTINCT checkgroup, checkgroup as cg2 FROM {' . manager::DB_CHECKS . '} ' . 'WHERE status = ? ORDER BY checkgroup ASC' | 1 |
|
'SELECT ' . implode(', ', $this->sqlparts['SELECT']) | 1 |
|
"SELECT {$this->get_type( )} AS type, ctx.id AS contextid, {$this->get_standard_area_fields_sql( )} q.id AS itemid, {$this->get_course_and_cat_sql($event)} q.{$this->get_fieldname( )} AS content FROM {question} q INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid WHERE (q.id = :refid) ORDER BY q.id" | 1 |
|
"SELECT {$this->get_type( )} AS type, ctx.id AS contextid, {$this->get_standard_area_fields_sql( )} q.id AS itemid, {$courseid} AS courseid, null AS categoryid, q.{$this->get_fieldname( )} AS content FROM {question} q INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid WHERE (ctx.contextlevel = :ctxcourse AND ctx.id = qc.contextid AND ctx.instanceid = :courseid) OR (ctx.contextlevel = :module AND {$DB->sql_like('ctx.path', ':coursecontextpath')}) ORDER BY q.id ASC" | 1 |
|
"SELECT {$this->get_type( )} AS type, qc.contextid AS contextid, {$this->get_standard_area_fields_sql( )} q.id AS itemid, " . SITEID . " as courseid, cc.id as categoryid, q.{$this->get_fieldname( )} AS content FROM {question} q INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid LEFT JOIN {course_categories} cc ON cc.id = ctx.instanceid AND ctx.contextlevel = :coursecat WHERE (ctx.contextlevel = :syscontext) OR (ctx.contextlevel = :coursecat2) ORDER BY q.id" | 1 |
|
'SELECT ctx.instanceid, cm.course as courseid, ctx.contextlevel FROM {question} q INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid LEFT JOIN {course_modules} cm ON cm.id = ctx.instanceid AND ctx.contextlevel = :coursemodule WHERE q.id = :refid' | 1 |
|
"SELECT {$this->get_type( )} AS type, ctx.id AS contextid, {$this->get_standard_area_fields_sql( )} a.id AS itemid, {$this->get_reftable_field_sql( )} q.id AS refid, {$this->get_course_and_cat_sql($event)} a.{$this->get_fieldname( )} AS content FROM {question} q INNER JOIN {question_answers} a ON a.question = q.id INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid WHERE (q.id = :refid) ORDER BY a.id" | 1 |
|
"SELECT {$this->get_type( )} AS type, qc.contextid AS contextid, {$this->get_standard_area_fields_sql( )} a.id AS itemid, {$this->get_reftable_field_sql( )} q.id AS refid, " . SITEID . " as courseid, cc.id as categoryid, a.{$this->get_fieldname( )} AS content FROM {question} q INNER JOIN {question_answers} a ON a.question = q.id INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid LEFT JOIN {course_categories} cc ON cc.id = ctx.instanceid AND ctx.contextlevel = :coursecat WHERE (ctx.contextlevel = :syscontext) OR (ctx.contextlevel = :coursecat2) ORDER BY a.id" | 1 |
|
"SELECT {$this->get_type( )} AS type, ctx.id AS contextid, {$this->get_standard_area_fields_sql( )} a.id AS itemid, {$this->get_reftable_field_sql( )} q.id AS refid, {$courseid} AS courseid, a.{$this->get_fieldname( )} AS content FROM {question} q INNER JOIN {question_answers} a ON a.question = q.id INNER JOIN {question_versions} qv ON qv.questionid = q.id INNER JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid INNER JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid INNER JOIN {context} ctx ON ctx.id = qc.contextid WHERE (ctx.contextlevel = :ctxcourse AND ctx.id = qc.contextid AND ctx.instanceid = :courseid) OR (ctx.contextlevel = :module AND {$DB->sql_like('ctx.path', ':coursecontextpath')}) ORDER BY a.id ASC" | 1 |
|
'SELECT err.id as errid, res.id as resid, area.*, res.checkid, err.linenumber as errline, err.htmlcode FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id INNER JOIN {' . manager::DB_ERRORS . '} err ON res.id = err.resultid WHERE 1=1 ' . $wheresql . ' ORDER BY area.courseid, area.component ASC' | 1 |
|
'SELECT COUNT(err.id) FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id INNER JOIN {' . manager::DB_ERRORS . '} err ON res.id = err.resultid WHERE 1=1 ' . $wheresql | 1 |
|
'SELECT COUNT(err.id) FROM {' . manager::DB_CONTENT . '} ch INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_ERRORS . '} err ON res.id = err.resultid WHERE 1=1 ' . $wheresql | 1 |
|
'SELECT distinct ' . $DB->sql_concat_join("''", ['area.component', 'area.contextid']) . ' as tmpid, sum(res.errorcount) FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id WHERE 1=1 ' . $wheresql . ' group by area.component, area.contextid' | 1 |
|
'SELECT che.checkgroup, SUM(res.errorcount) as errorinstances FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id INNER JOIN {' . manager::DB_CHECKS . '} che ON che.id = res.checkid WHERE 1=1 ' . $wheresql . ' GROUP BY che.checkgroup ORDER BY che.checkgroup' | 1 |
|
'SELECT area.component, sum(res.errorcount) as errorsum FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id WHERE 1=1 ' . $wheresql . ' GROUP BY area.component ORDER BY errorsum DESC' | 1 |
|
'SELECT che.shortname, sum(res.errorcount) as checkcount FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id INNER JOIN {' . manager::DB_CHECKS . '} che ON che.id = res.checkid WHERE 1=1 ' . $wheresql . ' AND res.errorcount >= ? GROUP BY che.shortname ORDER BY checkcount DESC' | 1 |
|
'SELECT distinct ' . $DB->sql_concat_join("''", ['area.component', 'area.contextid']) . ' as tmpid, component, SUM(errorcount) as errorsum FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id WHERE 1=1 ' . $wheresql . ' GROUP BY area.component, area.contextid' | 1 |
|
'SELECT err.id as errid, res.id as resid, area.component, area.itemid, area.cmid, che.shortname, err.linenumber as errline, err.htmlcode FROM {' . manager::DB_AREAS . '} area INNER JOIN {' . manager::DB_CONTENT . '} ch ON ch.areaid = area.id AND ch.iscurrent = 1 INNER JOIN {' . manager::DB_RESULTS . '} res ON res.contentid = ch.id INNER JOIN {' . manager::DB_CHECKS . '} che ON che.id = res.checkid INNER JOIN {' . manager::DB_ERRORS . '} err ON res.id = err.resultid WHERE 1=1 ' . $wheresql | 1 |
|
'Delete historical checks results' | 1 |
|
'Update to' | 1 |
|
'Update site summarydata' | 1 |
|
'SELECT ' . $id . $db->sql_null_from_clause( ) | 1 |
|
" SELECT l.contextid FROM {logstore_standard_log} l WHERE l.userid = :userid1 OR l.relateduserid = :userid2 OR l.realuserid = :userid3" | 1 |
|
"SELECT userid, relateduserid, realuserid FROM {logstore_standard_log} WHERE contextid = :contextid" | 1 |
|
'Show with both' | 1 |
|
'Show default' | 1 |
|
'Show with help' | 1 |
|
'Show mixed' | 1 |
|
'Show with required' | 1 |
|
"INSERT INTO {reserved_words_temp} ($columnamequoted) VALUES (?)" | 1 |
|
"SHOW TABLE STATUS WHERE Name LIKE ? AND Engine <> 'InnoDB'" | 1 |
|
'SELECT DISTINCT u.id AS userid, ra.id, ctx.id AS contextid FROM {user} u JOIN {cohort_members} cm ON u.id = cm.userid JOIN {context} ctx ON u.id = ctx.instanceid AND ctx.contextlevel = :usercontext LEFT JOIN {role_assignments} ra ON ra.contextid = ctx.id AND ra.roleid = :roleid AND ra.userid = :userid WHERE cm.cohortid ' . $cohortsql . ' AND u.deleted = 0 AND ra.id IS NULL' | 1 |
|
'SELECT u.id as userid, ra.id, ctx.id AS contextid FROM {user} u JOIN {context} ctx ON u.id = ctx.instanceid AND ctx.contextlevel = :usercontext JOIN {role_assignments} ra ON ra.contextid = ctx.id AND ra.roleid = :roleid AND ra.userid = :userid LEFT JOIN {cohort_members} cm ON u.id = cm.userid AND cm.cohortid ' . $cohortsql . ' WHERE ra.component = :component AND cm.cohortid IS NULL' | 1 |
|
'SELECT DISTINCT(ra.id), ra.roleid, ra.userid, ra.contextid, ctx.instanceid FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :usercontext JOIN {cohort_members} cm ON cm.userid = ctx.instanceid LEFT JOIN {tool_cohortroles} tc ON tc.cohortid = cm.cohortid AND tc.userid = ra.userid AND tc.roleid = ra.roleid WHERE ra.component = :component AND tc.id is null' | 1 |
|
'SELECT DISTINCT(ra.id) FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :usercontext JOIN {cohort_members} cm ON cm.userid = ctx.instanceid JOIN {tool_cohortroles} tc ON tc.cohortid = cm.cohortid AND tc.userid = ra.userid WHERE ra.component = :component' | 1 |
|
"SELECT DISTINCT c.contextid FROM {tool_cohortroles} tc JOIN {cohort} c ON tc.cohortid = c.id JOIN {context} ctx ON ctx.id = c.contextid WHERE tc.userid = :userid AND (ctx.contextlevel = :contextlevel1 OR ctx.contextlevel = :contextlevel2)" | 1 |
|
"SELECT tc.userid as userid FROM {tool_cohortroles} tc JOIN {cohort} c ON tc.cohortid = c.id WHERE c.contextid = :contextid" | 1 |
|
"SELECT cr.id as cohortroleid, c.name as cohortname, c.idnumber as cohortidnumber, c.description as cohortdescription, c.contextid as contextid, r.shortname as roleshortname, cr.userid as userid, cr.timecreated as timecreated, cr.timemodified as timemodified FROM {tool_cohortroles} cr JOIN {cohort} c ON c.id = cr.cohortid JOIN {role} r ON r.id = cr.roleid WHERE cr.userid = :userid AND c.contextid {$contextsql}" | 1 |
|
"SELECT $select FROM {tool_cohortroles} uca JOIN {user} u ON u.id = uca.userid JOIN {cohort} c ON c.id = uca.cohortid" | 1 |
|
'Select role' | 1 |
|
'Select users to assign role' | 1 |
|
"SELECT v.policyid, v.id FROM {tool_policy} d LEFT JOIN {tool_policy_versions} v ON v.policyid = d.id WHERE d.currentversionid = v.id" | 1 |
|
"SELECT d.id, d.currentversionid, d.sortorder, $versionfields " | 1 |
|
"SELECT $ctxfields $userfields FROM {role_assignments} ra JOIN {context} c ON c.contextlevel = " . CONTEXT_USER . " AND ra.contextid = c.id JOIN {user} u ON c.instanceid = u.id WHERE ra.userid = ? ORDER BY u.lastname ASC, u.firstname ASC" | 1 |
|
"SELECT p.id, p.sortorder, MAX(v.timecreated) AS timerecentcreated FROM {tool_policy} p LEFT JOIN {tool_policy_versions} v ON v.policyid = p.id GROUP BY p.id, p.sortorder ORDER BY p.sortorder ASC, timerecentcreated ASC" | 1 |
|
"SELECT u.id AS mainuserid, a.policyversionid, a.status, a.lang, a.timemodified, a.usermodified, a.note, u.policyagreed, $userfieldsmod FROM {user} u INNER JOIN {tool_policy_acceptances} a ON a.userid = u.id AND a.userid = :userid $vsql LEFT JOIN {user} m ON m.id = a.usermodified" | 1 |
|
"SELECT v.id AS versionid, a.* FROM {tool_policy_versions} v LEFT JOIN {tool_policy_acceptances} a ON a.userid = :userid AND a.policyversionid = v.id WHERE v.id $sql AND (a.id IS NULL OR a.status <> :status)" | 1 |
|
"SELECT d.id, v.optional, a.status FROM {tool_policy} d INNER JOIN {tool_policy_versions} v ON v.policyid = d.id AND v.id = d.currentversionid LEFT JOIN {tool_policy_acceptances} a ON a.userid = :userid AND a.policyversionid = v.id WHERE (v.audience = :audience OR v.audience = :audienceall)" | 1 |
|
"SELECT u.id" . $userfieldsapi->get_sql('u')->selects . ", " . \context_helper::get_preload_record_columns_sql('ctx') . " FROM {user} u JOIN {context} ctx ON ctx.contextlevel=:usercontextlevel AND ctx.instanceid = u.id WHERE u.id " . $sql | 1 |
|
"SELECT c.id FROM {context} c JOIN {tool_policy_versions} v ON v.usermodified = :userid WHERE c.contextlevel = :contextlevel" | 1 |
|
"SELECT c.id FROM {context} c JOIN {tool_policy_acceptances} a ON c.instanceid = a.userid WHERE c.contextlevel = :contextlevel AND ( a.userid = :userid OR a.usermodified = :usermodified )" | 1 |
|
"SELECT v.usermodified AS userid FROM {tool_policy_versions} v" | 1 |
|
"SELECT a.userid, a.usermodified FROM {tool_policy_acceptances} a WHERE a.userid = :instanceid" | 1 |
|
"SELECT v.id, v.name, v.revision, v.summary, v.content, v.archived, v.usermodified, v.timecreated, v.timemodified, p.currentversionid FROM {tool_policy_versions} v JOIN {tool_policy} p ON p.id = v.policyid WHERE v.usermodified = :userid" | 1 |
|
'Show policy before showing other policies' | 1 |
|
'Select user {$a}' | 1 |
|
'Select users to give consent on behalf of.' | 1 |
|
'Select a file to use as a template for the creation of all courses.' | 1 |
|
'Update mode' | 1 |
|
'Update mode does not allow anything to be updated' | 1 |
|
'Update with CSV data and defaults' | 1 |
|
'Update with CSV data only' | 1 |
|
'Delete {$a} preset?' | 1 |
|
'Delete site admin preset' | 1 |
|
'Select file' | 1 |
|
'Show version history' | 1 |
|
'Select all models provided by the component \'{$a}\'' | 1 |
|
'Select the analysis interval you want to use to evaluate the model configuration.' | 1 |
|
"SELECT stringid, id, lang, componentid, original, master, local, timemodified, timecustomized, outdated, modified FROM {tool_customlang} s WHERE lang = ? AND componentid = ? ORDER BY stringid" | 1 |
|
"SELECT s.*, c.name AS component FROM {tool_customlang} s JOIN {tool_customlang_components} c ON s.componentid = c.id WHERE s.lang = ? AND (s.local IS NOT NULL OR s.modified = 1) AND c.name $insql ORDER BY componentid, stringid" | 1 |
|
"SELECT s.*, c.name AS component" | 1 |
|
'Select component(s) to export' | 1 |
|
'Show strings of these components' | 1 |
|
'Show strings' | 1 |
|
'Update only strings with local customisation' | 1 |
|
"SELECT id, $column FROM $fulltable WHERE $column LIKE '%</lang>%' OR $column LIKE '%<span lang=%'" | 1 |
|
"UPDATE $fulltable SET $column=? WHERE id=?" | 1 |
|
"SELECT DISTINCT c.id AS course, cr.id AS criteriaid, ra.userid AS userid, mc.timemodified AS timecompleted FROM {course_completion_criteria} cr INNER JOIN {course} c ON cr.course = c.id INNER JOIN {context} con ON con.instanceid = c.id INNER JOIN {role_assignments} ra ON ra.contextid = con.id INNER JOIN {course_modules} cm ON cm.id = cr.moduleinstance INNER JOIN {course_modules_completion} mc ON mc.coursemoduleid = cr.moduleinstance AND mc.userid = ra.userid LEFT JOIN {course_completion_crit_compl} cc ON cc.criteriaid = cr.id AND cc.userid = ra.userid WHERE cr.criteriatype = :criteriatype AND con.contextlevel = :contextlevel AND c.enablecompletion = 1 AND cc.id IS NULL AND ( mc.completionstate = :completionstate OR (cm.completionpassgrade = 1 AND mc.completionstate = :completionstatepass1) OR (cm.completionpassgrade = 0 AND (mc.completionstate = :completionstatepass2 OR mc.completionstate = :completionstatefail)) )" | 1 |
|
"SELECT cmc.userid FROM {course} c JOIN {course_completion_criteria} ccc ON ccc.course = c.id JOIN {course_modules_completion} cmc ON cmc.coursemoduleid = ccc.moduleinstance WHERE c.id = :courseid" | 1 |
|
"SELECT cmv.userid FROM {course} c JOIN {course_completion_criteria} ccc ON ccc.course = c.id JOIN {course_modules_viewed} cmv ON cmv.coursemoduleid = ccc.moduleinstance WHERE c.id = :courseid" | 1 |
|
"SELECT ccc_compl.userid FROM {course} c JOIN {course_completion_criteria} ccc ON ccc.course = c.id JOIN {course_completion_crit_compl} ccc_compl ON ccc_compl.criteriaid = ccc.id WHERE c.id = :courseid" | 1 |
|
"SELECT cmc.id FROM {course_completion_criteria} ccc JOIN {course_modules_completion} cmc ON ccc.moduleinstance = cmc.coursemoduleid WHERE ccc.course = :course $usersql" | 1 |
|
"SELECT cmv.id FROM {course_completion_criteria} ccc JOIN {course_modules_viewed} cmv ON ccc.moduleinstance = cmv.coursemoduleid WHERE ccc.course = :course $usercmvsql" | 1 |
|
"SELECT cmc.id FROM {course_completion_criteria} ccc JOIN {course_modules_completion} cmc ON ccc.moduleinstance = cmc.coursemoduleid WHERE ccc.course = :course AND cmc.userid {$useridsql}" | 1 |
|
"SELECT cmv.id FROM {course_completion_criteria} ccc JOIN {course_modules_viewed} cmv ON ccc.moduleinstance = cmv.coursemoduleid WHERE ccc.course = :course AND cmv.userid {$useridsql}" | 1 |
|
"SELECT DISTINCT c.id FROM {course} c {$join} WHERE {$where}" | 1 |
|
' SELECT DISTINCT c.id AS course, cr.timeend AS timeend, cr.id AS criteriaid, ra.userid AS userid FROM {course_completion_criteria} cr INNER JOIN {course} c ON cr.course = c.id INNER JOIN {context} con ON con.instanceid = c.id INNER JOIN {role_assignments} ra ON ra.contextid = con.id LEFT JOIN {course_completion_crit_compl} cc ON cc.criteriaid = cr.id AND cc.userid = ra.userid WHERE cr.criteriatype = ' . COMPLETION_CRITERIA_TYPE_DATE . ' AND con.contextlevel = ' . CONTEXT_COURSE . ' AND c.enablecompletion = 1 AND cc.id IS NULL AND cr.timeend < ? ' | 1 |
|
' SELECT DISTINCT c.id AS course, cr.id AS criteriaid, ra.userid AS userid, gg.finalgrade AS gradefinal, gg.timemodified AS timecompleted FROM {course_completion_criteria} cr INNER JOIN {course} c ON cr.course = c.id INNER JOIN {context} con ON con.instanceid = c.id INNER JOIN {role_assignments} ra ON ra.contextid = con.id INNER JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = \'course\' INNER JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = ra.userid LEFT JOIN {course_completion_crit_compl} cc ON cc.criteriaid = cr.id AND cc.userid = ra.userid WHERE cr.criteriatype = ' . COMPLETION_CRITERIA_TYPE_GRADE . ' AND con.contextlevel = ' . CONTEXT_COURSE . ' AND c.enablecompletion = 1 AND cc.id IS NULL AND gg.finalgrade >= cr.gradepass ' | 1 |
|
" SELECT DISTINCT c.id AS course, cr.id AS criteriaid, ra.userid AS userid, cc.timecompleted AS timecompleted FROM {course_completion_criteria} cr INNER JOIN {course} c ON cr.course = c.id INNER JOIN {context} con ON con.instanceid = c.id INNER JOIN {role_assignments} ra ON ra.contextid = con.id INNER JOIN {course_completions} cc ON cc.course = cr.courseinstance AND cc.userid = ra.userid LEFT JOIN {course_completion_crit_compl} ccc ON ccc.criteriaid = cr.id AND ccc.userid = ra.userid WHERE cr.criteriatype = " . COMPLETION_CRITERIA_TYPE_COURSE . " AND con.contextlevel = " . CONTEXT_COURSE . " AND c.enablecompletion = 1 AND ccc.id IS NULL AND cc.timecompleted IS NOT NULL " | 1 |
|
' SELECT eu.timestart FROM {user_enrolments} eu JOIN {enrol} e ON eu.enrolid = e.id WHERE e.courseid = ? AND eu.userid = ?' | 1 |
|
"SELECT COUNT(DISTINCT u.id) FROM {user} u JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid $instancessql) JOIN {enrol} e ON (e.id = ue.enrolid)" | 1 |
|
"SELECT COUNT(DISTINCT u.id) FROM {role_assignments} ra JOIN {user} u ON u.id = ra.userid JOIN {context} ctx ON ra.contextid = ctx.id LEFT JOIN ( SELECT ue.id, ue.userid FROM {user_enrolments} ue LEFT JOIN {enrol} e ON e.id=ue.enrolid WHERE e.courseid = :courseid ) ue ON ue.userid=u.id WHERE ctx.id $ctxcondition AND ue.id IS NULL" | 1 |
|
"SELECT DISTINCT $fieldselect, COALESCE(ul.timeaccess, 0) AS lastcourseaccess FROM {user} u JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid $instancessql) JOIN {enrol} e ON (e.id = ue.enrolid) $fieldjoin LEFT JOIN {user_lastaccess} ul ON (ul.courseid = e.courseid AND ul.userid = u.id)" | 1 |
|
"SELECT ra.id as raid, ra.contextid, ra.component, ctx.contextlevel, ra.roleid, coalesce(u.lastaccess,0) AS lastaccess $fieldselect FROM {role_assignments} ra JOIN {user} u ON u.id = ra.userid JOIN {context} ctx ON ra.contextid = ctx.id $fieldjoin LEFT JOIN ( SELECT ue.id, ue.userid FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE e.courseid = :courseid ) ue ON ue.userid=u.id WHERE ctx.id $ctxcondition AND ue.id IS NULL ORDER BY $sort $direction, ctx.depth DESC" | 1 |
|
"SELECT ue.id AS ueid, ue.status, ue.enrolid, ue.userid, ue.timestart, ue.timeend, ue.modifierid, ue.timecreated, ue.timemodified, $userfields FROM {user_enrolments} ue LEFT JOIN {user} u ON u.id = ue.userid WHERE ue.enrolid $instancesql AND u.id $idsql ORDER BY $sort" | 1 |
|
"SELECT u.*, COALESCE(ul.timeaccess, 0) AS lastcourseaccess FROM {user} u LEFT JOIN {user_lastaccess} ul ON (ul.userid = u.id AND ul.courseid = :courseid) WHERE u.id IN ($enrolledsql) ORDER BY u.id ASC" | 1 |
|
"SELECT COUNT('x') FROM ($enrolledsqlselect) enrolleduserids" | 1 |
|
"SELECT us.*, COALESCE(ul.timeaccess, 0) AS lastcourseaccess FROM {user} us JOIN ( SELECT DISTINCT u.id $ctxselect FROM {user} u $ctxjoin $groupjoin WHERE u.id IN ($enrolledsql) ) q ON q.id = us.id LEFT JOIN {user_lastaccess} ul ON (ul.userid = us.id AND ul.courseid = :courseid) ORDER BY $sortby $sortdirection" | 1 |
|
"SELECT e.*, c.visible AS cvisible, ue.status AS ustatus FROM {enrol} e JOIN {course} c ON c.id = e.courseid JOIN {role_assignments} ra ON ra.itemid = e.id LEFT JOIN {user_enrolments} ue ON ue.enrolid = e.id AND ue.userid = ra.userid WHERE ra.userid = :userid AND e.enrol = 'database'" | 1 |
|
"SELECT c.id, c.visible, c.$localcoursefield AS mapping, c.shortname, e.id AS enrolid FROM {course} c LEFT JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'database') WHERE c.id = :id" | 1 |
|
"SELECT c.id, c.visible, c.$localcoursefield AS mapping, e.id AS enrolid, c.shortname FROM {course} c JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'database')" | 1 |
|
"SELECT c.id, c.visible, c.$localcoursefield AS mapping, c.shortname FROM {course} c LEFT JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'database') WHERE e.id IS NULL $localnotempty" | 1 |
|
"SELECT u.$localuserfield AS mapping, u.id AS userid, ue.status, ra.roleid FROM {user} u JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.component = 'enrol_database' AND ra.itemid = :enrolid) LEFT JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid = ra.itemid) WHERE u.deleted = 0" | 1 |
|
"SELECT $distinct $fields FROM $table $where $sort" | 1 |
|
"SELECT * FROM $enroltable" | 1 |
|
"SELECT * FROM $coursetable" | 1 |
|
"SELECT ctx.id FROM {enrol} e JOIN {context} ctx ON (e.courseid = ctx.instanceid AND ctx.contextlevel = :contextcourse) WHERE e.id = :enrolid AND e.enrol = :enrolname" | 1 |
|
"SELECT p.userid FROM {payments} p JOIN {enrol} e ON (p.component = :component AND p.itemid = e.id) WHERE e.courseid = :courseid" | 1 |
|
"SELECT p.userid FROM {payments} p LEFT JOIN {enrol} e ON p.itemid = e.id WHERE p.component = :component AND e.id IS NULL" | 1 |
|
"SELECT p.* FROM {payments} p LEFT JOIN {enrol} e ON p.itemid = e.id WHERE p.userid = :userid AND p.component = :component AND e.id IS NULL" | 1 |
|
"SELECT p.id FROM {payments} p JOIN {enrol} e ON (p.component = :component AND p.itemid = e.id) WHERE e.courseid = :courseid" | 1 |
|
"SELECT p.id FROM {payments} p LEFT JOIN {enrol} e ON p.itemid = e.id WHERE p.component = :component AND e.id IS NULL" | 1 |
|
"SELECT p.id FROM {payments} p JOIN {enrol} e ON (p.component = :component AND p.itemid = e.id) WHERE p.userid = :userid AND e.courseid $insql" | 1 |
|
"SELECT p.id FROM {payments} p LEFT JOIN {enrol} e ON p.itemid = e.id WHERE p.component = :component AND p.userid = :userid AND e.id IS NULL" | 1 |
|
"SELECT p.id FROM {payments} p JOIN {enrol} e ON (p.component = :component AND p.itemid = e.id) WHERE e.courseid = :courseid AND p.userid $usersql" | 1 |
|
"SELECT p.id FROM {payments} p LEFT JOIN {enrol} e ON p.itemid = e.id WHERE p.component = :component AND p.userid $usersql AND e.id IS NULL" | 1 |
|
'Select the role to assign to users after making a payment.' | 1 |
|
'Select the action to be performed when a user\'s enrolment expires. Please note that some user data and settings are deleted when a user is unenrolled.' | 1 |
|
'Select payment type' | 1 |
|
"SELECT 'x' FROM {role_assignments} WHERE roleid $roleids AND contextid $contextids" | 1 |
|
"SELECT ra.userid, ra.estart FROM (SELECT xra.userid, MIN(xra.timemodified) AS estart FROM {role_assignments} xra JOIN {user} xu ON (xu.id = xra.userid AND xu.deleted = 0) WHERE xra.roleid $roleids AND xra.contextid $contextids GROUP BY xra.userid ) ra LEFT JOIN {user_enrolments} ue ON (ue.enrolid = :instanceid AND ue.userid = ra.userid) WHERE ue.id IS NULL" | 1 |
|
"SELECT DISTINCT ue.userid FROM {user_enrolments} ue LEFT JOIN {role_assignments} ra ON (ra.roleid $roleids AND ra.contextid $contextids AND ra.userid = ue.userid) WHERE ue.enrolid = :instanceid AND ra.id IS NULL" | 1 |
|
"SELECT c.* FROM {course} c JOIN ( SELECT DISTINCT c.id FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :courselevel) JOIN (SELECT DISTINCT cctx.path FROM {course_categories} cc JOIN {context} cctx ON (cctx.instanceid = cc.id AND cctx.contextlevel = :catlevel) JOIN {role_assignments} ra ON (ra.contextid = cctx.id AND ra.roleid $roleids) ) cat ON (ctx.path LIKE $parentcat) LEFT JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'category') WHERE e.id IS NULL) ci ON (c.id = ci.id)" | 1 |
|
"SELECT e.* FROM {enrol} e JOIN {context} ctx ON (ctx.instanceid = e.courseid AND ctx.contextlevel = :courselevel) LEFT JOIN ({course_categories} cc JOIN {context} cctx ON (cctx.instanceid = cc.id AND cctx.contextlevel = :catlevel) JOIN {role_assignments} ra ON (ra.contextid = cctx.id AND ra.roleid $roleids) ) ON (ctx.path LIKE $parentcctx) WHERE e.enrol = 'category' AND cc.id IS NULL" | 1 |
|
"SELECT e.*, cat.userid, cat.estart FROM {enrol} e JOIN {context} ctx ON (ctx.instanceid = e.courseid AND ctx.contextlevel = :courselevel) JOIN (SELECT cctx.path, ra.userid, MIN(ra.timemodified) AS estart FROM {course_categories} cc JOIN {context} cctx ON (cctx.instanceid = cc.id AND cctx.contextlevel = :catlevel) JOIN {role_assignments} ra ON (ra.contextid = cctx.id AND ra.roleid $roleids) GROUP BY cctx.path, ra.userid ) cat ON (ctx.path LIKE $parentcat) LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = cat.userid) WHERE e.enrol = 'category' AND ue.id IS NULL" | 1 |
|
"SELECT e.*, ue.userid FROM {enrol} e JOIN {context} ctx ON (ctx.instanceid = e.courseid AND ctx.contextlevel = :courselevel) JOIN {user_enrolments} ue ON (ue.enrolid = e.id) LEFT JOIN ({course_categories} cc JOIN {context} cctx ON (cctx.instanceid = cc.id AND cctx.contextlevel = :catlevel) JOIN {role_assignments} ra ON (ra.contextid = cctx.id AND ra.roleid $roleids) ) ON (ctx.path LIKE $parentcctx AND ra.userid = ue.userid) WHERE e.enrol = 'category' AND cc.id IS NULL" | 1 |
|
"SELECT c.* FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :courselevel AND ctx.path LIKE :match) LEFT JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'category') WHERE e.id IS NULL" | 1 |
|
"SELECT e.* FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :courselevel AND ctx.path LIKE :match) JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'category') LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = :userid) WHERE ue.id IS NULL" | 1 |
|
"SELECT e.* FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :courselevel AND ctx.path LIKE :match) JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'category') JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = :userid)" | 1 |
|
"SELECT ra.id FROM {role_assignments} ra WHERE ra.userid = :userid AND ra.contextid $contextids AND ra.roleid $roleids" | 1 |
|
"SELECT ctx.id FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid AND ue.userid = :userid JOIN {context} ctx ON ctx.instanceid = e.courseid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT ue.userid as userid FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE e.courseid = ?" | 1 |
|
"SELECT ue.id, ue.status, ue.timestart, ue.timeend, ue.timecreated, ue.timemodified, e.enrol, ctx.id as contextid FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid AND ue.userid = :userid JOIN {context} ctx ON ctx.instanceid = e.courseid AND ctx.contextlevel = :contextlevel WHERE ctx.id $insql ORDER BY ctx.id, e.enrol" | 1 |
|
"SELECT ue.id FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE e.courseid = :courseid" | 1 |
|
"SELECT ue.id FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE e.courseid = :courseid AND ue.userid {$usersql}" | 1 |
|
"SELECT ue.id FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid AND ue.userid = :userid JOIN {context} ctx ON ctx.instanceid = e.courseid AND ctx.contextlevel = :contextlevel WHERE ctx.id $insql" | 1 |
|
"SELECT c.id FROM {enrol_flatfile} ef JOIN {context} c ON c.contextlevel = ? AND c.instanceid = ef.courseid WHERE ef.userid = ?" | 1 |
|
"SELECT userid FROM {enrol_flatfile} WHERE courseid = ?" | 1 |
|
"SELECT ef.action, r.shortname, ef.courseid, ef.timestart, ef.timeend, ef.timemodified FROM {enrol_flatfile} ef JOIN {context} c ON c.contextlevel = :contextlevel AND c.instanceid = ef.courseid JOIN {role} r ON r.id = ef.roleid WHERE ef.userid = :userid" | 1 |
|
"SELECT e.courseid, ue.status, e.id as enrolid, c.shortname FROM {user} u JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.component = 'enrol_ldap' AND ra.roleid = :roleid) JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid = ra.itemid) JOIN {enrol} e ON (e.id = ue.enrolid) JOIN {course} c ON (c.id = e.courseid) WHERE u.deleted = 0 AND u.id = :userid" | 1 |
|
"SELECT c.id, c.visible, e.id as enrolid FROM {course} c JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'ldap') WHERE c.id = :courseid" | 1 |
|
"SELECT u.id as userid, u.username, ue.status, ra.contextid, ra.itemid as instanceid FROM {user} u JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.component = 'enrol_ldap' AND ra.roleid = :roleid) JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid = ra.itemid) JOIN {enrol} e ON (e.id = ue.enrolid) WHERE u.deleted = 0 AND e.courseid = :courseid " | 1 |
|
"SELECT c.id, c.visible, e.id as enrolid FROM {course} c JOIN {enrol} e ON (e.courseid = c.id AND e.enrol = 'ldap') WHERE c.id = :courseid" | 1 |
|
'SELECT id,username,1 FROM {user} WHERE idnumber = ? AND deleted = 0' | 1 |
|
"SELECT ue.status FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'ldap') WHERE e.courseid = :courseid AND ue.userid = :userid" | 1 |
|
'Update full name during synchronisation script' | 1 |
|
'Update full name' | 1 |
|
'Update short name during synchronisation script' | 1 |
|
'Update short name' | 1 |
|
'Update summary during synchronisation script' | 1 |
|
'Update summary' | 1 |
|
'Update local data' | 1 |
|
"SELECT COUNT(DISTINCT u.id) FROM {user} u {$join->joins} WHERE {$join->wheres}" | 1 |
|
"SELECT ue.id, ue.status, ue.timestart, ue.timeend, ue.timecreated, ue.timemodified FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid AND e.courseid = :courseid WHERE ue.userid = :userid" | 1 |
|
"SELECT ue.id FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid AND e.courseid = :courseid" | 1 |
|
"SELECT ue.*, e.status AS enrolstatus FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol <> 'meta' AND e.courseid = :parentcourse AND e.enrol $enabled) WHERE ue.userid = :userid" | 1 |
|
"SELECT pue.userid, e.id AS enrolid, MIN(pue.status + pe.status) AS status, MIN(CASE WHEN (pue.status + pe.status = 0) THEN pue.timestart ELSE 9999999999 END) AS timestart, MAX(CASE WHEN (pue.status + pe.status = 0) THEN (CASE WHEN pue.timeend = 0 THEN 9999999999 ELSE pue.timeend END) ELSE 0 END) AS timeend FROM {user_enrolments} pue JOIN {enrol} pe ON (pe.id = pue.enrolid AND pe.enrol <> 'meta' AND pe.enrol $enabled) JOIN {enrol} e ON (e.customint1 = pe.courseid AND e.enrol = 'meta' AND e.status = :enrolstatus $onecourse) JOIN {user} u ON (u.id = pue.userid AND u.deleted = 0) LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = pue.userid) WHERE ue.id IS NULL GROUP BY pue.userid, e.id" | 1 |
|
"SELECT ue.* FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'meta' $onecourse) LEFT JOIN ({user_enrolments} xpue JOIN {enrol} xpe ON (xpe.id = xpue.enrolid AND xpe.enrol <> 'meta' AND xpe.enrol $enabled) ) ON (xpe.courseid = e.customint1 AND xpue.userid = ue.userid) WHERE xpue.userid IS NULL" | 1 |
|
"SELECT ue.userid, ue.enrolid, MIN(xpue.status + xpe.status) AS pstatus, MIN(CASE WHEN (xpue.status + xpe.status = 0) THEN xpue.timestart ELSE 9999999999 END) AS ptimestart, MAX(CASE WHEN (xpue.status + xpe.status = 0) THEN (CASE WHEN xpue.timeend = 0 THEN 9999999999 ELSE xpue.timeend END) ELSE 0 END) AS ptimeend FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'meta' $onecourse) JOIN {user_enrolments} xpue ON (xpue.userid = ue.userid) JOIN {enrol} xpe ON (xpe.id = xpue.enrolid AND xpe.enrol <> 'meta' AND xpe.enrol $enabled AND xpe.courseid = e.customint1) GROUP BY ue.userid, ue.enrolid HAVING (MIN(xpue.status + xpe.status) = 0 AND MIN(ue.status) > 0) OR (MIN(xpue.status + xpe.status) > 0 AND MIN(ue.status) = 0) OR ((CASE WHEN MIN(CASE WHEN (xpue.status + xpe.status = 0) THEN xpue.timestart ELSE 9999999999 END) = 9999999999 THEN 0 ELSE MIN(CASE WHEN (xpue.status + xpe.status = 0) THEN xpue.timestart ELSE 9999999999 END) END) <> MIN(ue.timestart)) OR ((CASE WHEN MAX(CASE WHEN (xpue.status + xpe.status = 0) THEN (CASE WHEN xpue.timeend = 0 THEN 9999999999 ELSE xpue.timeend END) ELSE 0 END) = 9999999999 THEN 0 ELSE MAX(CASE WHEN (xpue.status + xpe.status = 0) THEN (CASE WHEN xpue.timeend = 0 THEN 9999999999 ELSE xpue.timeend END) ELSE 0 END) END) <> MAX(ue.timeend))" | 1 |
|
"SELECT DISTINCT pra.roleid, pra.userid, c.id AS contextid, e.id AS enrolid, e.courseid FROM {role_assignments} pra JOIN {user} u ON (u.id = pra.userid AND u.deleted = 0) JOIN {context} pc ON (pc.id = pra.contextid AND pc.contextlevel = :coursecontext AND pra.component $enabled) JOIN {enrol} e ON (e.customint1 = pc.instanceid AND e.enrol = 'meta' $onecourse AND e.status = :enabledinstance) JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = u.id AND ue.status = :activeuser) JOIN {context} c ON (c.contextlevel = pc.contextlevel AND c.instanceid = e.courseid) LEFT JOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.userid = pra.userid AND ra.roleid = pra.roleid AND ra.itemid = e.id AND ra.component = 'enrol_meta') WHERE ra.id IS NULL" | 1 |
|
"SELECT ra.roleid, ra.userid, ra.contextid, ra.itemid, e.courseid FROM {role_assignments} ra JOIN {enrol} e ON (e.id = ra.itemid AND ra.component = 'enrol_meta' AND e.enrol = 'meta' $onecourse) JOIN {context} pc ON (pc.instanceid = e.customint1 AND pc.contextlevel = :coursecontext) LEFT JOIN {role_assignments} pra ON (pra.contextid = pc.id AND pra.userid = ra.userid AND pra.roleid = ra.roleid AND pra.component <> 'enrol_meta' $notignored) LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = ra.userid AND ue.status = :activeuser) WHERE pra.id IS NULL OR ue.id IS NULL OR e.status <> :enabledinstance" | 1 |
|
"SELECT ue.userid, ue.enrolid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'meta' $onecourse) JOIN {context} c ON (e.courseid = c.instanceid AND c.contextlevel = :coursecontext) LEFT JOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.itemid = e.id AND ra.userid = ue.userid) WHERE ra.id IS NULL" | 1 |
|
"SELECT ue.userid, ue.enrolid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'meta' $onecourse) JOIN {context} c ON (e.courseid = c.instanceid AND c.contextlevel = :coursecontext) LEFT JOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.itemid = e.id AND ra.userid = ue.userid) WHERE ra.id IS NULL AND ue.status = :active" | 1 |
|
"SELECT c.id, c.fullname, c.shortname, c.visible $select FROM {course} c $join $where ORDER BY $sortorder" | 1 |
|
'SELECT DISTINCT courseid FROM {enrol} ' . 'WHERE customint1 = ? AND enrol = ?' | 1 |
|
'SELECT MAX(id) FROM {course}' | 1 |
|
'SELECT MAX(id) FROM {groups}' | 1 |
|
'Select course as meta linked' | 1 |
|
'Delete meta enrolment instances' | 1 |
|
"SELECT c.id AS remoteid, c.fullname, c.shortname, c.idnumber, c.summary, c.summaryformat, c.sortorder, c.startdate, cat.id AS cat_id, cat.name AS cat_name, cat.description AS cat_description, cat.descriptionformat AS cat_descriptionformat, e.cost, e.currency, e.roleid AS defaultroleid, r.name AS defaultrolename, e.customint1 FROM {enrol} e INNER JOIN {course} c ON c.id = e.courseid INNER JOIN {course_categories} cat ON cat.id = c.category INNER JOIN {role} r ON r.id = e.roleid WHERE e.enrol = 'mnet' AND (e.customint1 = 0 OR e.customint1 = ?) AND c.visible = 1 ORDER BY cat.sortorder, c.sortorder, c.shortname" | 1 |
|
"SELECT u.username, r.shortname, r.name, e.enrol, ue.timemodified FROM {user_enrolments} ue JOIN {user} u ON ue.userid = u.id JOIN {enrol} e ON ue.enrolid = e.id JOIN {role} r ON e.roleid = r.id WHERE u.mnethostid = :mnethostid AND e.courseid = :courseid AND u.id <> :guestid AND u.confirmed = 1 AND u.deleted = 0" | 1 |
|
'Select \'All hosts\' to open this course for all MNet peers we are offering the remote enrolment service to. Or choose a single host to make this course available for their users only.' | 1 |
|
"SELECT e.*, r.id as roleexists FROM {enrol} e LEFT JOIN {role} r ON (r.id = e.roleid) WHERE e.customint1 = :cohortid AND e.enrol = 'cohort' AND e.status = :enrolstatus ORDER BY e.id ASC" | 1 |
|
"SELECT cm.userid, e.id AS enrolid, ue.status FROM {cohort_members} cm JOIN {enrol} e ON (e.customint1 = cm.cohortid AND e.enrol = 'cohort' AND e.status = :enrolstatus $onecourse) JOIN {user} u ON (u.id = cm.userid AND u.deleted = 0) LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = cm.userid) WHERE ue.id IS NULL OR ue.status = :suspended" | 1 |
|
"SELECT ue.*, e.courseid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'cohort' $onecourse) LEFT JOIN {cohort_members} cm ON (cm.cohortid = e.customint1 AND cm.userid = ue.userid) WHERE cm.id IS NULL" | 1 |
|
"SELECT e.roleid, ue.userid, c.id AS contextid, e.id AS itemid, e.courseid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'cohort' AND e.status = :statusenabled $onecourse) JOIN {role} r ON (r.id = e.roleid) JOIN {context} c ON (c.instanceid = e.courseid AND c.contextlevel = :coursecontext) JOIN {user} u ON (u.id = ue.userid AND u.deleted = 0) LEFT JOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.userid = ue.userid AND ra.itemid = e.id AND ra.component = 'enrol_cohort' AND e.roleid = ra.roleid) WHERE ue.status = :useractive AND ra.id IS NULL" | 1 |
|
"SELECT ra.roleid, ra.userid, ra.contextid, ra.itemid, e.courseid FROM {role_assignments} ra JOIN {context} c ON (c.id = ra.contextid AND c.contextlevel = :coursecontext) JOIN {enrol} e ON (e.id = ra.itemid AND e.enrol = 'cohort' $onecourse) LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = ra.userid AND ue.status = :useractive) WHERE ra.component = 'enrol_cohort' AND (ue.id IS NULL OR e.status <> :statusenabled)" | 1 |
|
"SELECT e.id, e.courseid, e.status, MIN(me.id) AS mid, COUNT(ue.id) AS cu FROM {enrol} e JOIN {user_enrolments} ue ON (ue.enrolid = e.id) JOIN {course} c ON (c.id = e.courseid) LEFT JOIN {enrol} me ON (me.courseid = e.courseid AND me.enrol='manual') WHERE e.enrol = :enrol GROUP BY e.id, e.courseid, e.status ORDER BY e.id" | 1 |
|
"SELECT ra.id FROM {role_assignments} ra JOIN {role_assignments} mra ON (mra.contextid = ra.contextid AND mra.userid = ra.userid AND mra.roleid = ra.roleid AND mra.component = :empty AND mra.itemid = 0) WHERE ra.component = :component AND ra.itemid = :id" | 1 |
|
"UPDATE {role_assignments} SET itemid = 0, component = :empty WHERE itemid = :id AND component = :component" | 1 |
|
"SELECT ue.id FROM {user_enrolments} ue JOIN {user_enrolments} mue ON (mue.userid = ue.userid AND mue.enrolid = :mid) WHERE ue.enrolid = :id" | 1 |
|
"UPDATE {user_enrolments} SET enrolid = :mid $status WHERE enrolid = :id" | 1 |
|
"SELECT ue.*, e.courseid, c.id AS contextid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'manual') JOIN {context} c ON (c.instanceid = e.courseid AND c.contextlevel = :courselevel) WHERE ue.timeend > 0 AND ue.timeend < :now $coursesql" | 1 |
|
"SELECT ue.*, e.courseid, c.id AS contextid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'manual') JOIN {context} c ON (c.instanceid = e.courseid AND c.contextlevel = :courselevel) WHERE ue.timeend > 0 AND ue.timeend < :now AND ue.status = :useractive $coursesql" | 1 |
|
"SELECT cm.userid FROM {cohort_members} cm LEFT JOIN ($esql) u ON u.id = cm.userid " . "WHERE cm.cohortid = :cohortid AND u.id IS NULL" | 1 |
|
'Delete user accounts when specified in IMS data' | 1 |
|
'Update course' | 1 |
|
'Update user accounts when specified in IMS data' | 1 |
|
'Delete enrolment and roles' | 1 |
|
"SELECT r.* FROM {{$this->resourcelinktable}} r LEFT OUTER JOIN {{$this->contexttable}} c ON r.contextid = c.id WHERE (r.consumerid = ? OR c.consumerid = ?) AND ltiresourcelinkkey = ?" | 1 |
|
"SELECT id FROM {{$this->resourcelinktable}} WHERE {$subwhere}" | 1 |
|
"SELECT elt.*, e.name, e.courseid, e.status, e.enrolstartdate, e.enrolenddate, e.enrolperiod FROM {enrol_lti_tools} elt JOIN {enrol} e ON elt.enrolid = e.id WHERE elt.id = :tid" | 1 |
|
"SELECT elt.*, e.name, e.courseid, e.status, e.enrolstartdate, e.enrolenddate, e.enrolperiod FROM {enrol_lti_tools} elt JOIN {enrol} e ON elt.enrolid = e.id" | 1 |
|
"SELECT COUNT(*) FROM {enrol_lti_tools} elt JOIN {enrol} e ON elt.enrolid = e.id" | 1 |
|
"SELECT DISTINCT ctx.id FROM {enrol_lti_users} ltiusers JOIN {enrol_lti_tools} ltitools ON ltiusers.toolid = ltitools.id JOIN {context} ctx ON ctx.id = ltitools.contextid WHERE ltiusers.userid = :userid" | 1 |
|
"SELECT ltiusers.userid FROM {enrol_lti_users} ltiusers JOIN {enrol_lti_tools} ltitools ON ltiusers.toolid = ltitools.id WHERE ltitools.contextid = :contextid" | 1 |
|
"SELECT ltiusers.lastgrade, ltiusers.lastaccess, ltiusers.timecreated, ltitools.contextid FROM {enrol_lti_users} ltiusers JOIN {enrol_lti_tools} ltitools ON ltiusers.toolid = ltitools.id JOIN {context} ctx ON ctx.id = ltitools.contextid WHERE ctx.id {$contextsql} AND ltiusers.userid = :userid" | 1 |
|
"SELECT r.id, r.resourcelinkid, r.resourceid, r.ltideploymentid, r.lticontextid, r.lineitemsservice, r.lineitemservice, r.lineitemscope, r.resultscope, r.scorescope, r.contextmembershipsurl, r.nrpsserviceversions, r.timecreated, r.timemodified FROM {enrol_lti_resource_link} r JOIN {enrol_lti_user_resource_link} ur ON (r.id = ur.resourcelinkid) WHERE ur.ltiuserid = :ltiuserid AND r.resourceid = :resourceid" | 1 |
|
"SELECT t.id, t.secret FROM {enrol_lti_lti2_consumer} c JOIN {enrol_lti_tool_consumer_map} cm ON (c.id = cm.consumerid) JOIN {enrol_lti_tools} t ON (t.id = cm.toolid) WHERE c.consumerkey256 = :consumerkey" | 1 |
|
"SELECT lu.id FROM {{$this->ltiuserstable}} lu WHERE lu.toolid = :toolid AND lu.userid = :userid" | 1 |
|
"SELECT lu.id, u.id as localid, u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.institution, u.timezone, u.maildisplay, u.lang, lu.sourceid, lu.toolid, lu.lastgrade, lu.lastaccess, lu.ltideploymentid FROM {{$this->ltiuserstable}} lu JOIN {user} u ON (u.id = lu.userid) WHERE lu.id = :id AND lu.ltideploymentid IS NOT NULL" | 1 |
|
"SELECT lu.id, u.id as localid, u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.institution, u.timezone, u.maildisplay, u.lang, lu.sourceid, lu.toolid, lu.lastgrade, lu.lastaccess, lu.ltideploymentid FROM {{$this->ltiuserstable}} lu JOIN {user} u ON (u.id = lu.userid) WHERE lu.userid = :userid AND lu.toolid = :resourceid AND lu.ltideploymentid IS NOT NULL" | 1 |
|
"SELECT lu.id, u.id as localid, u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.institution, u.timezone, u.maildisplay, u.lang, lu.sourceid, lu.toolid, lu.lastgrade, lu.lastaccess, lu.ltideploymentid FROM {{$this->ltiuserstable}} lu JOIN {user} u ON (u.id = lu.userid) WHERE lu.toolid = :resourceid AND lu.ltideploymentid IS NOT NULL ORDER BY lu.lastaccess DESC" | 1 |
|
"SELECT lu.id, u.id as localid, u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.institution, u.timezone, u.maildisplay, u.lang, lu.sourceid, lu.toolid, lu.lastgrade, lu.lastaccess, lu.ltideploymentid FROM {{$this->ltiuserstable}} lu JOIN {user} u ON (u.id = lu.userid) JOIN {{$this->userresourcelinkidtable}} url ON (url.ltiuserid = lu.id) WHERE url.resourcelinkid = :resourcelinkid ORDER BY lu.lastaccess DESC" | 1 |
|
"SELECT eld.id, eld.name, eld.deploymentid, eld.platformid, eld.legacyconsumerkey FROM {" . $this->deploymenttable . "} eld JOIN {enrol_lti_app_registration} elar ON (eld.platformid = elar.id) WHERE elar.id = :registrationid AND eld.deploymentid = :deploymentid" | 1 |
|
"SELECT eld.id, eld.name, eld.deploymentid, eld.platformid, eld.legacyconsumerkey FROM {" . $this->deploymenttable . "} eld JOIN {enrol_lti_app_registration} elar ON (eld.platformid = elar.id) WHERE elar.id = :registrationid" | 1 |
|
"SELECT elt.id, elt.uuid, elt.enrolid, elt.contextid, elt.institution, elt.lang, elt.timezone, elt.maxenrolled, elt.maildisplay, elt.city, elt.country, elt.gradesync, elt.gradesynccompletion, elt.membersync, elt.membersyncmode, elt.roleinstructor, elt.rolelearner, e.name AS enrolname, e.courseid, ctx.contextlevel, c.fullname AS coursefullname FROM {enrol} e JOIN {enrol_lti_tools} elt ON (e.id = elt.enrolid and e.status = :enrolstatusenabled) JOIN {course} c ON (c.id = e.courseid) JOIN {context} ctx ON (ctx.id = elt.contextid) WHERE elt.ltiversion $insql ORDER BY courseid" | 1 |
|
"SELECT elt.id, elt.uuid, elt.enrolid, elt.contextid, elt.institution, elt.lang, elt.timezone, elt.maxenrolled, elt.maildisplay, elt.city, elt.country, elt.gradesync, elt.gradesynccompletion, elt.membersync, elt.membersyncmode, elt.roleinstructor, elt.rolelearner, e.name AS enrolname, e.courseid, ctx.contextlevel, c.fullname AS coursefullname FROM {enrol} e JOIN {enrol_lti_tools} elt ON (e.id = elt.enrolid and e.status = :enrolstatusenabled) JOIN {course} c ON (c.id = e.courseid) JOIN {context} ctx ON (ctx.id = elt.contextid) WHERE elt.ltiversion $insql AND elt.id $idsinsql ORDER BY courseid" | 1 |
|
"SELECT a.id, a.name, a.platformid, a.clientid, a.authenticationrequesturl, a.jwksurl, a.accesstokenurl, a.uniqueid, a.status, a.timecreated, a.timemodified FROM {enrol_lti_app_registration} a JOIN {enrol_lti_deployment} d ON (d.platformid = a.id) WHERE d.id = :id" | 1 |
|
"SELECT c.fullname FROM {enrol_lti_tools} t JOIN {enrol} e ON (e.id = t.enrolid) JOIN {course} c ON (c.id = e.courseid) WHERE t.id = :resourceid" | 1 |
|
"SELECT lu.userid as ltiuserid, e.* FROM {enrol_lti_users} lu JOIN {enrol_lti_tools} lt ON (lt.id = lu.toolid) JOIN {enrol} e ON (e.id = lt.enrolid) WHERE lu.ltideploymentid = :deploymentid" | 1 |
|
"SELECT u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.institution, u.timezone, u.maildisplay, u.mnethostid, u.confirmed, u.lang, u.auth FROM {enrol_lti_users} lu JOIN {user} u ON (lu.userid = u.id) WHERE lu.id = :id" | 1 |
|
"SELECT rl.id FROM {enrol_lti_users} lu JOIN {enrol_lti_user_resource_link} rlj ON (lu.id = rlj.ltiuserid) JOIN {enrol_lti_resource_link} rl ON (rl.id = rlj.resourcelinkid) WHERE lu.id = :id" | 1 |
|
'Delete deployment' | 1 |
|
'Delete platform registration' | 1 |
|
"SELECT e.*, ue.userid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'self' AND e.customint2 > 0) JOIN {user} u ON u.id = ue.userid WHERE :now - u.lastaccess > e.customint2 $coursesql" | 1 |
|
"SELECT e.*, ue.userid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = 'self' AND e.customint2 > 0) JOIN {user_lastaccess} ul ON (ul.userid = ue.userid AND ul.courseid = e.courseid) WHERE :now - ul.timeaccess > e.customint2 $coursesql" | 1 |
|
"SELECT ue.*, e.expirynotify, e.notifyall, e.expirythreshold, e.courseid, c.fullname, e.customint2, COALESCE(ul.timeaccess, 0) AS timeaccess, ue.timestart FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = :name AND e.expirynotify > 0 AND e.status = :enabled) JOIN {course} c ON (c.id = e.courseid) JOIN {user} u ON (u.id = ue.userid AND u.deleted = 0 AND u.suspended = 0) LEFT JOIN {user_lastaccess} ul ON (ul.userid = u.id AND ul.courseid = c.id) WHERE ue.status = :active AND ((ue.timeend > 0 AND ue.timeend > :now1 AND ue.timeend < (e.expirythreshold + :now2)) OR (e.customint2 > 0 AND (:now3 - COALESCE(ul.timeaccess, 0) + e.expirythreshold > e.customint2))) ORDER BY ue.enrolid ASC, u.lastname ASC, u.firstname ASC, u.id ASC" | 1 |
|
'Select role which should be assigned to users during self enrolment' | 1 |
|
'Show first letter of the guest access key.' | 1 |
|
"SELECT ctx.id FROM {enrol_paypal} ep JOIN {enrol} e ON ep.instanceid = e.id JOIN {context} ctx ON e.courseid = ctx.instanceid AND ctx.contextlevel = :contextcourse JOIN {user} u ON u.id = ep.userid OR LOWER(u.email) = ep.receiver_email OR LOWER(u.email) = ep.business WHERE u.id = :userid" | 1 |
|
"SELECT u.id FROM {enrol_paypal} ep JOIN {enrol} e ON ep.instanceid = e.id JOIN {user} u ON ep.userid = u.id OR LOWER(u.email) = ep.receiver_email OR LOWER(u.email) = ep.business WHERE e.courseid = :courseid" | 1 |
|
"SELECT ep.* FROM {enrol_paypal} ep JOIN {enrol} e ON ep.instanceid = e.id JOIN {context} ctx ON e.courseid = ctx.instanceid AND ctx.contextlevel = :contextcourse JOIN {user} u ON u.id = ep.userid OR LOWER(u.email) = ep.receiver_email OR LOWER(u.email) = ep.business WHERE ctx.id {$contextsql} AND u.id = :userid ORDER BY e.courseid" | 1 |
|
'Select role which should be assigned to users during PayPal enrolments' | 1 |
|
'Show first letter of the guest access password.' | 1 |
|
"SELECT $ufields, mc.id as contactlistid, mub.id as userblockedid FROM {user} u LEFT JOIN {message_contacts} mc ON mc.contactid = u.id AND mc.userid = :userid LEFT JOIN {message_users_blocked} mub ON mub.userid = :userid2 AND mub.blockeduserid = u.id WHERE u.deleted = '0' AND u.confirmed = '1' AND (" . $DB->sql_like($fullname, ':query', false) . ") $except $order" | 1 |
|
"SELECT DISTINCT $ufields, mc.id as contactlistid, mub.id as userblockedid FROM {user} u JOIN {role_assignments} ra ON ra.userid = u.id LEFT JOIN {message_contacts} mc ON mc.contactid = u.id AND mc.userid = :userid LEFT JOIN {message_users_blocked} mub ON mub.userid = :userid2 AND mub.blockeduserid = u.id WHERE u.deleted = '0' AND u.confirmed = '1' AND (" . $DB->sql_like($fullname, ':query', false) . ") AND ra.contextid $contextwhere $except $order" | 1 |
|
"SELECT mr.*, $userfields, 0 as notification, '' as contexturl, '' as contexturlname, mua.timecreated as timeusertodeleted, mua2.timecreated as timeread, mua3.timecreated as timeuserfromdeleted, $messageuseridtosql FROM {messages} mr INNER JOIN {message_conversations} mc ON mc.id = mr.conversationid INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id " | 1 |
|
"SELECT mr.*, $userfields, 1 as notification FROM {notifications} mr " | 1 |
|
"SELECT m.*, mcm.userid as useridto FROM {messages} m INNER JOIN {message_conversations} mc ON m.conversationid = mc.id INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND mua.action = ?) WHERE mua.id is NULL AND mcm.userid != m.useridfrom AND m.id = ?" | 1 |
|
"SELECT m.id, m.useridfrom, m.subject, m.fullmessage, m.fullmessagehtml, m.fullmessageformat, m.fullmessagetrust, m.smallmessage, m.timecreated, mc.contextid, muaread.timecreated AS timeread FROM {message_conversations} mc INNER JOIN {messages} m ON m.conversationid = mc.id LEFT JOIN {message_user_actions} muaread ON (muaread.messageid = m.id AND muaread.userid = :userid1 AND muaread.action = :readaction)" | 1 |
|
"SELECT id FROM {message} m WHERE useridfrom = ? OR useridto = ?" | 1 |
|
"SELECT id FROM {message_read} m WHERE useridfrom = ? OR useridto = ?" | 1 |
|
"SELECT $userfields, u.deleted, mc.id AS contactid, mub.id AS blockedid FROM {user} u LEFT JOIN {message_contacts} mc ON ((mc.userid = ? AND mc.contactid = u.id) OR (mc.userid = u.id AND mc.contactid = ?)) LEFT JOIN {message_users_blocked} mub ON (mub.userid = ? AND mub.blockeduserid = u.id) WHERE u.id $useridsql" | 1 |
|
"SELECT $uniqueidsql AS uniqueid, m.id, m.useridfrom, mcm.userid as useridto, m.subject, m.fullmessage, m.fullmessagehtml, m.fullmessageformat, m.smallmessage, m.conversationid, m.timecreated, 0 as isread, $ufields, mub.id as userfrom_blocked, $ufields2, mub2.id as userto_blocked FROM ( SELECT m2.id AS id FROM {messages} m2 WHERE m2.useridfrom = ? UNION SELECT m3.id AS id FROM {message_conversation_members} mcm3 INNER JOIN {messages} m3 ON mcm3.conversationid = m3.conversationid WHERE mcm3.userid = ? ) der INNER JOIN {messages} m ON der.id = m.id INNER JOIN {user} u ON u.id = m.useridfrom INNER JOIN {message_conversations} mc ON mc.id = m.conversationid INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = m.conversationid INNER JOIN {user} u2 ON u2.id = mcm.userid LEFT JOIN {message_users_blocked} mub ON (mub.blockeduserid = u.id AND mub.userid = ?) LEFT JOIN {message_users_blocked} mub2 ON (mub2.blockeduserid = u2.id AND mub2.userid = ?) LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND mua.action = ?) WHERE (m.useridfrom = ? OR mcm.userid = ?) AND (m.useridfrom != mcm.userid OR mc.type = ?) AND u.deleted = 0 AND u2.deleted = 0 AND mua.id is NULL AND " . $DB->sql_like('smallmessage', '?', false) . " ORDER BY timecreated DESC" | 1 |
|
"SELECT u.id FROM {user} u JOIN {message_contacts} mc ON (u.id = mc.contactid AND mc.userid = :userid1) OR (u.id = mc.userid AND mc.contactid = :userid2) WHERE u.deleted = 0 AND u.confirmed = 1 AND " . $DB->sql_like($fullname, ':search', false) . " AND u.id $exclude ORDER BY " . $DB->sql_fullname( ) | 1 |
|
"SELECT $select FROM ( SELECT DISTINCT u.id FROM {user} u $joinenrolled WHERE u.deleted = 0 AND u.confirmed = 1 AND " . $DB->sql_like($fullname, ':search', false) . " AND u.id $exclude $enrolled AND NOT EXISTS (SELECT mc.id FROM {message_contacts} mc WHERE (mc.userid = u.id AND mc.contactid = :userid1) OR (mc.userid = :userid2 AND mc.contactid = u.id)) $unionself ) targetedusers JOIN {user} u ON u.id = targetedusers.id ORDER BY 2" | 1 |
|
"SELECT g.*, c.shortname as courseshortname FROM {groups} g JOIN {course} c ON g.courseid = c.id WHERE g.id $groupidsql" | 1 |
|
"SELECT m.id as messageid, mc.id as id, mc.name as conversationname, mc.type as conversationtype, m.useridfrom, m.smallmessage, m.fullmessage, m.fullmessageformat, m.fullmessagetrust, m.fullmessagehtml, m.timecreated, mc.component, mc.itemtype, mc.itemid, mc.contextid, mca.action as ismuted FROM {message_conversations} mc INNER JOIN {message_conversation_members} mcm ON (mcm.conversationid = mc.id AND mcm.userid = :userid3) LEFT JOIN ( SELECT m.conversationid, MAX(m.id) AS messageid FROM {messages} m INNER JOIN ( SELECT m.conversationid, MAX(m.timecreated) as maxtime FROM {messages} m INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = m.conversationid LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = :userid AND mua.action = :action) WHERE mua.id is NULL AND mcm.userid = :userid2 GROUP BY m.conversationid ) maxmessage ON maxmessage.maxtime = m.timecreated AND maxmessage.conversationid = m.conversationid GROUP BY m.conversationid ) lastmessage ON lastmessage.conversationid = mc.id LEFT JOIN {messages} m ON m.id = lastmessage.messageid LEFT JOIN {message_conversation_actions} mca ON (mca.conversationid = mc.id AND mca.userid = :userid4 AND mca.action = :convaction) WHERE mc.id IS NOT NULL AND mc.enabled = 1 $typesql $favouritesql ORDER BY (CASE WHEN m.timecreated IS NULL THEN 0 ELSE 1 END) DESC, m.timecreated DESC, id DESC" | 1 |
|
"SELECT mcm.id, mcm.conversationid, mcm.userid FROM {message_conversation_members} mcm WHERE mcm.conversationid $icidinsql AND mcm.userid != :userid ORDER BY mcm.id" | 1 |
|
"SELECT conversationid, count(DISTINCT userid) AS membercount FROM {message_conversation_members} mcm WHERE mcm.conversationid $cidinsql GROUP BY mcm.conversationid" | 1 |
|
'SELECT m.conversationid, count(m.id) as unreadcount FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid INNER JOIN {message_conversation_members} mcm ON m.conversationid = mcm.conversationid LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND (mua.action = ? OR mua.action = ?)) WHERE mcm.userid = ? AND m.useridfrom != ? AND mua.id is NULL GROUP BY m.conversationid' | 1 |
|
"SELECT mc.id, mc.type, mc.name, mc.timecreated FROM {message_conversations} mc INNER JOIN {message_conversation_members} mcm1 ON mc.id = mcm1.conversationid INNER JOIN {message_conversation_members} mcm2 ON mc.id = mcm2.conversationid WHERE mcm1.userid = :userid1 AND mcm2.userid = :userid2 AND mc.enabled != 0 ORDER BY mc.timecreated DESC" | 1 |
|
'SELECT count(m.id) FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND (mua.action = ? OR mua.action = ?)) WHERE m.conversationid = ? AND m.useridfrom != ? AND mua.id is NULL' | 1 |
|
"SELECT * FROM {message_contacts} mc WHERE mc.userid = ? OR mc.contactid = ? ORDER BY timecreated DESC, id ASC" | 1 |
|
"SELECT COUNT(id) FROM {message_contacts} WHERE userid = ? OR contactid = ?" | 1 |
|
"SELECT m.* FROM {messages} m INNER JOIN {message_conversations} mc ON m.conversationid = mc.id LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND mua.action = ?) WHERE mua.id is NULL AND mc.id = ? ORDER BY m.timecreated ASC" | 1 |
|
"SELECT COUNT(DISTINCT(m.conversationid)) FROM {messages} m INNER JOIN {message_conversations} mc ON m.conversationid = mc.id INNER JOIN {message_conversation_members} mcm ON mc.id = mcm.conversationid LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND mua.action = ?) WHERE mcm.userid = ? AND mc.enabled = ? AND mcm.userid != m.useridfrom AND mua.id is NULL" | 1 |
|
"SELECT mc.type, fav.itemtype, COUNT(DISTINCT mc.id) as count, MAX(maxvisibleconvmessage.convid) as maxconvidmessage FROM {message_conversations} mc INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id LEFT JOIN ( SELECT m.conversationid as convid, MAX(m.timecreated) as maxtime FROM {messages} m INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = m.conversationid LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = :userid AND mua.action = :action) WHERE mua.id is NULL AND mcm.userid = :userid2 GROUP BY m.conversationid ) maxvisibleconvmessage ON maxvisibleconvmessage.convid = mc.id $favsql WHERE mcm.userid = :userid3 AND mc.enabled = :enabled AND ( (mc.type = :individualtype AND maxvisibleconvmessage.convid IS NOT NULL) OR (mc.type = :grouptype) OR (mc.type = :selftype) ) GROUP BY mc.type, fav.itemtype ORDER BY mc.type ASC" | 1 |
|
"SELECT m.* FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND mua.action = ?) WHERE mua.id is NULL AND mcm.userid = ? AND m.useridfrom != ?" | 1 |
|
"SELECT n.* FROM {notifications} n WHERE useridto = ? AND timeread is NULL" | 1 |
|
"SELECT count(mub.id) FROM {message_users_blocked} mub WHERE mub.userid = :userid" | 1 |
|
"SELECT $userfields FROM {message_users_blocked} mub INNER JOIN {user} u ON u.id = mub.blockeduserid WHERE u.deleted = 0 AND mub.userid = ? GROUP BY $userfields ORDER BY u.firstname ASC" | 1 |
|
"SELECT mcr.userid FROM {message_contact_requests} mcr LEFT JOIN {message_users_blocked} mub ON (mub.userid = ? AND mub.blockeduserid = mcr.userid) WHERE mcr.requesteduserid = ? AND mub.id is NULL ORDER BY mcr.timecreated ASC" | 1 |
|
"SELECT COUNT(mcr.id) FROM {message_contact_requests} mcr LEFT JOIN {message_users_blocked} mub ON mub.userid = mcr.requesteduserid AND mub.blockeduserid = mcr.userid WHERE mcr.requesteduserid = :requesteduserid AND mub.id IS NULL" | 1 |
|
"SELECT id FROM {message_contacts} mc WHERE (mc.userid = ? AND mc.contactid = ?) OR (mc.userid = ? AND mc.contactid = ?)" | 1 |
|
"SELECT mc.* FROM {message_contacts} mc WHERE (mc.userid = ? AND mc.contactid = ?) OR (mc.userid = ? AND mc.contactid = ?)" | 1 |
|
"SELECT * FROM {message_contact_requests} mcr WHERE (mcr.userid = ? AND mcr.requesteduserid = ?) OR (mcr.userid = ? AND mcr.requesteduserid = ?)" | 1 |
|
"SELECT id FROM {message_contact_requests} mcr WHERE (mcr.userid = ? AND mcr.requesteduserid = ?) OR (mcr.userid = ? AND mcr.requesteduserid = ?)" | 1 |
|
'SELECT conv.id, conv.type, indcounts.unreadcount FROM {message_conversations} conv INNER JOIN ( SELECT m.conversationid, count(m.id) as unreadcount FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid INNER JOIN {message_conversation_members} mcm ON m.conversationid = mcm.conversationid LEFT JOIN {message_user_actions} mua ON (mua.messageid = m.id AND mua.userid = ? AND (mua.action = ? OR mua.action = ?)) WHERE mcm.userid = ? AND m.useridfrom != ? AND mua.id is NULL GROUP BY m.conversationid ) indcounts ON indcounts.conversationid = conv.id WHERE conv.enabled = 1' | 1 |
|
"SELECT mc.id, mc.contextid FROM {message_conversations} mc INNER JOIN {messages} m ON mc.id = m.conversationid WHERE m.id = :messageid" | 1 |
|
"SELECT mcm.id, mcm.userid FROM {message_conversation_members} mcm INNER JOIN {messages} m ON mcm.conversationid = m.conversationid WHERE m.id = :messageid" | 1 |
|
"SELECT mc.contextid FROM {message_conversations} mc JOIN {message_conversation_members} mcm ON (mcm.conversationid = mc.id AND mcm.userid = :userid) JOIN {context} ctx ON mc.contextid = ctx.id WHERE mc.component = :component AND mc.itemtype = :itemtype" | 1 |
|
"SELECT mcm.userid FROM {message_conversation_members} mcm INNER JOIN {message_conversations} mc ON mc.id = mcm.conversationid WHERE mc.contextid = :contextid AND mc.component = :component AND mc.itemtype = :itemtype" | 1 |
|
"SELECT DISTINCT mc.* FROM {message_conversations} mc JOIN {message_conversation_members} mcm ON (mcm.conversationid = mc.id AND mcm.userid = :userid)" | 1 |
|
"SELECT DISTINCT mcm.conversationid as id FROM {message_conversation_members} mcm INNER JOIN {message_conversations} mc ON mc.id = mcm.conversationid WHERE mcm.userid $useridsql AND $select" | 1 |
|
"SELECT DISTINCT m.id FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid INNER JOIN {message_user_actions} mua ON mua.messageid = m.id WHERE mua.userid $useridsql AND mc.id $conversationidsql" | 1 |
|
"SELECT DISTINCT m.id FROM {messages} m WHERE m.useridfrom $useridsql AND m.conversationid $conversationidsql" | 1 |
|
"SELECT DISTINCT mcm.conversationid as id FROM {message_conversation_members} mcm INNER JOIN {message_conversations} mc ON mc.id = mcm.conversationid WHERE mcm.userid = :userid AND $select" | 1 |
|
"SELECT DISTINCT m.id FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid INNER JOIN {message_user_actions} mua ON mua.messageid = m.id WHERE mua.userid = :userid AND mc.id $conversationidsql" | 1 |
|
"SELECT DISTINCT m.id FROM {messages} m WHERE m.useridfrom = :userid AND m.conversationid $conversationidsql" | 1 |
|
"SELECT m.*, muadelete.timecreated as timedeleted, muaread.timecreated as timeread FROM {messages} m LEFT JOIN {message_user_actions} muadelete ON m.id = muadelete.messageid AND muadelete.action = :deleteaction AND muadelete.userid = :deleteuserid LEFT JOIN {message_user_actions} muaread ON m.id = muaread.messageid AND muaread.action = :readaction AND muaread.userid = :readuserid WHERE conversationid = :conversationid ORDER BY m.timecreated ASC" | 1 |
|
"SELECT m.*, mcm.userid as useridto FROM {messages} m INNER JOIN {message_conversations} mc ON m.conversationid = mc.id INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id WHERE mcm.userid != m.useridfrom AND $where ORDER BY m.timecreated ASC" | 1 |
|
"SELECT DISTINCT(useridfrom) FROM {message} m WHERE useridto = ? UNION SELECT DISTINCT(useridfrom) FROM {message_read} m WHERE useridto = ?" | 1 |
|
"SELECT DISTINCT(useridto) FROM {message} m WHERE useridfrom = ? UNION SELECT DISTINCT(useridto) FROM {message_read} m WHERE useridfrom = ?" | 1 |
|
"SELECT COUNT(n.id) FROM {notifications} n LEFT JOIN {user} u ON (u.id = n.useridfrom AND u.deleted = 0) WHERE n.useridto = ? AND n.timeread IS NULL" | 1 |
|
"SELECT n.id, n.useridfrom, n.useridto, n.subject, n.fullmessage, n.fullmessageformat, n.fullmessagehtml, n.smallmessage, n.contexturl, n.contexturlname, n.timecreated, n.component, n.eventtype, n.timeread, n.customdata FROM {notifications} n WHERE n.id IN (SELECT notificationid FROM {message_popup_notifications}) AND n.useridto = ? ORDER BY timecreated $sort, timeread $sort, id $sort" | 1 |
|
"SELECT count(id) FROM {notifications} WHERE id IN (SELECT notificationid FROM {message_popup_notifications}) AND useridto = ? AND timeread is NULL" | 1 |
|
"SELECT ctx.id FROM {message_airnotifier_devices} mad JOIN {user_devices} ud ON ud.id = mad.userdeviceid JOIN {user} u ON ud.userid = u.id JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel WHERE ud.userid = :userid" | 1 |
|
"SELECT ud.userid FROM {message_airnotifier_devices} mad JOIN {user_devices} ud ON ud.id = mad.userdeviceid WHERE ud.userid = ?" | 1 |
|
"SELECT mad.id, mad.enable, ud.appid, ud.name, ud.model, ud.platform, ud.version, ud.timecreated, ud.timemodified, ud.pushid FROM {message_airnotifier_devices} mad JOIN {user_devices} ud ON mad.userdeviceid = ud.id WHERE ud.userid = :userid" | 1 |
|
'Delete your device: {$a->name}' | 1 |
|
'Delete the device. Note that an app can register the device again. If the device keeps reappearing, disable it.' | 1 |
|
"SELECT MAX(id) FROM {message_email_messages}" | 1 |
|
'SELECT DISTINCT(useridto) as id FROM {message_email_messages} WHERE id <= ?' | 1 |
|
"SELECT * FROM {user} u WHERE id IN ($subsql)" | 1 |
|
"SELECT DISTINCT mc.id, mc.name, c.id as courseid, c.fullname as coursename, g.id as groupid, g.picture FROM {message_conversations} mc JOIN {groups} g ON mc.itemid = g.id JOIN {course} c ON g.courseid = c.id JOIN {message_email_messages} mem ON mem.conversationid = mc.id WHERE mem.useridto = ? AND mem.id <= ?" | 1 |
|
"SELECT $usernamefields, m.* FROM {messages} m JOIN {user} u ON u.id = m.useridfrom JOIN {message_email_messages} mem ON mem.messageid = m.id WHERE mem.useridto = ? AND mem.conversationid = ? AND mem.id <= ?" | 1 |
|
"SELECT u.firstname, u.lastname {$userfields->selects} FROM {user} u {$userfields->joins} JOIN ({$enrolledsql}) je ON je.id = u.id {$groupmemberjoin} {$groupconcatjoin} WHERE u.id {$useridsql} ORDER BY {$userordersql}" | 1 |
|
"SELECT c.* $cselect FROM {course} c $cjoin WHERE c.id $sqlcourseids" | 1 |
|
"SELECT DISTINCT mnethostid FROM {user} WHERE deleted=0" | 1 |
|
"SELECT u.id AS userid, g.* FROM {user} u JOIN {groups_members} gm ON u.id = gm.userid JOIN {groups} g ON gm.groupid = g.id WHERE u.id $membersidsclause AND g.courseid = :courseid " | 1 |
|
"SELECT r.id AS roleid, u.id AS userid, " . $this->userfieldsselects . ", (SELECT count(igm.groupid) FROM {groups_members} igm JOIN {groups} ig ON igm.groupid = ig.id WHERE igm.userid = u.id AND ig.courseid = :courseid) AS numgroups" | 1 |
|
"SELECT COUNT(DISTINCT u.id) $sql" | 1 |
|
"SELECT id FROM {context} WHERE instanceid = :userid and contextlevel = :contextuser" | 1 |
|
"SELECT c.id, c.fullname, ul.timeaccess FROM {user_lastaccess} ul JOIN {course} c ON c.id = ul.courseid WHERE ul.userid = :userid" | 1 |
|
"SELECT cr.shortname, cr.fullname, cr.summary, cc.name AS category, cr.reason FROM {course_request} cr JOIN {course_categories} cc ON cr.category = cc.id WHERE cr.requester = :userid" | 1 |
|
"SELECT 'x' FROM {user} u JOIN ({$enrolledsql}) je ON je.id = u.id LEFT JOIN {user_lastaccess} ula ON ula.userid = je.id AND ula.courseid = :courseid WHERE COALESCE(ula.timeaccess, 0) = :timeaccess" | 1 |
|
" SELECT u.*, ra.contextid, r.shortname as roleshortname, ra.id as itemid, ra.timemodified as timeassigned FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :coursecontext JOIN {user} u ON u.id = ra.userid JOIN {role} r ON r.id = ra.roleid WHERE ra.timemodified >= :modifiedfrom AND r.id $insql ORDER BY ra.timemodified ASC" | 1 |
|
"SELECT u.* FROM {user} u JOIN {role_assignments} ra ON ra.userid = u.id WHERE ra.id = :raid" | 1 |
|
"SELECT COUNT(u.id) FROM ({$innerselect} FROM {$innerjoins} {$innerwhere} ) {$subqueryalias} {$outerjoins} {$outerwhere}" | 1 |
|
"SELECT DISTINCT {$inneruseralias}.id" | 1 |
|
"SELECT u.lastaccess $userfieldssql" | 1 |
|
"SELECT COALESCE(ul.timeaccess, 0) AS lastaccess $userfieldssql" | 1 |
|
"SELECT DISTINCT {$prefix}u.id FROM {user} {$prefix}u {$joinsql} WHERE {$prefix}u.deleted = 0" | 1 |
|
"SELECT DISTINCT {$forcedprefix}u.id FROM {user} {$forcedprefix}u {$forcedjoinsql} WHERE {$forcedwhere}" | 1 |
|
"SELECT idnumber $selects FROM {user} $joins WHERE idnumber LIKE :idnum ORDER BY idnumber" | 1 |
|
"SELECT idnumber $selects FROM {user} u $joins WHERE idnumber LIKE ? ORDER BY idnumber" | 1 |
|
"SELECT $selects FROM {user} $joins WHERE idnumber LIKE ? ORDER BY idnumber" | 1 |
|
"SELECT username, details.profile_field_b AS innerb, details.city AS innerc $selects2 FROM {user} u2 $joins2 LEFT JOIN ( SELECT u1.id $selects1 FROM {user} u1 $joins1 WHERE idnumber LIKE :idnum ) details ON details.id = u2.id ORDER BY username" | 1 |
|
"SELECT $fields FROM {user} u WHERE $wherecondition ORDER BY $sort" | 1 |
|
' SELECT id, userid FROM {user_info_data} WHERE fieldid = ? AND ' . $DB->sql_compare_text('data', 255) . ' = ' . $DB->sql_compare_text('?', 255) | 1 |
|
'SELECT uif.*, uic.name AS categoryname ' | 1 |
|
'SELECT min(id) from {user_info_category}' | 1 |
|
"SELECT contextid FROM {favourite} f WHERE userid = :userid AND component = :component" | 1 |
|
"SELECT userid FROM {favourite} WHERE contextid = :contextid AND component = :component" | 1 |
|
"SELECT c.id, favalias.component FROM {course} c $favsql WHERE c.id = :courseid1 OR c.id = :courseid2" | 1 |
|
"SELECT DISTINCT ctx.id FROM {context} ctx JOIN {contentbank_content} cb ON cb.contextid = ctx.id WHERE cb.usercreated = :userid AND (ctx.contextlevel = :contextlevel1 OR ctx.contextlevel = :contextlevel2 OR ctx.contextlevel = :contextlevel3)" | 1 |
|
"SELECT cb.usercreated as userid FROM {contentbank_content} cb WHERE cb.contextid = :contextid" | 1 |
|
"SELECT cb.id, cb.name, cb.contenttype, cb.usercreated, cb.usermodified, cb.timecreated, cb.timemodified, cb.contextid FROM {contentbank_content} cb WHERE cb.usercreated = :userid AND cb.contextid {$contextsql} ORDER BY cb.contextid" | 1 |
|
"SELECT cm.*, md.name as modname FROM {course_modules} cm, {modules} md WHERE cm.id = ? AND md.id = cm.module" | 1 |
|
"SELECT cm.*, m.name, md.name as modname FROM {grade_items} gi, {course_modules} cm, {modules} md, {{$modulename}} m WHERE gi.courseid = ? AND gi.itemtype = 'mod' AND gi.itemmodule = ? AND gi.itemnumber = 0 AND gi.gradetype != ? AND gi.iteminstance = cm.instance AND cm.instance = m.id AND md.name = ? AND md.id = cm.module" | 1 |
|
"SELECT $userfields $ofields FROM {user} u JOIN ($enrolledsql) je ON je.id = u.id $groupsql $customfieldssql JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid $gradebookroles_sql AND ra.contextid $relatedctxsql ) rainner ON rainner.userid = u.id WHERE u.deleted = 0 $groupwheresql ORDER BY $order" | 1 |
|
"SELECT g.* $ofields FROM {grade_grades} g JOIN {user} u ON g.userid = u.id JOIN ($enrolledsql) je ON je.id = u.id $groupsql JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid $gradebookroles_sql AND ra.contextid $relatedctxsql ) rainner ON rainner.userid = u.id WHERE u.deleted = 0 AND g.itemid $itemidsql $groupwheresql ORDER BY $order, g.itemid ASC" | 1 |
|
"SELECT DISTINCT gd.id, gd.areaid, gd.name, gd.usercreated FROM {grading_definitions} gd JOIN {grading_areas} ga ON (gd.areaid = ga.id) JOIN {context} cx ON (ga.contextid = cx.id)" | 1 |
|
"SELECT gc.shortname, gc.description, gc.maxscore, gf.score, gf.remark FROM {gradingform_guide_fillings} gf JOIN {gradingform_guide_criteria} gc ON gc.id = gf.criterionid WHERE gf.instanceid = :instanceid" | 1 |
|
'Show guide definition to students' | 1 |
|
'Insert frequently used comment' | 1 |
|
'Show marker criterion descriptions' | 1 |
|
'Show marks per criterion to students' | 1 |
|
'Show student criterion descriptions' | 1 |
|
"SELECT gd.*, rc.id AS rcid, rc.sortorder AS rcsortorder, rc.description AS rcdescription, rc.descriptionformat AS rcdescriptionformat, rl.id AS rlid, rl.score AS rlscore, rl.definition AS rldefinition, rl.definitionformat AS rldefinitionformat FROM {grading_definitions} gd LEFT JOIN {gradingform_rubric_criteria} rc ON (rc.definitionid = gd.id) LEFT JOIN {gradingform_rubric_levels} rl ON (rl.criterionid = rc.id) WHERE gd.areaid = :areaid AND gd.method = :method ORDER BY rc.sortorder,rl.score" | 1 |
|
"SELECT rc.description, rl.definition, rl.score, rf.remark FROM {gradingform_rubric_fillings} rf JOIN {gradingform_rubric_criteria} rc ON rc.id = rf.criterionid JOIN {gradingform_rubric_levels} rl ON rf.levelid = rl.id WHERE rf.instanceid = :instanceid" | 1 |
|
'Delete level {$a}' | 1 |
|
'Show remarks to those being graded' | 1 |
|
'SELECT rf.* FROM {gradingform_rubric_fillings} rf JOIN {grading_instances} gi ON gi.id = rf.instanceid JOIN {gradingform_rubric_criteria} rc ON rc.id = rf.criterionid AND gi.definitionid = rc.definitionid WHERE rf.instanceid = :instanceid' | 1 |
|
"SELECT c.id FROM {context} c JOIN {grading_areas} a ON a.contextid = c.id JOIN {grading_definitions} d ON d.areaid = a.id LEFT JOIN {grading_instances} i ON i.definitionid = d.id AND i.raterid = :raterid WHERE c.contextlevel = :contextlevel AND (d.usercreated = :usercreated OR d.usermodified = :usermodified OR i.id IS NOT NULL)" | 1 |
|
"SELECT d.usercreated, d.usermodified FROM {grading_definitions} d JOIN {grading_areas} a ON a.id = d.areaid WHERE a.contextid = :contextid" | 1 |
|
"SELECT i.raterid FROM {grading_definitions} d JOIN {grading_areas} a ON a.id = d.areaid JOIN {grading_instances} i ON i.definitionid = d.id WHERE a.contextid = :contextid" | 1 |
|
"SELECT gi.id AS instanceid, gd.id AS definitionid, gd.method FROM {grading_areas} ga JOIN {grading_definitions} gd ON gd.areaid = ga.id JOIN {grading_instances} gi ON gi.definitionid = gd.id AND gi.itemid = :itemid WHERE ga.contextid = :contextid" | 1 |
|
"SELECT gi.id AS instanceid, gd.id, gd.method FROM {grading_definitions} gd JOIN {grading_instances} gi ON gi.definitionid = gd.id JOIN {grading_areas} ga ON ga.id = gd.areaid WHERE ga.contextid = :contextid $itemsql" | 1 |
|
"SELECT gd.id, gd.method, gd.name, gd.description, gd.timecopied, gd.timecreated, gd.usercreated, gd.timemodified, gd.usermodified FROM ( SELECT DISTINCT d.id FROM {grading_definitions} d $join WHERE $select ) ids JOIN {grading_definitions} gd ON gd.id = ids.id" | 1 |
|
" SELECT DISTINCT ctx.id FROM {grade_outcomes} go JOIN {context} ctx ON (go.courseid > 0 AND ctx.instanceid = go.courseid AND ctx.contextlevel = :courselevel) OR ((go.courseid IS NULL OR go.courseid < 1) AND ctx.id = :syscontextid) WHERE go.usermodified = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {scale} s JOIN {context} ctx ON (s.courseid > 0 AND ctx.instanceid = s.courseid AND ctx.contextlevel = :courselevel) OR (s.courseid = 0 AND ctx.id = :syscontextid) WHERE s.userid = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {grade_outcomes_history} goh ON goh.loggeduser = :userid1 AND goh.courseid > 0 AND goh.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {grade_outcomes_history} goh ON goh.loggeduser = :userid1 AND (goh.courseid IS NULL OR goh.courseid < 1) AND ctx.id = :syscontextid1" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {grade_categories_history} gch ON gch.loggeduser = :userid2 AND gch.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {grade_items_history} gih ON gih.loggeduser = :userid3 AND gih.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {scale_history} sh ON sh.userid = :userid4 AND sh.courseid > 0 AND sh.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel4" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {scale_history} sh ON sh.loggeduser = :userid5 AND sh.courseid > 0 AND sh.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel4" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {scale_history} sh ON sh.userid = :userid4 AND sh.courseid = 0 AND ctx.id = :syscontextid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {scale_history} sh ON sh.loggeduser = :userid5 AND sh.courseid = 0 AND ctx.id = :syscontextid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {grade_items} gi JOIN {context} ctx ON ctx.instanceid = gi.courseid AND ctx.contextlevel = :courselevel JOIN {grade_grades} gg ON gg.itemid = gi.id WHERE gg.userid = :userid1 OR gg.usermodified = :userid2" | 1 |
|
" SELECT DISTINCT ctx.id FROM {grade_items} gi JOIN {context} ctx ON ctx.instanceid = gi.courseid AND ctx.contextlevel = :courselevel JOIN {grade_grades_history} ggh ON ggh.itemid = gi.id WHERE ggh.userid = :userid1 OR ggh.loggeduser = :userid2 OR ggh.usermodified = :userid3" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {grade_grades_history} ggh ON ctx.contextlevel = :userlevel AND ggh.userid = ctx.instanceid AND ( ggh.userid = :userid1 OR ggh.usermodified = :userid2 OR ggh.loggeduser = :userid3 ) LEFT JOIN {grade_items} gi ON ggh.itemid = gi.id WHERE gi.id IS NULL" | 1 |
|
"SELECT usermodified FROM {grade_outcomes} WHERE courseid = :contextinstanceid" | 1 |
|
"SELECT loggeduser FROM {grade_outcomes_history} WHERE courseid = :contextinstanceid" | 1 |
|
"SELECT loggeduser FROM {grade_items_history} WHERE courseid = :contextinstanceid" | 1 |
|
"SELECT ggh.userid FROM {grade_grades_history} ggh JOIN {grade_items} gi ON ggh.itemid = gi.id WHERE gi.courseid = :contextinstanceid" | 1 |
|
"SELECT gg.userid, gg.usermodified FROM {grade_grades} gg JOIN {grade_items} gi ON gg.itemid = gi.id WHERE gi.courseid = :contextinstanceid" | 1 |
|
"SELECT loggeduser FROM {grade_categories_history} WHERE courseid = :contextinstanceid" | 1 |
|
"SELECT usermodified FROM {grade_outcomes} WHERE (courseid IS NULL OR courseid < 1)" | 1 |
|
"SELECT loggeduser FROM {grade_outcomes_history} WHERE (courseid IS NULL OR courseid < 1)" | 1 |
|
"SELECT ggh.userid FROM {grade_grades_history} ggh LEFT JOIN {grade_items} gi ON ggh.itemid = gi.id WHERE gi.id IS NULL AND ggh.userid = :contextinstanceid" | 1 |
|
" SELECT $gghfields, ctx.id as ctxid FROM {grade_grades_history} ggh JOIN {context} ctx ON ctx.instanceid = ggh.userid AND ctx.contextlevel = :userlevel LEFT JOIN {grade_items} gi ON gi.id = ggh.itemid WHERE gi.id IS NULL AND (ggh.userid $inuseridsql OR ggh.usermodified $inusermodifiedsql OR ggh.loggeduser $inloggedusersql) AND (ggh.userid = :userid1 OR ggh.usermodified = :userid2 OR ggh.loggeduser = :userid3) ORDER BY ggh.userid, ggh.timemodified, ggh.id" | 1 |
|
" SELECT $ggfields, $gifields, $scalefields FROM {grade_grades} gg JOIN {grade_items} gi ON gi.id = gg.itemid LEFT JOIN {scale} sc ON sc.id = gi.scaleid WHERE gi.courseid $incoursesql AND gg.userid = :userid ORDER BY gi.courseid, gi.id, gg.id" | 1 |
|
" SELECT $gghfields, $gifields, $scalefields FROM {grade_grades_history} ggh JOIN {grade_items} gi ON gi.id = ggh.itemid LEFT JOIN {scale} sc ON sc.id = gi.scaleid WHERE gi.courseid $incoursesql AND ggh.userid = :userid ORDER BY gi.courseid, ggh.timemodified, ggh.id" | 1 |
|
" SELECT gch.id, gch.courseid, gch.fullname, gch.timemodified, gch.action FROM {grade_categories_history} gch WHERE gch.courseid $incoursesql AND gch.loggeduser = :userid ORDER BY gch.courseid, gch.timemodified, gch.id" | 1 |
|
" SELECT gih.id, gih.courseid, gih.itemname, gih.itemmodule, gih.iteminfo, gih.timemodified, gih.action FROM {grade_items_history} gih WHERE gih.courseid $incoursesql AND gih.loggeduser = :userid ORDER BY gih.courseid, gih.timemodified, gih.id" | 1 |
|
" SELECT $ggfields, $gifields, $scalefields FROM {grade_grades} gg JOIN {grade_items} gi ON gg.itemid = gi.id LEFT JOIN {scale} sc ON sc.id = gi.scaleid WHERE gi.courseid $incoursesql AND gg.userid <> :userid1 -- Our grades have already been exported. AND gg.usermodified = :userid2 ORDER BY gi.courseid, gg.timemodified, gg.id" | 1 |
|
" SELECT $gghfields, $gifields, $scalefields, ggh.loggeduser AS loggeduser FROM {grade_grades_history} ggh JOIN {grade_items} gi ON ggh.itemid = gi.id LEFT JOIN {scale} sc ON sc.id = gi.scaleid WHERE gi.courseid $incoursesql AND ggh.userid <> :userid1 -- We've already exported our history. AND (ggh.loggeduser = :userid2 OR ggh.usermodified = :userid3) ORDER BY gi.courseid, ggh.timemodified, ggh.id" | 1 |
|
" SELECT ggh.id FROM {grade_grades_history} ggh LEFT JOIN {grade_items} gi ON ggh.itemid = gi.id WHERE gi.id IS NULL AND ggh.userid = :userid" | 1 |
|
" SELECT gi.id FROM {grade_grades_history} ggh JOIN {grade_items} gi ON gi.id = ggh.itemid WHERE ggh.userid = :userid" | 1 |
|
" SELECT go.id, COALESCE(go.courseid, 0) AS courseid, go.shortname, go.fullname, go.timemodified FROM {grade_outcomes} go WHERE $sqlwhere AND go.usermodified = :userid ORDER BY go.courseid, go.timemodified, go.id" | 1 |
|
" SELECT goh.id, COALESCE(goh.courseid, 0) AS courseid, goh.shortname, goh.fullname, goh.timemodified, goh.action FROM {grade_outcomes_history} goh WHERE $sqlwhere AND goh.loggeduser = :userid ORDER BY goh.courseid, goh.timemodified, goh.id" | 1 |
|
" SELECT s.id, s.courseid, s.name, s.timemodified FROM {scale} s WHERE $sqlwhere AND s.userid = :userid ORDER BY s.courseid, s.timemodified, s.id" | 1 |
|
" SELECT sh.id, sh.courseid, sh.name, sh.userid, sh.timemodified, sh.action, sh.loggeduser FROM {scale_history} sh WHERE $sqlwhere AND sh.loggeduser = :userid1 OR sh.userid = :userid2 ORDER BY sh.courseid, sh.timemodified, sh.id" | 1 |
|
"SELECT $gradefields, $gifields FROM {{$gradetable}} $tableprefix JOIN {grade_items} gi ON gi.id = {$tableprefix}.itemid WHERE gi.id $iteminnsql " | 1 |
|
'Show only active and no user preference' | 1 |
|
'Show only active and user preference set to true' | 1 |
|
'Show only active and user preference set to false' | 1 |
|
"SELECT gc.id FROM {grade_categories} gc LEFT JOIN {course} c ON c.id = gc.courseid WHERE c.fullname = ? AND gc.depth = 1" | 1 |
|
"SELECT gc.id FROM {grade_categories} gc LEFT JOIN {course} c ON c.id = gc.courseid WHERE gc.fullname = ?" | 1 |
|
"SELECT DISTINCT outcomeid FROM {grade_items} WHERE courseid=? and outcomeid IS NOT NULL" | 1 |
|
"SELECT DISTINCT u.id FROM {user} u JOIN ($enrolledsql) je ON je.id = u.id JOIN {role_assignments} ra ON u.id = ra.userid $groupsql WHERE ra.roleid $gradebookrolessql AND u.deleted = 0 $userwheresql $groupwheresql AND ra.contextid $relatedctxsql" | 1 |
|
"SELECT g.* FROM {grade_grades} g JOIN {grade_items} gi ON gi.id = g.itemid WHERE g.userid = {$this->user->id} AND gi.courseid = {$courseid}" | 1 |
|
"SELECT gi.id, COUNT(u.id) AS count FROM {grade_items} gi JOIN {user} u ON u.deleted = 0 JOIN ($enrolledsql) je ON je.id = u.id JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid $gradebookrolessql AND ra.contextid $relatedctxsql ) rainner ON rainner.userid = u.id LEFT JOIN {grade_grades} gg ON (gg.itemid = gi.id AND gg.userid = u.id AND gg.finalgrade IS NOT NULL $includesql) $this->groupsql WHERE gi.courseid = :courseid AND gg.finalgrade IS NULL $this->groupwheresql GROUP BY gi.id" | 1 |
|
"SELECT gg.itemid, SUM(gg.finalgrade) AS sum FROM {grade_items} gi JOIN {grade_grades} gg ON gg.itemid = gi.id JOIN {user} u ON u.id = gg.userid JOIN ($enrolledsql) je ON je.id = gg.userid JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid $gradebookrolessql AND ra.contextid $relatedctxsql ) rainner ON rainner.userid = u.id $this->groupsql WHERE gi.courseid = :courseid AND u.deleted = 0 AND gg.finalgrade IS NOT NULL $includesql $this->groupwheresql GROUP BY gg.itemid" | 1 |
|
"SELECT {$userfieldssql->selects} FROM {user} u {$userfieldssql->joins} JOIN ($enrolledsql) je ON je.id = u.id $this->groupsql $sortjoin JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid IN ($this->gradebookroles) AND ra.contextid $relatedctxsql ) rainner ON rainner.userid = u.id AND u.deleted = 0 $this->userwheresql $this->groupwheresql ORDER BY $sort" | 1 |
|
"SELECT ue.userid FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE ue.userid $usql AND ue.status = :uestatus AND e.status = :estatus AND e.courseid = :courseid AND ue.timestart < :now1 AND (ue.timeend = 0 OR ue.timeend > :now2) GROUP BY ue.userid" | 1 |
|
"SELECT g.* FROM {grade_items} gi, {grade_grades} g WHERE g.itemid = gi.id AND gi.courseid = :courseid {$this->userselect}" | 1 |
|
"SELECT g.itemid, SUM(g.finalgrade) AS sum FROM {grade_items} gi JOIN {grade_grades} g ON g.itemid = gi.id JOIN {user} u ON u.id = g.userid JOIN ($enrolledsql) je ON je.id = u.id JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid $gradebookrolessql AND ra.contextid $relatedctxsql ) rainner ON rainner.userid = u.id $groupsql WHERE gi.courseid = :courseid AND u.deleted = 0 AND g.finalgrade IS NOT NULL $groupwheresql GROUP BY g.itemid" | 1 |
|
"SELECT gi.id, COUNT(DISTINCT u.id) AS count FROM {grade_items} gi CROSS JOIN ($enrolledsql) u JOIN {role_assignments} ra ON ra.userid = u.id LEFT OUTER JOIN {grade_grades} g ON (g.itemid = gi.id AND g.userid = u.id AND g.finalgrade IS NOT NULL) $groupsql WHERE gi.courseid = :courseid AND ra.roleid $gradebookrolessql AND ra.contextid $relatedctxsql AND g.id IS NULL $groupwheresql GROUP BY gi.id" | 1 |
|
'Insert new grade' | 1 |
|
'Select activity' | 1 |
|
'Select a report type to view' | 1 |
|
'Select a grade item above' | 1 |
|
'Show grades for {$a}.' | 1 |
|
"SELECT COUNT(DISTINCT(userid)) FROM {grade_grades} WHERE finalgrade > ? AND itemid = ? AND hidden = 0" | 1 |
|
"SELECT itemid, AVG(finalgrade) AS avg, COUNT(finalgrade) AS count FROM {grade_grades} WHERE itemid = ?" . $hidesuspendedsql . " GROUP BY itemid" | 1 |
|
"SELECT COUNT(DISTINCT u.id) " | 1 |
|
"SELECT DISTINCT $userfieldssql->selects " | 1 |
|
"SELECT u.id, $ufields FROM {user} u JOIN {grade_grades_history} ggh ON ggh.usermodified = u.id JOIN {grade_items} gi ON gi.id = ggh.itemid $groupjoinsql WHERE gi.courseid = :courseid $groupwheresql GROUP BY u.id, $ufields ORDER BY u.lastname ASC, u.firstname ASC" | 1 |
|
"SELECT MAX(finalgrade) FROM {grade_grades_history} h WHERE h.itemid = ggh.itemid AND h.userid = ggh.userid AND h.timemodified < ggh.timemodified AND NOT EXISTS ( SELECT 1 FROM {grade_grades_history} h2 WHERE h2.itemid = ggh.itemid AND h2.userid = ggh.userid AND h2.timemodified < ggh.timemodified AND h.timemodified < h2.timemodified)" | 1 |
|
" SELECT $select $userfieldsselects FROM {grade_grades_history} ggh JOIN {grade_items} gi ON gi.id = ggh.itemid JOIN {user} u ON u.id = ggh.userid $userfieldsjoins LEFT JOIN {user} ug ON ug.id = ggh.usermodified WHERE $where" | 1 |
|
"SELECT $allorcount FROM ($sql) pg WHERE pg.finalgrade != pg.prevgrade OR (pg.prevgrade IS NULL AND pg.finalgrade IS NOT NULL) OR (pg.prevgrade IS NOT NULL AND pg.finalgrade IS NULL)" | 1 |
|
'show email,lang and height;search for all users' | 1 |
|
'show email,lang and height;search for users on .org ' | 1 |
|
'show email,lang and height;search for users on .com ' | 1 |
|
'show email,lang and height;search for users on .uk ' | 1 |
|
'show email and height;search for users on .org' | 1 |
|
'show email and height;search for users on .com' | 1 |
|
'show email and height;search for users on .co' | 1 |
|
'show email and height,search for users with height 180cm' | 1 |
|
'show email only;search for users on .org' | 1 |
|
'show email only;search for users on .com' | 1 |
|
'show email only;search for users on .co.uk' | 1 |
|
'show email only;search for users on .uk' | 1 |
|
'show email only;search for users on .co' | 1 |
|
'show email only;search for Spanish speakers' | 1 |
|
'show email only;search for German speakers' | 1 |
|
'show email only;search for English speakers' | 1 |
|
'Delete item with id {$a}' | 1 |
|
'Select user' | 1 |
|
"SELECT COUNT(DISTINCT(userid)) FROM {grade_grades} WHERE finalgrade IS NOT NULL AND finalgrade > ? AND itemid = ?" | 1 |
|
"UPDATE {grade_grades} SET exported = ? WHERE id $usql" | 1 |
|
"SELECT * FROM {grade_import_newitem} WHERE importcode = ? AND importer=?" | 1 |
|
"SELECT DISTINCT (itemid) FROM {grade_import_values} WHERE importcode = ? AND importer=? AND itemid > 0" | 1 |
|
"SELECT giv.id, {$usernamefields->selects}, u.idnumber AS useridnumber, COALESCE(gi.idnumber, gin.itemname) AS gradeidnumber FROM {grade_import_values} giv JOIN {user} u ON giv.userid = u.id LEFT JOIN {grade_items} gi ON gi.id = giv.itemid LEFT JOIN {grade_import_newitem} gin ON gin.id = giv.newgradeitem LEFT JOIN ($enrolledsql) je ON je.id = u.id LEFT JOIN {role_assignments} ra ON (giv.userid = ra.userid AND ra.roleid $gradebookrolessql AND ra.contextid $relatedctxsql) WHERE giv.importcode = :importcode AND (ra.id IS NULL OR je.id IS NULL) ORDER BY gradeidnumber, $sort" | 1 |
|
"SELECT * FROM {grade_import_values} WHERE importcode=? AND userid=? AND itemid=? AND importer=?" | 1 |
|
'SELECT cm.instance, m.name FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module WHERE cm.id = :cmid' | 1 |
|
'SELECT ' . $requiredfields | 1 |
|
'SELECT fullname FROM {course} cr LEFT JOIN {context} ct ON ct.instanceid = cr.id WHERE ct.id = ?' | 1 |
|
"SELECT id, uniquehash FROM {post} WHERE module = 'blog_external' AND " . $DB->sql_compare_text('content') . " = " . $DB->sql_compare_text(':blogid') . " AND created > :ts" | 1 |
|
'SELECT u.* FROM {user} u, {post} p WHERE p.id = ? AND p.userid = u.id' | 1 |
|
" SELECT DISTINCT ctx.id FROM {post} p JOIN {blog_association} ba ON ba.blogid = p.id JOIN {context} ctx ON ctx.id = ba.contextid WHERE p.userid = :userid" | 1 |
|
" SELECT DISTINCT ctx.id FROM {context} ctx JOIN {comments} c ON c.contextid = ctx.id WHERE c.component = :component AND c.commentarea = :commentarea AND c.userid = :userid" | 1 |
|
"SELECT p.id, p.userid FROM {post} p JOIN {blog_association} ba ON ba.blogid = p.id AND ba.contextid = :contextid" | 1 |
|
"SELECT userid FROM {blog_external} WHERE userid = :userid" | 1 |
|
"SELECT userid FROM {post} WHERE userid = :userid" | 1 |
|
" SELECT DISTINCT c.itemid FROM {comments} c WHERE c.contextid = :contextid AND c.userid = :userid AND c.component = :component AND c.commentarea = :commentarea" | 1 |
|
"SELECT ba.contextid, $ctxfields FROM {blog_association} ba JOIN {context} ctx ON ba.contextid = ctx.id WHERE ba.blogid = :blogid" | 1 |
|
" SELECT ba.contextid, p.subject, $ctxfields FROM {post} p JOIN {blog_association} ba ON ba.blogid = p.id JOIN {context} ctx ON ctx.id = ba.contextid WHERE ba.contextid $insql AND p.userid = :userid ORDER BY ba.contextid ASC" | 1 |
|
"SELECT ba.id FROM {blog_association} ba JOIN {post} p ON p.id = ba.blogid WHERE ba.contextid $insql AND p.userid = :userid" | 1 |
|
"SELECT ba.id FROM {blog_association} ba JOIN {post} p ON p.id = ba.blogid WHERE ba.contextid = :contextid AND p.userid $insql" | 1 |
|
"SELECT h.id, h.deleted, h.wwwroot, h.ip_address, h.name, h.public_key, h.public_key_expires, h.transport, h.portno, h.last_connect_time, h.last_log_id, h.applicationid, a.name as app_name, a.display_name as app_display_name, a.xmlrpc_server_url FROM {mnet_host} h JOIN {mnet_application} a ON h.applicationid = a.id WHERE h.id <> ?" | 1 |
|
" SELECT DISTINCT $concat as id, svc.id as serviceid, svc.name, svc.offer, svc.apiversion, r.plugintype, r.pluginname, h2s.hostid, h2s.publish, h2s.subscribe FROM {mnet_service2rpc} s2r, {mnet_rpc} r, {mnet_service} svc LEFT JOIN {mnet_host2service} h2s ON h2s.hostid in ($id_list) AND h2s.serviceid = svc.id WHERE svc.offer = '1' AND s2r.serviceid = svc.id AND s2r.rpcid = r.id ORDER BY svc.name ASC" | 1 |
|
"SELECT DISTINCT h.id, h.name AS hostname, h.wwwroot AS hosturl, a.display_name AS appname FROM {mnet_host} h JOIN {mnet_host2service} hs ON h.id = hs.hostid JOIN {mnet_service} s ON hs.serviceid = s.id JOIN {mnet_application} a ON h.applicationid = a.id WHERE s.name = 'mnet_enrol' AND h.deleted = 0 AND hs.publish = 1" | 1 |
|
"SELECT DISTINCT h.id, h.name AS hostname, h.wwwroot AS hosturl, a.display_name AS appname FROM {mnet_host} h JOIN {mnet_host2service} hs ON h.id = hs.hostid JOIN {mnet_service} s ON hs.serviceid = s.id JOIN {mnet_application} a ON h.applicationid = a.id WHERE s.name = 'mnet_enrol' AND h.deleted = 0 AND hs.subscribe = 1" | 1 |
|
"SELECT username,id FROM {user} WHERE mnethostid = :mnetlocalhostid AND username $usql AND deleted = 0 AND confirmed = 1 ORDER BY $sort" | 1 |
|
"SELECT e.id,e.enroltype AS plugin, u.firstname, u.lastname, u.email, u.id AS userid, e.enroltime AS timemodified, e.rolename FROM {mnetservice_enrol_enrolments} e JOIN {user} u ON u.id = e.userid WHERE e.hostid = :hostid AND e.remotecourseid = :remotecourseid AND e.enroltype != 'mnet' ORDER BY $sort" | 1 |
|
"SELECT c.id FROM {context} c JOIN {mnetservice_enrol_enrolments} me ON me.userid = c.instanceid AND c.contextlevel = :contextlevel WHERE me.userid = :userid" | 1 |
|
"SELECT userid FROM {mnetservice_enrol_enrolments} WHERE userid = :userid" | 1 |
|
"SELECT me.id, me.rolename, me.enroltime, me.enroltype, mh.name as hostname, mc.fullname FROM {mnetservice_enrol_enrolments} me JOIN {context} ctx ON ctx.instanceid = me.userid AND ctx.contextlevel = :contextlevel JOIN {mnet_host} mh ON mh.id = me.hostid JOIN {mnetservice_enrol_courses} mc ON mc.remoteid = me.remotecourseid WHERE me.userid = :userid AND ctx.id {$insql}" | 1 |
|
' SELECT DISTINCT rpc.functionname, rpc.xmlrpcpath FROM {mnet_host2service} h2s JOIN {mnet_service2rpc} s2r ON h2s.serviceid = s2r.serviceid JOIN {mnet_rpc} rpc ON s2r.rpcid = rpc.id JOIN {mnet_service} svc ON svc.id = s2r.serviceid WHERE h2s.hostid in (' . $id_list . ') AND h2s.publish = 1 AND rpc.enabled = 1 ' . ((count($params) > 0) ? 'AND svc.name = ? ' : '') . ' ORDER BY rpc.xmlrpcpath ASC' | 1 |
|
' SELECT DISTINCT rpc.functionname, rpc.help, rpc.profile FROM {mnet_host2service} h2s, {mnet_service2rpc} s2r, {mnet_rpc} rpc WHERE rpc.xmlrpcpath = ? AND s2r.rpcid = rpc.id AND h2s.publish = 1 AND rpc.enabled = 1 AND h2s.serviceid = s2r.serviceid AND h2s.hostid in (' . $id_list . ')' | 1 |
|
' SELECT DISTINCT s.id, s.name, s.apiversion, h2s.publish, h2s.subscribe FROM {mnet_host2service} h2s, {mnet_service} s WHERE h2s.serviceid = s.id AND (h2s.publish = 1 OR h2s.subscribe = 1) AND h2s.hostid in (' . $id_list . ') ORDER BY s.name ASC' | 1 |
|
"SELECT r.id FROM {mnet_remote_rpc} r INNER JOIN {mnet_remote_service2rpc} s2r ON s2r.rpcid = r.id INNER JOIN {mnet_host2service} h2s ON h2s.serviceid = s2r.serviceid WHERE r.xmlrpcpath = ? AND h2s.subscribe = ? AND h2s.hostid $hostidsql" | 1 |
|
"SELECT cm.*, md.name as modname FROM {course_modules} cm, {modules} md WHERE cm.id = ? AND md.id = cm.module" | 1 |
|
"SELECT q.*, qv.status, qc.id AS category FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.id {$usql} {$npsql} {$version} ORDER BY qc.id, q.qtype, q.name" | 1 |
|
"UPDATE {question} SET parent = id WHERE qtype = 'random' AND parent <> id" | 1 |
|
" SELECT qv.questionid FROM {question_versions} qv -- This is a performant to get the latest non-draft version for each -- question_bank_entry that relates to one of our questionids. LEFT JOIN ( SELECT lqv.questionbankentryid, MAX(lv.version) AS latestusableversion FROM {question_versions} lqv JOIN {question_versions} lv ON lv.questionbankentryid = lqv.questionbankentryid WHERE lqv.questionid $lqidtest AND lv.status <> :draft GROUP BY lqv.questionbankentryid ) latestversions ON latestversions.questionbankentryid = qv.questionbankentryid JOIN {question_references} qr ON qr.questionbankentryid = qv.questionbankentryid AND (qr.version = qv.version OR qr.version IS NULL AND qv.version = latestversions.latestusableversion) WHERE qv.questionid $qidtest " | 1 |
|
"SELECT qc.contextid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.createdby = :useridcreated OR q.modifiedby = :useridmodified" | 1 |
|
"SELECT q.createdby, q.modifiedby FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = :contextid" | 1 |
|
"SELECT {$prefix}_qas.userid FROM {question_attempt_steps} {$prefix}_qas JOIN {question_attempts} {$prefix}_qa ON {$prefix}_qas.questionattemptid = {$prefix}_qa.id JOIN {question_usages} {$prefix}_qu ON {$prefix}_qa.questionusageid = {$prefix}_qu.id WHERE {$prefix}_qu.id IN ({$insql})" | 1 |
|
'SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = ?' | 1 |
|
"SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid {$contextsql} AND q.createdby = :createdby" | 1 |
|
"SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid {$contextsql} AND q.modifiedby = :modifiedby" | 1 |
|
"SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = :contextid AND q.createdby {$createdbysql}" | 1 |
|
"SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = :contextid AND q.modifiedby {$modifiedbysql}" | 1 |
|
"SELECT questionbankentryid, MAX(version) AS latestversion FROM {question_versions} WHERE questionbankentryid $insql GROUP BY questionbankentryid" | 1 |
|
" SELECT MIN(qu.id) AS somethingunique, qu.component, qu.contextid FROM {question_usages} qu JOIN {question_attempts} qatt ON qatt.questionusageid = qu.id JOIN {context} ctx ON ctx.id = qu.contextid WHERE qatt.questionid $questionidcondition GROUP BY qu.component, qu.contextid ORDER BY qu.contextid ASC " | 1 |
|
"SELECT COUNT(1) FROM " . $this->qubaids->from_question_attempts('qa') . " WHERE qa.questionid = q.id AND " . $this->qubaids->where( ) | 1 |
|
"SELECT MAX(v.version) FROM {question_versions} v JOIN {question_bank_entries} be ON be.id = v.questionbankentryid WHERE be.id = qbe.id" | 1 |
|
"SELECT q.id, ($previoussql) AS previous_attempts FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE " | 1 |
|
"SELECT {$fieldsstring} FROM (SELECT q.*, qbe.questioncategoryid as category FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid {$condition}) q" | 1 |
|
"SELECT {$fieldsstring} FROM (SELECT q.*, qbe.questioncategoryid as category FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid {$condition}) q ORDER BY q.id" | 1 |
|
" SELECT MIN(qu.id) AS somethingunique, qu.component, qu.contextid, " . \context_helper::get_preload_record_columns_sql('ctx') . " FROM {question_usages} qu JOIN {question_attempts} qa ON qa.questionusageid = qu.id JOIN {context} ctx ON ctx.id = qu.contextid WHERE qa.questionid $questionidcondition GROUP BY qu.component, qu.contextid, " . implode(', ', array_keys(\context_helper::get_preload_record_columns('ctx'))) . " ORDER BY qu.contextid ASC " | 1 |
|
"SELECT contextid FROM {comments} WHERE component = :component AND userid = :userid" | 1 |
|
'SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.idnumber = ?' | 1 |
|
"SELECT c.* FROM {comments} c WHERE c.contextid = :contextid AND c.component = 'qbank_comment' AND c.commentarea = 'question' AND c.itemid = :itemid" | 1 |
|
'SELECT COUNT(*) FROM (' . self::question_usage_sql($specificversion) . ') quizid' | 1 |
|
'SELECT COUNT(qatt.id) FROM {quiz} qz JOIN {quiz_attempts} qa ON qa.quiz = qz.id JOIN {question_usages} qu ON qu.id = qa.uniqueid JOIN {question_attempts} qatt ON qatt.questionusageid = qu.id JOIN {question} q ON q.id = qatt.questionid WHERE qatt.questionid = :questionid AND qa.preview = 0 AND qz.id = :quizid' | 1 |
|
'SELECT COUNT(qatt.id) FROM {quiz_slots} qs JOIN {quiz_attempts} qa ON qa.quiz = qs.quizid JOIN {question_usages} qu ON qu.id = qa.uniqueid JOIN {question_attempts} qatt ON qatt.questionusageid = qu.id JOIN {question} q ON q.id = qatt.questionid WHERE qatt.questionid = ? AND qa.preview = 0' | 1 |
|
"SELECT qz.id as quizid, qz.name as modulename, qz.course as courseid FROM {quiz_slots} slot JOIN {quiz} qz ON qz.id = slot.quizid JOIN {question_references} qr ON qr.itemid = slot.id JOIN {question_bank_entries} qbe ON qbe.id = qr.questionbankentryid JOIN {question_versions} qv ON qv.questionbankentryid = qbe.id WHERE qv.questionbankentryid = ? AND qr.component = ? AND qr.questionarea = ?" | 1 |
|
"SELECT qz.id as quizid, qz.name as modulename, qz.course as courseid FROM {quiz} qz JOIN {quiz_attempts} qa ON qa.quiz = qz.id JOIN {question_usages} qu ON qu.id = qa.uniqueid JOIN {question_attempts} qatt ON qatt.questionusageid = qu.id" | 1 |
|
"SELECT MAX(qa.timemodified) as lastused FROM {quiz} qz JOIN {quiz_attempts} qa ON qa.quiz = qz.id JOIN {question_usages} qu ON qu.id = qa.uniqueid JOIN {question_attempts} qatt ON qatt.questionusageid = qu.id JOIN {question} q ON q.id = qatt.questionid WHERE qa.preview = 0 AND q.id = ?" | 1 |
|
"SELECT q.id FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = :categoryid AND (q.qtype = :qtype OR qv.status = :status)" | 1 |
|
" SELECT count(*) FROM {question_categories} c JOIN {question_categories} p ON c.parent = p.id JOIN {question_categories} s ON s.parent = c.parent WHERE c.id = ? AND p.parent = 0" | 1 |
|
"SELECT q.id FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = :categoryid AND (q.parent = 0 OR q.parent = q.id)" | 1 |
|
"SELECT qsr.* FROM {quiz_slots} qs JOIN {question_set_references} qsr ON qsr.itemid = qs.id WHERE qs.quizid = ? AND qsr.component = ? AND qsr.questionarea = ?" | 1 |
|
'SELECT version, questionid FROM {question_versions} WHERE questionbankentryid = ? ORDER BY version' | 1 |
|
'SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qv.version = (SELECT MAX(v.version) FROM {question_versions} v JOIN {question_bank_entries} be ON be.id = v.questionbankentryid WHERE be.id = qbe.id) AND qbe.id = ?' | 1 |
|
'Update the question status.' | 1 |
|
"SELECT qc.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id = :id" | 1 |
|
' SELECT q.*, qc.contextid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id = ?' | 1 |
|
'Update the question tags.' | 1 |
|
'SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.idnumber = ?' | 1 |
|
"SELECT cfd.id, cff.shortname, cff.type, cfd.value, cfd.valueformat, cfd.valuetrust FROM {customfield_data} cfd JOIN {customfield_field} cff ON cff.id = cfd.fieldid JOIN {customfield_category} cfc ON cfc.id = cff.categoryid WHERE cfc.component = 'qbank_customfields' AND cfc.area = 'question' AND cfd.instanceid = ?" | 1 |
|
"SELECT q.*, c.contextid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} c ON c.id = qbe.questioncategoryid WHERE q.id {$usql}" | 1 |
|
"SELECT COUNT(q.id) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.id = :categoryid AND q.id $insql" | 1 |
|
'Delete selected question' | 1 |
|
'SELECT q.*, qbe.idnumber FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = ? ORDER BY qbe.idnumber' | 1 |
|
"SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = ?" | 1 |
|
"SELECT qv.id AS versionid, qv.questionbankentryid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE q.id = ?" | 1 |
|
"SELECT q.id, qv.id AS versionid, qv.questionbankentryid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE q.id = ?" | 1 |
|
"SELECT qv.* FROM {question_versions} qv WHERE qv.id = ?" | 1 |
|
"SELECT qbe.questioncategoryid FROM {question_bank_entries} qbe WHERE qbe.id = ?" | 1 |
|
"SELECT q.id AS questionid, qv.id AS versionid, qbe.id AS questionbankentryid, qbe.idnumber FROM {question_bank_entries} qbe JOIN {question_versions} qv ON qv.questionbankentryid = qbe.id JOIN {question} q ON q.id = qv.questionid WHERE qbe.id = ?" | 1 |
|
"SELECT COUNT(q.id) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = ? AND (q.createdby = ? OR q.modifiedby = ? OR q.createdby = ? OR q.modifiedby = ?)" | 1 |
|
"SELECT COUNT(q.id) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = ? AND (q.createdby = ? OR q.modifiedby = ?)" | 1 |
|
"SELECT qbe.id FROM {question_bank_entries} qbe WHERE qbe.idnumber = :idnumber AND qbe.questioncategoryid = :categoryid $andcondition" | 1 |
|
"SELECT * FROM {{$extraanswertable}} WHERE " . 'answerid IN (SELECT id FROM {question_answers} WHERE question = ' . $question->id . ')' | 1 |
|
" SELECT qa.*, qax." . implode(', qax.', $extraanswerfields) . ' FROM {question_answers} qa ' . " LEFT JOIN {{$answerextensiontable}} qax ON qa.id = qax.answerid WHERE qa.question = ? ORDER BY qa.id" | 1 |
|
"SELECT DISTINCT qbe.id FROM {question_versions} qv JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qv.questionid = ?" | 1 |
|
'Select missing words question' | 1 |
|
'Select missing words' | 1 |
|
'Select missing words questions require the respondent to select correct answers from drop-down menus. [[1]], [[2]], [[3]], ... are used as placeholders in the question text, with the correct answers specified as choice answers 1, 2, 3, ... respectively. Extra choice answers may be added to make the question harder. Choice answers may be grouped to restrict answers available in each drop-down menu.' | 1 |
|
'Select missing words question type plugin allows question authors to set default options as user preferences.' | 1 |
|
" SELECT qma.id, qma.sequence FROM {question_multianswer} qma JOIN {backup_ids_temp} bi ON bi.newitemid = qma.question WHERE bi.backupid = ? AND bi.itemname = 'question_created'" | 1 |
|
"SELECT a.*, n.tolerance " . "FROM {question_answers} a, " . " {question_numerical} n " . "WHERE a.question = ? " . " AND a.id = n.answer " . "ORDER BY a.id ASC" | 1 |
|
'Select units' | 1 |
|
'Select one unit' | 1 |
|
'Select a background image file, enter text labels for markers and define the drop zones on the background image to which they must be dragged.' | 1 |
|
" SELECT MAX(id) FROM {question} WHERE qtype = ? " | 1 |
|
'Select a background image, specify draggable items and define drop zones on the background image into which they must be dragged.' | 1 |
|
'show standard instruction yes' | 1 |
|
'show standard instruction no' | 1 |
|
'Select one or more:' | 1 |
|
" SELECT a.*, c.tolerance, c.tolerancetype, c.correctanswerlength, c.correctanswerformat FROM {question_answers} a, {question_calculated} c WHERE a.question = ? AND a.id = c.answer ORDER BY a.id ASC" | 1 |
|
"SELECT i.* FROM {question_datasets} d, {question_dataset_definitions} i WHERE d.question = ? AND d.datasetdefinition = i.id" | 1 |
|
"SELECT a.* FROM {question_datasets} b, {question_dataset_definitions} a WHERE a.id = b.datasetdefinition AND a.type = '1' AND a.category != 0 AND b.question = ? ORDER BY a.name " | 1 |
|
" SELECT id , itemnumber, definition, value FROM {question_dataset_items} WHERE definition = $definition order by id DESC " | 1 |
|
"SELECT i.* FROM {question_datasets} d, {question_dataset_definitions} i WHERE d.question = ? AND d.datasetdefinition = i.id ORDER BY i.id" | 1 |
|
"SELECT i.id, d.name, i.value FROM {question_dataset_definitions} d, {question_dataset_items} i, {question_datasets} q WHERE q.question = ? AND q.datasetdefinition = d.id AND d.id = i.definition AND i.itemnumber = ? ORDER BY i.id DESC " | 1 |
|
"SELECT a.* FROM {question_dataset_definitions} a, {question_datasets} b WHERE a.id = b.datasetdefinition AND a.type = '1' AND b.question = ? AND " . $DB->sql_equal('a.name', '?') | 1 |
|
"SELECT b.question, a.* FROM {question_datasets} b, {question_dataset_definitions} a WHERE a.id = b.datasetdefinition AND a.type = '1' AND a.category = ? AND " . $DB->sql_equal('a.name', '?') | 1 |
|
"SELECT i.*, d.* FROM {question_datasets} d, {question_dataset_definitions} i WHERE i.id = d.datasetdefinition AND i.category = ?" | 1 |
|
'SELECT COUNT(*) FROM (' . qbank_usage\helper::get_question_bank_usage_sql( ) . ') questioncount' | 1 |
|
'SELECT COUNT(*) FROM (' . qbank_usage\helper::get_question_attempt_usage_sql( ) . ') attemptcount' | 1 |
|
' SELECT MIN(qdd.itemcount) FROM {question_dataset_definitions} qdd JOIN {question_datasets} qd ON qdd.id = qd.datasetdefinition WHERE qd.question = ? ' | 1 |
|
' SELECT MAX(qdd.category) AS max, MIN(qdd.category) AS min FROM {question_dataset_definitions} qdd JOIN {question_datasets} qd ON qdd.id = qd.datasetdefinition WHERE qd.question = ? AND qdd.category <> 0 ' | 1 |
|
'Delete item' | 1 |
|
'Delete last item' | 1 |
|
'Select distribution option' | 1 |
|
'Select length option' | 1 |
|
'Update the category' | 1 |
|
'Update the datasets parameters' | 1 |
|
'Update the answers tolerance parameters' | 1 |
|
"SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid {$qcsql} AND q.parent = 0 AND qv.status = '$readystatus' AND q.id NOT IN ($otherquestionsinuse) AND q.qtype IN ($this->manualqtypes)" | 1 |
|
" SELECT q.id, 1 FROM {question} q JOIN {backup_ids_temp} bi ON q.id = bi.newitemid WHERE q.qtype = 'random' AND " . $DB->sql_compare_text('q.questiontext') . " = ? AND bi.backupid = ? AND bi.itemname = 'question_created' " | 1 |
|
"UPDATE {question_answers} SET answerformat = '" . FORMAT_PLAIN . "' WHERE question IN ( SELECT id FROM {question} WHERE qtype = 'calculatedmulti' )" | 1 |
|
'SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = ? AND q.qtype = ?' | 1 |
|
" SELECT q.* FROM {question} q JOIN {backup_ids_temp} bi ON bi.newitemid = q.id LEFT JOIN {qtype_essay_options} qeo ON qeo.questionid = q.id WHERE q.qtype = ? AND qeo.id IS NULL AND bi.backupid = ? AND bi.itemname = ? " | 1 |
|
'SELECT qc1.* FROM {question_categories} qc1 JOIN {question_categories} qc2 ON qc1.parent = qc2.id WHERE qc1.name = ? AND qc2.name = ?' | 1 |
|
"SELECT q.*, qbe.questioncategoryid AS category FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE q.name = :name" | 1 |
|
"SELECT qa.questionusageid, 1 $extraselect FROM {$qubaids->from_question_attempts('qa')} JOIN {question_attempt_steps} qas ON qas.questionattemptid = qa.id AND qas.sequencenumber = {$this->latest_step_for_qa_subquery( )} JOIN {question} q ON q.id = qa.questionid WHERE {$qubaidswhere} AND qa.slot = :slot $extrawhere $sqlorderby" | 1 |
|
" SELECT DISTINCT contextid, 1 FROM {question_usages} WHERE id {$qubaids->usage_id_in( )}" | 1 |
|
" SELECT DISTINCT id, id AS id2 FROM {question_usages} WHERE id " . $qubaids->usage_id_in( ) | 1 |
|
' DELETE qu, qa, qas, qasd FROM {question_usages} qu JOIN {question_attempts} qa ON qa.questionusageid = qu.id LEFT JOIN {question_attempt_steps} qas ON qas.questionattemptid = qa.id LEFT JOIN {question_attempt_step_data} qasd ON qasd.attemptstepid = qas.id WHERE qu.id ' . $idsql | 1 |
|
" SELECT DISTINCT quba.id, 1 FROM {question_usages} quba JOIN {question_attempts} qa ON qa.questionusageid = quba.id WHERE quba.component = 'core_question_preview' AND qa.questionid = ?" | 1 |
|
" UPDATE " . $qubaids->from_question_attempts('qa') . " SET qa.maxmark = :newmaxmark WHERE " . $qubaids->where( ) . " AND slot = :slot " | 1 |
|
"SELECT COALESCE(SUM(qa.maxmark * qas.fraction), 0) FROM {question_attempts} qa JOIN {question_attempt_steps} qas ON qas.questionattemptid = qa.id AND qas.sequencenumber = ( SELECT MAX(summarks_qas.sequencenumber) FROM {question_attempt_steps} summarks_qas WHERE summarks_qas.questionattemptid = qa.id ) WHERE qa.questionusageid = $qubaid HAVING COUNT(CASE WHEN qas.state = 'needsgrading' AND qa.maxmark > 0 THEN 1 ELSE NULL END) = 0" | 1 |
|
" SELECT qa.questionid, qa.variant, COUNT(1) AS usescount FROM " . $qubaids->from_question_attempts('qa') . " WHERE qa.questionid $test AND " . $qubaids->where( ) . " GROUP BY qa.questionid, qa.variant ORDER BY COUNT(1) ASC " | 1 |
|
"SELECT qv.id AS versionid, qv.version, qv.questionid FROM {question_versions} qv WHERE qv.questionbankentryid = (SELECT DISTINCT qbe.id FROM {question_bank_entries} qbe JOIN {question_versions} qv ON qbe.id = qv.questionbankentryid JOIN {question} q ON qv.questionid = q.id WHERE q.id = ?) ORDER BY qv.version DESC" | 1 |
|
"SELECT qv.questionid, qv.version, qv.questionbankentryid FROM {question_versions} qv JOIN {question_versions} qv2 ON qv.questionbankentryid = qv2.questionbankentryid WHERE qv2.questionid $listquestionid ORDER BY qv.questionbankentryid, qv.version DESC" | 1 |
|
"SELECT DISTINCT q.qtype FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid $categorysql" | 1 |
|
"SELECT q.id, q.id AS id2 FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid {$qcsql} AND q.parent = 0 AND qv.status = :readystatus AND qv.version = (SELECT MAX(v.version) FROM {question_versions} v JOIN {question_bank_entries} be ON be.id = v.questionbankentryid WHERE be.id = qbe.id AND v.status = :readystatusqv) {$extraconditions}" | 1 |
|
"SELECT $select FROM $from WHERE $where $extraconditions ORDER BY previous_attempts" | 1 |
|
'SELECT q.id, qc.id as category, q.parent, q.name, q.questiontext, q.questiontextformat, q.generalfeedback, q.generalfeedbackformat, q.defaultmark, q.penalty, q.qtype, q.length, q.stamp, q.timecreated, q.timemodified, q.createdby, q.modifiedby, qbe.idnumber, qc.contextid, qv.status, qv.id as versionid, qv.version, qv.questionbankentryid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id = :id' | 1 |
|
'SELECT q.id, qc.id as category, q.parent, q.name, q.questiontext, q.questiontextformat, q.generalfeedback, q.generalfeedbackformat, q.defaultmark, q.penalty, q.qtype, q.length, q.stamp, q.timecreated, q.timemodified, q.createdby, q.modifiedby, qbe.idnumber, qc.contextid, qv.status, qv.id as versionid, qv.version, qv.questionbankentryid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id ' | 1 |
|
" SELECT q.*, slot.maxmark FROM {question} q JOIN {quiz_slots} slot ON slot.questionid = q.id WHERE q.id = ? AND slot.quizid = ?" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {$qubaids->from_question_attempts('qa')} WHERE {$qubaids->where( )} AND qa.slot = :slot" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid {$qubaids->usage_id_in( )}" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid = :qubaid1 AND qa.slot = :slot" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid IN (:qubaid2,:qubaid3,:qubaid4) AND qa.slot = :slot" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {other_table} ot JOIN {question_attempts} qa ON qa.questionusageid = ot.usageid WHERE ot.id = 1 AND qa.slot = :slot" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {other_table} ot JOIN {question_attempts} qa ON qa.questionusageid = ot.usageid WHERE 1 = 1 AND qa.slot = :slot" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid = :qubaid5" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid IN (:qubaid6,:qubaid7,:qubaid8)" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid IN (SELECT ot.usageid FROM {other_table} ot WHERE ot.id = 1)" | 1 |
|
"SELECT qa.id, qa.maxmark FROM {question_attempts} qa WHERE qa.questionusageid IN (SELECT ot.usageid FROM {other_table} ot WHERE 1 = 1)" | 1 |
|
"SELECT qu.id, ({$this->dm->sum_usage_marks_subquery('qu.id')}) AS totalmark FROM {question_usages} qu WHERE qu.id IN ({$this->usageids[0]}, {$this->usageids[1]})" | 1 |
|
" SELECT lateststate.questionattemptid, qu.id AS questionusageid, lateststate.slot, lateststate.questionid, lateststate.maxmark, lateststate.sequencenumber, lateststate.state FROM {question_usages} qu LEFT JOIN $inlineview ON lateststate.questionusageid = qu.id WHERE qu.id IN ({$this->usageids[0]}, {$this->usageids[1]})" | 1 |
|
'SELECT modtable.* FROM {' . $this->get_module_name( ) . '} modtable ' . $contextjoin . ' WHERE modtable.' . static::MODIFIED_FIELD_NAME . ' >= ? ORDER BY modtable.' . static::MODIFIED_FIELD_NAME . ' ASC' | 1 |
|
" SELECT bi.id, bi.timemodified, bi.timecreated, bi.configdata, c.id AS courseid, x.id AS contextid FROM {block_instances} bi $contextjoin JOIN {context} x ON x.instanceid = bi.id AND x.contextlevel = ? JOIN {context} parent ON parent.id = bi.parentcontextid LEFT JOIN {course_modules} cm ON cm.id = parent.instanceid AND parent.contextlevel = ? JOIN {course} c ON c.id = cm.course OR (c.id = parent.instanceid AND parent.contextlevel = ?) WHERE bi.timemodified >= ? AND bi.blockname = ? AND (parent.contextlevel = ? AND (" . $DB->sql_like('bi.pagetypepattern', '?') . " OR bi.pagetypepattern IN ('site-index', 'course-*', '*'))) $restrictions ORDER BY bi.timemodified ASC" | 1 |
|
" SELECT bi.id, bi.pagetypepattern, bi.subpagepattern, c.id AS courseid, cm.id AS cmid FROM {block_instances} bi JOIN {context} parent ON parent.id = bi.parentcontextid LEFT JOIN {course} c ON c.id = parent.instanceid AND parent.contextlevel = ? LEFT JOIN {course_modules} cm ON cm.id = parent.instanceid AND parent.contextlevel = ? WHERE bi.id = ?" | 1 |
|
" SELECT $selectcolumns FROM {block_instances} bi JOIN {context} x ON x.instanceid = bi.id AND x.contextlevel = ? JOIN {context} parent ON parent.id = bi.parentcontextid $extrajoins WHERE bi.blockname = ? AND parent.contextlevel = ? GROUP BY $groupbycolumns ORDER BY $dborder" | 1 |
|
" SELECT x.*, bi.blockname AS blockname, bi.id AS blockinstanceid FROM {block_instances} bi JOIN {context} x ON x.instanceid = bi.id AND x.contextlevel = ? LEFT JOIN {block_positions} bp ON bp.blockinstanceid = bi.id AND bp.contextid = bi.parentcontextid AND bp.pagetype LIKE 'course-view-%' AND bp.subpage = '' AND bp.visible = 0 WHERE bi.parentcontextid $contextsql $blockcontextwhere AND bi.blockname $blocknamesql AND bi.subpagepattern IS NULL AND (bi.pagetypepattern = 'site-index' OR bi.pagetypepattern LIKE 'course-view-%' OR bi.pagetypepattern = 'course-*' OR bi.pagetypepattern = '*') AND bp.id IS NULL" | 1 |
|
" SELECT $selectcolumns FROM {course_modules} cm JOIN {context} x ON x.instanceid = cm.id AND x.contextlevel = ? $extrajoins WHERE cm.module = (SELECT id FROM {modules} WHERE name = ?) GROUP BY $groupbycolumns ORDER BY $dborder" | 1 |
|
' SELECT x.id FROM {block_instances} bi JOIN {context} x ON x.instanceid = bi.id AND x.contextlevel = ? WHERE (parentcontextid = ? OR parentcontextid = ?) AND blockname = ? ORDER BY bi.id' | 1 |
|
"SELECT * FROM {temp_mock_search_area} WHERE timemodified >= ? ORDER BY timemodified ASC" | 1 |
|
'SELECT MIN(id) FROM {course_categories}' | 1 |
|
"SELECT DISTINCT contextid FROM {search_simpledb_index} WHERE (userid = :userid OR owneruserid = :owneruserid)" | 1 |
|
"SELECT ssi.userid FROM {search_simpledb_index} ssi WHERE ssi.contextid = :contextid" | 1 |
|
"SELECT ssi.owneruserid AS userid FROM {search_simpledb_index} ssi WHERE ssi.contextid = :contextid" | 1 |
|
"SELECT ssi.*, $ctxfields FROM {search_simpledb_index} ssi JOIN {context} ctx ON ctx.id = ssi.contextid WHERE ssi.contextid $contextsql AND (ssi.userid = :userid OR ssi.owneruserid = :owneruserid)" | 1 |
|
"SELECT FULLTEXTCATALOGPROPERTY(cat.name, 'PopulateStatus') AS [PopulateStatus] FROM sys.fulltext_catalogs AS cat WHERE cat.name = ?" | 1 |
|
'SELECT * FROM sys.fulltext_catalogs WHERE name = ?' | 1 |
|
" SELECT u.id as id, esu.id as serviceuserid {$fieldsql->selects}, esu.iprestriction as iprestriction, esu.validuntil as validuntil, esu.timecreated as timecreated FROM {user} u JOIN {external_services_users} esu ON esu.userid = u.id {$fieldsql->joins} WHERE u.id <> ? AND u.deleted = 0 AND u.confirmed = 1 AND esu.externalserviceid = ?" | 1 |
|
" SELECT u.id as id, esu.id as serviceuserid, u.email as email, u.firstname as firstname, u.lastname as lastname, esu.iprestriction as iprestriction, esu.validuntil as validuntil, esu.timecreated as timecreated FROM {user} u, {external_services_users} esu WHERE u.id <> ? AND u.deleted = 0 AND u.confirmed = 1 AND esu.userid = u.id AND esu.externalserviceid = ? AND u.id = ?" | 1 |
|
"SELECT t.id, t.token, u.id AS userid, u.firstname, u.lastname, s.name, t.creatorid FROM {external_tokens} t, {user} u, {external_services} s WHERE t.id=? AND t.tokentype = ? AND s.id = t.externalserviceid AND t.userid = u.id" | 1 |
|
"SELECT f.* FROM {external_functions} f WHERE f.name IN (SELECT sf.functionname FROM {external_services_functions} sf WHERE sf.externalserviceid $serviceids) ORDER BY f.name ASC" | 1 |
|
"SELECT f.* FROM {external_functions} f WHERE f.name IN (SELECT sf.functionname FROM {external_services_functions} sf, {external_services} s WHERE s.shortname $serviceshortnames AND sf.externalserviceid = s.id " . $enabledonlysql . ")" | 1 |
|
"SELECT DISTINCT rc.id, rc.capability FROM {role_capabilities} rc, {role_assignments} ra WHERE rc.roleid=ra.roleid AND ra.userid= ? AND rc.permission = ?" | 1 |
|
"SELECT c.name AS capability, u.id AS userid FROM {capabilities} c JOIN {role_capabilities} rc ON c.name = rc.capability JOIN {role_assignments} ra ON ra.roleid = rc.roleid JOIN {user} u ON ra.userid = u.id WHERE rc.permission = :capallow AND c.name {$capsql} AND u.id {$usersql}" | 1 |
|
'SELECT t.id, t.creatorid, t.externalserviceid, t.name AS tokenname, t.validuntil, s.name AS servicename FROM {external_tokens} t JOIN {external_services} s ON t.externalserviceid = s.id WHERE t.userid = :userid AND (COALESCE(t.validuntil, 0) = 0 OR t.validuntil > :now)' | 1 |
|
"SELECT s.*, NULL AS iprestriction FROM {external_services} s JOIN {external_services_functions} sf ON (sf.externalserviceid = s.id AND s.restrictedusers = 0 AND sf.functionname = :name1) WHERE s.enabled = 1 $wscond1 UNION SELECT s.*, su.iprestriction FROM {external_services} s JOIN {external_services_functions} sf ON (sf.externalserviceid = s.id AND s.restrictedusers = 1 AND sf.functionname = :name2) JOIN {external_services_users} su ON (su.externalserviceid = s.id AND su.userid = :userid) WHERE s.enabled = 1 AND (su.validuntil IS NULL OR su.validuntil < :now) $wscond2" | 1 |
|
"SELECT s.*, NULL AS iprestriction FROM {external_services} s JOIN {external_services_functions} sf ON (sf.externalserviceid = s.id AND s.restrictedusers = 0) WHERE s.enabled = 1 $wscond1 UNION SELECT s.*, su.iprestriction FROM {external_services} s JOIN {external_services_functions} sf ON (sf.externalserviceid = s.id AND s.restrictedusers = 1) JOIN {external_services_users} su ON (su.externalserviceid = s.id AND su.userid = :userid) WHERE s.enabled = 1 AND (su.validuntil IS NULL OR su.validuntil < :now) $wscond2" | 1 |
|
'SELECT s.* FROM {external_services} s, {external_tokens} t WHERE t.externalserviceid = s.id AND token = ? AND t.userid = ? AND s.enabled = 1' | 1 |
|
"SELECT f.* FROM {external_functions} f, {external_services_functions} sf WHERE f.name = sf.functionname AND sf.externalserviceid = ?" | 1 |
|
"SELECT t.id, t.name, t.iprestriction, t.validuntil, t.creatorid, t.lastaccess, u.id AS userid, $usernamefields, s.id AS serviceid, s.name AS servicename, s.shortname AS serviceshortname, $creatorfields " | 1 |
|
"SELECT COUNT(t.id) " | 1 |
|
"SELECT c.id, ctx.id contextid FROM {context} ctx JOIN {course_categories} c ON ctx.contextlevel = ? AND ctx.instanceid = c.id WHERE c.$field = ?" | 1 |
|
"SELECT " . str_replace('c.', 'cohort.', $fieldssql) . " FROM {cohort} cohort JOIN (SELECT $subfields FROM {cohort} c $fromsql WHERE $wheresql $groupbysql $havingsql ) s ON cohort.id = s.id ORDER BY cohort.name, cohort.idnumber" | 1 |
|
"SELECT $fieldssql FROM {cohort} c $fromsql WHERE $wheresql ORDER BY c.name, c.idnumber" | 1 |
|
"SELECT *" | 1 |
|
"SELECT c.*, " . context_helper::get_preload_record_columns_sql('ctx') | 1 |
|
'SELECT c.* FROM {cohort} c JOIN {cohort_members} cm ON c.id = cm.cohortid WHERE cm.userid = ? AND c.visible = 1' | 1 |
|
"SELECT DISTINCT ctx.id, " . context_helper::get_preload_record_columns_sql('ctx') . " " . "FROM {context} ctx JOIN {cohort} c ON ctx.id = c.contextid " | 1 |
|
"SELECT u.id FROM {user} u, {cohort_members} cm WHERE u.id = cm.userid AND cm.cohortid = ? ORDER BY lastname ASC, firstname ASC" | 1 |
|
"SELECT ctx.id FROM {context} ctx INNER JOIN {cohort} c ON c.contextid = ctx.id INNER JOIN {cohort_members} cm ON cm.cohortid = c.id WHERE cm.userid = :userid AND (ctx.contextlevel = :contextlevel1 OR ctx.contextlevel = :contextlevel2)" | 1 |
|
"SELECT cm.userid FROM {cohort_members} cm JOIN {cohort} c ON cm.cohortid = c.id WHERE c.contextid = :contextid" | 1 |
|
"SELECT c.name, c.idnumber, c.description, c.visible, cm.timeadded, ctx.id as contextid FROM {context} ctx INNER JOIN {cohort} c ON c.contextid = ctx.id INNER JOIN {cohort_members} cm ON cm.cohortid = c.id WHERE ctx.id {$contextsql} AND cm.userid = :userid" | 1 |
|
" SELECT DISTINCT {$ctxfields}, c.contextid FROM {context} ctx JOIN {cohort} c ON c.contextid = ctx.id" | 1 |
|
"SELECT c.id FROM {context} c INNER JOIN {post} p ON p.courseid = c.instanceid AND c.contextlevel = :contextcoursewrittenby WHERE p.module = 'notes' AND p.usermodified = :usermodified" | 1 |
|
"SELECT c.id FROM {context} c INNER JOIN {post} p ON p.courseid = c.instanceid AND c.contextlevel = :contextcoursewrittenfor WHERE p.module = 'notes' AND p.userid = :userid AND p.publishstate {$publishstatesql}" | 1 |
|
"SELECT usermodified as userid FROM {post} WHERE module = 'notes' AND courseid = :instanceid" | 1 |
|
"SELECT userid FROM {post} WHERE module = 'notes' AND courseid = :instanceid AND publishstate {$publishstatesql}" | 1 |
|
"SELECT p.courseid as courseid, p.content as content, p.publishstate as publishstate, p.userid as userid, p.usermodified as usermodified, p.created as datecreated, p.lastmodified as datemodified FROM {context} c INNER JOIN {post} p ON p.courseid = c.instanceid AND c.contextlevel = :contextcourse WHERE p.module = 'notes' AND (p.usermodified = :usermodified OR p.userid = :userid) AND c.id {$contextsql}" | 1 |
|
'Show footer' | 1 |
|
"SELECT bi.id FROM {my_pages} p JOIN {context} ctx ON ctx.instanceid = p.userid AND ctx.contextlevel = :usercontextlevel JOIN {block_instances} bi ON bi.parentcontextid = ctx.id AND bi.pagetypepattern = :pagetypepattern AND (bi.subpagepattern IS NULL OR bi.subpagepattern = " . $DB->sql_cast_to_char('p.id') . ") WHERE p.private = :private AND p.name = :name AND p.userid $infragment" | 1 |
|
"SELECT ctx.path, rc.roleid, rc.capability, rc.permission FROM {role_capabilities} rc JOIN {context} ctx ON rc.contextid = ctx.id JOIN {capabilities} cap ON rc.capability = cap.name WHERE rc.roleid $sql" | 1 |
|
"SELECT 1 FROM {role_assignments} WHERE userid = :userid AND roleid IN ($CFG->coursecontact)" | 1 |
|
"SELECT ctx.path, ra.roleid, ra.contextid FROM {role_assignments} ra JOIN {context} ctx ON ctx.id = ra.contextid WHERE ra.userid = :userid" | 1 |
|
"SELECT DISTINCT ra.roleid AS id FROM {role_assignments} ra WHERE ra.contextid = :contextid AND ra.userid = :userid" | 1 |
|
" SELECT rc.* FROM {role_capabilities} rc JOIN {capability} cap ON rc.capability = cap.name WHERE rc.roleid = :roleid AND rc.capability = :capability AND rc.contextid = :contextid" | 1 |
|
"SELECT r.* FROM {role} r WHERE r.id IN (SELECT rc.roleid FROM {role_capabilities} rc JOIN {capabilities} cap ON rc.capability = cap.name WHERE rc.capability = :capname $contextsql $permissionsql)" | 1 |
|
' SELECT rc.*, CASE WHEN EXISTS(SELECT 1 FROM {role_capabilities} rc2 WHERE rc2.capability = ? AND rc2.contextid = rc.contextid AND rc2.roleid = rc.roleid) THEN 1 ELSE 0 END AS entryexists, ' . context_helper::get_preload_record_columns_sql('x') . ' FROM {role_capabilities} rc JOIN {context} x ON x.id = rc.contextid WHERE rc.capability = ?' | 1 |
|
"SELECT rc.* FROM {role_capabilities} rc JOIN {context} c ON rc.contextid = c.id JOIN {capabilities} cap ON rc.capability = cap.name WHERE rc.contextid in $contexts AND rc.roleid = ? $search ORDER BY c.contextlevel DESC, rc.capability DESC" | 1 |
|
"SELECT DISTINCT r.id, r.name, r.shortname, r.sortorder, rn.name AS coursealias FROM {role_assignments} ra, {role} r LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) WHERE r.id = ra.roleid AND ra.contextid $contextlist AND r.id $rallowed ORDER BY r.sortorder ASC" | 1 |
|
"SELECT DISTINCT r.id, r.name, r.shortname, r.sortorder, rn.name AS coursealias FROM {role_assignments} ra, {role} r LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) WHERE r.id = ra.roleid AND ra.contextid $contextlist ORDER BY r.sortorder ASC" | 1 |
|
"SELECT DISTINCT r.id, r.name, r.shortname, r.sortorder, rn.name AS coursealias FROM {role_assignments} ra, {role} r LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) WHERE r.id = ra.roleid AND ra.contextid $contextlist AND r.id $rallowed AND ra.userid = :userid ORDER BY r.sortorder ASC" | 1 |
|
"SELECT r.*, rn.name AS coursealias FROM {role} r LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) ORDER BY r.sortorder ASC" | 1 |
|
"SELECT ra.*, r.name, r.shortname, ra.userid FROM {role_assignments} ra, {role} r, {context} c WHERE ra.userid $useridlist AND ra.roleid = r.id AND ra.contextid = c.id AND ra.contextid $contextids ORDER BY $order" | 1 |
|
"SELECT ra.*, r.name, r.shortname FROM {role_assignments} ra, {role} r, {context} c WHERE ra.userid = ? AND ra.roleid = r.id AND ra.contextid = c.id AND ra.contextid $contextids ORDER BY $order" | 1 |
|
"SELECT r.id, r.name, r.shortname, rn.name AS coursealias $extrafields FROM {role} r $assignrestriction JOIN {role_context_levels} rcl ON (rcl.contextlevel = :contextlevel AND r.id = rcl.roleid) LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) ORDER BY r.sortorder ASC" | 1 |
|
" SELECT r.id, r.name, r.shortname, rn.name AS coursealias FROM (SELECT DISTINCT rc.roleid FROM {role_capabilities} rc $extrajoins $extrawhere) idlist JOIN {role} r ON r.id = idlist.roleid LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) ORDER BY r.sortorder" | 1 |
|
" SELECT r.id, r.name, r.shortname, rn.name AS coursealias, r.sortorder FROM {role} r $extrajoins LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) $extrawhere GROUP BY r.id, r.name, r.shortname, rn.name, r.sortorder ORDER BY r.sortorder" | 1 |
|
" SELECT ro.id, ro.name, ro.shortname, rn.name AS coursealias $extrafields FROM {role} ro LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = ro.id) ORDER BY ro.sortorder ASC" | 1 |
|
" SELECT ro.id, ro.name, ro.shortname, rn.name AS coursealias $extrafields FROM {role} ro JOIN (SELECT DISTINCT r.id FROM {role} r JOIN {role_allow_override} rao ON r.id = rao.allowoverride JOIN {role_assignments} ra ON rao.roleid = ra.roleid WHERE ra.userid = :userid AND ra.contextid IN ($contexts) ) inline_view ON ro.id = inline_view.id LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = ro.id) ORDER BY ro.sortorder ASC" | 1 |
|
"SELECT r.id, r.name, r.shortname, rn.name AS coursealias FROM {role} r LEFT JOIN {role_context_levels} rcl ON (rcl.roleid = r.id AND rcl.contextlevel = :contextlevel) LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) WHERE rcl.id IS NOT NULL $addrole ORDER BY sortorder DESC" | 1 |
|
"SELECT rc.id, rc.roleid, rc.permission, rc.capability, ctx.path FROM {role_capabilities} rc JOIN {capabilities} cap ON rc.capability = cap.name JOIN {context} ctx on rc.contextid = ctx.id WHERE rc.contextid $incontexts AND rc.capability $incaps $excludelockedcaps" | 1 |
|
"SELECT userid FROM {role_assignments} WHERE contextid IN ($ctxids) AND roleid IN (" . implode(',', array_keys($needed[$cap])) . ")" | 1 |
|
"SELECT id AS userid FROM {user} WHERE id NOT IN (SELECT userid FROM {role_assignments} WHERE contextid IN ($ctxids) AND roleid IN (" . implode(',', array_keys($prohibited[$cap])) . "))" | 1 |
|
"SELECT userid FROM {role_assignments} WHERE contextid IN ($ctxids) AND roleid IN (" . implode(',', array_keys($needed[$cap])) . ") AND userid NOT IN ( SELECT userid FROM {role_assignments} WHERE contextid IN ($ctxids) AND roleid IN (" . implode(',', array_keys($prohibited[$cap])) . "))" | 1 |
|
"SELECT $fields FROM {user} u $joins $where ORDER BY $sort" | 1 |
|
"SELECT ra.userid FROM {role_assignments} ra JOIN {role} r ON ra.roleid=r.id JOIN {context} ctx ON ra.contextid=ctx.id WHERE $userswhere $contextwhere $roleswhere" | 1 |
|
"SELECT DISTINCT $fields, ra.roleid FROM {role_assignments} ra JOIN {user} u ON u.id = ra.userid JOIN {role} r ON ra.roleid = r.id $ejoin LEFT JOIN {role_names} rn ON (rn.contextid = :coursecontext AND rn.roleid = r.id) $groupjoin WHERE (ra.contextid = :contextid $parentcontexts) $roleselect $groupselect $extrawheretest ORDER BY $sort" | 1 |
|
"SELECT COUNT(DISTINCT u.id) FROM {role_assignments} r JOIN {user} u ON u.id = r.userid WHERE (r.contextid = ? $parentcontexts) $roleselect AND u.deleted = 0" | 1 |
|
" SELECT c.id $fieldlist FROM {course_categories} c JOIN {context} x ON c.id = x.instanceid AND x.contextlevel = ? $contextlimitsql $categoryorderby" | 1 |
|
" SELECT c.id $fieldlist FROM {course} c JOIN {context} x ON c.id = x.instanceid AND x.contextlevel = ? $contextlimitsql $courseorderby" | 1 |
|
"SELECT r.* FROM {role_capabilities} rc, {role} r WHERE rc.roleid = r.id AND rc.contextid = ?" | 1 |
|
"SELECT * FROM {role_capabilities} WHERE contextid = ? AND roleid = ?" | 1 |
|
"SELECT * FROM {role_assignments} WHERE contextid = ? AND roleid = ?" | 1 |
|
"SELECT COUNT(ra.id) FROM {role_assignments} ra WHERE ra.userid = :userid AND ra.roleid = :roleid AND ra.contextid $contexts" | 1 |
|
"SELECT * FROM {role_capabilities} WHERE roleid = ? AND contextid = ?" | 1 |
|
"SELECT rc.id, rc.roleid, rc.permission, ctx.depth FROM {role_capabilities} rc JOIN {context} ctx ON ctx.id = rc.contextid JOIN {capabilities} cap ON rc.capability = cap.name WHERE rc.capability = :cap AND ctx.id IN ($ctxids) ORDER BY rc.roleid ASC, ctx.depth DESC" | 1 |
|
"SELECT ctx.id FROM {role_capabilities} rc JOIN {context} ctx ON ctx.id = rc.contextid JOIN {capabilities} cap ON rc.capability = cap.name WHERE rc.roleid = :roleid AND rc.permission = :prohibit AND rc.capability = :cap AND ctx.id IN ($ctxids) ORDER BY ctx.depth DESC" | 1 |
|
"SELECT ctx.id, rc.permission, ctx.depth FROM {role_capabilities} rc JOIN {context} ctx ON ctx.id = rc.contextid JOIN {capabilities} cap ON rc.capability = cap.name WHERE rc.roleid = :roleid AND rc.capability = :cap AND ctx.id IN ($ctxids) ORDER BY ctx.depth DESC" | 1 |
|
" SELECT ctx.* FROM {context} ctx LEFT JOIN {user} u ON ctx.contextlevel = " . CONTEXT_USER . " AND u.id = ctx.instanceid LEFT JOIN {course_categories} cat ON ctx.contextlevel = " . CONTEXT_COURSECAT . " AND cat.id = ctx.instanceid LEFT JOIN {course} c ON ctx.contextlevel = " . CONTEXT_COURSE . " AND c.id = ctx.instanceid LEFT JOIN {course_modules} cm ON ctx.contextlevel = " . CONTEXT_MODULE . " AND cm.id = ctx.instanceid LEFT JOIN {block_instances} bi ON ctx.contextlevel = " . CONTEXT_BLOCK . " AND bi.id = ctx.instanceid $select ORDER BY ctx.contextlevel, bi.defaultregion, COALESCE(cat.sortorder, c.sortorder, cm.section, bi.defaultweight), u.lastname, u.firstname, cm.id " | 1 |
|
"SELECT DISTINCT {$prefix}u.id FROM {user} {$prefix}u $capjoin->joins WHERE {$prefix}u.deleted = 0 AND $capjoin->wheres" | 1 |
|
"SELECT u.* FROM {user} u WHERE u.deleted = 0 AND u.id IN ($CFG->siteadmins)" | 1 |
|
"SELECT u.id, u.firstname, u.lastname, u.email FROM {user} u WHERE $select $except $order" | 1 |
|
"SELECT u.id, u.firstname, u.lastname, u.email FROM {user} u JOIN {groups_members} gm ON gm.userid = u.id WHERE $select AND gm.groupid = :groupid $except $order" | 1 |
|
"SELECT u.id, u.firstname, u.lastname, u.email FROM {user} u JOIN {role_assignments} ra ON ra.userid = u.id WHERE $select AND ra.contextid $relatedctxsql $except $order" | 1 |
|
"SELECT u.id $selects FROM {user} u $joins WHERE $select $sort" | 1 |
|
"SELECT * FROM {user} WHERE confirmed = 1 AND deleted = 0 AND id <> ?" | 1 |
|
"SELECT $fields $ccselect FROM {course} c $ccjoin $categoryselect $sortstatement" | 1 |
|
"SELECT c.* $ccselect FROM {course} c $ccjoin WHERE $searchcond AND c.id <> " . SITEID . " ORDER BY $sort" | 1 |
|
"SELECT cc.id, cc.coursecount, COUNT(c.id) AS newcount FROM {course_categories} cc LEFT JOIN {course} c ON c.category = cc.id GROUP BY cc.id, cc.coursecount HAVING cc.coursecount <> COUNT(c.id)" | 1 |
|
"SELECT DISTINCT cc.id, cc.sortorder FROM {course_categories} cc JOIN {course} c ON c.category = cc.id WHERE c.sortorder < cc.sortorder OR c.sortorder > cc.sortorder + " . get_max_courses_in_category( ) | 1 |
|
"UPDATE {course} SET sortorder = " . $DB->sql_modulo('sortorder', get_max_courses_in_category( )) . " + ? WHERE category = ?" | 1 |
|
"SELECT DISTINCT c1.category AS id , cc.sortorder FROM {course} c1 JOIN {course} c2 ON c1.sortorder = c2.sortorder JOIN {course_categories} cc ON (c1.category = cc.id) WHERE c1.id <> c2.id" | 1 |
|
"SELECT cc.id, cc.sortorder, cc.coursecount, MAX(c.sortorder) AS maxsort, MIN(c.sortorder) AS minsort FROM {course_categories} cc JOIN {course} c ON c.category = cc.id GROUP BY cc.id, cc.sortorder, cc.coursecount HAVING (MAX(c.sortorder) <> cc.sortorder + cc.coursecount) OR (MIN(c.sortorder) <> cc.sortorder + 1)" | 1 |
|
"UPDATE {course} SET sortorder = sortorder + 1 WHERE category = ?" | 1 |
|
"SELECT c.id, c.remoteid, c.shortname, c.fullname, c.hostid, c.summary, c.summaryformat, c.categoryname AS cat_name, h.name AS hostname FROM {mnetservice_enrol_courses} c JOIN (SELECT DISTINCT hostid, remotecourseid FROM {mnetservice_enrol_enrolments} WHERE userid = ? ) e ON (e.hostid = c.hostid AND e.remotecourseid = c.remoteid) JOIN {mnet_host} h ON h.id = c.hostid" | 1 |
|
"SELECT id, name, courseid FROM {scale} WHERE courseid = 0 or courseid = ? ORDER BY courseid ASC, name ASC" | 1 |
|
"UPDATE {{$table}} SET $field = (CASE WHEN $field IS NULL THEN $now WHEN $field < $now THEN $now WHEN $field > $now + 3600 THEN $now ELSE $field + 1 END)" | 1 |
|
"SELECT cm.*, m.name as modname FROM {modules} m, {course_modules} cm WHERE cm.course = ? AND cm.module = m.id AND m.visible = 1" | 1 |
|
"SELECT md.name FROM {modules} md JOIN {course_modules} cm ON cm.module = md.id WHERE cm.id = :cmid" | 1 |
|
"SELECT cm.*, m.name, md.name AS modname $sectionfield FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module JOIN {" . $modulename . "} m ON m.id = cm.instance $sectionjoin WHERE cm.id = :cmid AND md.name = :modulename $courseselect" | 1 |
|
"SELECT cm.*, m.name, md.name AS modname $sectionfield FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module JOIN {" . $modulename . "} m ON m.id = cm.instance $sectionjoin WHERE m.id = :instance AND md.name = :modulename $courseselect" | 1 |
|
"SELECT cm.*, m.name, md.name as modname $extrafields FROM {course_modules} cm, {modules} md, {" . $modulename . "} m WHERE cm.course = :courseid AND cm.instance = m.id AND md.name = :modulename AND md.id = cm.module" | 1 |
|
"SELECT cm.id AS coursemodule, m.*, cw.section, cm.visible AS visible, cm.groupmode, cm.groupingid, cm.lang FROM {course_modules} cm, {course_sections} cw, {modules} md, {" . $modulename . "} m WHERE cm.course $coursessql AND cm.instance = m.id AND cm.section = cw.id AND md.name = :modulename AND md.id = cm.module" | 1 |
|
"SELECT cm.instance, cm.visible, cm.groupingid, cm.id, cm.course FROM {course_modules} cm, {modules} m WHERE cm.course = :courseid AND cm.module = m.id AND m.name = :moduletype AND cm.instance = :moduleid" | 1 |
|
'select custom-select ' . $attributes['class'] | 1 |
|
"SELECT 'x' FROM {user} WHERE " . $DB->sql_equal('email', ':email1', false, true) . " AND id IN (SELECT id FROM {user} WHERE " . $DB->sql_equal('email', ':email2', false, false) . " AND mnethostid = :mnethostid)" | 1 |
|
"SELECT h.id, h.name, h.wwwroot, a.name as application, a.display_name FROM {mnet_host} h, {mnet_application} a WHERE h.id = ? AND h.applicationid = a.id" | 1 |
|
'SELECT * FROM {portfolio_instance}' | 1 |
|
'SELECT t.id FROM {portfolio_tempdata} t JOIN {portfolio_instance} i ON t.instance = i.id WHERE t.userid = ? AND i.plugin = ?' | 1 |
|
'SELECT t.*,t.instance,i.plugin,i.name FROM {portfolio_tempdata} t JOIN {portfolio_instance} i ON t.instance = i.id WHERE t.userid = ? ' | 1 |
|
'SELECT t.id,i.plugin FROM {portfolio_tempdata} t JOIN {portfolio_instance} i ON t.instance = i.id WHERE t.userid = ? ' | 1 |
|
" SELECT c.* FROM {course_modules} cm JOIN {course} c ON c.id = cm.course WHERE cm.id = ?" | 1 |
|
" SELECT c.* FROM $pagetable instance JOIN {course} c ON c.id = instance.course WHERE instance.id = ?" | 1 |
|
"SELECT f.filter, fc.name, fc.value FROM {filter_active} f LEFT JOIN {filter_config} fc ON fc.filter = f.filter AND fc.contextid = f.contextid WHERE f.contextid = :contextid AND f.active != :disabled ORDER BY f.sortorder" | 1 |
|
"SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM {filter_active} f JOIN {context} ctx ON f.contextid = ctx.id WHERE ctx.id IN ($contextids) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN {filter_config} fc ON fc.filter = active.filter AND fc.contextid = $context->id ORDER BY active.sortorder" | 1 |
|
"SELECT parent_states.filter, CASE WHEN fa.active IS NULL THEN " . TEXTFILTER_INHERIT . " ELSE fa.active END AS localstate, parent_states.inheritedstate FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder, CASE WHEN MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) THEN " . TEXTFILTER_ON . " ELSE " . TEXTFILTER_OFF . " END AS inheritedstate FROM {filter_active} f JOIN {context} ctx ON f.contextid = ctx.id WHERE ctx.id IN ($contextids) GROUP BY f.filter HAVING MIN(f.active) > " . TEXTFILTER_DISABLED . " ) parent_states LEFT JOIN {filter_active} fa ON fa.filter = parent_states.filter AND fa.contextid = $context->id ORDER BY parent_states.sortorder" | 1 |
|
'SELECT qbe.* FROM {question_bank_entries} qbe JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = ?' | 1 |
|
'SELECT qv.id as versionid, qv.version, qbe.id as entryid, qc.id as categoryid, ctx.id as contextid FROM {question} q LEFT JOIN {question_versions} qv ON qv.questionid = q.id LEFT JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid LEFT JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid LEFT JOIN {context} ctx ON ctx.id = qc.contextid WHERE q.id = ?' | 1 |
|
'SELECT qbe.idnumber FROM {question_bank_entries} qbe WHERE qbe.idnumber LIKE ? AND qbe.questioncategoryid = ? ORDER BY qbe.idnumber DESC' | 1 |
|
"SELECT qv.id as versionid, qbe.id as entryid, qc.id as category, qc.contextid as contextid, q.id, q.qtype, qbe.idnumber FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id $questionidcondition OR (q.parent <> 0 AND q.parent $questionidcondition)" | 1 |
|
"SELECT q.id, q.qtype FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = ?" | 1 |
|
"SELECT q.*, qc.id as category, qv.status, qv.id as versionid, qv.version, qv.questionbankentryid, qc.contextid as contextid {$extrafields} FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid {$join} {$extracondition} {$orderby}" | 1 |
|
"SELECT $concatsql FROM {question_categories} WHERE contextid $insql AND parent = 0" | 1 |
|
'SELECT q.id, q.createdby, qc.contextid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id = :id' | 1 |
|
'SELECT q.*, qc.contextid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id = :id AND qc.contextid = :contextid' | 1 |
|
"SELECT qbe.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE q.id = :id" | 1 |
|
"SELECT MAX(qv.version) FROM {question_versions} qv JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.id = :id" | 1 |
|
"SELECT cm.id AS cmid, cmc.*, CASE WHEN cmv.id IS NULL THEN 0 ELSE 1 END AS viewed FROM {course_modules} cm LEFT JOIN {course_modules_completion} cmc ON cmc.coursemoduleid = cm.id AND cmc.userid = ? LEFT JOIN {course_modules_viewed} cmv ON cmv.coursemoduleid = cm.id AND cmv.userid = ? INNER JOIN {modules} m ON m.id = cm.module WHERE m.visible = 1 AND cm.course = ?" | 1 |
|
'SELECT COUNT(eu.id) FROM (' . $enrolledsql . ') eu JOIN {user} u ON u.id = eu.id' | 1 |
|
'SELECT u.id, u.idnumber ' . $fieldssql->selects | 1 |
|
"SELECT cmc.*, cmv.coursemoduleid as cmvcoursemoduleid, cmv.userid as cmvuserid FROM {course_modules_completion} cmc LEFT JOIN {course_modules_viewed} cmv ON cmc.coursemoduleid = cmv.coursemoduleid AND cmc.userid = cmv.userid WHERE cmc.coursemoduleid = :cmccoursemoduleid AND cmc.userid = :cmcuserid UNION SELECT cmc2.*, cmv2.coursemoduleid as cmvcoursemoduleid, cmv2.userid as cmvuserid FROM {course_modules_completion} cmc2 RIGHT JOIN {course_modules_viewed} cmv2 ON cmc2.coursemoduleid = cmv2.coursemoduleid AND cmc2.userid = cmv2.userid WHERE cmv2.coursemoduleid = :cmvcoursemoduleid AND cmv2.userid = :cmvuserid" | 1 |
|
"SELECT DISTINCT c.id AS courseid, cr.id AS criteriaid, cco.userid, cr.criteriatype, ccocr.timecompleted FROM {course_completion_criteria} cr INNER JOIN {course} c ON cr.course = c.id INNER JOIN {course_completions} cco ON cco.course = c.id LEFT JOIN {course_completion_crit_compl} ccocr ON ccocr.criteriaid = cr.id AND cco.userid = ccocr.userid WHERE c.enablecompletion = 1 AND cco.timecompleted IS NULL AND cco.reaggregate > 0" | 1 |
|
'SELECT COUNT(1) FROM ' . $this->sql->from . ' WHERE ' . $this->sql->where | 1 |
|
"SELECT {$this->sql->fields} FROM {$this->sql->from} WHERE {$this->sql->where}" | 1 |
|
" SELECT $fields FROM {groups} g $userfrom $groupingfrom $visibilityfrom WHERE g.courseid = ? $userwhere $groupingwhere $visibilitywhere $participationwhere ORDER BY g.name ASC" | 1 |
|
" SELECT gm.* FROM {groups_members} gm $gmvisibilityfrom WHERE gm.groupid $gmin $gmvisibilitywhere" | 1 |
|
"SELECT * FROM {groups_members} gm JOIN {groups} g ON g.id = gm.groupid WHERE gm.userid = :userid $visibilitywhere ORDER BY name ASC" | 1 |
|
"SELECT g.id, g.courseid, gg.groupingid FROM {groups} g JOIN {groups_members} gm ON gm.groupid = g.id LEFT JOIN {groupings_groups} gg ON gg.groupid = g.id WHERE gm.userid = :userid" | 1 |
|
"SELECT * FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE g.id = :groupid AND gm.userid = :userid" | 1 |
|
"SELECT 'x' FROM {groups_members} gm, {groupings_groups} gg WHERE gm.userid = ? AND gm.groupid = gg.groupid AND gg.groupingid = ?" | 1 |
|
"SELECT 'x' FROM {groups_members} gm, {groups} g WHERE gm.userid = ? AND gm.groupid = g.id AND g.courseid = ?" | 1 |
|
"SELECT $fields" | 1 |
|
"SELECT $fields FROM {user} u INNER JOIN {groups_members} gm ON u.id = gm.userid INNER JOIN {groupings_groups} gg ON gm.groupid = gg.groupid WHERE gg.groupingid = ? ORDER BY $sort" | 1 |
|
"SELECT DISTINCT u.id FROM {user} u $groupjoin->joins WHERE u.deleted = 0" | 1 |
|
"SELECT {$groupmemberalias}.userid, {$sqlgroupconcat} AS groupnames FROM {groups} {$groupalias} JOIN {groups_members} {$groupmemberalias} ON {$groupmemberalias}.groupid = {$groupalias}.id WHERE {$groupalias}.courseid = :{$groupcourseparam} GROUP BY {$groupmemberalias}.userid" | 1 |
|
" SELECT gg.id, gg.groupingid, gg.groupid FROM {groupings_groups} gg JOIN {groups} g ON g.id = gg.groupid WHERE gg.groupingid $insql ORDER BY g.name ASC" | 1 |
|
"SELECT DISTINCT courseid FROM {groups} WHERE id $insql" | 1 |
|
"SELECT $userfields FROM {user} u JOIN {groups_members} gm ON u.id = gm.userid JOIN {groups} g ON g.id = gm.groupid WHERE {$where} GROUP BY $userfields ORDER BY $sort" | 1 |
|
"SELECT 'x' FROM {temp_log1} l" | 1 |
|
'SELECT COUNT(DISTINCT u.id) FROM {user} u JOIN {temp_log1} l ON l.userid = u.id WHERE u.deleted = 0' | 1 |
|
"INSERT INTO {temp_stats_user_daily} (stattype, timeend, courseid, userid, statsreads) SELECT 'logins', $nextmidnight AS timeend, " . SITEID . " AS courseid, userid, COUNT(id) AS statsreads FROM {temp_log1} l WHERE action = 'login' GROUP BY userid HAVING COUNT(id) > 0" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'logins' AS stattype, $nextmidnight AS timeend, " . SITEID . " AS courseid, 0, COALESCE(SUM(statsreads), 0) as stat1, COUNT('x') as stat2 FROM {temp_stats_user_daily} WHERE stattype = 'logins' AND timeend = $nextmidnight" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'enrolments' as stattype, $nextmidnight as timeend, courseid, roleid, COUNT(DISTINCT userid) as stat1, 0 as stat2 FROM {temp_enroled} GROUP BY courseid, roleid" | 1 |
|
"UPDATE {temp_stats_daily} SET stat2 = ( SELECT COUNT(DISTINCT userid) FROM {temp_enroled} te WHERE roleid = {temp_stats_daily}.roleid AND courseid = {temp_stats_daily}.courseid AND EXISTS ( SELECT 'x' FROM {temp_log1} l WHERE l.course = {temp_stats_daily}.courseid AND l.userid = te.userid ) ) WHERE {temp_stats_daily}.stattype = 'enrolments' AND {temp_stats_daily}.timeend = $nextmidnight AND {temp_stats_daily}.courseid IN ( SELECT DISTINCT course FROM {temp_log2})" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'enrolments', $nextmidnight AS timeend, te.courseid AS courseid, 0 AS roleid, COUNT(DISTINCT userid) AS stat1, 0 AS stat2 FROM {temp_enroled} te GROUP BY courseid HAVING COUNT(DISTINCT userid) > 0" | 1 |
|
"UPDATE {temp_stats_daily} SET stat2 = ( SELECT COUNT(DISTINCT te.userid) FROM {temp_enroled} te WHERE te.courseid = {temp_stats_daily}.courseid AND EXISTS ( SELECT 'x' FROM {temp_log1} l WHERE l.course = {temp_stats_daily}.courseid AND l.userid = te.userid ) ) WHERE {temp_stats_daily}.stattype = 'enrolments' AND {temp_stats_daily}.timeend = $nextmidnight AND {temp_stats_daily}.roleid = 0 AND {temp_stats_daily}.courseid IN ( SELECT l.course FROM {temp_log2} l WHERE l.course <> " . SITEID . ")" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'enrolments', $nextmidnight, " . SITEID . ", 0, $totalactiveusers AS stat1, $dailyactiveusers AS stat2" . $DB->sql_null_from_clause( ) | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'enrolments', $nextmidnight, " . SITEID . ", $defaultfproleid, $totalactiveusers AS stat1, $dailyactiveusers AS stat2" . $DB->sql_null_from_clause( ) | 1 |
|
"INSERT INTO {temp_stats_user_daily} (stattype, timeend, courseid, userid, statsreads, statswrites) SELECT 'activity' AS stattype, $nextmidnight AS timeend, course AS courseid, userid, SUM(CASE WHEN action $viewactionssql THEN 1 ELSE 0 END) AS statsreads, SUM(CASE WHEN action $postactionssql THEN 1 ELSE 0 END) AS statswrites FROM {temp_log1} l GROUP BY userid, course" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity' AS stattype, $nextmidnight AS timeend, c.id AS courseid, 0, SUM(CASE WHEN l.action $viewactionssql THEN 1 ELSE 0 END) AS stat1, SUM(CASE WHEN l.action $postactionssql THEN 1 ELSE 0 END) AS stat2 FROM {course} c, {temp_log1} l WHERE l.course = c.id GROUP BY c.id" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity', $nextmidnight AS timeend, courseid, roleid, SUM(statsreads), SUM(statswrites) FROM ( SELECT pl.courseid, pl.roleid, sud.statsreads, sud.statswrites FROM {temp_stats_user_daily} sud, ( SELECT DISTINCT te.userid, te.roleid, te.courseid FROM {temp_enroled} te WHERE te.roleid <> $guestrole AND te.userid <> $guest ) pl WHERE sud.userid = pl.userid AND sud.courseid = pl.courseid AND sud.timeend = $nextmidnight AND sud.stattype='activity' ) inline_view GROUP BY courseid, roleid HAVING SUM(statsreads) > 0 OR SUM(statswrites) > 0" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity', $nextmidnight AS timeend, courseid, $guestrole AS roleid, SUM(statsreads), SUM(statswrites) FROM ( SELECT sud.courseid, sud.statsreads, sud.statswrites FROM {temp_stats_user_daily} sud WHERE sud.timeend = $nextmidnight AND sud.courseid <> " . SITEID . " AND sud.stattype='activity' AND (sud.userid = $guest OR sud.userid NOT IN ( SELECT userid FROM {temp_enroled} te WHERE te.courseid = sud.courseid )) ) inline_view GROUP BY courseid HAVING SUM(statsreads) > 0 OR SUM(statswrites) > 0" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity', $nextmidnight AS timeend, courseid, roleid, SUM(statsreads), SUM(statswrites) FROM ( SELECT pl.courseid, pl.roleid, sud.statsreads, sud.statswrites FROM {temp_stats_user_daily} sud, ( SELECT DISTINCT ra.userid, ra.roleid, c.instanceid AS courseid FROM {role_assignments} ra JOIN {context} c ON c.id = ra.contextid WHERE ra.contextid = :fpcontext AND ra.roleid <> $defaultfproleid AND ra.roleid <> $guestrole AND ra.userid <> $guest ) pl WHERE sud.userid = pl.userid AND sud.courseid = pl.courseid AND sud.timeend = $nextmidnight AND sud.stattype='activity' ) inline_view GROUP BY courseid, roleid HAVING SUM(statsreads) > 0 OR SUM(statswrites) > 0" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity', timeend, courseid, $defaultfproleid AS roleid, SUM(statsreads), SUM(statswrites) FROM ( SELECT sud.timeend AS timeend, sud.courseid, sud.statsreads, sud.statswrites FROM {temp_stats_user_daily} sud WHERE sud.timeend = :nextm AND sud.courseid = :siteid AND sud.stattype='activity' AND sud.userid <> $guest AND sud.userid <> 0 AND sud.userid NOT IN ( SELECT ra.userid FROM {role_assignments} ra WHERE ra.roleid <> $guestrole AND ra.roleid <> $defaultfproleid AND ra.contextid = :fpcontext) ) inline_view GROUP BY timeend, courseid HAVING SUM(statsreads) > 0 OR SUM(statswrites) > 0" | 1 |
|
"INSERT INTO {temp_stats_daily} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT stattype, timeend, courseid, $guestrole AS roleid, SUM(statsreads) AS stat1, SUM(statswrites) AS stat2 FROM ( SELECT sud.stattype, sud.timeend, sud.courseid, sud.statsreads, sud.statswrites FROM {temp_stats_user_daily} sud WHERE (sud.userid = $guest OR sud.userid = 0) AND sud.timeend = $nextmidnight AND sud.courseid = " . SITEID . " AND sud.stattype='activity' ) inline_view GROUP BY stattype, timeend, courseid HAVING SUM(statsreads) > 0 OR SUM(statswrites) > 0" | 1 |
|
"INSERT INTO {stats_user_weekly} (stattype, timeend, courseid, userid, statsreads) SELECT 'logins', timeend, courseid, userid, SUM(statsreads) FROM ( SELECT $nextstartweek AS timeend, courseid, userid, statsreads FROM {stats_user_daily} sd WHERE stattype = 'logins' AND $stattimesql ) inline_view GROUP BY timeend, courseid, userid HAVING SUM(statsreads) > 0" | 1 |
|
"INSERT INTO {stats_weekly} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'logins' AS stattype, $nextstartweek AS timeend, " . SITEID . " as courseid, 0, COALESCE((SELECT SUM(statsreads) FROM {stats_user_weekly} s1 WHERE s1.stattype = 'logins' AND timeend = $nextstartweek), 0) AS nstat1, (SELECT COUNT('x') FROM {stats_user_weekly} s2 WHERE s2.stattype = 'logins' AND timeend = $nextstartweek) AS nstat2" . $DB->sql_null_from_clause( ) | 1 |
|
"INSERT INTO {stats_weekly} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'enrolments', ntimeend, courseid, roleid, " . $DB->sql_ceil('AVG(stat1)') . ", " . $DB->sql_ceil('AVG(stat2)') . " FROM ( SELECT $nextstartweek AS ntimeend, courseid, roleid, stat1, stat2 FROM {stats_daily} sd WHERE stattype = 'enrolments' AND $stattimesql ) inline_view GROUP BY ntimeend, courseid, roleid" | 1 |
|
"INSERT INTO {stats_weekly} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity', ntimeend, courseid, roleid, SUM(stat1), SUM(stat2) FROM ( SELECT $nextstartweek AS ntimeend, courseid, roleid, stat1, stat2 FROM {stats_daily} WHERE stattype = 'activity' AND $stattimesql ) inline_view GROUP BY ntimeend, courseid, roleid" | 1 |
|
"INSERT INTO {stats_user_weekly} (stattype, timeend, courseid, userid, statsreads, statswrites) SELECT 'activity', ntimeend, courseid, userid, SUM(statsreads), SUM(statswrites) FROM ( SELECT $nextstartweek AS ntimeend, courseid, userid, statsreads, statswrites FROM {stats_user_daily} WHERE stattype = 'activity' AND $stattimesql ) inline_view GROUP BY ntimeend, courseid, userid" | 1 |
|
"INSERT INTO {stats_user_monthly} (stattype, timeend, courseid, userid, statsreads) SELECT 'logins', timeend, courseid, userid, SUM(statsreads) FROM ( SELECT $nextstartmonth AS timeend, courseid, userid, statsreads FROM {stats_user_daily} sd WHERE stattype = 'logins' AND $stattimesql ) inline_view GROUP BY timeend, courseid, userid HAVING SUM(statsreads) > 0" | 1 |
|
"INSERT INTO {stats_monthly} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'logins' AS stattype, $nextstartmonth AS timeend, " . SITEID . " as courseid, 0, COALESCE((SELECT SUM(statsreads) FROM {stats_user_monthly} s1 WHERE s1.stattype = 'logins' AND timeend = $nextstartmonth), 0) AS nstat1, (SELECT COUNT('x') FROM {stats_user_monthly} s2 WHERE s2.stattype = 'logins' AND timeend = $nextstartmonth) AS nstat2" . $DB->sql_null_from_clause( ) | 1 |
|
"INSERT INTO {stats_monthly} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'enrolments', ntimeend, courseid, roleid, " . $DB->sql_ceil('AVG(stat1)') . ", " . $DB->sql_ceil('AVG(stat2)') . " FROM ( SELECT $nextstartmonth AS ntimeend, courseid, roleid, stat1, stat2 FROM {stats_daily} sd WHERE stattype = 'enrolments' AND $stattimesql ) inline_view GROUP BY ntimeend, courseid, roleid" | 1 |
|
"INSERT INTO {stats_monthly} (stattype, timeend, courseid, roleid, stat1, stat2) SELECT 'activity', ntimeend, courseid, roleid, SUM(stat1), SUM(stat2) FROM ( SELECT $nextstartmonth AS ntimeend, courseid, roleid, stat1, stat2 FROM {stats_daily} WHERE stattype = 'activity' AND $stattimesql ) inline_view GROUP BY ntimeend, courseid, roleid" | 1 |
|
"INSERT INTO {stats_user_monthly} (stattype, timeend, courseid, userid, statsreads, statswrites) SELECT 'activity', ntimeend, courseid, userid, SUM(statsreads), SUM(statswrites) FROM ( SELECT $nextstartmonth AS ntimeend, courseid, userid, statsreads, statswrites FROM {stats_user_daily} WHERE stattype = 'activity' AND $stattimesql ) inline_view GROUP BY ntimeend, courseid, userid" | 1 |
|
'SELECT MAX(timeend) FROM {stats_' . $str . '}' | 1 |
|
"SELECT MIN(timecreated) FROM {{$logtable}}" | 1 |
|
'SELECT activity.courseid, activity.all_activity AS line1, enrolments.highest_enrolments AS line2, activity.all_activity / enrolments.highest_enrolments as line3 FROM ( SELECT courseid, sum(stat1+stat2) AS all_activity FROM {stats_' . $param->table . '} WHERE stattype=\'activity\' AND timeend >= ' . (int) $param->timeafter . ' AND roleid = 0 GROUP BY courseid ) activity INNER JOIN ( SELECT courseid, max(stat1) AS highest_enrolments FROM {stats_' . $param->table . '} WHERE stattype=\'enrolments\' AND timeend >= ' . (int) $param->timeafter . ' AND stat1 > ' . (int) $threshold . ' GROUP BY courseid ) enrolments ON (activity.courseid = enrolments.courseid) ORDER BY line3 DESC' | 1 |
|
'SELECT courseid, ' . $DB->sql_ceil('avg(all_enrolments)') . ' as line1, ' . $DB->sql_ceil('avg(active_enrolments)') . ' as line2, avg(proportion_active) AS line3 FROM ( SELECT courseid, timeend, stat2 as active_enrolments, stat1 as all_enrolments, ' . $DB->sql_cast_char2real('stat2') . '/' . $DB->sql_cast_char2real('stat1') . ' AS proportion_active FROM {stats_' . $param->table . '} WHERE stattype=\'enrolments\' AND roleid = 0 AND stat1 > ' . (int) $threshold . ' ) aq WHERE timeend >= ' . (int) $param->timeafter . ' GROUP BY courseid ORDER BY line3 DESC' | 1 |
|
'SELECT courseid, sum(views) AS line1, sum(posts) AS line2, avg(proportion_active) AS line3 FROM ( SELECT courseid, timeend, stat1 as views, stat2 AS posts, ' . $DB->sql_cast_char2real('stat2') . '/' . $DB->sql_cast_char2real('stat1') . ' as proportion_active FROM {stats_' . $param->table . '} WHERE stattype=\'activity\' AND roleid = 0 AND stat1 > 0 ) aq WHERE timeend >= ' . (int) $param->timeafter . ' GROUP BY courseid ORDER BY line3 DESC' | 1 |
|
'SELECT r.id, r.name, r.shortname FROM {role} r JOIN {stats_daily} s ON s.roleid = r.id WHERE s.courseid = :courseid GROUP BY r.id, r.name, r.shortname' | 1 |
|
"SELECT COUNT(DISTINCT(timeend)) FROM {stats_daily}" | 1 |
|
"INSERT INTO {temp_enroled} (userid, courseid, roleid) SELECT ue.userid, e.courseid, ra.roleid FROM {role_assignments} ra JOIN {context} c ON (c.id = ra.contextid AND c.contextlevel = :courselevel) JOIN {enrol} e ON e.courseid = c.instanceid JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = ra.userid)" | 1 |
|
"SELECT COUNT('x') FROM {{$logtable}} WHERE timecreated >= :timestart AND timecreated < :timeend" | 1 |
|
"INSERT INTO {temp_log1} (userid, course, action) SELECT userid, CASE WHEN courseid IS NULL THEN " . SITEID . " WHEN courseid = 0 THEN " . SITEID . " ELSE courseid END, CASE WHEN eventname = :loginevent1 THEN 'login' WHEN crud = 'r' THEN 'view' ELSE 'update' END FROM {{$logtable}} WHERE timecreated >= :timestart AND timecreated < :timeend AND (origin = 'web' OR origin = 'ws') AND (edulevel = :participating OR edulevel = :teaching OR eventname = :loginevent2)" | 1 |
|
"INSERT INTO {temp_log1} (userid, course, action) SELECT userid, course, action FROM {log} WHERE time >= :timestart AND time < :timeend" | 1 |
|
'INSERT INTO {temp_log2} (userid, course, action) SELECT userid, course, action FROM {temp_log1}' | 1 |
|
'INSERT INTO {stats_daily} (courseid, roleid, stattype, timeend, stat1, stat2) SELECT courseid, roleid, stattype, timeend, stat1, stat2 FROM {temp_stats_daily}' | 1 |
|
'INSERT INTO {stats_user_daily} (courseid, userid, roleid, timeend, statsreads, statswrites, stattype) SELECT courseid, userid, roleid, timeend, statsreads, statswrites, stattype FROM {temp_stats_user_daily}' | 1 |
|
"SELECT SUM(files1.filesize) AS totalbytes FROM {files} files1 JOIN (SELECT contenthash, filename, MAX(id) AS id FROM {files} WHERE contextid = ? AND component = ? AND filearea != ? GROUP BY contenthash, filename) files2 ON files1.id = files2.id" | 1 |
|
"SELECT ga.id FROM {grading_areas} ga JOIN {grading_definitions} gd ON (gd.areaid = ga.id) WHERE gd.id = ? AND ga.contextid = ?" | 1 |
|
"SELECT u.id FROM {user} u JOIN {user_private_key} k ON u.id = k.userid WHERE u.deleted = 0 AND u.confirmed = 1 AND u.suspended = 0 AND k.script = 'rss' AND k.value = ?" | 1 |
|
"SELECT DISTINCT enrol FROM {enrol}" | 1 |
|
"SELECT cc.id, COUNT(c.id) AS coursecount FROM {course_categories} cc LEFT JOIN {course} c ON c.category = cc.id {$categorywhere} GROUP BY cc.id" | 1 |
|
"SELECT c.id, c.sortorder, c.visible, c.fullname, c.shortname, c.category $ccselect FROM {course} c $ccjoin WHERE c.category {$categoryids} ORDER BY c.sortorder ASC" | 1 |
|
"SELECT c.id, c.sortorder, c.visible, c.fullname, c.shortname, c.category $ccselect FROM {course} c $ccjoin WHERE c.category = :categoryid ORDER BY c.sortorder ASC" | 1 |
|
"SELECT c.id, c.sortorder, c.visible, c.fullname, c.shortname, c.category $ccselect FROM {course} c $ccjoin WHERE c.id {$courseids} ORDER BY c.sortorder ASC" | 1 |
|
"SELECT cc.*, $catcontextsql FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid" | 1 |
|
"SELECT cc.id, COUNT(c.id) AS coursecount FROM {course_categories} cc JOIN {course} c ON c.category = cc.id WHERE cc.id {$categoriessql} GROUP BY cc.id HAVING COUNT(c.id) > :limit" | 1 |
|
"SELECT u.*, $select FROM {user} u JOIN {context} ctx ON u.id = ctx.instanceid WHERE u.id = :userid AND ctx.contextlevel = :contextlevel" | 1 |
|
'SELECT c.*, cs.section AS sectionnumber FROM {course} c LEFT JOIN {course_sections} cs ON cs.course = c.id WHERE cs.id = ?' | 1 |
|
"SELECT c.* FROM {course} c JOIN {course_modules} cm ON cm.course = c.id WHERE cm.id = :cmid" | 1 |
|
"SELECT cc.*, $catcontextsql FROM {course_categories} cc JOIN {context} ctx ON cc.id = ctx.instanceid WHERE ctx.contextlevel = " . CONTEXT_COURSECAT . " AND (cc.id = :categoryid1 OR cc.parent = :categoryid2) ORDER BY cc.depth ASC, cc.sortorder ASC, cc.id ASC" | 1 |
|
"SELECT c.*, $select FROM {course} c JOIN {context} ctx ON c.id = ctx.instanceid WHERE c.id = :courseid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT u.*, $select FROM {user} u JOIN {context} ctx ON u.id = ctx.instanceid WHERE u.id = :userid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT cm.*, m.id AS modinstance, m.name, '$modname' AS modname FROM {" . $modname . "} m LEFT JOIN {course_modules} cm ON cm.instance = m.id AND cm.module = :moduleid WHERE m.course = :courseid" | 1 |
|
"UPDATE {" . $modname . "} SET $field = $field + ? WHERE course=? AND $field<>0" | 1 |
|
"UPDATE {event} SET timestart = timestart + ? WHERE courseid=? AND instance=0" | 1 |
|
"SELECT ue.* FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid) JOIN {context} c ON (c.contextlevel = :courselevel AND c.instanceid = e.courseid) JOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.roleid = :roleid AND ra.userid = ue.userid)" | 1 |
|
"SELECT ue.* FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid) JOIN {context} c ON (c.contextlevel = :courselevel AND c.instanceid = e.courseid) LEFT JOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.userid = ue.userid) WHERE ra.id IS null" | 1 |
|
"SELECT $fields FROM {badge} b $usersql WHERE $where $sorting" | 1 |
|
'SELECT COUNT(b.userid) FROM {badge_issued} b INNER JOIN {user} u ON b.userid = u.id WHERE b.badgeid = :badgeid AND u.deleted = 0' | 1 |
|
"SELECT DISTINCT bb.id FROM {badge_backpack} bb WHERE bb.externalbackpackid = :backpackid" | 1 |
|
"SELECT beb.*, bb.id AS badgebackpack, bb.password, bb.email AS backpackemail FROM {badge_external_backpack} beb LEFT JOIN {badge_backpack} bb ON bb.externalbackpackid = beb.id AND bb.userid=:userid WHERE beb.id=:id" | 1 |
|
"SELECT beb.*, bb.id AS badgebackpack, bb.password, bb.email AS backpackemail FROM {badge_external_backpack} beb JOIN {badge_backpack} bb ON bb.externalbackpackid = beb.id AND bb.userid=:userid" | 1 |
|
'SELECT * FROM {badge_external_backpack} WHERE sortorder = (SELECT MIN(sortorder) FROM {badge_external_backpack} b2)' | 1 |
|
"SELECT DISTINCT bc.badgeid FROM {badge_criteria} bc JOIN {badge_criteria_param} bcp ON bc.id = bcp.critid WHERE bc.criteriatype = :criteriatype AND bcp.value $insql" | 1 |
|
"SELECT c.* $ctxselect FROM {course} c JOIN ( SELECT DISTINCT c.id FROM {course} c JOIN {enrol} e1 ON (c.id = e1.courseid AND e1.status = :enabled1 AND e1.enrol $plugins1) JOIN {user_enrolments} ue1 ON (ue1.enrolid = e1.id AND ue1.status = :active1 AND ue1.userid = :user1) JOIN {enrol} e2 ON (c.id = e2.courseid AND e2.status = :enabled2 AND e2.enrol $plugins2) JOIN {user_enrolments} ue2 ON (ue2.enrolid = e2.id AND ue2.status = :active2 AND ue2.userid = :user2) WHERE c.visible = 1 ) ec ON ec.id = c.id $ctxjoin" | 1 |
|
" SELECT DISTINCT e.courseid FROM {enrol} e JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = :userid1) WHERE ue.status = :active AND e.status = :enabled AND ue.timestart <= :now1 AND (ue.timeend = 0 OR ue.timeend > :now2)" | 1 |
|
"SELECT DISTINCT c2.id AS courseid FROM {course} c2" | 1 |
|
" SELECT DISTINCT e.courseid FROM {enrol} e WHERE e.enrol = 'guest' AND e.password = :emptypass AND e.status = :enabled2" | 1 |
|
"SELECT $coursefields $ccselect $timeaccessselect FROM {course} c JOIN ($courseidsql) en ON (en.courseid = c.id) $timeaccessjoin $ccjoin WHERE $wheres $orderby" | 1 |
|
"SELECT $coursefields $ccselect FROM {course} c JOIN (SELECT DISTINCT e.courseid FROM {enrol} e JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = :userid) $subwhere ) en ON (en.courseid = c.id) $ccjoin WHERE c.id <> " . SITEID . " $orderby" | 1 |
|
"SELECT ue.* FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid) JOIN {user} u ON u.id = ue.userid WHERE ue.userid = :userid AND ue.status = :active AND e.status = :enabled AND u.deleted = 0" | 1 |
|
"SELECT 'x' FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid) JOIN {user} u ON u.id = ue.userid WHERE ue.userid = :userid AND u.deleted = 0" | 1 |
|
"SELECT DISTINCT {$prefix}u.id FROM {user} {$prefix}u $capjoin->joins WHERE $capjoin->wheres" | 1 |
|
"SELECT DISTINCT {$prefix}ue.userid FROM {user_enrolments} {$prefix}ue $ejoin WHERE $where1 AND $where2" | 1 |
|
"SELECT $userfields FROM {user} u JOIN ($esql) je ON je.id = u.id WHERE u.deleted = 0" | 1 |
|
"SELECT COUNT(DISTINCT u.id) FROM {user} u $capjoin->joins WHERE $capjoin->wheres AND u.deleted = 0" | 1 |
|
"SELECT c.* FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid JOIN {course} c ON c.id = e.courseid WHERE ue.id = :ueid" | 1 |
|
"SELECT ue.id AS ueid, ue.status AS uestatus, ue.enrolid AS ueenrolid, ue.timestart AS uetimestart, ue.timeend AS uetimeend, ue.modifierid AS uemodifierid, ue.timecreated AS uetimecreated, ue.timemodified AS uetimemodified, e.status AS estatus, u.* FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid JOIN {user} u ON ue.userid = u.id WHERE " | 1 |
|
"SELECT 'x' FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid) WHERE ue.userid = :userid AND e.courseid = :courseid" | 1 |
|
"SELECT e.* FROM {enrol} e JOIN {user_enrolments} ue ON (ue.enrolid = e.id) WHERE e.enrol = :name AND ue.userid = :userid" | 1 |
|
"SELECT ue.*, e.courseid, c.id AS contextid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = :enrol) JOIN {context} c ON (c.instanceid = e.courseid AND c.contextlevel = :courselevel) WHERE ue.timeend > 0 AND ue.timeend < :now $coursesql" | 1 |
|
"SELECT ue.*, e.courseid, c.id AS contextid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = :enrol) JOIN {context} c ON (c.instanceid = e.courseid AND c.contextlevel = :courselevel) WHERE ue.timeend > 0 AND ue.timeend < :now AND ue.status = :useractive $coursesql" | 1 |
|
"SELECT ue.*, e.expirynotify, e.notifyall, e.expirythreshold, e.courseid, c.fullname FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.enrol = :name AND e.expirynotify > 0 AND e.status = :enabled) JOIN {course} c ON (c.id = e.courseid) JOIN {user} u ON (u.id = ue.userid AND u.deleted = 0 AND u.suspended = 0) WHERE ue.status = :active AND ue.timeend > 0 AND ue.timeend > :now1 AND ue.timeend < (e.expirythreshold + :now2) ORDER BY ue.enrolid ASC, u.lastname ASC, u.firstname ASC, u.id ASC" | 1 |
|
"SELECT u.* FROM {message_conversation_members} mcm JOIN {user} u ON (mcm.conversationid = :convid AND u.id = mcm.userid AND u.id != :userid)" | 1 |
|
'SELECT DISTINCT component FROM {message_providers}' | 1 |
|
"SELECT DISTINCT rc.capability, 1 FROM {role_assignments} ra JOIN {context} actx ON actx.id = ra.contextid JOIN {role_capabilities} rc ON rc.roleid = ra.roleid JOIN {context} cctx ON cctx.id = rc.contextid WHERE ra.userid = :userid AND rc.capability $capcondition AND rc.permission > 0 AND (" . $DB->sql_concat('actx.path', "'/'") . " LIKE " . $DB->sql_concat('cctx.path', "'/%'") . " OR " . $DB->sql_concat('cctx.path', "'/'") . " LIKE " . $DB->sql_concat('actx.path', "'/%'") . ")" | 1 |
|
"SELECT * FROM {grade_grades} WHERE itemid = :gid AND userid $uids" | 1 |
|
"SELECT * FROM {grade_grades} WHERE itemid = :gid" | 1 |
|
"SELECT gg.id FROM {grade_grades} gg JOIN {grade_items} gi ON gi.id = gg.itemid WHERE gi.courseid = :courseid AND gg.userid = :userid" | 1 |
|
"SELECT h.id, gi.itemtype, gi.itemmodule, gi.iteminstance as iteminstance, gi.itemnumber, h.source, h.itemid, h.userid, h.rawgrade, h.rawgrademax, h.rawgrademin, h.rawscaleid, h.usermodified, h.finalgrade, h.hidden, h.locked, h.locktime, h.exported, h.overridden, h.excluded, h.feedback, h.feedbackformat, h.information, h.informationformat, h.timemodified, itemcreated.tm AS timecreated FROM {grade_grades_history} h JOIN (SELECT itemid, MAX(id) AS id FROM {grade_grades_history} WHERE userid = :userid1 GROUP BY itemid) maxquery ON h.id = maxquery.id AND h.itemid = maxquery.itemid JOIN {grade_items} gi ON gi.id = h.itemid JOIN (SELECT itemid, MAX(timemodified) AS tm FROM {grade_grades_history} WHERE userid = :userid2 AND action = :insertaction GROUP BY itemid) itemcreated ON itemcreated.itemid = h.itemid WHERE gi.courseid = :courseid" | 1 |
|
"SELECT a.*, cm.idnumber as cmidnumber, m.name as modname FROM {" . $modname . "} a, {course_modules} cm, {modules} m WHERE m.name=:modname AND m.visible=1 AND m.id=cm.module AND cm.instance=a.id AND cm.course=:courseid" | 1 |
|
"SELECT a.*, cm.idnumber as cmidnumber, m.name as modname FROM {" . $mod . "} a, {course_modules} cm, {modules} m WHERE m.name=:mod AND m.visible=1 AND m.id=cm.module AND cm.instance=a.id AND cm.course=:courseid" | 1 |
|
"SELECT * FROM {grade_items} WHERE itemtype='mod' AND itemmodule=?" | 1 |
|
"SELECT k.userid FROM {user_private_key} k WHERE k.script = :script AND k.userid = :userid {$whereinstance}" | 1 |
|
"SELECT " . join(',', $fields) . ", $ctxselect FROM {course} c JOIN {context} ctx ON c.id = ctx.instanceid AND ctx.contextlevel = :contextcourse WHERE c.id " . $whereclause . " ORDER BY c.sortorder" | 1 |
|
'Show or enable subelements' | 1 |
|
'Delete option {no}' | 1 |
|
"UPDATE $table SET $uSet WHERE $where" | 1 |
|
"select count(*) from $table where $where" | 1 |
|
"INSERT INTO $table ($iCols) VALUES ($iVals)" | 1 |
|
"SELECT " . $hint[0] . " COUNT(*) FROM (" . $rewritesql . ")" | 1 |
|
"SELECT COUNT(*) FROM (" . $rewritesql . ")" | 1 |
|
"SELECT COUNT(*) FROM ($rewritesql) $requiresAlias" | 1 |
|
'SELECT COUNT(*) ' . substr($sql, $pos) | 1 |
|
'UPDATE ' . $tableName . ' SET ' . substr($setFields, 0, -2) | 1 |
|
'INSERT INTO ' . $tableName . ' ( ' . $fields . ' ) VALUES ( ' . $values . ' )' | 1 |
|
"SELECT MAX($id) FROM $table" | 1 |
|
"select count(*) from $table $where" | 1 |
|
"select $field from $table $where order by 1" | 1 |
|
"SELECT * FROM $table" | 1 |
|
"SELECT COUNT(*) FROM $table $condition" | 1 |
|
"select max(" . $fieldname . ") from " . $this->_table | 1 |
|
"select * from " . $this->_table | 1 |
|
'INSERT INTO ' . $this->_table . "(" . implode(',', $names) . ') VALUES (' . implode(',', $valstr) . ')' | 1 |
|
'DELETE FROM ' . $this->_table . ' WHERE ' . $where | 1 |
|
'UPDATE ' . $this->_table . " SET " . implode(",", $pairs) . " WHERE " . $where | 1 |
|
"SELECT MAX(%s) FROM %s" | 1 |
|
"SELECT * FROM %s" | 1 |
|
'INSERT INTO %s (%s) VALUES (%s)' | 1 |
|
'DELETE FROM %s WHERE %s' | 1 |
|
'UPDATE %s SET %s WHERE %s' | 1 |
|
"insert into $perf_table values($d,:b,:c,:d,:e,:f)" | 1 |
|
"insert into $perf_table (created,sql0,sql1,params,tracer,timer) values($d,$sql1,$sql2,$params,$tracer,$timer)" | 1 |
|
"insert into $perf_table (created,sql0,sql1,params,tracer,timer) values( $d,?,?,?,?,?)" | 1 |
|
"SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total'" | 1 |
|
"select count(*),tracer from $perf_table where sql1=$sqlq group by tracer order by 1 desc" | 1 |
|
"select distinct count(*),sql1,tracer as error_msg from $perf_table where tracer like 'ERROR:%' group by sql1,tracer order by 1 desc" | 1 |
|
"select avg(timer) as avg_timer,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer from $perf_table where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') and (tracer is null or tracer not like 'ERROR:%') group by sql1 order by 1 desc" | 1 |
|
"select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer from $perf_table where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT') and (tracer is null or tracer not like 'ERROR:%') group by sql1 having count(*)>1 order by 1 desc" | 1 |
|
"delete from $perf_table where created<" . $this->conn->sysTimeStamp | 1 |
|
"select distinct $colfield from $tables $where order by 1" | 1 |
|
"SELECT $sel \nFROM $tables $where \nGROUP BY $rowfields" | 1 |
|
'SELECT * FROM ' . $table . ' WHERE 1=1' | 1 |
|
'SELECT * FROM ' . $table . ' WHERE ' . $where | 1 |
|
'SELECT * FROM ' . $table . ' WHERE 0=1' | 1 |
|
'UPDATE ' . $tabname . ' SET ' . $colname . '=' . $default . ' WHERE ' . $colname . ' IS NULL ' | 1 |
|
"SELECT * INTO TEMPORARY TABLE $tempname FROM $tabname" | 1 |
|
"INSERT INTO $tabname SELECT $copyflds FROM $tempname" | 1 |
|
"SELECT setval('$seq_name', MAX($seq_fld)) FROM $tabname" | 1 |
|
"SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'" | 1 |
|
"SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'" | 1 |
|
"SELECT name FROM sys.default_constraints WHERE object_name(parent_object_id) = ? AND col_name(parent_object_id, parent_column_id) = ?" | 1 |
|
"select comments from USER_COL_COMMENTS where TABLE_NAME=$table and COLUMN_NAME=$col" | 1 |
|
"SELECT sysobjects.name FROM sysobjects, sysusers WHERE sysobjects.type='U' AND sysobjects.uid = sysusers.uid" | 1 |
|
"SELECT syscolumns.name AS field_name, systypes.name AS type, systypes.length AS width FROM sysobjects, syscolumns, systypes WHERE sysobjects.name='%s' AND syscolumns.id = sysobjects.id AND systypes.type=syscolumns.type" | 1 |
|
"SELECT a.name FROM master.dbo.sysdatabases a, master.dbo.syslogins b WHERE a.suid = b.suid and a.name like '%' and a.name != 'tempdb' and a.status3 != 256 order by 1" | 1 |
|
"select $this->sysTimeStamp from dual" | 1 |
|
"select lower(cname),coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno" | 1 |
|
"select lower(table_name),table_type from cat where table_type in ('TABLE','VIEW')" | 1 |
|
"SHOW TABLES" | 1 |
|
"SHOW COLUMNS FROM %s" | 1 |
|
"select name from sysobjects where type='U' or type='V'" | 1 |
|
"SELECT c.column_name, c.column_type, c.width FROM syscolumn c, systable t WHERE t.table_name='%s' AND c.table_id=t.table_id AND t.table_type='BASE'" | 1 |
|
"select $col from $tables HOLDLOCK where $where" | 1 |
|
"SELECT c.column_name " . "FROM syscolumn c, systable t " . "WHERE t.table_name='$table' AND c.table_id=t.table_id " . "AND t.table_type='BASE' " . "AND c.pkey = 'Y' " . "ORDER BY c.column_id" | 1 |
|
"select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE'))" | 1 |
|
"select c.name,t.name,c.length,c.isnullable, c.status, (case when c.xusertype=61 then 0 else c.xprec end), (case when c.xusertype=61 then 0 else c.xscale end) from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'" | 1 |
|
"select object_name(constid) as constraint_name, col_name(fkeyid, fkey) as column_name, object_name(rkeyid) as referenced_table_name, col_name(rkeyid, rkey) as referenced_column_name from sysforeignkeys where upper(object_name(fkeyid)) = $table order by constraint_name, referenced_table_name, keyno" | 1 |
|
"select tabname,tabtype from systables where tabtype in ('T','V') and owner!='informix'" | 1 |
|
"select c.colname, c.coltype, c.collength, d.default,c.colno from syscolumns c, systables t,outer sysdefaults d where c.tabid=t.tabid and d.tabid=t.tabid and d.colno=c.colno and tabname='%s' order by c.colno" | 1 |
|
"select part1,part2,part3,part4,part5,part6,part7,part8 from systables t,sysconstraints s,sysindexes i where t.tabname='%s' and s.tabid=t.tabid and s.constrtype='P' and i.idxname=s.idxname" | 1 |
|
"select DBINFO('version','full') from systables where tabid = 1" | 1 |
|
"select DBINFO('version','major') || DBINFO('version','minor') from systables where tabid = 1" | 1 |
|
'SELECT procname, isproc FROM sysprocedures' . $likepattern | 1 |
|
" select tr.tabname,updrule,delrule, i.part1 o1,i2.part1 d1,i.part2 o2,i2.part2 d2,i.part3 o3,i2.part3 d3,i.part4 o4,i2.part4 d4, i.part5 o5,i2.part5 d5,i.part6 o6,i2.part6 d6,i.part7 o7,i2.part7 d7,i.part8 o8,i2.part8 d8 from systables t,sysconstraints s,sysindexes i, sysreferences r,systables tr,sysconstraints s2,sysindexes i2 where t.tabname='$table' and s.tabid=t.tabid and s.constrtype='R' and r.constrid=s.constrid and i.idxname=s.idxname and tr.tabid=r.ptabid and s2.constrid=r.primary and i2.idxname=s2.idxname" | 1 |
|
'SELECT /*+FIRST_ROWS*/' | 1 |
|
"UPDATE %s SET id=LAST_INSERT_ID(id+1);" | 1 |
|
"SELECT count(*) FROM %s" | 1 |
|
"INSERT INTO %s VALUES (%s)" | 1 |
|
'SHOW INDEXES FROM %s' | 1 |
|
"select $col from $table $where for update" | 1 |
|
'SELECT LAST_INSERT_ID()' | 1 |
|
"update %s set id=LAST_INSERT_ID(id+1);" | 1 |
|
"select count(*) from %s" | 1 |
|
"insert into %s values (%s)" | 1 |
|
"select LAST_INSERT_ID() from " . $seqname | 1 |
|
"SHOW DATABASES" | 1 |
|
'SHOW INDEXES FROM `%s`' | 1 |
|
'SHOW PROCEDURE STATUS' . $likepattern | 1 |
|
'SHOW FUNCTION STATUS' . $likepattern | 1 |
|
'SHOW CREATE TABLE `%s`' | 1 |
|
"SELECT column_name, column_type FROM information_schema.columns WHERE table_schema='{$this->database}' AND table_name='$table'" | 1 |
|
"Select of database " . $dbName . " failed. " . $this->errorMsg( ) | 1 |
|
"select table_name,table_type from cat where table_type in ('TABLE','VIEW')" | 1 |
|
"select tablename,'T' from pg_tables where tablename not like 'pg\_%' and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages', 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') union select viewname,'V' from pg_views where viewname not like 'pg\_%'" | 1 |
|
"SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'" | 1 |
|
'SELECT last_value FROM ' . $tablename . '_' . $fieldname . '_seq' | 1 |
|
"SELECT $column FROM $table WHERE oid=" . (int) $oid | 1 |
|
" select table_name,'T' from information_schema.tables where table_schema not in ( 'pg_catalog','information_schema') union select table_name,'V' from information_schema.views where table_schema not in ( 'pg_catalog','information_schema') " | 1 |
|
" select table_name,'T' from information_schema.tables where table_name like $mask and table_schema not in ( 'pg_catalog','information_schema') union select table_name,'V' from information_schema.views where table_name like $mask and table_schema not in ( 'pg_catalog','information_schema') " | 1 |
|
" select tablename,'T' from pg_tables where tablename like $mask union select viewname,'V' from pg_views where viewname like $mask" | 1 |
|
"UPDATE $table SET $column=" . $this->qstr($val) . " WHERE $where" | 1 |
|
"UPDATE $table SET $column='" . $this->BlobEncode($val) . "'::bytea WHERE $where" | 1 |
|
' SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" FROM pg_catalog.pg_class c JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid ,pg_namespace n WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\')) and c.relnamespace=c2.relnamespace and c.relnamespace=n.oid and n.nspname=\'%s\'' | 1 |
|
' SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" FROM pg_catalog.pg_class c JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))' | 1 |
|
"SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1" | 1 |
|
"select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'" | 1 |
|
"select column_name,data_type,data_length, data_scale, data_precision, case when nullable = 'Y' then 'NULL' else 'NOT NULL' end as nulls, data_default from all_tab_cols where owner='%s' and table_name='%s' order by column_id" | 1 |
|
"SELECT (%s.nextval) FROM DUAL" | 1 |
|
"select TO_CHAR($this->sysTimeStamp,'YYYY-MM-DD HH24:MI:SS') from dual" | 1 |
|
'select value from sys.database_compatible_level' | 1 |
|
"SELECT $seqname.currval FROM dual" | 1 |
|
"SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'" | 1 |
|
"SELECT ALL_INDEXES.INDEX_NAME, ALL_INDEXES.UNIQUENESS, ALL_IND_COLUMNS.COLUMN_POSITION, ALL_IND_COLUMNS.COLUMN_NAME FROM ALL_INDEXES,ALL_IND_COLUMNS WHERE UPPER(ALL_INDEXES.TABLE_NAME)='%s' AND ALL_IND_COLUMNS.INDEX_NAME=ALL_INDEXES.INDEX_NAME" | 1 |
|
"SELECT * FROM ($sql ORDER BY dbms_random.value) WHERE rownum = 1" | 1 |
|
"SELECT /*+$hint*/" | 1 |
|
"select * from (" . $sql . ") where rownum <= :adodb_offset" | 1 |
|
"SELECT * FROM (" . $sql . ") WHERE NULL = NULL" | 1 |
|
"SELECT $hint $fields FROM" . "(SELECT rownum as adodb_rownum, $fields FROM" . " ($sql) WHERE rownum <= :adodb_nrows" . ") WHERE adodb_rownum >= :adodb_offset" | 1 |
|
" SELECT /*+ RULE */ distinct b.column_name FROM {$ptab}CONSTRAINTS a , {$ptab}CONS_COLUMNS b WHERE ( UPPER(b.table_name) = ('$table')) AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P') $owner_clause AND (a.constraint_name = b.constraint_name)" | 1 |
|
"select constraint_name,r_owner,r_constraint_name from {$tabp}constraints where constraint_type = 'R' and table_name = $table $owner" | 1 |
|
"select column_name from {$tabp}cons_columns where constraint_name=$cons $owner order by position" | 1 |
|
"select table_name,column_name from {$tabp}cons_columns where owner=$rowner and constraint_name=$rcons order by position" | 1 |
|
"delete from adodb_seq where seq_name = '%s'" | 1 |
|
"select seq_value from adodb_seq" | 1 |
|
"select seq_value from adodb_seq where seq_name='$seqname'" | 1 |
|
"insert into adodb_seq values('$seqname',$start)" | 1 |
|
"select seq_value from adodb_seq where seq_name='$seq'" | 1 |
|
"select seq_value from adodb_seq " | 1 |
|
"insert into adodb_seq values('$seq',$start)" | 1 |
|
"update adodb_seq set seq_value=seq_value+1 where seq_name='$seq'" | 1 |
|
"select name from master..sysdatabases where name <> 'master'" | 1 |
|
"UPDATE $table SET $column = ? WHERE $where" | 1 |
|
"SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND lower(O.Name) = $table ORDER BY O.name, I.Name, K.keyno" | 1 |
|
"UPDATE $table SET $column=$blobVarName WHERE $where" | 1 |
|
"SELECT d.adnum as num, pg_get_expr(d.adbin, d.adrelid) as def FROM pg_attrdef d, pg_class c WHERE d.adrelid=c.oid AND c.relname='%s' ORDER BY d.adnum" | 1 |
|
'SELECT lastval()' | 1 |
|
"SELECT currval(pg_get_serial_sequence('$table', '$column'))" | 1 |
|
"select tablename,'T' from pg_tables where tablename not like 'pg\_%' and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages', 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') union select viewname,'V' from pg_views where viewname not like 'pg\_%'" | 1 |
|
"SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'" | 1 |
|
" select tablename,'T' from pg_tables where tablename not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') union select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema')" | 1 |
|
" select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') union select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema')" | 1 |
|
" select tablename,'T' from pg_tables where tablename like $mask union select viewname,'V' from pg_views where viewname like $mask" | 1 |
|
"select c.name,t.name,c.length,c.isnullable, c.status, (case when c.xusertype=61 then 0 else c.xprec end), (case when c.xusertype=61 then 0 else c.xscale end) from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'" | 1 |
|
"select object_name(constid) as constraint_name, col_name(fkeyid, fkey) as column_name, object_name(rkeyid) as referenced_table_name, col_name(rkeyid, rkey) as referenced_column_name from sysforeignkeys where upper(object_name(fkeyid)) = $table order by constraint_name, referenced_table_name, keyno" | 1 |
|
"select @@ERROR" | 1 |
|
'select @@TRANCOUNT' | 1 |
|
"SELECT LOWER(rdb\$relation_name) FROM rdb\$relations" | 1 |
|
"SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '%s' ORDER BY RDB\$FIELD_POSITION ASC" | 1 |
|
"SELECT $col FROM $table $where FOR UPDATE WITH LOCK" | 1 |
|
"select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'" | 1 |
|
"select a.rdb\$field_name, a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc" | 1 |
|
"UPDATE $table SET $col=$col WHERE $where " | 1 |
|
"delete from RDB\$GENERATORS where RDB\$GENERATOR_NAME='$seqname'" | 1 |
|
"select * from $seqname" | 1 |
|
"INSERT INTO $seqname VALUES( DEFAULT )" | 1 |
|
"SELECT LastAutoInc( STATEMENT ) FROM system.iota" | 1 |
|
"select * from system.tables" | 1 |
|
"select * from system.views" | 1 |
|
"select table_primary_key from system.tables where name='$table'" | 1 |
|
"select name from system.columns where parent='$table'" | 1 |
|
"select name from sys.sysdatabases where name <> 'master'" | 1 |
|
"select c.name, t.name as type, c.length, c.xprec as precision, c.xscale as scale, c.isnullable as nullable, c.cdefault as default_value, c.xtype, t.length as type_length, sc.is_identity from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id join sys.tables st on st.name=o.name join sys.columns sc on sc.object_id = st.object_id and sc.name=c.name where o.name='%s'" | 1 |
|
"SELECT NEXT VALUE FOR $seq" | 1 |
|
"select object_name(constid) as constraint_name, col_name(fkeyid, fkey) as column_name, object_name(rkeyid) as referenced_table_name, col_name(rkeyid, rkey) as referenced_column_name from sysforeignkeys where upper(object_name(fkeyid)) = $table order by constraint_name, referenced_table_name, keyno" | 1 |
|
"SELECT $fields FROM {$this->database}.information_schema.routines WHERE 1=1 $procedureSQL $catalogSQL $schemaSQL ORDER BY ROUTINE_NAME " | 1 |
|
"SELECT INDEXNAME,TYPE,COLUMNNAME FROM INDEXCOLUMNS " . " WHERE TABLENAME=$table" . " ORDER BY INDEXNAME,COLUMNNO" | 1 |
|
"SELECT COLUMNNAME,DATATYPE,LEN,DEC,NULLABLE,MODE,\"DEFAULT\",CASE WHEN \"DEFAULT\" IS NULL THEN 0 ELSE 1 END AS HAS_DEFAULT FROM COLUMNS WHERE tablename=$table ORDER BY pos" | 1 |
|
"SELECT columnname FROM COLUMNS WHERE tablename=$table ORDER BY pos" | 1 |
|
"SELECT $table.CURRVAL FROM DUAL" | 1 |
|
"select lower(rdb\$relation_name) from rdb\$relations where rdb\$relation_name not like 'RDB\$%'" | 1 |
|
"SELECT sql FROM ( SELECT sql sql, type type, tbl_name tbl_name, name name FROM sqlite_master ) WHERE type != 'meta' AND sql NOTNULL AND LOWER(name) ='" . strtolower($table) . "'" | 1 |
|
"insert into $seqname values($startID)" | 1 |
|
"SELECT name,sql FROM sqlite_master WHERE type='index' AND sql IS NOT NULL AND LOWER(tbl_name)='%s'" | 1 |
|
"UPDATE $table SET $column=? WHERE " . implode(' AND ', $paramWhere) | 1 |
|
"select objname from _v_object_data where objtype='database' order by 1" | 1 |
|
"select objname from _v_object_data where objtype='table' order by 1" | 1 |
|
"SELECT c.NAME, OBJECT_NAME(c.id) as tbl_name, c.length, c.isnullable, c.status, ( CASE WHEN c.xusertype=61 THEN 0 ELSE c.xprec END), ( CASE WHEN c.xusertype=61 THEN 0 ELSE c.xscale END), ISNULL(i.is_primary_key, 0) as primary_key FROM syscolumns c INNER JOIN systypes t ON t.xusertype=c.xusertype INNER JOIN sysobjects o ON o.id=c.id LEFT JOIN sys.index_columns ic ON ic.object_id = c.id AND c.colid = ic.column_id LEFT JOIN sys.indexes i ON i.object_id = ic.object_id AND i.index_id = ic.index_id WHERE c.id = OBJECT_ID('%s') ORDER by c.colid" | 1 |
|
"SELECT name FROM sqlite_master WHERE type='table'" | 1 |
|
"UPDATE %s SET id=id+1 WHERE id=%s" | 1 |
|
'SELECT COUNT(*) FROM %s' | 1 |
|
'INSERT INTO %s VALUES(%s)' | 1 |
|
"SELECT sqlite_version()" | 1 |
|
"SELECT id FROM {$seq}" | 1 |
|
'select versionnumber from sysibm.sysversions' | 1 |
|
"SELECT NAME, UNIQUERULE, COLNAMES FROM SYSIBM.SYSINDEXES WHERE TBNAME='$table'" | 1 |
|
"SELECT service_level, fixpack_num FROM TABLE(sysproc.env_get_inst_info()) AS INSTANCEINFO" | 1 |
|
"SELECT SUBSTR(tabname,1,20) table_name, SUBSTR(constname,1,20) fk_name, SUBSTR(REFTABNAME,1,12) parent_table, SUBSTR(refkeyname,1,20) pk_orig_table, fk_colnames FROM syscat.references WHERE tabname = '$table'" | 1 |
|
"SELECT $fields FROM syscat.routines WHERE OWNER IS NOT NULL $procedureSQL $catalogSQL $schemaSQL ORDER BY ROUTINENAME " | 1 |
|
"SELECT name,sql FROM sqlite_master WHERE type='index' AND tbl_name='%s'" | 1 |
|
"select a.relname as tablename,(a.relpages+CASE WHEN b.relpages is null THEN 0 ELSE b.relpages END+CASE WHEN c.relpages is null THEN 0 ELSE c.relpages END)*8 as size_in_K,a.relfilenode as \"OID\" from pg_class a left join pg_class b on b.relname = 'pg_toast_'||trim(a.relfilenode) left join pg_class c on c.relname = 'pg_toast_'||trim(a.relfilenode)||'_index' where a.relname in (select tablename from pg_tables where tablename not like 'pg_%')" | 1 |
|
"select case when count(*)=3 then 'TRUE' else 'FALSE' end from pg_settings where (name='stats_block_level' or name='stats_row_level' or name='stats_start_collector') and setting='on' " | 1 |
|
"select case when blks_hit=0 then 0 else round( ((1-blks_read::float/blks_hit)*100)::numeric, 2) end from pg_stat_database where datname='\$DATABASE'" | 1 |
|
'select sum(heap_blks_read+toast_blks_read) from pg_statio_user_tables' | 1 |
|
'select round((sum(n_tup_ins/4.0+n_tup_upd/8.0+n_tup_del/4.0)/16)::numeric,2) from pg_stat_user_tables' | 1 |
|
"select setting from pg_settings where name='shared_buffers'" | 1 |
|
'select 8192' | 1 |
|
"select setting::integer*8192 from pg_settings where name='shared_buffers'" | 1 |
|
"select setting::integer*8192 from pg_settings where name='effective_cache_size'" | 1 |
|
"select setting::integer*1024 from pg_settings where name='sort_mem' or name = 'work_mem' order by name" | 1 |
|
'select count(*) from pg_stat_activity' | 1 |
|
"select setting from pg_settings where name='max_connections'" | 1 |
|
"select setting from pg_settings where name='wal_buffers'" | 1 |
|
"select setting from pg_settings where name='random_page_cost'" | 1 |
|
"select sql1 from adodb_logsql where sql1 like $sqlq" | 1 |
|
'show engine innodb status' | 1 |
|
'select sum(npages) from SYSCAT.BUFFERPOOLS' | 1 |
|
'select avg(pagesize) from SYSCAT.BUFFERPOOLS' | 1 |
|
'select sum(npages*pagesize) from SYSCAT.BUFFERPOOLS' | 1 |
|
"SELECT count(*) FROM TABLE(SNAPSHOT_APPL_INFO('',-2)) as t" | 1 |
|
"select * from explain_statement where queryno=$qno" | 1 |
|
"select tabschema,tabname,card as rows, npages pages_used,fpages pages_allocated, tbspace tablespace from syscat.tables where tabschema not in ('SYSCAT','SYSIBM','SYSSTAT') order by 1,2" | 1 |
|
"select a.tabname tablename, ti_nptotal*2 size_in_k, ti_nextns extents, ti_nrows records from systables c, sysmaster:systabnames a, sysmaster:systabinfo b where c.tabname not matches 'sys*' and c.partnum = a.partnum and c.partnum = b.ti_partnum" | 1 |
|
"select round((1-(wt.value / (rd.value + wr.value)))*100,2) from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt where rd.name = 'pagreads' and wr.name = 'pagwrites' and wt.name = 'buffwts'" | 1 |
|
"select value from sysmaster:sysprofile where name='pagreads'" | 1 |
|
"select value from sysmaster:sysprofile where name='pagwrites'" | 1 |
|
'select count(*) from sysmaster:syssessions' | 1 |
|
"SELECT * FROM sqlite_master WHERE type='table'" | 1 |
|
"select segment_name as \"tablename\", sum(bytes)/1024 as \"size_in_k\",tablespace_name as \"tablespace\",count(*) \"extents\" from sys.user_extents group by segment_name,tablespace_name" | 1 |
|
"select round((1-(phy.value / (cur.value + con.value)))*100,2) from v\$sysstat cur, v\$sysstat con, v\$sysstat phy where cur.name = 'db block gets' and con.name = 'consistent gets' and phy.name = 'physical reads'" | 1 |
|
'select round(100*(sum(pins)-sum(reloads))/sum(pins),2) from v$librarycache' | 1 |
|
"SELECT ROUND((100 * b.VALUE) /DECODE ((a.VALUE + b.VALUE), 0,1,(a.VALUE + b.VALUE)),2) FROM v\$sysstat a, v\$sysstat b WHERE a.name = 'sorts (disk)' AND b.name = 'sorts (memory)'" | 1 |
|
"select value from v\$sysstat where name='physical reads'" | 1 |
|
"select value from v\$sysstat where name='physical writes'" | 1 |
|
"select a.value/b.value from v\$parameter a, v\$parameter b where a.name = 'db_cache_size' and b.name= 'db_block_size'" | 1 |
|
"select value from v\$parameter where name='db_block_size'" | 1 |
|
"select value from v\$parameter where name = 'memory_max_target'" | 1 |
|
"select value from v\$parameter where name = 'memory_target'" | 1 |
|
"select nvl(value,0)/1024.0/1024 || 'M' from v\$parameter where name = 'sga_max_size'" | 1 |
|
"select nvl(value,0)/1024.0/1024 || 'M' from v\$parameter where name = 'sga_target'" | 1 |
|
"select nvl(value,0)/1024.0/1024 || 'M' from v\$parameter where name = 'pga_aggregate_target'" | 1 |
|
"select value from v\$parameter where name = 'db_cache_size'" | 1 |
|
"select value from v\$parameter where name = 'shared_pool_size'" | 1 |
|
"select value from v\$parameter where name = 'java_pool_size'" | 1 |
|
"select value from v\$parameter where name='large_pool_size'" | 1 |
|
'select count(*) from sys.v_$session where username is not null' | 1 |
|
"select value from v\$parameter where name='sessions'" | 1 |
|
"select round((1-bytes/sgasize)*100, 2) from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f where name = 'free memory' and pool = 'shared pool'" | 1 |
|
'select round((sga.bytes/case when p.value=0 then sga.bytes else to_number(p.value) end)*100,2) from v$sgastat sga, v$parameter p where sga.name = \'free memory\' and sga.pool = \'shared pool\' and p.name = \'shared_pool_size\'' | 1 |
|
"select round((1-bytes/sgasize)*100, 2) from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f where name = 'free memory' and pool = 'large pool'" | 1 |
|
"select value from v\$parameter where name='sort_area_size'" | 1 |
|
"select count(*) from sys.v_\$rollstat" | 1 |
|
"select max_utilization tx_hwm from sys.v_\$resource_limit where resource_name = 'transactions'" | 1 |
|
"select value from v\$parameter where name = 'transactions'" | 1 |
|
"select value from v\$parameter where name = 'cursor_sharing'" | 1 |
|
"select value from v\$parameter where name = 'optimizer_index_caching'" | 1 |
|
"select value from v\$parameter where name = 'optimizer_index_cost_adj'" | 1 |
|
'select \'Top 5 events\' from dual' | 1 |
|
'select log_mode from v$database' | 1 |
|
'select dbid from v$database' | 1 |
|
"SELECT NVL(v1.value,v2.value) FROM v\$parameter v1, v\$parameter v2 WHERE v1.name='log_archive_dest' AND v2.name='log_archive_dest_10'" | 1 |
|
"select nvl(value,'Flashback Area not used') from v\$parameter where name=lower('DB_RECOVERY_FILE_DEST')" | 1 |
|
"select nvl('-','Flashback Area not used') from v\$parameter where name=lower('DB_RECOVERY_FILE_DEST')" | 1 |
|
"select value from v\$parameter where name='control_file_record_keep_time'" | 1 |
|
"select log_mode from v\$database" | 1 |
|
"select * from ( select event, round(100*time_waited/(select sum(time_waited) from v\$system_event where wait_class <> 'Idle'),1) \"% Wait\", total_waits,time_waited, average_wait,wait_class from v\$system_event where wait_class <> 'Idle' order by 2 desc ) where rownum <=5" | 1 |
|
"select * from ( SELECT b.wait_class,B.NAME, round(sum(wait_time+TIME_WAITED)/1000000) waitsecs, parsing_schema_name, C.SQL_TEXT, a.sql_id FROM V\$ACTIVE_SESSION_HISTORY A join V\$EVENT_NAME B on A.EVENT# = B.EVENT# join V\$SQLAREA C on A.SQL_ID = C.SQL_ID WHERE A.SAMPLE_TIME BETWEEN sysdate-$days and sysdate and parsing_schema_name not in ('SYS','SYSMAN','DBSNMP','SYSTEM') GROUP BY b.wait_class,parsing_schema_name,C.SQL_TEXT, B.NAME,A.sql_id order by 3 desc) where rownum <=10" | 1 |
|
"select tablespace_name,round(sum(bytes)/1024/1024) as Used_MB,round(sum(maxbytes)/1024/1024) as Max_MB, round(sum(bytes)/sum(maxbytes),4) * 100 as PCT from dba_data_files group by tablespace_name order by 2 desc" | 1 |
|
"select * from dba_data_files order by tablespace_name, 1" | 1 |
|
"select * from (select start_time, end_time, operation, status, mbytes_processed, output_device_type from V\$RMAN_STATUS order by start_time desc) where rownum <=10" | 1 |
|
"select component, current_size/1024./1024 as \"CurrSize (M)\" from V\$MEMORY_DYNAMIC_COMPONENTS" | 1 |
|
"select name, round(bytes/1024./1024,2) as \"CurrSize (M)\" from V\$sgainfo" | 1 |
|
"select * from V\$FLASH_RECOVERY_AREA_USAGE" | 1 |
|
'select a.MB, case when a.targ = 1 then \'<<= Current \' when a.targ < 1 or a.pct <= b.pct then null else \'- BETTER than Current by \'||round(a.pct/b.pct*100-100,2)||\'%\' end as "Percent Improved", a.targ as "PGA Size Factor",a.pct "% Perf" from (select round(pga_target_for_estimate/1024.0/1024.0,0) MB, pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r from v$pga_target_advice) a left join (select round(pga_target_for_estimate/1024.0/1024.0,0) MB, pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r from v$pga_target_advice) b on a.r = b.r+1 where b.pct < 100' | 1 |
|
"select ID FROM PLAN_TABLE" | 1 |
|
" select a.name Buffer_Pool, b.size_for_estimate as cache_mb_estimate, case when b.size_factor=1 then '<<= Current' when a.estd_physical_read_factor-b.estd_physical_read_factor > 0.001 and b.estd_physical_read_factor<1 then '- BETTER than current by ' || round((1-b.estd_physical_read_factor)/b.estd_physical_read_factor*100,2) || '%' else ' ' end as RATING, b.estd_physical_read_factor \"Phys. Reads Factor\", round((a.estd_physical_read_factor-b.estd_physical_read_factor)/b.estd_physical_read_factor*100,2) as \"% Improve\" from (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r,name from v\$db_cache_advice order by name,1) a , (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r,name from v\$db_cache_advice order by name,1) b where a.r = b.r-1 and a.name = b.name " | 1 |
|
"SELECT max(totalexecutiontime) FROM {profiling} WHERE url = ?" | 1 |
|
'SHOW TABLES' | 1 |
|
'DELETE i, cd FROM `' . $this->options['extras']['prefix'] . 'cache_data` cd, ' . '`' . $this->options['extras']['prefix'] . 'items` i ' . 'WHERE cd.id = i.feed_id ' . 'AND cd.mtime < (unix_timestamp() - :purge_time)' | 1 |
|
'SELECT COUNT(*) FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed' | 1 |
|
'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = :items, `data` = :data, `mtime` = :time WHERE `id` = :feed' | 1 |
|
'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `data` = :data, `mtime` = :time WHERE `id` = :feed' | 1 |
|
'INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:feed, :count, :data, :time)' | 1 |
|
'SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `id` = ' . implode(' OR `id` = ', $database_ids) . ' AND `feed_id` = :feed' | 1 |
|
'INSERT INTO `' . $this->options['extras']['prefix'] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(:feed, :id, :data, :date)' | 1 |
|
'SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed' | 1 |
|
'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = 0, `data` = :data, `mtime` = :time WHERE `id` = :feed' | 1 |
|
'INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:id, 0, :data, :time)' | 1 |
|
'SELECT `items`, `data` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id' | 1 |
|
'SELECT `data` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :feed ORDER BY `posted` DESC' | 1 |
|
'SELECT `mtime` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id' | 1 |
|
'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `mtime` = :time WHERE `id` = :id' | 1 |
|
'DELETE FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id' | 1 |
|
'DELETE FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :id' | 1 |
|
'SELECT id FROM {user}' | 1 |
|
" SELECT innerusers.id, COUNT(identityusers.id) AS showidentity FROM ($userquery) innerusers LEFT JOIN ($sql) identityusers ON identityusers.id = innerusers.id GROUP BY innerusers.id" | 1 |
|
" SELECT $mainfield, COUNT(courseusers.id) AS incourse FROM ($userquery) innerusers2 LEFT JOIN ($sql) courseusers ON courseusers.id = innerusers2.id GROUP BY $mainfield" | 1 |
|
" SELECT $selectfields FROM ($userquery) users JOIN {user} u ON u.id = users.id WHERE $where ORDER BY $order" | 1 |
|
"SELECT timemodified FROM {upgrade_log} WHERE plugin = 'core' AND $targetversioncast - $versioncast > 30000 ORDER BY timemodified DESC" | 1 |
|
"UPDATE {context} ct, {context_temp} temp SET ct.path = temp.path, ct.depth = temp.depth, ct.locked = temp.locked WHERE ct.id = temp.id" | 1 |
|
"UPDATE {context} ct SET (ct.path, ct.depth, ct.locked) = (SELECT temp.path, temp.depth, temp.locked FROM {context_temp} temp WHERE temp.id=ct.id) WHERE EXISTS (SELECT 'x' FROM {context_temp} temp WHERE temp.id = ct.id)" | 1 |
|
"UPDATE {context} SET path = temp.path, depth = temp.depth, locked = temp.locked FROM {context_temp} temp WHERE temp.id={context}.id" | 1 |
|
"UPDATE {context} SET path = (SELECT path FROM {context_temp} WHERE id = {context}.id), depth = (SELECT depth FROM {context_temp} WHERE id = {context}.id), locked = (SELECT locked FROM {context_temp} WHERE id = {context}.id) WHERE id IN (SELECT id FROM {context_temp})" | 1 |
|
"UPDATE {context} SET path = ? $setdepth WHERE id = ?" | 1 |
|
"UPDATE {context} SET path = " . $DB->sql_concat("?", $DB->sql_substr("path", strlen($frompath) + 1)) . " $setdepth WHERE path LIKE ?" | 1 |
|
"SELECT ctx.* FROM {context} ctx WHERE ctx.path LIKE ?" | 1 |
|
"SELECT * from {task_adhoc} WHERE $where" | 1 |
|
"SELECT ctx.* FROM {context} ctx WHERE ctx.path LIKE ? AND (ctx.depth = ? OR ctx.contextlevel = ?)" | 1 |
|
"SELECT " . self::LEVEL . ", cc.id FROM {course_categories} cc WHERE NOT EXISTS (SELECT 'x' FROM {context} cx WHERE cc.id = cx.instanceid AND cx.contextlevel=" . self::LEVEL . ")" | 1 |
|
" SELECT c.* FROM {context} c LEFT OUTER JOIN {course_categories} cc ON c.instanceid = cc.id WHERE cc.id IS NULL AND c.contextlevel = " . self::LEVEL . " " | 1 |
|
"UPDATE {context} SET depth=2, path=" . $DB->sql_concat("'$base/'", 'id') . " WHERE contextlevel=" . self::LEVEL . " AND EXISTS (SELECT 'x' FROM {course_categories} cc WHERE cc.id = {context}.instanceid AND cc.depth=1) $emptyclause" | 1 |
|
"SELECT MAX(depth) FROM {course_categories}" | 1 |
|
"INSERT INTO {context_temp} (id, path, depth, locked) SELECT ctx.id, " . $DB->sql_concat('pctx.path', "'/'", 'ctx.id') . ", pctx.depth+1, ctx.locked FROM {context} ctx JOIN {course_categories} cc ON (cc.id = ctx.instanceid AND ctx.contextlevel = " . self::LEVEL . " AND cc.depth = $n) JOIN {context} pctx ON (pctx.instanceid = cc.parent AND pctx.contextlevel = " . self::LEVEL . ") WHERE pctx.path IS NOT NULL AND pctx.depth > 0 $ctxemptyclause" | 1 |
|
"SELECT " . self::LEVEL . ", u.id FROM {user} u WHERE u.deleted = 0 AND NOT EXISTS (SELECT 'x' FROM {context} cx WHERE u.id = cx.instanceid AND cx.contextlevel=" . self::LEVEL . ")" | 1 |
|
" SELECT c.* FROM {context} c LEFT OUTER JOIN {user} u ON (c.instanceid = u.id AND u.deleted = 0) WHERE u.id IS NULL AND c.contextlevel = " . self::LEVEL . " " | 1 |
|
"UPDATE {context} SET depth = 2, path = {$path} WHERE contextlevel = " . self::LEVEL . " AND ($where)" | 1 |
|
"SELECT c.* FROM {context} c WHERE contextlevel > " . self::LEVEL | 1 |
|
" SELECT c.* FROM {context} c WHERE 1=2 " | 1 |
|
<<<EOF INSERT INTO {context} ( contextlevel, instanceid ) SELECT :contextlevel, bi.id as instanceid FROM {block_instances} bi WHERE NOT EXISTS ( SELECT 'x' FROM {context} cx WHERE bi.id = cx.instanceid AND cx.contextlevel = :existingcontextlevel ) EOF | 1 |
|
" SELECT c.* FROM {context} c LEFT OUTER JOIN {block_instances} bi ON c.instanceid = bi.id WHERE bi.id IS NULL AND c.contextlevel = " . self::LEVEL . " " | 1 |
|
"INSERT INTO {context_temp} (id, path, depth, locked) SELECT ctx.id, " . $DB->sql_concat('pctx.path', "'/'", 'ctx.id') . ", pctx.depth+1, ctx.locked FROM {context} ctx JOIN {block_instances} bi ON (bi.id = ctx.instanceid AND ctx.contextlevel = " . self::LEVEL . ") JOIN {context} pctx ON (pctx.id = bi.parentcontextid) WHERE (pctx.path IS NOT NULL AND pctx.depth > 0) $ctxemptyclause" | 1 |
|
"SELECT cm.*, md.name AS modname FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module WHERE cm.id = ?" | 1 |
|
"SELECT md.name AS modname FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module WHERE cm.id = ?" | 1 |
|
"SELECT * FROM {capabilities} WHERE (contextlevel = " . self::LEVEL . " AND component {$notcompsql} AND {$notlikesql}) $extra ORDER BY $sort" | 1 |
|
"SELECT " . self::LEVEL . ", cm.id FROM {course_modules} cm WHERE NOT EXISTS (SELECT 'x' FROM {context} cx WHERE cm.id = cx.instanceid AND cx.contextlevel=" . self::LEVEL . ")" | 1 |
|
" SELECT c.* FROM {context} c LEFT OUTER JOIN {course_modules} cm ON c.instanceid = cm.id WHERE cm.id IS NULL AND c.contextlevel = " . self::LEVEL . " " | 1 |
|
"INSERT INTO {context_temp} (id, path, depth, locked) SELECT ctx.id, " . $DB->sql_concat('pctx.path', "'/'", 'ctx.id') . ", pctx.depth+1, ctx.locked FROM {context} ctx JOIN {course_modules} cm ON (cm.id = ctx.instanceid AND ctx.contextlevel = " . self::LEVEL . ") JOIN {context} pctx ON (pctx.instanceid = cm.course AND pctx.contextlevel = " . course::LEVEL . ") WHERE pctx.path IS NOT NULL AND pctx.depth > 0 $ctxemptyclause" | 1 |
|
"SELECT " . self::LEVEL . ", c.id FROM {course} c WHERE NOT EXISTS (SELECT 'x' FROM {context} cx WHERE c.id = cx.instanceid AND cx.contextlevel=" . self::LEVEL . ")" | 1 |
|
" SELECT c.* FROM {context} c LEFT OUTER JOIN {course} co ON c.instanceid = co.id WHERE co.id IS NULL AND c.contextlevel = " . self::LEVEL . " " | 1 |
|
"UPDATE {context} SET depth = 2, path = " . $DB->sql_concat("'$base/'", 'id') . " WHERE contextlevel = " . self::LEVEL . " AND EXISTS (SELECT 'x' FROM {course} c WHERE c.id = {context}.instanceid AND c.category = 0) $emptyclause" | 1 |
|
"INSERT INTO {context_temp} (id, path, depth, locked) SELECT ctx.id, " . $DB->sql_concat('pctx.path', "'/'", 'ctx.id') . ", pctx.depth+1, ctx.locked FROM {context} ctx JOIN {course} c ON (c.id = ctx.instanceid AND ctx.contextlevel = " . self::LEVEL . " AND c.category <> 0) JOIN {context} pctx ON (pctx.instanceid = c.category AND pctx.contextlevel = " . coursecat::LEVEL . ") WHERE pctx.path IS NOT NULL AND pctx.depth > 0 $ctxemptyclause" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {moodlenet_share_progress} msp ON ctx.instanceid = msp.userid AND ctx.contextlevel = :contextlevel WHERE msp.userid = :userid" | 1 |
|
"SELECT DISTINCT userid FROM {moodlenet_share_progress} WHERE userid = :userid" | 1 |
|
'SELECT pg_try_advisory_lock(:locktype, :token) AS locked' | 1 |
|
'SELECT pg_advisory_unlock(:locktype, :token) AS unlocked' | 1 |
|
'UPDATE {lock_db} SET expires = :expires, owner = :token WHERE resourcekey = :resourcekey AND (owner IS NULL OR expires < :now)' | 1 |
|
'UPDATE {lock_db} SET expires = :noexpires, owner = :noowner WHERE owner = :token' | 1 |
|
'SELECT GET_LOCK(:resourcekey, :timeout) AS locked' | 1 |
|
'SELECT RELEASE_LOCK(:resourcekey) AS unlocked' | 1 |
|
" SELECT u.id FROM {user} u WHERE u.theme = :usertheme " | 1 |
|
" SELECT c.id FROM {course} c WHERE c.theme = :coursetheme " | 1 |
|
" SELECT co.id FROM {cohort} co WHERE co.theme = :cohorttheme " | 1 |
|
" SELECT cat.id FROM {course_categories} cat WHERE cat.theme = :categorytheme " | 1 |
|
"SELECT u.*, mca.id as ismuted FROM {user} u LEFT JOIN {message_conversation_actions} mca ON mca.userid = u.id AND mca.conversationid = ? AND mca.action = ? WHERE u.id IN ( SELECT mcm.userid FROM {message_conversation_members} mcm WHERE mcm.conversationid = ? )" | 1 |
|
"SELECT COUNT('x') FROM {user_enrolments} ue JOIN {enrol} e ON e.id = ue.enrolid WHERE e.enrol = :plugin" | 1 |
|
"UPDATE {course_modules} SET visibleold = visible, visible = 0 WHERE module = ?" | 1 |
|
"SELECT COUNT('x') FROM ( SELECT course FROM {course_modules} WHERE module = :mid GROUP BY course ) c" | 1 |
|
'UPDATE {grading_areas} SET activemethod = NULL WHERE activemethod = ?' | 1 |
|
"SELECT $select FROM {moodlenet_share_progress} msp LEFT JOIN {course} c ON c.id = msp.courseid LEFT JOIN {course_modules} cm ON cm.course = msp.courseid AND cm.id = msp.cmid LEFT JOIN {modules} md ON md.id = cm.module WHERE msp.userid = :userid" | 1 |
|
"SELECT h5p.id FROM {h5p} h5p LEFT JOIN {files} f ON f.pathnamehash = h5p.pathnamehash WHERE f.pathnamehash IS NULL" | 1 |
|
"SELECT f.id, f.pathnamehash FROM {files} f WHERE f.itemid = :itemid AND f.filearea = :filearea AND f.component = :component" | 1 |
|
'SELECT pairs.tagid, pairs.correlation, pairs.ocurrences, co.id AS correlationid FROM ( SELECT ta.tagid, tb.tagid AS correlation, COUNT(*) AS ocurrences FROM {tag_instance} ta JOIN {tag} tga ON ta.tagid = tga.id JOIN {tag_instance} tb ON (ta.itemtype = tb.itemtype AND ta.component = tb.component AND ta.itemid = tb.itemid AND ta.tagid <> tb.tagid) JOIN {tag} tgb ON tb.tagid = tgb.id AND tgb.tagcollid = tga.tagcollid GROUP BY ta.tagid, tb.tagid HAVING COUNT(*) > :mincorrelation ) pairs LEFT JOIN {tag_correlation} co ON co.tagid = pairs.tagid ORDER BY pairs.tagid ASC, pairs.ocurrences DESC, pairs.correlation ASC' | 1 |
|
"SELECT ti.id FROM {tag_instance} ti LEFT JOIN {tag} t ON t.id = ti.tagid WHERE t.id IS null" | 1 |
|
"SELECT ti.id FROM {tag_instance} ti, {user} u WHERE ti.itemid = u.id AND ti.itemtype = 'user' AND ti.component = 'core' AND u.deleted = 1" | 1 |
|
"SELECT DISTINCT component, itemtype FROM {tag_instance} WHERE itemtype <> 'user' or component <> 'core'" | 1 |
|
'SELECT ti.id FROM {tag_instance} ti LEFT JOIN {' . $tagarea->itemtype . '} it ON it.id = ti.itemid WHERE it.id IS null AND ti.itemtype = ? AND ti.component = ?' | 1 |
|
"SELECT ti.*, COALESCE(t.name, 'deleted') AS name, COALESCE(t.rawname, 'deleted') AS rawname FROM {tag_instance} ti LEFT JOIN {tag} t ON t.id = ti.tagid WHERE ti.id $sqlin" | 1 |
|
"SELECT * FROM {user} WHERE confirmed = 0 AND timecreated > 0 AND timecreated < ? AND deleted = 0" | 1 |
|
"SELECT ip, COUNT(*) FROM {" . $logtable . "} WHERE eventname = ? AND timecreated > ? GROUP BY ip HAVING COUNT(*) >= ?" | 1 |
|
"SELECT userid, count(*) FROM {" . $logtable . "} WHERE eventname = ? AND timecreated > ? GROUP BY userid HAVING count(*) >= ?" | 1 |
|
"SELECT * FROM ( SELECT l.*, u.username, $namefields FROM {" . $logtable . "} l JOIN {cache_flags} cf ON l.ip = cf.name LEFT JOIN {user} u ON l.userid = u.id WHERE l.eventname = ? AND l.timecreated > ? AND cf.flagtype = 'login_failure_by_ip' UNION ALL SELECT l.*, u.username, $namefields FROM {" . $logtable . "} l JOIN {cache_flags} cf ON l.userid = " . $DB->sql_cast_char2int('cf.name') . " LEFT JOIN {user} u ON l.userid = u.id WHERE l.eventname = ? AND l.timecreated > ? AND cf.flagtype = 'login_failure_by_info') t ORDER BY t.timecreated DESC" | 1 |
|
"SELECT i.* FROM {grade_items} i WHERE i.locked = 0 AND i.locktime > 0 AND i.locktime < ? AND EXISTS (SELECT 'x' FROM {grade_items} c WHERE c.itemtype='course' AND c.needsupdate=0 AND c.courseid=i.courseid)" | 1 |
|
"SELECT $fields FROM {grade_grades} g, {grade_items} i WHERE g.locked = 0 AND g.locktime > 0 AND g.locktime < ? AND g.itemid = i.id AND EXISTS (SELECT 'x' FROM {grade_items} c WHERE c.itemtype = 'course' AND c.needsupdate = 0 AND c.courseid = i.courseid)" | 1 |
|
"SELECT * FROM {event_subscriptions} WHERE pollinterval > 0 AND lastupdated + pollinterval < :time" | 1 |
|
'SELECT * FROM {backup_controllers} WHERE purpose = ? AND status <> ?' | 1 |
|
"SELECT c.id AS course, u.id AS userid, crc.id AS completionid, ue.timestart AS timeenrolled, ue.timecreated FROM {user} u INNER JOIN {user_enrolments} ue ON ue.userid = u.id INNER JOIN {enrol} e ON e.id = ue.enrolid INNER JOIN {course} c ON c.id = e.courseid INNER JOIN {context} con ON con.contextlevel = ? AND con.instanceid = c.id INNER JOIN {role_assignments} ra ON ra.userid = u.id AND ra.contextid = con.id LEFT JOIN {course_completions} crc ON crc.course = c.id AND crc.userid = u.id WHERE c.enablecompletion = 1 AND crc.timeenrolled IS NULL AND ue.status = 0 AND e.status = 0 AND u.deleted = 0 AND ue.timestart < ? AND (ue.timeend > ? OR ue.timeend = 0) $sqlroles ORDER BY course, userid" | 1 |
|
'SELECT * FROM {task_adhoc}' | 1 |
|
'SELECT * from {task_adhoc} WHERE faildelay > ?' | 1 |
|
'SELECT classname FROM {task_adhoc} WHERE nextruntime < :timestart GROUP BY classname' | 1 |
|
'SELECT classname, COALESCE(COUNT(*), 0) running, MIN(timestarted) earliest FROM {task_adhoc} WHERE timestarted IS NOT NULL AND (attemptsavailable > 0 OR attemptsavailable IS NULL) AND nextruntime < :timestart GROUP BY classname ORDER BY running ASC, earliest DESC' | 1 |
|
"SELECT q.id, q.classname, q.timestarted, COALESCE(run.running, 0) running, run.earliest FROM {task_adhoc} q LEFT JOIN ( SELECT classname, COUNT(*) running, MIN(timestarted) earliest FROM {task_adhoc} run WHERE timestarted IS NOT NULL AND (attemptsavailable > 0 OR attemptsavailable IS NULL) GROUP BY classname ) run ON run.classname = q.classname WHERE nextruntime < :timestart AND q.timestarted IS NULL AND (q.attemptsavailable > 0 OR q.attemptsavailable IS NULL) " . (!empty($pertasksql) ? "AND (" . $pertasksql . ") " : "") . ($runmax ? "AND (COALESCE(run.running, 0)) < :runmax " : "") . "ORDER BY COALESCE(run.running, 0) ASC, run.earliest DESC, q.nextruntime ASC, q.id ASC" | 1 |
|
"SELECT subquery.* FROM (SELECT " . $DB->sql_concat("'s'", 'ts.id') . " as uniqueid, ts.id, 'scheduled' as type, ts.classname, (:now1 - ts.timestarted) as time, ts.timestarted, ts.hostname, ts.pid FROM {task_scheduled} ts WHERE ts.timestarted IS NOT NULL UNION ALL SELECT " . $DB->sql_concat("'a'", 'ta.id') . " as uniqueid, ta.id, 'adhoc' as type, ta.classname, (:now2 - ta.timestarted) as time, ta.timestarted, ta.hostname, ta.pid FROM {task_adhoc} ta WHERE ta.timestarted IS NOT NULL) subquery ORDER BY " . $sort | 1 |
|
"SELECT b.id FROM {badge} b WHERE (b.status = :active OR b.status = :activelocked) AND (b.type = :site $coursesql )" | 1 |
|
"SELECT u.id as id, u.email, u.auth, u.deleted, u.suspended, u.emailstop, u.mnethostid, u.mailformat, $usernamefields, u.username, u.lang, p.id as prefid FROM {user} u JOIN {user_preferences} p ON u.id=p.userid WHERE p.name='create_password' AND p.value='1' AND u.email !='' AND u.suspended = 0 AND u.auth != 'nologin' AND u.deleted = 0" | 1 |
|
"SELECT classname FROM {task_log} GROUP BY classname HAVING COUNT(classname) > :retaincount" | 1 |
|
"SELECT * FROM {user} WHERE confirmed = 1 AND lastaccess > 0 AND lastaccess < ? AND deleted = 0 AND (lastname = '' OR firstname = '' OR email = '')" | 1 |
|
"SELECT DISTINCT r.id, r.name, r.shortname, r.sortorder, r.archetype FROM {role} r JOIN {role_capabilities} rc ON rc.roleid = r.id WHERE rc.capability = :capability AND rc.contextid = :contextid AND rc.permission = :permission" | 1 |
|
"SELECT DISTINCT {$roleidcontextfield} AS rolecontext, r.id, r.name, r.shortname, r.sortorder, r.archetype, rc.contextid FROM {role} r JOIN {role_capabilities} rc ON rc.roleid = r.id WHERE rc.capability = :capability AND rc.contextid <> :contextid AND rc.permission = :permission" | 1 |
|
"SELECT COUNT('x') FROM (SELECT DISTINCT u.id $this->sqluserinfo) userinfo" | 1 |
|
" SELECT DISTINCT $userfields, ra.contextid, ra.roleid $this->sqluserinfo ORDER BY $sort" | 1 |
|
"SELECT COUNT(DISTINCT u.id) $this->sqlfrom" | 1 |
|
"SELECT DISTINCT $userfields $this->sqlfrom" | 1 |
|
"SELECT rc.id, rc.contextid, rc.capability FROM {role_capabilities} rc JOIN {capabilities} cap ON cap.name = rc.capability WHERE " . $DB->sql_bitand('cap.riskbitmask', (RISK_XSS | RISK_CONFIG | RISK_DATALOSS)) . " <> 0 AND rc.permission = :capallow AND rc.roleid = :roleid" | 1 |
|
"SELECT $userfields FROM {user} u WHERE u.id IN ($CFG->siteadmins)" | 1 |
|
'SELECT auth, count(auth) as tc FROM {user} GROUP BY auth ORDER BY tc DESC' | 1 |
|
"UPDATE {sessions} SET timemodified = :now WHERE sid = :sid" | 1 |
|
"SELECT u.*, s.sid, s.timecreated AS s_timecreated, s.timemodified AS s_timemodified FROM {user} u JOIN {sessions} s ON s.userid = u.id WHERE s.timemodified < :purgebefore AND u.id <> :guestid" | 1 |
|
'SELECT DBMS_SESSION.UNIQUE_SESSION_ID() FROM DUAL' | 1 |
|
"SELECT TABLE_NAME FROM CAT WHERE TABLE_TYPE='TABLE' AND TABLE_NAME NOT LIKE 'BIN\$%' AND TABLE_NAME LIKE '$prefix%' ESCAPE '\\'" | 1 |
|
"SELECT i.INDEX_NAME, i.INDEX_TYPE, i.UNIQUENESS, c.COLUMN_POSITION, c.COLUMN_NAME, e.COLUMN_EXPRESSION, ac.CONSTRAINT_TYPE FROM ALL_INDEXES i JOIN ALL_IND_COLUMNS c ON c.INDEX_NAME=i.INDEX_NAME LEFT JOIN ALL_IND_EXPRESSIONS e ON (e.INDEX_NAME = c.INDEX_NAME AND e.COLUMN_POSITION = c.COLUMN_POSITION) LEFT JOIN ALL_CONSTRAINTS ac ON (ac.TABLE_NAME=i.TABLE_NAME AND ac.CONSTRAINT_NAME=i.INDEX_NAME AND ac.CONSTRAINT_TYPE='P') WHERE i.TABLE_NAME = '$tablename' ORDER BY i.INDEX_NAME, c.COLUMN_POSITION" | 1 |
|
"SELECT CNAME, COLTYPE, nvl(CHAR_LENGTH, WIDTH) AS WIDTH, SCALE, PRECISION, NULLS, DEFAULTVAL, DECODE(NVL(TRIGGER_NAME, '0'), '0', '0', '1') HASTRIGGER FROM COL c LEFT JOIN USER_TAB_COLUMNS u ON (u.TABLE_NAME = c.TNAME AND u.COLUMN_NAME = c.CNAME AND u.DATA_TYPE = 'VARCHAR2') LEFT JOIN USER_TRIGGERS t ON (t.TABLE_NAME = c.TNAME AND TRIGGER_TYPE = 'BEFORE EACH ROW' AND c.CNAME = 'ID') WHERE TNAME = UPPER('{" . $table . "}') ORDER BY COLNO" | 1 |
|
"SELECT VALUE FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET'" | 1 |
|
"INSERT INTO {" . $table . "} ($fields) VALUES ($values)" | 1 |
|
"UPDATE {" . $table . "} SET $sets WHERE id=:id" | 1 |
|
"UPDATE {" . $table . "} SET $newsql $select" | 1 |
|
"SELECT 1 FROM user_objects WHERE object_type = 'PACKAGE BODY' AND object_name = 'MOODLELIB' AND status = 'VALID'" | 1 |
|
'SHOW ERRORS' | 1 |
|
'SELECT MOODLELIB.GET_LOCK(:lockname, :locktimeout) FROM DUAL' | 1 |
|
'SELECT MOODLELIB.RELEASE_LOCK(:lockname) FROM DUAL' | 1 |
|
"SELECT engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name = '{$this->prefix}config'" | 1 |
|
"SELECT @@default_storage_engine engine" | 1 |
|
"SHOW STORAGE ENGINES" | 1 |
|
"SELECT collation_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() AND table_name = '{$this->prefix}config' AND column_name = 'value'" | 1 |
|
"SELECT @@collation_database" | 1 |
|
"SHOW COLLATION WHERE Collation LIKE 'utf8mb4\_%' AND Charset = 'utf8mb4'" | 1 |
|
"SELECT row_format FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name = '{$this->prefix}$table'" | 1 |
|
"SHOW VARIABLES LIKE 'innodb_large_prefix'" | 1 |
|
"SELECT COUNT('x') FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name LIKE BINARY '$prefix%' AND Engine = 'MyISAM'" | 1 |
|
"SELECT VERSION() version;" | 1 |
|
"SHOW TABLES LIKE '$prefix%'" | 1 |
|
"SHOW INDEXES FROM $fixedtable" | 1 |
|
"SELECT column_name, data_type, character_maximum_length, numeric_precision, numeric_scale, is_nullable, column_type, column_default, column_key, extra FROM information_schema.columns WHERE table_name = '" . $this->prefix . $table . "' AND table_schema = '" . $this->dbname . "' ORDER BY ordinal_position" | 1 |
|
"SHOW COLUMNS FROM $fixedtable" | 1 |
|
"SHOW COLLATION WHERE Collation ='$collation' AND Charset = '$charset'" | 1 |
|
"SELECT * FROM {{$table}}" | 1 |
|
"INSERT INTO $fixedtable ($fields) VALUES($qms)" | 1 |
|
"SHOW VARIABLES LIKE 'max_allowed_packet'" | 1 |
|
"INSERT INTO $fixedtable $fieldssql VALUES $valuessql" | 1 |
|
"UPDATE $fixedtable SET $sets WHERE id=?" | 1 |
|
"UPDATE $fixedtable SET $newfield $select" | 1 |
|
"DELETE FROM $fixedtable $select" | 1 |
|
"DELETE mysql_deltable FROM {" . $table . "} mysql_deltable JOIN " . "($subquery) mysql_subquery ON mysql_subquery.$alias = mysql_deltable.$field" | 1 |
|
"SELECT $falias." . preg_replace('/,/', ',' . $falias . '.', $fields) . " FROM ($selects[0]) $falias" | 1 |
|
"SELECT GET_LOCK('$fullname', $timeout)" | 1 |
|
"SELECT RELEASE_LOCK('$fullname')" | 1 |
|
"INSERT INTO {{$table}} ($fields) VALUES($qms)" | 1 |
|
"UPDATE {{$table}} SET $sets WHERE id=?" | 1 |
|
"UPDATE {{$table}} SET $newfield $select" | 1 |
|
'SELECT name FROM sqlite_master WHERE type="table" UNION ALL SELECT name FROM sqlite_temp_master WHERE type="table" ORDER BY name' | 1 |
|
'SELECT sql FROM sqlite_master WHERE type="table" AND tbl_name="' . $this->prefix . $table . '"' | 1 |
|
"SELECT $fields FROM {" . $table . "}" | 1 |
|
"SELECT $fields FROM {" . $table . "} $select $sort" | 1 |
|
"SELECT $fields FROM {" . $table . "} $select" | 1 |
|
"SELECT $countitem FROM {" . $table . "} $select" | 1 |
|
"SELECT 'x' FROM {" . $table . "} $select" | 1 |
|
"UPDATE {" . $table . "} SET $columnname = REPLACE($columnname, ?, ?) WHERE $searchsql" | 1 |
|
"UPDATE {" . $table . "} SET $columnname = " . $this->sql_substr("REPLACE(" . $columnname . ", ?, ?)", 1, $colsize) . " WHERE $searchsql" | 1 |
|
"SELECT c.relname FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace as ns ON ns.oid = c.relnamespace WHERE c.relname LIKE '$prefix%' ESCAPE '|' AND c.relkind = 'r' AND (ns.nspname = current_schema() OR ns.oid = pg_my_temp_schema())" | 1 |
|
"SELECT i.* FROM pg_catalog.pg_indexes i JOIN pg_catalog.pg_namespace as ns ON ns.nspname = i.schemaname WHERE i.tablename = '$tablename' AND (i.schemaname = current_schema() OR ns.oid = pg_my_temp_schema())" | 1 |
|
"SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, CASE WHEN a.atthasdef THEN pg_catalog.pg_get_expr(d.adbin, d.adrelid) ELSE '' END AS adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace as ns ON ns.oid = c.relnamespace JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid JOIN pg_catalog.pg_type t ON t.oid = a.atttypid LEFT JOIN pg_catalog.pg_attrdef d ON (d.adrelid = c.oid AND d.adnum = a.attnum) WHERE relkind = 'r' AND c.relname = '$tablename' AND c.reltype > 0 AND a.attnum > 0 AND (ns.nspname = current_schema() OR ns.oid = pg_my_temp_schema()) ORDER BY a.attnum" | 1 |
|
'SHOW server_encoding' | 1 |
|
"INSERT INTO {$this->prefix}$table ($fields) VALUES($values) $returning" | 1 |
|
"INSERT INTO {$this->prefix}$table $fieldssql VALUES $valuessql" | 1 |
|
"UPDATE {$this->prefix}$table SET $newfield $select" | 1 |
|
"DELETE FROM {$this->prefix}$table $select" | 1 |
|
"SELECT pg_advisory_lock($rowid)" | 1 |
|
"SELECT pg_advisory_unlock($rowid)" | 1 |
|
"SELECT is_read_committed_snapshot_on FROM sys.databases WHERE name = '{$this->dbname}'" | 1 |
|
"SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_name LIKE '$prefix%' ESCAPE '\\' AND table_type = 'BASE TABLE'" | 1 |
|
"SELECT i.name AS index_name, i.is_unique, ic.index_column_id, c.name AS column_name FROM sys.indexes i JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id JOIN sys.tables t ON i.object_id = t.object_id WHERE t.name = '$tablename' AND i.is_primary_key = 0 ORDER BY i.name, i.index_id, ic.index_column_id" | 1 |
|
"SELECT column_name AS name, data_type AS type, numeric_precision AS max_length, character_maximum_length AS char_max_length, numeric_scale AS scale, is_nullable AS is_nullable, columnproperty(object_id(quotename(table_schema) + '.' + quotename(table_name)), column_name, 'IsIdentity') AS auto_increment, column_default AS default_value FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '{" . $table . "}' ORDER BY ordinal_position" | 1 |
|
"SELECT column_name AS name, data_type AS type, numeric_precision AS max_length, character_maximum_length AS char_max_length, numeric_scale AS scale, is_nullable AS is_nullable, columnproperty(object_id(quotename(table_schema) + '.' + quotename(table_name)), column_name, 'IsIdentity') AS auto_increment, column_default AS default_value FROM tempdb.INFORMATION_SCHEMA.COLUMNS " . "WHERE table_name LIKE '{" . $table . "}__________%' ORDER BY ordinal_position" | 1 |
|
"INSERT INTO {" . $table . "} ($fields) VALUES($qms)" | 1 |
|
'SELECT SCOPE_IDENTITY()' | 1 |
|
"UPDATE {" . $table . "} SET $sets WHERE id = ?" | 1 |
|
"UPDATE {" . $table . "} SET $newfield $select" | 1 |
|
"SELECT CAST(DATABASEPROPERTYEX('$this->dbname', 'Collation') AS varchar(255)) AS SQLCollation" | 1 |
|
"SELECT FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')" | 1 |
|
"INSERT INTO {table2} (name) VALUES ('blah')" | 1 |
|
"SELECT * FROM {table2}" | 1 |
|
'SELECT pg_whatever(1)' | 1 |
|
"SELECT $fn(1)" | 1 |
|
"SELECT * FROM {user} u JOIN ( SELECT DISTINCT u.id FROM {user} u JOIN {user_enrolments} ue1 ON ue1.userid = u.id JOIN {enrol} e ON e.id = ue1.enrolid WHERE u.id NOT IN ( SELECT DISTINCT ue.userid FROM {user_enrolments} ue JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = 1) WHERE ue.status = 'active' AND e.status = 'enabled' AND ue.timestart < now() AND (ue.timeend = 0 OR ue.timeend > now()) ) ) je ON je.id = u.id JOIN ( SELECT DISTINCT ra.userid FROM {role_assignments} ra WHERE ra.roleid IN (1, 2, 3) AND ra.contextid = 'ctx' ) rainner ON rainner.userid = u.id WHERE u.deleted = 0" | 1 |
|
"UPDATE {table} SET a = 1 WHERE id = 1" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE id $insql ORDER BY id ASC" | 1 |
|
"SELECT * FROM INFORMATION_SCHEMA.TABLES" | 1 |
|
'SHOW SESSION STATUS' | 1 |
|
'SELECT * FROM {silly_test_table} WHERE id <= ? ORDER BY id' | 1 |
|
'SELECT * FROM {table_temp}' | 1 |
|
'SELECT * FROM {table_temp} WITH (NOLOCK)' | 1 |
|
'SELECT * FROM {table_temp} MYTABLE' | 1 |
|
'SELECT * FROM {table_temp} MYTABLE WITH (NOLOCK)' | 1 |
|
'SELECT * FROM {table_temp} x WHERE y in (SELECT y from {table2})' | 1 |
|
'SELECT * FROM {table_temp} x WITH (NOLOCK) WHERE y in (SELECT y from {table2})' | 1 |
|
'SELECT DISTINCT * FROM {table_temp} WHERE y in (SELECT y from {table2} nottemp)' | 1 |
|
'SELECT DISTINCT * FROM {table_temp} WITH (NOLOCK) WHERE y in (SELECT y from {table2} nottemp)' | 1 |
|
'SELECT DISTINCT * FROM {table_temp} where y in (SELECT y from {table2} nottemp)' | 1 |
|
'SELECT DISTINCT * FROM {table_temp} WITH (NOLOCK) where y in (SELECT y from {table2} nottemp)' | 1 |
|
'SELECT * FROM {table_temp} asx' | 1 |
|
'SELECT * FROM {table_temp} asx WITH (NOLOCK)' | 1 |
|
'SELECT * FROM {table_temp} alias_for_table' | 1 |
|
'SELECT * FROM {table_temp} alias_for_table WITH (NOLOCK)' | 1 |
|
'SELECT * FROM {table_temp} a5 WHERE y' | 1 |
|
'SELECT * FROM {table_temp} a5 WITH (NOLOCK) WHERE y' | 1 |
|
'SELECT * FROM {table_temp} a_5 WHERE y' | 1 |
|
'SELECT * FROM {table_temp} a_5 WITH (NOLOCK) WHERE y' | 1 |
|
'select * FROM (SELECT DISTINCT * FROM {table_temp})' | 1 |
|
'select * FROM (SELECT DISTINCT * FROM {table_temp} WITH (NOLOCK))' | 1 |
|
'select * FROM (SELECT DISTINCT * FROM {table_temp} ) WHERE y' | 1 |
|
'select * FROM (SELECT DISTINCT * FROM {table_temp} WITH (NOLOCK) ) WHERE y' | 1 |
|
'select * FROM (SELECT DISTINCT * FROM {table_temp} x) WHERE y' | 1 |
|
'select * FROM (SELECT DISTINCT * FROM {table_temp} x WITH (NOLOCK)) WHERE y' | 1 |
|
<<<EOT SELECT COUNT(*) AS 'Users who have logged in today' FROM ( SELECT ROW_NUMBER() OVER(ORDER BY lastaccess DESC) AS Row FROM mdl_user WHERE lastaccess > DATEDIFF(s, '1970-01-01 02:00:00', (SELECT Convert(DateTime, DATEDIFF(DAY, 0, GETDATE())))) ) AS Logins EOT | 1 |
|
<<<EOT SELECT COUNT() AS 'Users who have logged in today' FROM () AS Logins EOT | 1 |
|
<<<EOT SELECT COUNT(*) AS 'Users who have logged in today' FROM ( SELECT ROW_NUMBER() OVER(ORDER BY lastaccess DESC) AS Row FROM mdl_user WHERE lastaccess > DATEDIFF(s, '1970-01-01 02:00:00', (SELECT Convert(DateTime, DATEDIFF(DAY, 0, GETDATE())))) ) AS Logins ORDER BY 1 EOT | 1 |
|
<<<EOT SELECT COUNT() AS 'Users who have logged in today' FROM () AS Logins ORDER BY 1 EOT | 1 |
|
<<<EOT SELECT c.fullname, COUNT(ue.id) AS Enroled FROM prefix_course AS c JOIN prefix_enrol AS en ON en.courseid = c.id JOIN prefix_user_enrolments AS ue ON ue.enrolid = en.id GROUP BY c.id ORDER BY c.fullname EOT | 1 |
|
<<<EOT SELECT c.fullname, COUNT() AS Enroled FROM prefix_course AS c JOIN prefix_enrol AS en ON en.courseid = c.id JOIN prefix_user_enrolments AS ue ON ue.enrolid = en.id GROUP BY c.id ORDER BY c.fullname EOT | 1 |
|
"SELECT * FROM {user}, {funny_table_name}, {mdl_stupid_table} WHERE {user}.id = {funny_table_name}.userid" | 1 |
|
"SELECT * FROM {$prefix}user, {$prefix}funny_table_name, {$prefix}mdl_stupid_table WHERE {$prefix}user.id = {$prefix}funny_table_name.userid" | 1 |
|
"SELECT * FROM {$prefix}" . $tablename | 1 |
|
"SELECT * FROM {$prefix}testtable WHERE name = :param1, course = :param2" | 1 |
|
"SELECT * FROM {$prefix}testtable WHERE name = ?, course = ?" | 1 |
|
"SELECT * FROM {$prefix}testtable WHERE name = \$1, course = \$2" | 1 |
|
"SELECT * FROM [testtable]" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = :param1, course = \$1" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = ?, course = \$1" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = ?, course = ?, id = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = :name, course = :name" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = :{$correctparam} AND course = :course" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = :{$incorrectparam} AND course = :course" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE course = ? OR course = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE course = :course1 OR course = :course2" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE course = \$1 OR course = \$2" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name IN (?,?,?,?,?,?)" | 1 |
|
<<<EOD SELECT * FROM {users} -- line 64 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to ReflectionMethod->invoke() EOD | 1 |
|
<<<EOD SELECT * FROM {users} -- line 64 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to ReflectionMethod->invoke() -- line 73 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to test_dml_sql_debugging_fixture->one() EOD | 1 |
|
<<<EOD SELECT * FROM {users} -- line 64 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to ReflectionMethod->invoke() -- line 73 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to test_dml_sql_debugging_fixture->one() -- line 82 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to test_dml_sql_debugging_fixture->two() -- line 91 of /lib/dml/tests/fixtures/test_dml_sql_debugging_fixture.php: call to test_dml_sql_debugging_fixture->three() -- line 517 of /lib/dml/tests/dml_test.php: call to test_dml_sql_debugging_fixture->four() EOD | 1 |
|
"DELETE FROM {{$tablename}} WHERE $select" | 1 |
|
"SELECT * FROM {{$tablename1}} WHERE course = :course" | 1 |
|
"UPDATE {{$tablename1}} SET course = 6 WHERE course = ?" | 1 |
|
"UPDATE {{$tablename1}} SET course = 0 WHERE NOT EXISTS ( SELECT course FROM {{$tablename2}} tbl2 WHERE tbl2.course = {{$tablename1}}.course AND 1 = 0)" | 1 |
|
"INSERT INTO {{$tablename2}} (course) SELECT course FROM {{$tablename1}}" | 1 |
|
"INSERT INTO {{$tablename2}} (course, onetext) VALUES (:course, :onetext)" | 1 |
|
"UPDATE {{$tablename2}} SET course = :newcourse, onetext = :newonetext WHERE course = :oldcourse" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE course NOT IN ( SELECT course FROM {{$tablename}} WHERE course IN (0, 3)) ORDER BY course" | 1 |
|
"SELECT t1.id, t1.course AS cid, t2.nametext FROM {{$tablename}} t1, {{$tablename2}} t2 WHERE t2.course=t1.course ORDER BY t1.course, " . $DB->sql_compare_text('t2.nametext') | 1 |
|
"SELECT course FROM {{$tablename}} WHERE id = ?" | 1 |
|
"SELECT onebinary FROM {{$tablename}} WHERE course > ?" | 1 |
|
"SELECT COUNT(*) FROM {{$tablename}} WHERE course > ?" | 1 |
|
"SELECT onechar FROM {{$tablename}} WHERE course = ?" | 1 |
|
"SELECT course FROM {{$tablename}} WHERE 1 = 2" | 1 |
|
'SELECT id AS frog FROM {' . $tablename . '} WHERE course = ?' | 1 |
|
"SELECT 1 AS id " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_bitand(10, 3) . " AS res " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT id, " . $DB->sql_bitand('col1', 'col2') . " AS res FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_bitand('col1', '?') . " AS res FROM {{$tablename}}" | 1 |
|
"SELECT $notlimited AS res " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_bitor(10, 3) . " AS res " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT id, " . $DB->sql_bitor('col1', 'col2') . " AS res FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_bitor('col1', '?') . " AS res FROM {{$tablename}}" | 1 |
|
"SELECT " . $DB->sql_bitxor(10, 3) . " AS res " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT id, " . $DB->sql_bitxor('col1', 'col2') . " AS res FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_bitxor('col1', '?') . " AS res FROM {{$tablename}}" | 1 |
|
"SELECT " . $DB->sql_modulo(10, 7) . " AS res " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_ceil(665.666) . " AS res " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT t1.details FROM {{$tableonename}} t1 JOIN {{$tabletwoname}} t2 ON t2.charfield = " . $DB->sql_cast_to_char('t1.intfield') | 1 |
|
"SELECT * FROM {" . $tablename1 . "} t1 JOIN {" . $tablename2 . "} t2 ON " . $DB->sql_cast_char2int("t1.name") . " = t2.res " | 1 |
|
"SELECT * FROM {{$tablename1}} ORDER BY " . $DB->sql_cast_char2int('name') | 1 |
|
"SELECT * FROM {" . $tablename1 . "} t1 JOIN {" . $tablename2 . "} t2 ON " . $DB->sql_cast_char2int("t1.nametext", true) . " = t2.restext " | 1 |
|
"SELECT * FROM {{$tablename1}} ORDER BY " . $DB->sql_cast_char2int('nametext', true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_cast_char2real('name') . " > res" | 1 |
|
"SELECT * FROM {{$tablename}} ORDER BY " . $DB->sql_cast_char2real('name') | 1 |
|
"SELECT AVG(" . $DB->sql_cast_char2real('name') . ") FROM {{$tablename}}" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_cast_char2real('nametext', true) . " > res" | 1 |
|
"SELECT * FROM {{$tablename}} ORDER BY " . $DB->sql_cast_char2real('nametext', true) | 1 |
|
"SELECT AVG(" . $DB->sql_cast_char2real('nametext', true) . ") FROM {{$tablename}}" | 1 |
|
"SELECT name FROM {{$tablename}} WHERE FLOOR(res - " . $DB->sql_cast_char2real(':param') . ") = 0" | 1 |
|
"SELECT name FROM {{$tablename}} WHERE FLOOR(res - " . $DB->sql_cast_char2real('10.09999') . ") = 0" | 1 |
|
"SELECT " . $DB->sql_compare_text('description') . " AS field FROM {{$tablename}} WHERE name = ?" | 1 |
|
"SELECT " . $DB->sql_compare_text('description', 35) . " AS field FROM {{$tablename}} WHERE name = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = " . $DB->sql_compare_text('description') | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = " . $DB->sql_compare_text('description', 4) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_compare_text('description') . " = " . $DB->sql_compare_text(':clob') | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', '?', true, true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', ':name', true, true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', 'name2', true, true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', '?', false, true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', ':name', false, true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', 'name2', false, true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', '?', true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', '?', false, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_equal('name', 'name2', false, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?') | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', true, true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', false, true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', true, true, false, '\\') | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', true, false) | 1 |
|
"SELECT COALESCE('returnthis', 'orthis', 'orwhynotthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(:paramvalue, 'orthis', 'orwhynotthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, 'returnthis', 'orthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(:paramvalue, 'returnthis', 'orthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, :paramvalue, 'orthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, null, 'returnthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, :paramvalue, 'returnthis') AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, null, :paramvalue) AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, null, " . $customnull . ") AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, :paramvalue, " . $customnull . ") AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT COALESCE(null, :paramvalue, null) AS test" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_concat("?", "?", "?") . " AS fullname " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_concat_join($concat, $fields) . " AS result" . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT {$tableparentalias}.name, {$fieldsql} AS falias FROM {{$tableparentname}} {$tableparentalias} JOIN {{$tablechildname}} {$tablechildalias} ON {$tablechildalias}.parentid = {$tableparentalias}.id GROUP BY {$tableparentalias}.name" | 1 |
|
"SELECT " . $DB->sql_fullname(':first', ':last') . " AS fullname " . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT * FROM {{$tablename}} ORDER BY " . $DB->sql_order_by_text('description') | 1 |
|
"SELECT * FROM {{$tablename}} ORDER BY " . $DB->sql_order_by_null('name') | 1 |
|
"SELECT * FROM {{$tablename}} ORDER BY " . $DB->sql_order_by_null('name', SORT_DESC) | 1 |
|
"SELECT id, " . $DB->sql_substr("name", 5) . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_substr("name", 5, 2) . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_substr(":param1", $start) . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_substr("name", ":param1") . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_substr("name", $start, ":param1") . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_substr(":param1", ":param2", ":param3") . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT id, " . $DB->sql_substr("name", "(:param1 + 1) - 1") . " AS name FROM {{$tablename}}" | 1 |
|
"SELECT " . $DB->sql_length("'aeiou'") . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_length("'áéÃóú'") . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_position("'ood'", "'Moodle'") . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT " . $DB->sql_position("'Oracle'", "'Moodle'") . $DB->sql_null_from_clause( ) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE namenotnull = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE namenotnullnodeflt = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isempty($tablename, 'name', false, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isempty($tablename, 'namenull', true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isempty($tablename, 'description', false, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isempty($tablename, 'descriptionnull', true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isnotempty($tablename, 'name', false, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isnotempty($tablename, 'namenull', true, false) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isnotempty($tablename, 'description', false, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_isnotempty($tablename, 'descriptionnull', true, true) | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name " . $DB->sql_regex( ) . " ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name " . $DB->sql_regex(false) . " ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name " . $DB->sql_regex(true, true) . " ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name " . $DB->sql_regex(false, true) . " ?" | 1 |
|
"SELECT (CASE WHEN course = 3 THEN 1 ELSE 0 END) AS casecol, COUNT(1) AS countrecs, MAX(name) AS maxname FROM {{$tablename}} GROUP BY CASE WHEN course = 3 THEN 1 ELSE 0 END ORDER BY casecol DESC" | 1 |
|
"SELECT CASE name WHEN 'xyz' THEN 'last' WHEN 'def' THEN 'mid' WHEN 'abc' THEN 'first' END AS casecol, COUNT(1) AS countrecs, MAX(name) AS maxname FROM {{$tablename}} GROUP BY CASE name WHEN 'xyz' THEN 'last' WHEN 'def' THEN 'mid' WHEN 'abc' THEN 'first' END ORDER BY casecol DESC" | 1 |
|
"SELECT id, course, name FROM {{$tablename}} ORDER BY CASE WHEN (course = 5 OR name = 'xyz') THEN 0 ELSE 1 END, name, course" | 1 |
|
"SELECT DISTINCT course FROM {{$tablename}} ORDER BY course" | 1 |
|
"SELECT a.id AS id, a.course AS course FROM {{$tablename}} a JOIN (SELECT * FROM {{$tablename}}) b ON a.id = b.id WHERE a.course = ?" | 1 |
|
"SELECT * FROM {{$tablename}} c WHERE name = ?" | 1 |
|
"INSERT INTO {" . $tablename . "} (name,intro,$fromfield) VALUES (NULL,NULL,'localhost')" | 1 |
|
"INSERT INTO {" . $tablename . "} (name,intro,$fromfield) VALUES ('','','localhost')" | 1 |
|
"INSERT INTO {" . $tablename . "} (name,intro,$fromfield) VALUES ('xxyy','vvzz','localhost')" | 1 |
|
"INSERT INTO {" . $tablename . "} (name,intro,$fromfield) VALUES ('aa bb aa bb','cc dd cc aa','localhost')" | 1 |
|
"INSERT INTO {" . $tablename . "} (name,intro,$fromfield) VALUES ('kkllll','kkllll','localhost')" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = ?" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE name = :name" | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_compare_text('content') . " = " . $DB->sql_compare_text('?') | 1 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_compare_text('content') . " = " . $DB->sql_compare_text(':content') | 1 |
|
"UPDATE {{$tablename}} SET course = 1 WHERE id = :select" | 1 |
|
"SELECT id FROM {{$tablename}} WHERE course = :select" | 1 |
|
"SELECT t.*, t.name AS test FROM {{$tablename}} t ORDER BY t.id ASC" | 1 |
|
"SELECT DISTINCT t.name, t.name AS test FROM {{$tablename}} t ORDER BY t.name DESC" | 1 |
|
"SELECT 1 FROM {{$tablename}} t WHERE t.name = 'a'" | 1 |
|
"SELECT 'constant' FROM {{$tablename}} t WHERE t.name = 'a'" | 1 |
|
"SELECT t.name, COUNT(DISTINCT t2.id) AS count, 'Test' AS teststring FROM {{$tablename}} t LEFT JOIN ( SELECT t.id, t.name FROM {{$tablename}} t ) t2 ON t2.name = t.name GROUP BY t.name ORDER BY t.name ASC" | 1 |
|
'SELECT ival FROM {' . $tables[0]->getName( ) . '}' | 1 |
|
'SELECT ival FROM {' . $tables[1]->getName( ) . '} WHERE name <> :excludename' | 1 |
|
'SELECT ival FROM {' . $tables[2]->getName( ) . '}' | 1 |
|
'SELECT name FROM {' . $tables[0]->getName( ) . '}' | 1 |
|
'SELECT name FROM {' . $tables[1]->getName( ) . '} WHERE ival <> :excludeival' | 1 |
|
'SELECT name FROM {' . $tables[2]->getName( ) . '}' | 1 |
|
'SELECT ival, name FROM {' . $tables[0]->getName( ) . '}' | 1 |
|
'SELECT ival, name FROM {' . $tables[1]->getName( ) . '} WHERE name <> :excludename' | 1 |
|
'SELECT ival, name FROM {' . $tables[2]->getName( ) . '}' | 1 |
|
"SELECT GET_LOCK('lock',1)" | 1 |
|
"SELECT RELEASE_LOCK('lock',1)" | 1 |
|
"INSERT INTO {$this->prefix}$table ($fields) VALUES($values)" | 1 |
|
'SELECT MAX(id) FROM {' . $table->getName( ) . '}' | 1 |
|
"SELECT object_id, object_name(default_object_id) AS defaultconstraint FROM sys.columns WHERE object_id = object_id(?) AND name = ?" | 1 |
|
"SELECT name FROM sys.objects WHERE lower(name) = ?" | 1 |
|
"SELECT name FROM sys.indexes WHERE lower(name) = ?" | 1 |
|
"select setting from pg_settings where name = 'standard_conforming_strings'" | 1 |
|
"SELECT c.* FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace as ns ON ns.oid = c.relnamespace WHERE c.relname = ? AND c.relkind = 'S' AND (ns.nspname = current_schema() OR ns.oid = pg_my_temp_schema())" | 1 |
|
"SELECT c.relname FROM pg_class c JOIN pg_catalog.pg_namespace as ns ON ns.oid = c.relnamespace WHERE lower(c.relname) = ? AND (ns.nspname = current_schema() OR ns.oid = pg_my_temp_schema())" | 1 |
|
"SELECT c.conname FROM pg_constraint c JOIN pg_catalog.pg_namespace as ns ON ns.oid = c.connamespace WHERE lower(c.conname) = ? AND (ns.nspname = current_schema() OR ns.oid = pg_my_temp_schema())" | 1 |
|
"SELECT tgname FROM pg_trigger WHERE lower(tgname) = ?" | 1 |
|
"SELECT cname, precision FROM col WHERE tname = ? AND cname = ?" | 1 |
|
'UPDATE ' . $tablename . ' SET ' . $tempcolname . ' = CAST(' . $this->mdb->sql_compare_text($fieldname) . ' AS INT)' | 1 |
|
'UPDATE ' . $tablename . ' SET ' . $tempcolname . ' = CAST(' . $this->mdb->sql_compare_text($fieldname) . ' AS NUMBER)' | 1 |
|
'UPDATE ' . $tablename . ' SET ' . $tempcolname . ' = ' . $fieldname | 1 |
|
"SELECT object_name FROM user_objects WHERE lower(object_name) = ?" | 1 |
|
"SELECT constraint_name FROM user_constraints WHERE lower(constraint_name) = ?" | 1 |
|
'INSERT INTO ' . $this->getEncQuoted($this->prefix . $statement->getTable( )) . '(' . implode(', ', $fields) . ') ' . 'VALUES (' . implode(', ', $values) . ')' | 1 |
|
'SELECT MAX(id) FROM {' . $table . '}' | 1 |
|
"UPDATE sqlite_sequence SET seq=$value WHERE name='{$this->prefix}{$table}'" | 1 |
|
'INSERT INTO ' . $tablename . ' SELECT ' . $fields . ' FROM temp_data' | 1 |
|
"SELECT * FROM {test_table} n JOIN {test_temp} t ON t.name = n.name" | 1 |
|
"SELECT id, $result FROM {context} testalias" | 1 |
|
"SELECT id, $select FROM {context} testalias" | 1 |
|
"SELECT id FROM {context}" | 1 |
|
'UPDATE {course_sections} SET visible = 0 WHERE course = ? and section = ?' | 1 |
|
"UPDATE {event} SET userid = 0 WHERE eventtype <> 'user' OR priority <> 0" | 1 |
|
"SELECT h5p.id, h5p.pathnamehash FROM {h5p} h5p LEFT JOIN {files} f ON f.pathnamehash = h5p.pathnamehash WHERE f.pathnamehash IS NULL" | 1 |
|
"SELECT id FROM {files} WHERE itemid = :h5pid AND filearea = 'content' AND component = 'core_h5p'" | 1 |
|
'Select device' | 1 |
|
'SELECT COUNT(q.id) as questioncount FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qbe.questioncategoryid = ?' | 1 |
|
"SELECT COUNT(*) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.contextid = ?" | 1 |
|
'SELECT qbe.id as id, qv.id as versionid, qv.version FROM {question_bank_entries} qbe JOIN {question_versions} qv ON qbe.id = qv.questionbankentryid JOIN {question} q ON qv.questionid = q.id WHERE q.id = ?' | 1 |
|
"SELECT r.id FROM {role} r JOIN {role_allow_switch} ras ON ras.allowswitch = r.id JOIN {role_assignments} ra ON ra.roleid = ras.roleid WHERE ra.userid = :userid AND ra.contextid IN ($pcontexts) AND r.id = :roleid " | 1 |
|
"SELECT r.id FROM {role} r JOIN {role_allow_override} rao ON r.id = rao.allowoverride JOIN {role_assignments} ra ON rao.roleid = ra.roleid WHERE ra.userid = :userid AND ra.contextid IN ($pcontexts) AND r.id = :roleid " | 1 |
|
"SELECT " . context_helper::get_preload_record_columns_sql('c') . " FROM {context} c WHERE c.contextlevel <> " . CONTEXT_SYSTEM | 1 |
|
"SELECT MAX(id) FROM {course}" | 1 |
|
"SELECT MAX(id) FROM {course_categories}" | 1 |
|
"SELECT MAX(id) FROM {user} WHERE deleted=0" | 1 |
|
"SELECT u.* FROM {user} u {$sqljoin->joins} WHERE {$sqljoin->wheres}" | 1 |
|
'Select options' | 1 |
|
"SELECT filename FROM {files} f WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = :itemid AND f.filepath = :filepath AND $filenamelikesql ORDER BY $filenamelen DESC, f.filename DESC" | 1 |
|
"SELECT filepath FROM {files} f WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = :itemid AND f.filename = :filename AND $filepathlikesql ORDER BY $filepathlen DESC, f.filepath DESC" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE f.pathnamehash = ?" | 1 |
|
"SELECT 'x' FROM {files} WHERE $where AND filename <> '.'" | 1 |
|
"SELECT 'x' FROM {files} WHERE $where AND (filename <> '.' OR filepath <> '/')" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE r.repositoryid = ?" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE f.contextid = :contextid AND f.component = :component AND f.filearea $areasql $includedirssql $updatedsincesql $itemidsql" | 1 |
|
"SELECT itemid, MAX(f.timemodified) AS timemodified FROM {files} f WHERE component = :component AND filearea = :filearea AND contextid = :contextid $updatedsincesql GROUP BY itemid ORDER BY MAX(f.timemodified) DESC" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = :itemid AND " . $DB->sql_substr("f.filepath", 1, $length) . " = :filepath AND f.id <> :dirid $dirs $orderby" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = :itemid AND f.filename = '.' AND " . $DB->sql_substr("f.filepath", 1, $length) . " = :filepath AND f.id <> :dirid $orderby" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = :itemid AND f.filepath = :filepath AND f.filename <> '.' $orderby" | 1 |
|
"SELECT $select FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id JOIN {context} c ON f.contextid = c.id WHERE c.contextlevel <> :contextlevel AND f.filename <> :directory AND " . $like . "" | 1 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f JOIN {files_reference} r ON f.referencefileid = r.id JOIN {repository_instances} ri ON r.repositoryid = ri.id WHERE r.referencehash = ? AND (f.component <> ? OR f.filearea <> ?)" | 1 |
|
"SELECT COUNT(f.id) FROM {files} f JOIN {files_reference} r ON f.referencefileid = r.id JOIN {repository_instances} ri ON r.repositoryid = ri.id WHERE r.referencehash = ? AND (f.component <> ? OR f.filearea <> ?)" | 1 |
|
"SELECT repositoryid, id FROM {files_reference} WHERE referencehash = ?" | 1 |
|
"SELECT * FROM {files} WHERE component = 'user' AND filearea = 'draft' AND filepath = '/' AND filename = '.' AND timecreated < :old" | 1 |
|
"SELECT p.* FROM {files} p LEFT JOIN {files} o ON (p.filename = o.contenthash) WHERE p.contextid = ? AND p.component = 'core' AND (p.filearea = 'preview' OR p.filearea = 'documentconversion') AND p.itemid = 0 AND o.id IS NULL" | 1 |
|
"SELECT DISTINCT f.contextid FROM {files} f LEFT OUTER JOIN {context} c ON f.contextid = c.id WHERE c.id IS NULL" | 1 |
|
'UPDATE {files} SET contenthash = :contenthash, filesize = :filesize, status = :status ' . ($timemodified ? ', timemodified = :timemodified' : '') . ' WHERE referencefileid = :referencefileid' | 1 |
|
<<<EOF SELECT id FROM {course_categories} WHERE idnumber = :idnumber OR name = :name EOF | 1 |
|
<<<EOF SELECT id FROM {course} WHERE idnumber = :idnumber OR shortname = :shortname OR fullname = :fullname EOF | 1 |
|
<<<EOF SELECT {$courseselect}, cm.id as cmid FROM {$cmfrom} INNER JOIN {$coursefrom} ON c.id = cm.course WHERE cm.idnumber = :idnumber EOF | 1 |
|
<<<EOF SELECT id FROM {user} WHERE username = :username OR email = :email EOF | 1 |
|
"SELECT s.* FROM {tool_customlang} s JOIN {tool_customlang_components} c ON s.componentid = c.id WHERE c.name = ? AND s.lang = ? AND s.stringid = ?" | 1 |
|
"SELECT COUNT(*) FROM {grade_grades} g LEFT JOIN " . "{user} u ON g.userid = u.id $groupsql WHERE itemid = :itemid AND hidden = 1 $groupwheresql" | 1 |
|
"UPDATE {grade_items} SET sortorder = sortorder + 1 WHERE sortorder > ? AND courseid = ?" | 1 |
|
"SELECT DISTINCT g1.id, g1.courseid, g1.sortorder FROM {grade_items} g1 JOIN {grade_items} g2 ON g1.courseid = g2.courseid WHERE g1.sortorder = g2.sortorder AND g1.id != g2.id AND g1.courseid = :courseid ORDER BY g1.sortorder DESC, g1.id DESC" | 1 |
|
"UPDATE {grade_items} SET sortorder = sortorder + 1 WHERE courseid = :courseid AND (sortorder > :sortorder OR (sortorder = :sortorder2 AND id > :id))" | 1 |
|
"SELECT gi.id FROM {grade_items} gi WHERE $gtypes AND gi.categoryid = ? AND gi.courseid = ? $outcomes_sql UNION SELECT gi.id FROM {grade_items} gi, {grade_categories} gc WHERE (gi.itemtype = 'category' OR gi.itemtype = 'course') AND gi.iteminstance=gc.id AND gc.parent = ? AND gi.courseid = ? AND $gtypes $outcomes_sql" | 1 |
|
"SELECT gg.userid FROM {grade_grades} gg JOIN {grade_items} gi ON (gi.id = gg.itemid AND gi.courseid = :gicourseid) GROUP BY gg.userid HAVING SUM(CASE WHEN gg.itemid = :ggitemid THEN 1 ELSE 0 END) = 0" | 1 |
|
"SELECT $fields FROM {grade_grades} g, {grade_items} gi WHERE gi.id = g.itemid AND gi.id $usql $usersql AND gi.courseid=? ORDER BY g.userid" | 1 |
|
"SELECT gi.* FROM {grade_items} gi WHERE gi.id $usql and gi.courseid=?" | 1 |
|
"SELECT go.* FROM {grade_outcomes} go, {grade_outcomes_courses} goc WHERE go.id = goc.outcomeid AND goc.courseid = ? ORDER BY go.id ASC" | 1 |
|
"SELECT finalgrade $selectadd FROM {grade_grades}, {grade_items}, {grade_outcomes} WHERE {grade_outcomes}.id = {grade_items}.outcomeid AND {grade_items}.id = {grade_grades}.itemid AND {grade_outcomes}.id = ? $wheresql" | 1 |
|
"SELECT COUNT(id) FROM {grade_items} WHERE scaleid = ? AND outcomeid IS NULL" | 1 |
|
"SELECT COUNT(id) FROM {grade_outcomes} WHERE scaleid = ?" | 1 |
|
"SELECT $fields FROM {grade_grades} g, {grade_items} gi WHERE gi.id = g.itemid AND gi.id $usql $usersql ORDER BY g.userid" | 1 |
|
"SELECT itemid FROM {grade_grades} WHERE itemid $ggsql AND userid = :userid" | 1 |
|
"SELECT gi.id, gg.aggregationstatus, gg.aggregationweight FROM {grade_grades} gg JOIN {grade_items} gi ON (gg.itemid = gi.id) WHERE gg.userid = :userid" | 1 |
|
"UPDATE {grade_grades} SET aggregationstatus = 'unknown', aggregationweight = 0 WHERE itemid $itemsql AND userid = :userid" | 1 |
|
"UPDATE {grade_grades} SET aggregationstatus = 'used', aggregationweight = :contribution WHERE itemid = :itemid AND userid = :userid" | 1 |
|
"UPDATE {grade_grades} SET aggregationstatus = 'novalue', aggregationweight = 0 WHERE itemid $itemsql AND userid = :userid" | 1 |
|
"UPDATE {grade_grades} SET aggregationstatus = 'dropped', aggregationweight = 0 WHERE itemid $itemsql AND userid = :userid" | 1 |
|
"UPDATE {grade_items} SET needsupdate=? WHERE itemtype=? or itemtype=?" | 1 |
|
"SELECT g.* FROM {grade_grades} g JOIN {grade_items} gi ON gi.id = g.itemid WHERE g.userid = :userid AND gi.courseid = :courseid" | 1 |
|
"SELECT courseid, sortorder FROM {grade_items} WHERE courseid = :courseid GROUP BY courseid, sortorder HAVING COUNT(id) > 1" | 1 |
|
"SELECT sortorder from {grade_items} WHERE courseid=? ORDER BY id" | 1 |
|
"SELECT t.name FROM sys.identity_columns i JOIN sys.tables t ON t.object_id = i.object_id WHERE t.name LIKE ? AND i.name = 'id' AND i.last_value IS NULL" | 1 |
|
"SELECT sequence_name FROM user_sequences WHERE last_number = 1 AND sequence_name $seqs" | 1 |
|
"SELECT sequence_name, last_number FROM user_sequences WHERE sequence_name $seqs" | 1 |
|
'SELECT MAX(sortorder) FROM {user_info_category}' | 1 |
|
'SELECT MAX(sortorder) FROM {user_info_field} WHERE categoryid = ?' | 1 |
|
"UPDATE {$prefix}user SET username = username || '_test'" | 1 |
|
"UPDATE {$prefix}user SET {$prefix}username = username || '_test'" | 1 |
|
"UPDATE {$prefix}user{$prefix} SET username = username || '_test'" | 1 |
|
'Update table with a numeric name' | 1 |
|
"UPDATE {$prefix}example42 SET username = username || '_test'" | 1 |
|
'Insert in table' | 1 |
|
"INSERT INTO {$prefix}user (username,password) VALUES ('moodle', 'test')" | 1 |
|
"SELECT ctx.id FROM {xapi_states} xs JOIN {context} ctx ON ctx.id = xs.itemid WHERE xs.userid = :userid AND xs.component = :component" | 1 |
|
"SELECT xs.userid FROM {xapi_states} xs JOIN {context} ctx ON ctx.id = xs.itemid WHERE ctx.id = :contextid AND xs.component = :component" | 1 |
|
'Update existing state' | 1 |
|
'Update existing state (change statedata)' | 1 |
|
"SELECT $fields FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id) AND (ctx.contextlevel = :contextlevel1) WHERE c.category = :categoryid" | 1 |
|
"SELECT $fields FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id) AND (ctx.contextlevel = :contextlevel2) WHERE (" . implode(' OR ', $orcond) . ")" | 1 |
|
"SELECT * FROM (($sql1) UNION ($sql2)) d ORDER BY d.sortorder" | 1 |
|
'SELECT ' . $fields . ' FROM {course_categories} c LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel) WHERE c.parent = :parent ORDER BY c.sortorder' | 1 |
|
"SELECT filepath, filename FROM {files} f WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = :itemid AND " . $DB->sql_substr("f.filepath", 1, $length) . " = :filepath AND filename <> '.' " | 1 |
|
"SELECT " . $DB->sql_concat('f.component', "'_'", 'f.filearea') . " FROM {files} f WHERE f.filename <> :emptyfilename AND f.contextid = :contextid " | 1 |
|
"SELECT DISTINCT cs.id FROM {files} f, {course_sections} cs WHERE cs.course = :courseid AND f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = cs.id AND f.filename <> :emptyfilename" | 1 |
|
"SELECT DISTINCT cs.id AS sectionid FROM {files} f, {course_sections} cs WHERE cs.course = :courseid AND f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND f.itemid = cs.id AND f.filename <> :emptyfilename" | 1 |
|
'SELECT 1 from {files} WHERE contextid = :contextid AND filename <> :emptyfilename AND component = :component AND filearea = :filearea ' . $sql2 | 1 |
|
'SELECT COUNT(u.id) as num FROM {user} u LEFT JOIN {badge_issued} bi ON u.id = bi.userid AND bi.badgeid = :badgeid WHERE bi.badgeid IS NULL AND u.id != :guestid AND u.deleted = 0' | 1 |
|
'Update the start day (but not time) for an event.' | 1 |
|
'Delete calendar events' | 1 |
|
'Delete the calendar subscription' | 1 |
|
'Update the course completion status for the current user (if course self-completion is enabled).' | 1 |
|
'Update completion status for the current user in an activity, only for activities with manual tracking.' | 1 |
|
'Update completion status for a user in an activity by overriding it.' | 1 |
|
'Delete course categories' | 1 |
|
'Update course contents.' | 1 |
|
'Update categories' | 1 |
|
'Update courses' | 1 |
|
'Delete the indicated files (or directories) from a user draft file area.' | 1 |
|
'Update a grade item and associated student grades.' | 1 |
|
'Delete notes' | 1 |
|
'Update notes' | 1 |
|
'Update the flag state of a question attempt.' | 1 |
|
'Delete users.' | 1 |
|
'Update users.' | 1 |
|
'Update a user\'s preferences' | 1 |
|
'Update or delete the user picture in the site' | 1 |
|
'Delete a competency framework.' | 1 |
|
'Update a competency framework.' | 1 |
|
'Delete a competency.' | 1 |
|
'Update a competency.' | 1 |
|
'Delete a learning plan template.' | 1 |
|
'Update a learning plan template.' | 1 |
|
'Delete a learning plan.' | 1 |
|
'Delete an evidence of prior learning.' | 1 |
|
'Delete an evidence of prior learning relationship with a competency.' | 1 |
|
'Update the course competency settings' | 1 |
|
'Delete an evidence' | 1 |
|
'Delete an xAPI state data from an activityId.' | 1 |
|
'Delete all xAPI state data from an activityId.' | 1 |
|
'Delete a content from the content bank.' | 1 |
|
'Delete report' | 1 |
|
'Delete column from report' | 1 |
|
'Delete condition from report' | 1 |
|
'Delete filter from report' | 1 |
|
'Delete audience from report' | 1 |
|
'Delete schedule from report' | 1 |
|
"SELECT preset.* FROM {adminpresets} preset INNER JOIN {adminpresets_it} it ON preset.id = it.adminpresetid WHERE it.name = :name AND it.value = :value AND preset.iscore > 0" | 1 |
|
'UPDATE {external_tokens} SET name = ' . $DB->sql_concat("'" . get_string('tokennameprefix', 'webservice', '') . "'", "id") | 1 |
|
" SELECT MIN(id) AS id, reportid, uniqueidentifier, iscondition FROM {reportbuilder_filter} GROUP BY reportid, uniqueidentifier, iscondition HAVING COUNT(*) > 1" | 1 |
|
"SELECT id FROM {user} WHERE " . $DB->sql_length('password') . " = 32 AND $condition" | 1 |
|
<<<EOF SELECT comm.id, c.id AS contextid FROM {communication} comm INNER JOIN {context} c ON c.instanceid = comm.instanceid AND c.contextlevel = :contextcourse WHERE comm.contextid IS NULL AND comm.instancetype = :instancetype EOF | 1 |
|
' UPDATE {task_adhoc} SET attemptsavailable = CASE WHEN faildelay = 0 THEN 1 WHEN faildelay > 0 THEN 0 END ' | 1 |
|
"SELECT qsr.* FROM {question_set_references} qsr WHERE $sqllike" | 1 |
|
" UPDATE {reportbuilder_column} SET aggregation = NULL WHERE " . $DB->sql_like('uniqueidentifier', ':uniqueidentifier', false) . " AND aggregation IN ('avg', 'max', 'min', 'sum') " | 1 |
|
"SHOW FULL TABLES LIKE '$patprefix%'" | 1 |
|
"SELECT DISTINCT gc.courseid FROM {grade_categories} gc INNER JOIN {grade_items} gi ON gc.id = gi.categoryid AND gi.weightoverride = :weightoverriden INNER JOIN {grade_items} gie ON gc.id = gie.categoryid AND gie.aggregationcoef = :extracredit WHERE gc.aggregation = :naturalaggmethod" . ($onlycourseid ? " AND gc.courseid = :onlycourseid" : '') | 1 |
|
"SELECT ns.id FROM ( SELECT c.id, coalesce(" . $DB->sql_compare_text('gs.value') . ", :siteminmax) AS gradevalue FROM {course} c LEFT JOIN {grade_settings} gs ON c.id = gs.courseid AND ((gs.name = 'minmaxtouse' AND " . $DB->sql_compare_text('gs.value') . " = '2')) ) ns WHERE " . $DB->sql_compare_text('ns.gradevalue') . " = '2' $singlecoursesql" | 1 |
|
"SELECT DISTINCT courseid FROM {grade_items} WHERE calculation IS NOT NULL AND itemtype = 'manual' AND (grademax <> 100 OR grademin <> 0) AND courseid $sql" | 1 |
|
"SELECT id FROM {grade_items} WHERE itemtype = 'category' AND calculation IS NOT NULL $singlecoursesql" | 1 |
|
"SELECT DISTINCT gi.courseid FROM {grade_grades} gg, {grade_items} gi WHERE gi.id = gg.itemid AND (gg.rawgrademax <> gi.grademax OR gg.rawgrademin <> gi.grademin) AND gi.id $sql" | 1 |
|
"SELECT DISTINCT c.id AS courseid FROM {course} c JOIN {grade_items} gi ON c.id = gi.courseid JOIN {context} ctx ON ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel LEFT JOIN {grade_settings} gs ON gs.courseid = c.id AND gs.name = 'displaytype' LEFT JOIN {grade_settings} gss ON gss.courseid = c.id AND gss.name = 'report_user_showlettergrade' LEFT JOIN {grade_letters} gl ON gl.contextid = ctx.id WHERE gi.display = 0 AND ((gs.value is NULL) AND ($lettercolumnsql)) AND gl.id is NULL $coursesql" | 1 |
|
"SELECT DISTINCT c.id AS courseid, $contextselect FROM {course} c JOIN {context} ctx ON ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel JOIN {grade_items} gi ON c.id = gi.courseid LEFT JOIN {grade_settings} gs ON c.id = gs.courseid AND gs.name = 'displaytype' LEFT JOIN {grade_settings} gss ON gss.courseid = c.id AND gss.name = 'report_user_showlettergrade' WHERE ( -- A grade item is using letters (gi.display IN (3, 13, 23, 31, 32)) -- OR the course is using letters OR (" . $DB->sql_compare_text('gs.value') . " IN ('3', '13', '23', '31', '32') -- OR the course using the system default which is letters OR (gs.value IS NULL AND $systemusesletters = 1) ) OR ($lettercolumnsql) ) -- AND the course matches $coursesql" | 1 |
|
"SELECT f.id, f.contextid, f.component, f.filearea, f.itemid, fr.id AS referencefileid FROM {files} f JOIN {files_reference} fr ON f.referencefileid = fr.id LEFT JOIN {repository_instances} ri ON fr.repositoryid = ri.id WHERE ri.id IS NULL" | 1 |
|
" SELECT DISTINCT version FROM {upgrade_log} WHERE plugin = 'core' AND version " . $insql . " ORDER BY version" | 1 |
|
" SELECT ##group## AS groupname, COUNT(1) AS count FROM {event} WHERE ##groupconditions## GROUP BY ##group##" | 1 |
|
" SELECT DISTINCT eventtype, courseid FROM {event} WHERE {$info->sql}" | 1 |
|
" SELECT DISTINCT subscriptionid AS id FROM {event} WHERE {$info->sql}" | 1 |
|
" SELECT DISTINCT modulename, instance, courseid FROM {event} WHERE {$info->sql}" | 1 |
|
" SELECT DISTINCT modulename, instance FROM {event} WHERE {$info->sql}" | 1 |
|
<<<EOF INSERT INTO {block_instances} ( blockname, parentcontextid, showinsubcontexts, pagetypepattern, subpagepattern, defaultregion, defaultweight, timecreated, timemodified ) SELECT :selectblockname AS blockname, c.id AS parentcontextid, 0 AS showinsubcontexts, :selectpagetypepattern AS pagetypepattern, mp.id AS subpagepattern, :selectdefaultregion AS defaultregion, 0 AS defaultweight, :selecttimecreated AS timecreated, :selecttimemodified AS timemodified FROM {my_pages} mp JOIN {context} c ON c.instanceid = mp.userid AND c.contextlevel = :contextuser WHERE mp.id NOT IN ( SELECT mpi.id FROM {my_pages} mpi JOIN {block_instances} bi ON bi.blockname = :blockname AND bi.subpagepattern IS NOT NULL AND {$subpageempty} AND bi.pagetypepattern = :pagetypepattern AND {$subpagepattern} = mpi.id ) AND mp.private = 1 AND mp.name = :pagename EOF | 1 |
|
<<<EOF UPDATE {block_instances} SET defaultregion = :newdefaultregion WHERE id IN ( SELECT * FROM ( SELECT bi.id FROM {my_pages} mp JOIN {block_instances} bi ON bi.blockname = :blockname AND bi.subpagepattern IS NOT NULL AND {$subpageempty} AND bi.pagetypepattern = :pagetypepattern AND {$subpagepattern} = mp.id WHERE mp.private = 1 AND mp.name = :pagename AND bi.defaultregion <> :existingnewdefaultregion ) bid ) EOF | 1 |
|
<<<EOF SELECT c.id AS cid FROM {context} c JOIN {block_instances} bi ON bi.id = c.instanceid AND c.contextlevel = :contextlevel WHERE {$instanceselect} EOF | 1 |
|
<<<EOF SELECT bp.id AS bpid FROM {block_positions} bp JOIN {block_instances} bi ON bi.id = bp.blockinstanceid WHERE {$instanceselect} EOF | 1 |
|
<<<EOF SELECT p.id AS pid FROM {user_preferences} p JOIN {block_instances} bi ON p.name IN ({$blockhidden}, {$blockdocked}) WHERE {$instanceselect} EOF | 1 |
|
<<<EOF SELECT bi.id AS bid FROM {block_instances} bi WHERE {$instanceselect} EOF | 1 |
|
<<<EOF INSERT INTO {block_instance_context} ( instanceid, contextid ) SELECT bi.id as instanceid, c.id as contextid FROM {my_pages} mp JOIN {context} c ON c.instanceid = mp.userid AND c.contextlevel = :contextuser JOIN {block_instances} bi ON bi.blockname = :blockname AND bi.subpagepattern IS NOT NULL AND {$subpageempty} AND bi.pagetypepattern = :pagetypepattern AND {$subpagepattern} = mp.id WHERE mp.name = :pagename AND bi.parentcontextid <> c.id EOF | 1 |
|
<<<EOF UPDATE {block_instances} bi, {block_instance_context} bic SET bi.parentcontextid = bic.contextid WHERE bi.id = bic.instanceid EOF | 1 |
|
<<<EOF UPDATE {block_instances} bi SET (bi.parentcontextid) = ( SELECT bic.contextid FROM {block_instance_context} bic WHERE bic.instanceid = bi.id ) WHERE EXISTS ( SELECT 'x' FROM {block_instance_context} bic WHERE bic.instanceid = bi.id ) EOF | 1 |
|
<<<EOF UPDATE {block_instances} SET parentcontextid = bic.contextid FROM {block_instance_context} bic WHERE {block_instances}.id = bic.instanceid EOF | 1 |
|
"SELECT f.id, f2.timecreated FROM {files} f JOIN {files} f2 ON f2.contextid = f.contextid AND f2.filepath = f.filepath AND f2.component = f.component AND f2.filearea = f.filearea AND f2.itemid = f.itemid AND f2.filename = '.' WHERE f2.timecreated > f.timecreated" | 1 |
|
" SELECT c.*, $contextselect FROM {course} c JOIN {context} x ON x.instanceid = c.id WHERE x.contextlevel = ? AND c.id $listsql" | 1 |
|
" SELECT ctx.id FROM {external_tokens} t JOIN {context} ctx ON ctx.instanceid = t.userid AND ctx.contextlevel = :userlevel WHERE t.userid = :userid1 OR t.creatorid = :userid2" | 1 |
|
" SELECT ctx.id FROM {external_services_users} su JOIN {context} ctx ON ctx.instanceid = su.userid AND ctx.contextlevel = :userlevel WHERE su.userid = :userid" | 1 |
|
" SELECT t.*, s.name as externalservicename FROM {external_tokens} t JOIN {external_services} s ON s.id = t.externalserviceid WHERE t.userid = :userid ORDER BY t.id" | 1 |
|
" SELECT su.*, s.name as externalservicename FROM {external_services_users} su JOIN {external_services} s ON s.id = su.externalserviceid WHERE su.userid = :userid ORDER BY su.id" | 1 |
|
" SELECT t.*, s.name as externalservicename FROM {external_tokens} t JOIN {external_services} s ON s.id = t.externalserviceid WHERE t.userid $insql AND t.creatorid = :userid1 AND t.userid <> :userid2 ORDER BY t.userid, t.id" | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . '.resource_link_pk = rl.resource_link_pk) AND (rl.consumer_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . '.resource_link_pk = rl.resource_link_pk) AND (c.consumer_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . '.resource_link_pk = rl.resource_link_pk) AND (rl.consumer_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . '.resource_link_pk = rl.resource_link_pk) AND (c.consumer_pk = :id))' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'SET primary_resource_link_pk = NULL, share_approved = NULL ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . '.primary_resource_link_pk = rl.resource_link_pk) AND (rl.consumer_pk = :id))' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'SET primary_resource_link_pk = NULL, share_approved = NULL ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . '.primary_resource_link_pk = rl.resource_link_pk) AND (c.consumer_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE consumer_pk = :id' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . '.context_pk = c.context_pk) AND (c.consumer_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' ' . 'WHERE consumer_pk = :id' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . 'WHERE consumer_pk = :id' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . '.resource_link_pk = rl.resource_link_pk) AND (rl.context_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . '.resource_link_pk = rl.resource_link_pk) AND (rl.context_pk = :id))' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'SET primary_resource_link_pk = null, share_approved = null ' . "WHERE EXISTS (SELECT * FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "WHERE ({$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . '.primary_resource_link_pk = rl.resource_link_pk) AND (rl.context_pk = :id))' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE context_pk = :id' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' ' . 'WHERE context_pk = :id' | 1 |
|
'SELECT consumer_pk, name, consumer_key256, consumer_key, secret, lti_version, ' . 'consumer_name, consumer_version, consumer_guid, ' . 'profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . 'WHERE consumer_pk = :id' | 1 |
|
'SELECT consumer_pk, name, consumer_key256, consumer_key, secret, lti_version, ' . 'consumer_name, consumer_version, consumer_guid, ' . 'profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . 'WHERE consumer_key256 = :key256' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' (consumer_key256, consumer_key, name, ' . 'secret, lti_version, consumer_name, consumer_version, consumer_guid, profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated) ' . 'VALUES (:key256, :key, :name, :secret, :lti_version, :consumer_name, :consumer_version, :consumer_guid, :profile, :tool_proxy, :settings, ' . ':protected, :enabled, :enable_from, :enable_until, :last_access, :created, :updated)' | 1 |
|
'UPDATE ' . $this->dbTableNamePrefix . DataConnector::CONSUMER_TABLE_NAME . ' ' . 'SET consumer_key256 = :key256, consumer_key = :key, name = :name, secret = :secret, lti_version = :lti_version, ' . 'consumer_name = :consumer_name, consumer_version = :consumer_version, consumer_guid = :consumer_guid, ' . 'profile = :profile, tool_proxy = :tool_proxy, settings = :settings, ' . 'protected = :protected, enabled = :enabled, enable_from = :enable_from, enable_until = :enable_until, last_access = :last_access, updated = :updated ' . 'WHERE consumer_pk = :id' | 1 |
|
'DELETE sk ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' sk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON sk.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.consumer_pk = :id' | 1 |
|
'DELETE sk ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' sk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON sk.resource_link_pk = rl.resource_link_pk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'WHERE c.consumer_pk = :id' | 1 |
|
'DELETE u ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.consumer_pk = :id' | 1 |
|
'DELETE u ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON u.resource_link_pk = rl.resource_link_pk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'WHERE c.consumer_pk = :id' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' prl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON prl.primary_resource_link_pk = rl.resource_link_pk ' . 'SET prl.primary_resource_link_pk = NULL, prl.share_approved = NULL ' . 'WHERE rl.consumer_pk = :id' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' prl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON prl.primary_resource_link_pk = rl.resource_link_pk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'SET prl.primary_resource_link_pk = NULL, prl.share_approved = NULL ' . 'WHERE c.consumer_pk = :id' | 1 |
|
'DELETE rl ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . 'WHERE rl.consumer_pk = :id' | 1 |
|
'DELETE rl ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'WHERE c.consumer_pk = :id' | 1 |
|
'DELETE c ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ' . 'WHERE c.consumer_pk = :id' | 1 |
|
'DELETE c ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' c ' . 'WHERE c.consumer_pk = :id' | 1 |
|
'SELECT consumer_pk, name, consumer_key256, consumer_key, secret, lti_version, ' . 'consumer_name, consumer_version, consumer_guid, ' . 'profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . 'ORDER BY name' | 1 |
|
'SELECT context_pk, consumer_pk, lti_context_id, type, settings, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' ' . 'WHERE (context_pk = :id)' | 1 |
|
'SELECT context_pk, consumer_pk, lti_context_id, type, settings, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' ' . 'WHERE (consumer_pk = :cid) AND (lti_context_id = :ctx)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' (consumer_pk, lti_context_id, ' . 'type, settings, created, updated) ' . 'VALUES (:cid, :ctx, :type, :settings, :created, :updated)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' SET ' . 'lti_context_id = :ctx, type = :type, settings = :settings, ' . 'updated = :updated ' . 'WHERE (consumer_pk = :cid) AND (context_pk = :ctxid)' | 1 |
|
'DELETE sk ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' sk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON sk.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.context_pk = :id' | 1 |
|
'DELETE u ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.context_pk = :id' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' prl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON prl.primary_resource_link_pk = rl.resource_link_pk ' . 'SET prl.primary_resource_link_pk = null, prl.share_approved = null ' . 'WHERE rl.context_pk = :id' | 1 |
|
'DELETE rl ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . 'WHERE rl.context_pk = :id' | 1 |
|
'DELETE c ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ' . 'WHERE c.context_pk = :id' | 1 |
|
'SELECT resource_link_pk, context_pk, consumer_pk, lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = :id)' | 1 |
|
'SELECT resource_link_pk, context_pk, consumer_pk, lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (context_pk = :id) AND (lti_resource_link_id = :rlid)' | 1 |
|
'SELECT r.resource_link_pk, r.context_pk, r.consumer_pk, r.lti_resource_link_id, r.settings, r.primary_resource_link_pk, r.share_approved, r.created, r.updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' r LEFT OUTER JOIN ' . $this->dbTableNamePrefix . DataConnector::CONTEXT_TABLE_NAME . ' c ON r.context_pk = c.context_pk ' . ' WHERE ((r.consumer_pk = :id1) OR (c.consumer_pk = :id2)) AND (lti_resource_link_id = :rlid)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' (consumer_pk, context_pk, ' . 'lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated) ' . 'VALUES (:cid, :ctx, :rlid, :settings, :prlid, :share_approved, :created, :updated)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' SET ' . 'consumer_pk = NULL, context_pk = :ctx, lti_resource_link_id = :rlid, settings = :settings, ' . 'primary_resource_link_pk = :prlid, share_approved = :share_approved, updated = :updated ' . 'WHERE (resource_link_pk = :id)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' SET ' . 'context_pk = :ctx, lti_resource_link_id = :rlid, settings = :settings, ' . 'primary_resource_link_pk = :prlid, share_approved = :share_approved, updated = :updated ' . 'WHERE (consumer_pk = :cid) AND (resource_link_pk = :id)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = :id)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = :id)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'SET primary_resource_link_pk = NULL ' . 'WHERE (primary_resource_link_pk = :id)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = :id)' | 1 |
|
'SELECT u.user_pk, u.lti_result_sourcedid, u.lti_user_id, u.created, u.updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' AS u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' AS rl ' . 'ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE (rl.resource_link_pk = :id) AND (rl.primary_resource_link_pk IS NULL)' | 1 |
|
'SELECT u.user_pk, u.lti_result_sourcedid, u.lti_user_id, u.created, u.updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' AS u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' AS rl ' . 'ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE ((rl.resource_link_pk = :id) AND (rl.primary_resource_link_pk IS NULL)) OR ' . '((rl.primary_resource_link_pk = :pid) AND (share_approved = 1))' | 1 |
|
'SELECT consumer_pk, resource_link_pk, share_approved ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (primary_resource_link_pk = :id) ' . 'ORDER BY consumer_pk' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . ' WHERE expires <= :now' | 1 |
|
"SELECT value T FROM {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . ' WHERE (consumer_pk = :id) AND (value = :value)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . ' (consumer_pk, value, expires) VALUES (:id, :value, :expires)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' WHERE expires <= :now' | 1 |
|
'SELECT resource_link_pk, auto_approve, expires ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . 'WHERE share_key_id = :id' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . '(share_key_id, resource_link_pk, auto_approve, expires) ' . 'VALUES (:id, :prlid, :approve, :expires)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' WHERE share_key_id = :id' | 1 |
|
'SELECT user_pk, resource_link_pk, lti_user_id, lti_result_sourcedid, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (user_pk = :id)' | 1 |
|
'SELECT user_pk, resource_link_pk, lti_user_id, lti_result_sourcedid, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = :id) AND (lti_user_id = :uid)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' (resource_link_pk, ' . 'lti_user_id, lti_result_sourcedid, created, updated) ' . 'VALUES (:rlid, :uid, :sourcedid, :created, :updated)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'SET lti_result_sourcedid = :sourcedid, updated = :updated ' . 'WHERE (user_pk = :id)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (user_pk = :id)' | 1 |
|
'SELECT consumer_pk, name, consumer_key256, consumer_key, secret, lti_version, ' . 'consumer_name, consumer_version, consumer_guid, ' . 'profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . "WHERE consumer_pk = %d" | 1 |
|
'SELECT consumer_pk, name, consumer_key256, consumer_key, secret, lti_version, ' . 'consumer_name, consumer_version, consumer_guid, ' . 'profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . "WHERE consumer_key256 = %s" | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' (consumer_key256, consumer_key, name, ' . 'secret, lti_version, consumer_name, consumer_version, consumer_guid, profile, tool_proxy, settings, protected, enabled, ' . 'enable_from, enable_until, last_access, created, updated) ' . 'VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %d, %s, %s, %s, %s, %s)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' SET ' . 'consumer_key256 = %s, consumer_key = %s, ' . 'name = %s, secret= %s, lti_version = %s, consumer_name = %s, consumer_version = %s, consumer_guid = %s, ' . 'profile = %s, tool_proxy = %s, settings = %s, ' . 'protected = %d, enabled = %d, enable_from = %s, enable_until = %s, last_access = %s, updated = %s ' . 'WHERE consumer_pk = %d' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . ' WHERE consumer_pk = %d' | 1 |
|
'DELETE sk ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' sk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON sk.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.consumer_pk = %d' | 1 |
|
'DELETE sk ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' sk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON sk.resource_link_pk = rl.resource_link_pk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'WHERE c.consumer_pk = %d' | 1 |
|
'DELETE u ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.consumer_pk = %d' | 1 |
|
'DELETE u ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON u.resource_link_pk = rl.resource_link_pk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'WHERE c.consumer_pk = %d' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' prl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON prl.primary_resource_link_pk = rl.resource_link_pk ' . 'SET prl.primary_resource_link_pk = NULL, prl.share_approved = NULL ' . 'WHERE rl.consumer_pk = %d' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' prl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON prl.primary_resource_link_pk = rl.resource_link_pk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'SET prl.primary_resource_link_pk = NULL, prl.share_approved = NULL ' . 'WHERE c.consumer_pk = %d' | 1 |
|
'DELETE rl ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . 'WHERE rl.consumer_pk = %d' | 1 |
|
'DELETE rl ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ON rl.context_pk = c.context_pk ' . 'WHERE c.consumer_pk = %d' | 1 |
|
'DELETE c ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ' . 'WHERE c.consumer_pk = %d' | 1 |
|
'DELETE c ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' c ' . 'WHERE c.consumer_pk = %d' | 1 |
|
'SELECT consumer_pk, consumer_key, consumer_key, name, secret, lti_version, consumer_name, consumer_version, consumer_guid, ' . 'profile, tool_proxy, settings, ' . 'protected, enabled, enable_from, enable_until, last_access, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONSUMER_TABLE_NAME . ' ' . 'ORDER BY name' | 1 |
|
'SELECT context_pk, consumer_pk, lti_context_id, type, settings, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' ' . 'WHERE (context_pk = %d)' | 1 |
|
'SELECT context_pk, consumer_pk, lti_context_id, type, settings, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' ' . 'WHERE (consumer_pk = %d) AND (lti_context_id = %s)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' (consumer_pk, lti_context_id, ' . 'type, settings, created, updated) ' . 'VALUES (%d, %s, %s, %s, %s, %s)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' SET ' . 'lti_context_id = %s, type = %s, settings = %s, ' . 'updated = %s' . 'WHERE (consumer_pk = %d) AND (context_pk = %d)' | 1 |
|
'DELETE sk ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' sk ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON sk.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.context_pk = %d' | 1 |
|
'DELETE u ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE rl.context_pk = %d' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' prl ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ON prl.primary_resource_link_pk = rl.resource_link_pk ' . 'SET prl.primary_resource_link_pk = null, prl.share_approved = null ' . 'WHERE rl.context_pk = %d' | 1 |
|
'DELETE rl ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' rl ' . 'WHERE rl.context_pk = %d' | 1 |
|
'DELETE c ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::CONTEXT_TABLE_NAME . ' c ' | 1 |
|
'SELECT resource_link_pk, context_pk, consumer_pk, lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = %d)' | 1 |
|
'SELECT resource_link_pk, context_pk, consumer_pk, lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (context_pk = %d) AND (lti_resource_link_id = %s)' | 1 |
|
'SELECT r.resource_link_pk, r.context_pk, r.consumer_pk, r.lti_resource_link_id, r.settings, r.primary_resource_link_pk, r.share_approved, r.created, r.updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' r LEFT OUTER JOIN ' . $this->dbTableNamePrefix . DataConnector::CONTEXT_TABLE_NAME . ' c ON r.context_pk = c.context_pk ' . ' WHERE ((r.consumer_pk = %d) OR (c.consumer_pk = %d)) AND (lti_resource_link_id = %s)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' (consumer_pk, context_pk, ' . 'lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated) ' . 'VALUES (%s, %s, %s, %s, %s, %s, %s, %s)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' SET ' . 'consumer_pk = %s, lti_resource_link_id = %s, settings = %s, ' . 'primary_resource_link_pk = %s, share_approved = %s, updated = %s ' . 'WHERE (context_pk = %s) AND (resource_link_pk = %d)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' SET ' . 'context_pk = %s, lti_resource_link_id = %s, settings = %s, ' . 'primary_resource_link_pk = %s, share_approved = %s, updated = %s ' . 'WHERE (consumer_pk = %s) AND (resource_link_pk = %d)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = %d)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = %d)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'SET primary_resource_link_pk = NULL ' . 'WHERE (primary_resource_link_pk = %d)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = %s)' | 1 |
|
'SELECT u.user_pk, u.lti_result_sourcedid, u.lti_user_id, u.created, u.updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' AS u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' AS rl ' . 'ON u.resource_link_pk = rl.resource_link_pk ' . "WHERE (rl.resource_link_pk = %d) AND (rl.primary_resource_link_pk IS NULL)" | 1 |
|
'SELECT u.user_pk, u.lti_result_sourcedid, u.lti_user_id, u.created, u.updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' AS u ' . "INNER JOIN {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' AS rl ' . 'ON u.resource_link_pk = rl.resource_link_pk ' . 'WHERE ((rl.resource_link_pk = %d) AND (rl.primary_resource_link_pk IS NULL)) OR ' . '((rl.primary_resource_link_pk = %d) AND (share_approved = 1))' | 1 |
|
'SELECT consumer_pk, resource_link_pk, share_approved ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' . 'WHERE (primary_resource_link_pk = %d) ' . 'ORDER BY consumer_pk' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . " WHERE expires <= '{$now}'" | 1 |
|
"SELECT value AS T FROM {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . ' WHERE (consumer_pk = %d) AND (value = %s)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . " (consumer_pk, value, expires) VALUES (%d, %s, %s)" | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . " WHERE expires <= '{$now}'" | 1 |
|
'SELECT resource_link_pk, auto_approve, expires ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . "WHERE share_key_id = '{$id}'" | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . ' ' . '(share_key_id, resource_link_pk, auto_approve, expires) ' . "VALUES (%s, %d, {$approve}, '{$expires}')" | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME . " WHERE share_key_id = '{$shareKey->getId( )}'" | 1 |
|
'SELECT user_pk, resource_link_pk, lti_user_id, lti_result_sourcedid, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (user_pk = %d)' | 1 |
|
'SELECT user_pk, resource_link_pk, lti_user_id, lti_result_sourcedid, created, updated ' . "FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (resource_link_pk = %d) AND (lti_user_id = %s)' | 1 |
|
"INSERT INTO {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' (resource_link_pk, ' . 'lti_user_id, lti_result_sourcedid, created, updated) ' . 'VALUES (%d, %s, %s, %s, %s)' | 1 |
|
"UPDATE {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'SET lti_result_sourcedid = %s, updated = %s ' . 'WHERE (user_pk = %d)' | 1 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' . 'WHERE (user_pk = %d)' | 1 |
|
"SELECT contextid FROM {editor_atto_autosave} WHERE userid = :userid" | 1 |
|
"SELECT userid FROM {editor_atto_autosave} WHERE contextid = :contextid" | 1 |
|
"SELECT * FROM {editor_atto_autosave} WHERE userid = :userid AND contextid {$contextsql}" | 1 |
|
"SELECT eas.* FROM {editor_atto_autosave} eas JOIN {context} c ON c.id = eas.contextid WHERE c.id {$contextsql} AND c.contextlevel = :contextuser AND c.instanceid = :userid" | 1 |
|
"SELECT * FROM {editor_atto_autosave} WHERE contextid {$contextsql}" | 1 |
|
'Show fewer buttons' | 1 |
|
'Show first (n) groups when collapsed.' | 1 |
|
'Show more buttons' | 1 |
|
'Insert or edit image' | 1 |
|
'Insert emoticon' | 1 |
|
'Update table' | 1 |
|
'Select link' | 1 |
|
'Select image' | 1 |
|
'Insert H5P' | 1 |
|
'Insert or edit an audio/video file' | 1 |
|
'Delete expired autosave drafts' | 1 |
|
"SELECT contextid FROM {tiny_autosave} WHERE userid = :userid" | 1 |
|
"SELECT userid FROM {tiny_autosave} WHERE contextid = :contextid" | 1 |
|
"SELECT * FROM {tiny_autosave} WHERE userid = :userid AND contextid {$contextsql}" | 1 |
|
"SELECT eas.* FROM {tiny_autosave} eas JOIN {context} c ON c.id = eas.contextid WHERE c.id {$contextsql} AND c.contextlevel = :contextuser AND c.instanceid = :userid" | 1 |
|
"SELECT * FROM {tiny_autosave} WHERE contextid {$contextsql}" | 1 |
|
'Update an autosave session' | 1 |
|
'Update link' | 1 |
|
'Select a URL and try again.' | 1 |
|
'Update media' | 1 |
|
'Insert template' | 1 |
|
'Insert column before' | 1 |
|
'Insert date/time' | 1 |
|
'Insert link (if link plugin activated)' | 1 |
|
'Insert row before' | 1 |
|
'Insert table' | 1 |
|
'Insert template...' | 1 |
|
'Insert video' | 1 |
|
'Show blocks' | 1 |
|
'Show caption' | 1 |
|
'Show invisible characters' | 1 |
|
"SELECT ctx.id FROM {context} ctx WHERE ctx.instanceid = :userid AND ctx.contextlevel = :usercontext AND (EXISTS (SELECT 1 FROM {portfolio_instance_user} WHERE userid = :userid1) OR EXISTS (SELECT 1 FROM {portfolio_log} WHERE userid = :userid2)) " | 1 |
|
"SELECT userid FROM {portfolio_instance_user} WHERE userid = ?" | 1 |
|
"SELECT userid FROM {portfolio_log} WHERE userid = ?" | 1 |
|
"SELECT pi.id AS instanceid, pi.name, piu.id AS preferenceid, piu.name AS preference, piu.value, pl.id AS logid, pl.time AS logtime, pl.caller_class, pl.caller_file, pl.caller_component, pl.returnurl, pl.continueurl FROM {portfolio_instance} pi LEFT JOIN {portfolio_instance_user} piu ON piu.instance = pi.id AND piu.userid = :userid1 LEFT JOIN {portfolio_log} pl ON pl.portfolio = pi.id AND pl.userid = :userid2 WHERE piu.id IS NOT NULL OR pl.id IS NOT NULL" | 1 |
|
"SELECT {$sqlfields} FROM {" . self::TABLE . "} c JOIN {files} conversionsourcefile ON conversionsourcefile.id = c.sourcefileid LEFT JOIN {files} conversiondestfile ON conversiondestfile.id = c.destfileid WHERE conversionsourcefile.contenthash = :ccontenthash AND c.targetformat = :cformat AND (c.destfileid IS NULL OR conversiondestfile.id IS NOT NULL)" | 1 |
|
" SELECT c.id FROM {" . self::TABLE . "} c LEFT JOIN {files} f ON f.id = c.sourcefileid WHERE f.id IS NULL" | 1 |
|
"SELECT ctx.id FROM {user_private_key} k JOIN {user} u ON k.userid = u.id JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel WHERE k.userid = :userid AND k.script = :script" | 1 |
|
"SELECT userids.id FROM ($enrolsql) userids WHERE $condition (userids.id $matchsql)" | 1 |
|
" SELECT DISTINCT gm.userid FROM {groups} g JOIN {groups_members} gm ON gm.groupid = g.id WHERE g.courseid = ?" | 1 |
|
"SELECT 1 FROM {groups_members} gm WHERE gm.userid = userids.id AND gm.groupid = " | 1 |
|
"SELECT 1 FROM {groups_members} gm WHERE gm.userid = userids.id AND gm.groupid = " . self::unique_sql_parameter($matchparams, $this->groupid) | 1 |
|
"SELECT 1 FROM {groups_members} gm JOIN {groups} g ON g.id = gm.groupid WHERE gm.userid = userids.id AND g.courseid = " | 1 |
|
"SELECT 1 FROM {groups_members} gm JOIN {groups} g ON g.id = gm.groupid WHERE gm.userid = userids.id AND g.courseid = " . self::unique_sql_parameter($matchparams, $info->get_course( )->id) | 1 |
|
" SELECT DISTINCT gm.userid FROM {groupings_groups} gg JOIN {groups_members} gm ON gm.groupid = gg.groupid WHERE gg.groupingid = ?" | 1 |
|
"SELECT 1 FROM {groups_members} gm JOIN {groupings_groups} gg ON gg.groupid = gm.groupid WHERE gm.userid = userids.id AND gg.groupingid = " | 1 |
|
"SELECT 1 FROM {groups_members} gm JOIN {groupings_groups} gg ON gg.groupid = gm.groupid WHERE gm.userid = userids.id AND gg.groupingid = " . self::unique_sql_parameter($matchparams, $this->get_grouping_id($info)) | 1 |
|
"SELECT userids.id FROM ($enrolsql) userids $tablesql WHERE $where" | 1 |
|
'Select {$a} for bulk action' | 1 |
|
'Select other insights...' | 1 |
|
"SELECT id, timecreated, timemodified, firstip, lastip, sid FROM {sessions} WHERE userid = :userid ORDER BY timemodified DESC" | 1 |
|
"SELECT c.id,c.shortname $ccselect FROM {course} c $ccjoin WHERE c.id " . $coursesql | 1 |
|
" SELECT result.contextid, SUM(numquestions) AS numquestions, SUM(numhidden) AS numhidden, $ctxpreload FROM (SELECT data.contextid, data.versionid, COUNT(data.numquestions) AS numquestions, (SELECT COUNT(qv.id) FROM {question_versions} qv WHERE qv.id = data.versionid AND qv.status = ?) AS numhidden FROM (SELECT qv.id as versionid, qc.contextid, 1 AS numquestions FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid JOIN {context} con ON con.id = qc.contextid $sqlqtypetest AND qv.version = (SELECT MAX(v.version) FROM {question_versions} v JOIN {question_bank_entries} be ON be.id = v.questionbankentryid WHERE be.id = qbe.id) AND (q.parent = 0 OR q.parent = q.id)) data GROUP BY data.contextid, data.versionid) result JOIN {context} con ON con.id = result.contextid GROUP BY result.contextid, $ctxgroupby ORDER BY numquestions DESC, numhidden ASC, con.contextlevel ASC, con.id ASC" | 1 |
|
"SELECT courseid," . $param->fields . " FROM {" . 'stats_' . $param->table . "} WHERE timeend >= $param->timeafter AND stattype = 'activity' AND roleid = 0 GROUP BY courseid $param->extras ORDER BY $param->orderby" | 1 |
|
"SELECT courseid, $param->fields FROM {" . 'stats_' . $param->table . "} WHERE timeend >= $param->timeafter AND stattype = 'activity' AND roleid = 0 GROUP BY courseid $param->extras ORDER BY $param->orderby" | 1 |
|
" SELECT DISTINCT c.id AS id FROM {course} c INNER JOIN {context} con ON con.instanceid = c.id INNER JOIN {role_assignments} ra ON ra.contextid = con.id INNER JOIN {enrol} e ON c.id = e.courseid INNER JOIN {user_enrolments} ue ON e.id = ue.enrolid AND ra.userid = ue.userid AND ra.userid = {$user->id} " | 1 |
|
'SELECT min(time) FROM {log}' | 1 |
|
"SELECT cm.id, COUNT('x') AS numviews, COUNT(DISTINCT userid) AS distinctusers $sqllasttime FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module JOIN {log} l ON l.cmid = cm.id WHERE cm.course = :courseid AND $logactionlike AND m.visible = :visible $limittime GROUP BY cm.id" | 1 |
|
"SELECT contextinstanceid as cmid, COUNT('x') AS numviews, COUNT(DISTINCT userid) AS distinctusers $sqllasttime FROM {" . $logtable . "} l WHERE courseid = :courseid AND anonymous = 0 AND crud = 'r' AND contextlevel = :contextmodule $limittime GROUP BY contextinstanceid" | 1 |
|
'SELECT min(timecreated) FROM {' . $logtable . '}' | 1 |
|
'SELECT DISTINCT userid FROM {infected_files}' | 1 |
|
"SELECT $select FROM {infected_files}" | 1 |
|
"SELECT FLOOR(($timefield - $coursestart)/" . DAYSECS . ") AS day, COUNT(*) AS num FROM {" . $logtable . "} WHERE userid = :userid AND $timefield > $coursestart $courseselect $nonanonymous GROUP BY FLOOR(($timefield - $coursestart)/" . DAYSECS . ")" | 1 |
|
"SELECT FLOOR(($timefield - $daystart)/" . HOURSECS . ") AS hour, COUNT(*) AS num FROM {" . $logtable . "} WHERE userid = :userid AND $timefield > $daystart $courseselect $nonanonymous GROUP BY FLOOR(($timefield - $daystart)/" . HOURSECS . ") " | 1 |
|
"SELECT DISTINCT course, hostid, coursename FROM {mnet_log}" | 1 |
|
"select distinct h.id, h.name from {mnet_host} h, {mnet_log} l where h.id = l.hostid order by h.name" | 1 |
|
"SELECT DISTINCT course, coursename FROM {mnet_log} where hostid = ?" | 1 |
|
"SELECT bc.*, c.id as courseid, c.fullname $select FROM {backup_courses} bc JOIN {course} c ON c.id = bc.courseid $join" | 1 |
|
"SELECT COUNT(DISTINCT(ra.userid)) FROM {role_assignments} ra JOIN {user} u ON u.id = ra.userid $groupsql WHERE ra.contextid $relatedctxsql AND ra.roleid = :roleid" | 1 |
|
"SELECT ra.userid, $usernamefields, u.idnumber, l.actioncount AS count FROM (SELECT DISTINCT userid FROM {role_assignments} WHERE contextid $relatedctxsql AND roleid = :roleid ) ra JOIN {user} u ON u.id = ra.userid $groupsql LEFT JOIN ( SELECT userid, COUNT(action) AS actioncount FROM {log} WHERE cmid = :instanceid AND time > :timefrom " . $actionsql . " GROUP BY userid) l ON (l.userid = ra.userid)" | 1 |
|
"SELECT ra.userid, $usernamefields, u.idnumber, COUNT(DISTINCT l.timecreated) AS count FROM {user} u JOIN {role_assignments} ra ON u.id = ra.userid AND ra.contextid $relatedctxsql AND ra.roleid = :roleid $groupsql LEFT JOIN {" . $logtable . "} l ON l.contextinstanceid = :instanceid AND l.timecreated > :timefrom" . $crudsql . " AND l.edulevel = :edulevel AND l.anonymous = 0 AND l.contextlevel = :contextlevel AND (l.origin = 'web' OR l.origin = 'ws') AND l.userid = ra.userid" | 1 |
|
" SELECT {$param->fields} FROM {stats_{$param->table}} WHERE {$wheresql} {$param->extras} ORDER BY timeend DESC" | 1 |
|
"SELECT $fields $ccselect FROM {course} c $ccjoin $sortstatement" | 1 |
|
"SELECT DISTINCT $fields FROM {stats_user_{$param->table}} s JOIN {user} u ON u.id = s.userid WHERE courseid = :courseid" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {stats_user_daily} sud ON sud.courseid = ctx.instanceid AND sud.userid = :userid WHERE ctx.contextlevel = :contextcourse" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {stats_user_weekly} suw ON suw.courseid = ctx.instanceid AND suw.userid = :userid WHERE ctx.contextlevel = :contextcourse" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {stats_user_monthly} sum ON sum.courseid = ctx.instanceid AND sum.userid = :userid WHERE ctx.contextlevel = :contextcourse" | 1 |
|
"SELECT userid FROM {stats_user_daily} WHERE courseid = :courseid" | 1 |
|
"SELECT userid FROM {stats_user_weekly} WHERE courseid = :courseid" | 1 |
|
"SELECT userid FROM {stats_user_monthly} WHERE courseid = :courseid" | 1 |
|
"SELECT s.id, c.fullname, s.roleid, s.timeend, s.statsreads, s.statswrites, s.stattype, c.id as courseid FROM {" . $table . "} s JOIN {course} c ON s.courseid = c.id WHERE s.userid = :userid AND c.id $insql ORDER BY c.id ASC" | 1 |
|
'update communication' | 1 |
|
'SELECT dc.id AS contentid, dr.id AS recordid, dc.content AS content, d.id AS dataid FROM {data} d JOIN {data_fields} df ON df.dataid = d.id JOIN {data_records} dr ON dr.dataid = d.id JOIN {data_content} dc ON dc.fieldid = df.id AND dc.recordid = dr.id WHERE d.course ' . $coursesql . ' AND df.type = \'text\' AND ' . $DB->sql_compare_text('df.param1', 1) . " = '1'" | 1 |
|
" SELECT cm.*, cp.value AS version, m.name AS modulename, s.id AS sectionid, s.section AS sectionnumber FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module JOIN {config_plugins} cp ON cp.plugin = $concat AND cp.name = 'version' JOIN {course_sections} s ON s.id = cm.section WHERE cm.id = ?" | 1 |
|
"SELECT t.id, t.name, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = 'course_modules' AND ti.component = 'core' AND ti.itemid = ?" | 1 |
|
'SELECT cfo.id, cfo.format, cfo.name, cfo.value FROM {course} c JOIN {course_format_options} cfo ON cfo.courseid = c.id AND cfo.format = c.format WHERE c.id = ? AND cfo.sectionid = ?' | 1 |
|
'SELECT id, format, sectionid, name, value FROM {course_format_options} WHERE courseid = ? AND sectionid = 0' | 1 |
|
"SELECT ue.* FROM {user_enrolments} ue INNER JOIN {role_assignments} ra ON ue.userid = ra.userid WHERE ra.contextid = ? AND ue.enrolid = ? AND ra.roleid $insql" | 1 |
|
"SELECT r.*, rn.name AS nameincourse FROM {role} r JOIN {backup_ids_temp} bi ON r.id = bi.itemid LEFT JOIN {role_names} rn ON r.id = rn.roleid AND rn.contextid = ? WHERE bi.backupid = ? AND bi.itemname = 'rolefinal'" | 1 |
|
"SELECT s.* FROM {scale} s JOIN {backup_ids_temp} bi ON s.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'scalefinal'" | 1 |
|
"SELECT o.* FROM {grade_outcomes} o JOIN {backup_ids_temp} bi ON o.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'outcomefinal'" | 1 |
|
' SELECT * FROM {badge} WHERE courseid = :courseid AND status != ' . BADGE_STATUS_ARCHIVED | 1 |
|
'SELECT cp.*, c.criteriatype FROM {badge_criteria_param} cp JOIN {badge_criteria} c ON cp.critid = c.id WHERE critid = :critid' | 1 |
|
"SELECT * FROM {event} WHERE courseid = :courseid AND (eventtype = 'course' OR eventtype = 'group')" | 1 |
|
"SELECT * FROM {event} WHERE instance = :instance AND type <> :type AND modulename = :modulename" | 1 |
|
"SELECT * FROM {grade_items} WHERE courseid = :courseid AND (itemtype='manual' OR itemtype='course' OR itemtype='category')" | 1 |
|
"SELECT gc.*, gi.sortorder FROM {grade_categories} gc JOIN {grade_items} gi ON (gi.iteminstance = gc.id) WHERE gc.courseid = :courseid AND (gi.itemtype='course' OR gi.itemtype='category') ORDER BY gc.parent ASC" | 1 |
|
"SELECT ggh.* FROM {grade_grades_history} ggh JOIN {grade_items} gi ON ggh.itemid = gi.id WHERE gi.courseid = :courseid AND (gi.itemtype = 'manual' OR gi.itemtype = 'course' OR gi.itemtype = 'category')" | 1 |
|
" SELECT g.* FROM {groups} g JOIN {backup_ids_temp} bi ON g.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'groupfinal'" | 1 |
|
" SELECT g.* FROM {groupings} g JOIN {backup_ids_temp} bi ON g.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'groupingfinal'" | 1 |
|
'SELECT u.*, c.id AS contextid, m.wwwroot AS mnethosturl FROM {user} u JOIN {backup_ids_temp} bi ON bi.itemid = u.id LEFT JOIN {context} c ON c.instanceid = u.id AND c.contextlevel = ' . CONTEXT_USER . ' LEFT JOIN {mnet_host} m ON m.id = u.mnethostid WHERE bi.backupid = ? AND bi.itemname = ?' | 1 |
|
'SELECT f.id, f.shortname, f.datatype, d.data FROM {user_info_field} f JOIN {user_info_data} d ON d.fieldid = f.id WHERE d.userid = ?' | 1 |
|
'SELECT t.id, t.name, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = ? AND ti.itemid = ?' | 1 |
|
' SELECT id, userid, timeaccess FROM {user_lastaccess} WHERE courseid = ?' | 1 |
|
'SELECT s.pushratingstouserplans FROM {' . \core_competency\course_competency_settings::TABLE . '} s WHERE s.courseid = :courseid' | 1 |
|
'SELECT c.id, c.idnumber, cc.ruleoutcome, cc.sortorder, f.id AS frameworkid, f.idnumber AS frameworkidnumber FROM {' . \core_competency\course_competency::TABLE . '} cc JOIN {' . \core_competency\competency::TABLE . '} c ON c.id = cc.competencyid JOIN {' . \core_competency\competency_framework::TABLE . '} f ON f.id = c.competencyframeworkid WHERE cc.courseid = :courseid ORDER BY cc.sortorder' | 1 |
|
'SELECT ucc.userid, ucc.competencyid, ucc.proficiency, ucc.grade FROM {' . \core_competency\user_competency_course::TABLE . '} ucc WHERE ucc.courseid = :courseid AND ucc.grade IS NOT NULL' | 1 |
|
'SELECT c.idnumber, cmc.ruleoutcome, cmc.overridegrade, cmc.sortorder, f.idnumber AS frameworkidnumber FROM {' . \core_competency\course_module_competency::TABLE . '} cmc JOIN {' . \core_competency\competency::TABLE . '} c ON c.id = cmc.competencyid JOIN {' . \core_competency\competency_framework::TABLE . '} f ON f.id = c.competencyframeworkid WHERE cmc.cmid = :coursemoduleid ORDER BY cmc.sortorder' | 1 |
|
" SELECT itemid AS id FROM {backup_ids_temp} WHERE backupid = ? AND itemname = ?" | 1 |
|
"SELECT f.*, r.type AS repositorytype, fr.repositoryid, fr.reference FROM {files} f LEFT JOIN {files_reference} fr ON fr.id = f.referencefileid LEFT JOIN {repository_instances} ri ON ri.id = fr.repositoryid LEFT JOIN {repository} r ON r.id = ri.typeid JOIN {backup_ids_temp} bi ON f.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'filefinal'" | 1 |
|
"SELECT DISTINCT qc.contextid FROM {question_categories} qc JOIN {backup_ids_temp} bi ON bi.itemid = qc.id WHERE bi.backupid = ? AND bi.itemname = 'question_categoryfinal'" | 1 |
|
" SELECT gc.*, contextlevel, instanceid AS contextinstanceid FROM {question_categories} gc JOIN {backup_ids_temp} bi ON bi.itemid = gc.id JOIN {context} co ON co.id = gc.contextid WHERE bi.backupid = ? AND bi.itemname = 'question_categoryfinal'" | 1 |
|
' SELECT q.* FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE qv.id = ?' | 1 |
|
' SELECT * FROM {question_hints} WHERE questionid = :questionid ORDER BY id' | 1 |
|
"SELECT t.id, ti.contextid, t.name, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemid = ? AND ti.itemtype = 'question' AND ti.component = 'core_question'" | 1 |
|
"SELECT gi.* FROM {grade_items} gi JOIN {backup_ids_temp} bi ON gi.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'grade_item'" | 1 |
|
"SELECT ggh.* FROM {grade_grades_history} ggh JOIN {backup_ids_temp} bi ON ggh.itemid = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'grade_item'" | 1 |
|
"SELECT ccc.*, c.shortname AS courseinstanceshortname, r.shortname AS roleshortname FROM {course_completion_criteria} ccc LEFT JOIN {course} c ON c.id = ccc.courseinstance LEFT JOIN {role} r ON r.id = ccc.role WHERE ccc.course = ?" | 1 |
|
"SELECT d.id, m.name as modulename, d.completion, d.completionview, d.completionusegrade, d.completionpassgrade, d.completionexpected, d.customrules FROM {course_completion_defaults} d join {modules} m on d.module = m.id WHERE d.course = ?" | 1 |
|
'SELECT qdd.* FROM {question_dataset_definitions} qdd JOIN {question_datasets} qd ON qd.datasetdefinition = qdd.id WHERE qd.question = ?' | 1 |
|
"SELECT id, itemcount FROM {question_dataset_definitions} WHERE category = ? AND name = ? AND type = ?" | 1 |
|
"SELECT gi.id, gi.calculation FROM {grade_items} gi WHERE gi.id {$sql} AND calculation IS NOT NULL" | 1 |
|
"SELECT gi.id FROM {grade_items} gi JOIN {grade_grades} gg ON gg.itemid = gi.id WHERE gi.courseid = ? AND (gi.itemtype != ? AND gi.itemtype != ?) AND (gg.rawgrademax != gi.grademax OR gg.rawgrademin != gi.grademin)" | 1 |
|
"SELECT * FROM {groups} WHERE courseid = :courseid AND name = :grname $description_clause" | 1 |
|
"SELECT * FROM {groupings} WHERE courseid = :courseid AND name = :grname $description_clause" | 1 |
|
"SELECT * FROM {scale} WHERE courseid IN (0, :courseid) AND $compare_scale_clause ORDER BY courseid" | 1 |
|
'SELECT * FROM {grade_outcomes} WHERE shortname = :shortname AND (courseid = :courseid OR courseid IS NULL) ORDER BY COALESCE(courseid, 0)' | 1 |
|
'SELECT count(*) FROM {backup_files_temp} WHERE backupid = ? AND contextid = ? AND component = ? AND filearea = ?' | 1 |
|
"SELECT DISTINCT br.id, br.badgeid, br.relatedbadgeid FROM {badge_related} br WHERE (br.badgeid = :badgeid)" | 1 |
|
"SELECT id FROM {event} WHERE " . $DB->sql_compare_text('name', 255) . " = " . $DB->sql_compare_text('?', 255) . " AND courseid = ? AND modulename = ? AND instance = ? AND timestart = ? AND timeduration = ? AND " . $DB->sql_compare_text('description', 255) . " = " . $DB->sql_compare_text('?', 255) | 1 |
|
"SELECT ga.areaname FROM {grading_definitions} gd JOIN {grading_areas} ga ON gd.areaid = ga.id WHERE gd.id = ?" | 1 |
|
"SELECT cm.id FROM {course_modules} cm WHERE cm.course = :courseid AND cm.idnumber = :idnumber AND cm.id <> :cmid" | 1 |
|
"SELECT bi.id FROM {block_instances} bi JOIN {block} b ON b.name = bi.blockname WHERE bi.blockname = :blockname AND $contextsql AND bi.pagetypepattern $pagetypepatternsql AND $subpagepatternsql" | 1 |
|
'SELECT id FROM {question_hints} WHERE questionid = ? AND ' . $DB->sql_compare_text('hint', 255) . ' = ' . $DB->sql_compare_text('?', 255) | 1 |
|
"SELECT itemid, newitemid, info FROM {backup_ids_temp} WHERE backupid = ? AND itemname = 'question_category' AND parentitemid = ?" | 1 |
|
"UPDATE {tag_instance} SET contextid = :newcontext WHERE component = :component AND itemtype = :itemtype AND itemid IN (SELECT DISTINCT bi.newitemid as questionid FROM {backup_ids_temp} bi JOIN {question} q ON q.id = bi.newitemid JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE bi.backupid = :backupid AND bi.itemname = 'question_created' AND qbe.questioncategoryid {$categorysql}) " | 1 |
|
"SELECT DISTINCT bi.parentitemid AS categoryid, q.qtype as qtype FROM {backup_ids_temp} bi JOIN {question} q ON q.id = bi.newitemid WHERE bi.backupid = ? AND bi.itemname = 'question_created' ORDER BY categoryid ASC" | 1 |
|
"SELECT ri.id FROM {repository} r JOIN {repository_instances} ri ON ri.typeid = r.id WHERE r.type = ? AND ri.contextid = ?" | 1 |
|
"select ue.id, ue.userid, e.enrol from {user_enrolments} ue join {enrol} e on ue.enrolid = e.id WHERE e.courseid = ?" | 1 |
|
"SELECT COUNT(*) FROM ($countsql) sel" | 1 |
|
" SELECT c.id, c.fullname, c.shortname, c.visible, c.sortorder " | 1 |
|
" SELECT c.id, c.name, c.visible, c.sortorder, c.description, c.descriptionformat " | 1 |
|
"SELECT bc.itemid FROM {backup_controllers} bc, {course} c WHERE bc.operation = 'restore' AND bc.type = 'course' AND bc.itemid = c.id AND bc.itemid = ?" | 1 |
|
"SELECT ctx.id FROM {backup_controllers} bc JOIN {course_sections} c ON bc.itemid = c.id AND bc.type = :type JOIN {context} ctx ON ctx.instanceid = c.course AND ctx.contextlevel = :contextlevel WHERE bc.userid = :userid" | 1 |
|
"SELECT bc.userid FROM {backup_controllers} bc WHERE bc.itemid = :courseid AND bc.type = :typecourse" | 1 |
|
"SELECT bc.userid FROM {backup_controllers} bc JOIN {course_sections} c ON bc.itemid = c.id WHERE c.course = :courseid AND bc.type = :typesection" | 1 |
|
"SELECT bc.userid FROM {backup_controllers} bc WHERE bc.itemid = :cmid AND bc.type = :typeactivity" | 1 |
|
"SELECT bc.* FROM {backup_controllers} bc JOIN {context} ctx ON ctx.instanceid = bc.itemid AND ctx.contextlevel = :contextlevel WHERE ctx.id {$contextsql} AND bc.userid = :userid ORDER BY bc.timecreated ASC" | 1 |
|
"SELECT COUNT(*) FROM {backup_ids_temp} b JOIN {user} u ON u.id = b.itemid WHERE b.backupid = ? AND b.itemname = 'userfinal' AND u.mnethostid != ?" | 1 |
|
"SELECT count(r.repositoryid) FROM {files} f LEFT JOIN {files_reference} r ON r.id = f.referencefileid JOIN {backup_ids_temp} bi ON f.id = bi.itemid WHERE bi.backupid = ? AND bi.itemname = 'filefinal'" | 1 |
|
'SELECT q.id, q.stamp FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE qc.id = ?' | 1 |
|
"SELECT itemid, parentitemid AS contextid, info FROM {backup_ids_temp} WHERE backupid = ? AND itemname = 'question_category'" | 1 |
|
"SELECT itemid, info FROM {backup_ids_temp} WHERE backupid = ? AND itemname = 'question_category' AND parentitemid = ?" | 1 |
|
"SELECT DISTINCT contextid FROM {question_categories} WHERE stamp $stamp_sql AND contextid $context_sql" | 1 |
|
"SELECT itemid, info FROM {backup_ids_temp} WHERE backupid = ? AND itemname = 'question' AND parentitemid = ?" | 1 |
|
"SELECT id AS bftid, contextid, component, filearea, itemid, itemid AS newitemid, info FROM {backup_files_temp} WHERE backupid = ? AND contextid = ? AND component = ? AND filearea = ?" | 1 |
|
"SELECT f.id AS bftid, f.contextid, f.component, f.filearea, f.itemid, i.newitemid, f.info FROM {backup_files_temp} f JOIN {backup_ids_temp} i ON i.backupid = f.backupid $parentitemctxmatchsql AND i.itemid = f.itemid WHERE f.backupid = ? AND f.contextid = ? AND f.component = ? AND f.filearea = ? AND i.itemname = ?" | 1 |
|
"SELECT * FROM {user} u WHERE id = ? AND mnethostid = ? AND deleted = 1 AND ( UPPER(username) LIKE UPPER(?) OR ( " . $DB->sql_isnotempty('user', 'email', false, false) . " AND email = ? ) )" | 1 |
|
"SELECT * FROM {user} u WHERE id = ? AND mnethostid = ? AND " . $DB->sql_substr('UPPER(email)', 1, 89) . " = UPPER(?)" | 1 |
|
"SELECT * FROM {user} u WHERE username = ? AND mnethostid = ? AND ( UPPER(email) = UPPER(?) OR ( firstaccess != 0 AND firstaccess = ? ) )" | 1 |
|
"SELECT * FROM {user} u WHERE mnethostid = ? AND deleted = 1 AND " . $DB->sql_isnotempty('user', 'email', false, false) . " AND email = ? AND ( UPPER(username) LIKE UPPER(?) OR ( firstaccess != 0 AND firstaccess = ? ) )" | 1 |
|
"SELECT * FROM {user} u WHERE mnethostid = ? AND deleted = 1 AND UPPER(username) LIKE UPPER(?) AND firstaccess != 0 AND firstaccess = ?" | 1 |
|
"SELECT * FROM {user} u WHERE mnethostid = ? AND " . $DB->sql_substr('UPPER(email)', 1, 89) . " = UPPER(?) AND firstaccess != 0 AND firstaccess = ?" | 1 |
|
"SELECT * FROM {user} u WHERE username = ? AND mnethostid = ? AND NOT ( UPPER(email) = UPPER(?) OR ( firstaccess != 0 AND firstaccess = ? ) )" | 1 |
|
" SELECT cm.id, m.name AS modname FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module WHERE cm.course = ? AND cm.section = ? AND cm.deletioninprogress <> 1" | 1 |
|
"SELECT count(id) FROM {grade_items} WHERE courseid=:courseid AND itemtype = 'mod' AND id NOT IN ( SELECT bi.itemid FROM {backup_ids_temp} bi WHERE bi.itemname = 'grade_itemfinal' AND bi.backupid = :backupid)" | 1 |
|
'SELECT id FROM {files} WHERE contextid = ? AND component = ?' | 1 |
|
"INSERT INTO {backup_ids_temp} (backupid, itemname, itemid) SELECT ?, 'question_category', id FROM {question_categories} WHERE contextid = ?" | 1 |
|
"SELECT DISTINCT qc2.contextid FROM {question_categories} qc2 JOIN {question_bank_entries} qbe ON qbe.questioncategoryid = qc2.id JOIN {question_versions} qv ON qv.questionbankentryid = qbe.id JOIN {question} q ON q.id = qv.questionid JOIN {backup_ids_temp} bi ON bi.itemid = q.id WHERE bi.backupid = ? AND bi.itemname = 'question' AND qc2.contextid != ?" | 1 |
|
" SELECT DISTINCT qc.contextid FROM {question_categories} qc JOIN {question_set_references} qsr ON qsr.questionscontextid = qc.contextid WHERE qsr.usingcontextid = ?" | 1 |
|
" SELECT DISTINCT qc.contextid FROM {question_categories} qc JOIN {question_bank_entries} qbe ON qbe.questioncategoryid = qc.id JOIN {question_references} qr ON qr.questionbankentryid = qbe.id WHERE qr.usingcontextid =?" | 1 |
|
"INSERT INTO {backup_ids_temp} (backupid, itemname, itemid) SELECT ?, 'question_category', id FROM {question_categories} WHERE contextid $contextssql" | 1 |
|
'SELECT * FROM {forum_discussions} WHERE forum = ?' | 1 |
|
'SELECT * FROM {rating} WHERE itemid = ?' | 1 |
|
'SELECT type AS forumtype, name AS forumname FROM {forum} WHERE id = ?' | 1 |
|
'SELECT COUNT(DISTINCT id) FROM {forum_posts}' | 1 |
|
'SELECT COUNT(DISTINCT userid) FROM {forum_discussions}' | 1 |
|
'SELECT COUNT(DISTINCT userid) FROM {rating}' | 1 |
|
'SELECT backupid, itemid, operation, status, timecreated, purpose FROM {backup_controllers} WHERE userid = ? AND execution = ? AND purpose = ? AND ((operation = ? AND status <> ?) OR (operation = ? AND status NOT ' . $insql . ')) ORDER BY timecreated DESC' | 1 |
|
"SELECT t.id, $fieldslist FROM {" . $this->tablename . "} t JOIN {backup_ids_temp} b ON b.newitemid = t.id WHERE b.backupid = ? AND b.itemname = ?" | 1 |
|
'SELECT c.*, COALESCE(bc.nextstarttime, 1) nextstarttime FROM {course} c LEFT JOIN {backup_courses} bc ON bc.courseid = c.id WHERE bc.nextstarttime IS NULL OR bc.nextstarttime < ? ORDER BY nextstarttime ASC, c.timemodified DESC, c.sortorder' | 1 |
|
'SELECT DISTINCT bc.laststatus, COUNT(bc.courseid) AS statuscount FROM {backup_courses} bc GROUP BY bc.laststatus' | 1 |
|
"SELECT bc.courseid FROM {backup_courses} bc WHERE bc.courseid NOT IN (SELECT c.id FROM {course} c)" | 1 |
|
"SELECT qa.id, qa.answer FROM {question_answers} qa $condition" | 1 |
|
"SELECT hl.id, f.pathnamehash FROM {h5p_libraries} hl LEFT JOIN {files} f ON hl.id = f.itemid AND f.component = ? AND f.filearea = ? AND $sqllike WHERE ((hl.machinename = ? AND hl.majorversion = ? AND hl.minorversion = ?) AND f.filename = ?) ORDER BY hl.patchversion DESC" | 1 |
|
"SELECT DISTINCT f.filename FROM {h5p_libraries} hl LEFT JOIN {files} f ON hl.id = f.itemid AND f.component = ? AND f.filearea = ? AND $filepathsqllike AND $filenamesqllike WHERE hl.machinename = ? AND hl.majorversion = ? AND hl.minorversion = ?" | 1 |
|
"SELECT hl2.id, hl2.machinename as machine_name, hl2.title, hl2.majorversion as major_version, hl2.minorversion AS minor_version, hl2.patchversion as patch_version, '' as has_icon, 0 as restricted, hl2.enabled FROM {h5p_libraries} hl2 LEFT JOIN {h5p_libraries} hl1 ON hl1.machinename = hl2.machinename AND (hl2.majorversion < hl1.majorversion OR (hl2.majorversion = hl1.majorversion AND hl2.minorversion < hl1.minorversion) ) WHERE hl2.runnable = 1 AND hl1.majorversion is null ORDER BY hl2.title" | 1 |
|
"SELECT l.id, l.machinename AS machine_name, l.majorversion AS major_version, l.minorversion AS minor_version, l.patchversion AS patch_version, l.coremajor AS h5p_major_version, l.coreminor AS h5p_minor_version, l.title, l.tutorial, l.example, '' AS summary, '' AS description, '' AS icon, 0 AS created_at, 0 AS updated_at, 0 AS is_recommended, 0 AS popularity, '' AS screenshots, '' AS license, '' AS owner FROM {h5p_libraries} l" | 1 |
|
"SELECT {$filestableselect}, {$libtableselect} FROM {h5p_libraries} h LEFT JOIN {files} f ON h.id = f.itemid AND f.component = ? AND f.filearea = ? AND $sqllike WHERE ($wheresql) AND f.filename = ?" | 1 |
|
'SELECT DISTINCT hcl.h5pid FROM {h5p_contents_libraries} hcl WHERE hcl.libraryid = :libraryid' | 1 |
|
'SELECT * FROM {h5p_libraries} WHERE id IN (SELECT DISTINCT hl.id FROM {h5p_library_dependencies} hld JOIN {h5p_libraries} hl ON hl.id = hld.libraryid WHERE hld.requiredlibraryid = :libraryid)' | 1 |
|
'UPDATE {h5p_libraries} SET tutorial = :tutorial WHERE machinename = :machinename' | 1 |
|
"SELECT l1.id AS library_id, l1.machinename AS machine_name, l1.majorversion AS major_version, l1.minorversion AS minor_version, l1.patchversion AS patch_version, l1.addto AS add_to, l1.preloadedjs AS preloaded_js, l1.preloadedcss AS preloaded_css FROM {h5p_libraries} l1 LEFT JOIN {h5p_libraries} l2 ON l1.machinename = l2.machinename AND (l1.majorversion < l2.majorversion OR (l1.majorversion = l2.majorversion AND l1.minorversion < l2.minorversion)) WHERE l1.addto IS NOT NULL AND l2.machinename IS NULL" | 1 |
|
"SELECT id FROM {h5p_libraries} WHERE machinename = :machinename AND majorversion = :majorversion AND minorversion = :minorversion AND patchversion < :patchversion" | 1 |
|
"SELECT COUNT(distinct c.id) FROM {h5p_libraries} l JOIN {h5p_contents_libraries} cl ON l.id = cl.libraryid JOIN {h5p} c ON cl.h5pid = c.id WHERE l.id = :libraryid" | 1 |
|
'SELECT hl.id, hl.machinename, hl.majorversion, hl.minorversion, hll.dependencytype FROM {h5p_library_dependencies} hll JOIN {h5p_libraries} hl ON hll.requiredlibraryid = hl.id WHERE hll.libraryid = :libraryid ORDER BY hl.id ASC' | 1 |
|
"SELECT hc.id, hc.jsoncontent, hc.displayoptions, hl.id AS libraryid, hl.machinename, hl.title, hl.majorversion, hl.minorversion, hl.fullscreen, hl.embedtypes, hl.semantics, hc.filtered, hc.pathnamehash FROM {h5p} hc JOIN {h5p_libraries} hl ON hl.id = hc.mainlibraryid WHERE hc.id = :h5pid" | 1 |
|
"SELECT hcl.id AS unidepid, hl.id AS library_id, hl.machinename AS machine_name, hl.majorversion AS major_version, hl.minorversion AS minor_version, hl.patchversion AS patch_version, hl.preloadedcss AS preloaded_css, hl.preloadedjs AS preloaded_js, hcl.dropcss AS drop_css, hcl.dependencytype as dependency_type FROM {h5p_contents_libraries} hcl JOIN {h5p_libraries} hl ON hcl.libraryid = hl.id WHERE hcl.h5pid = :h5pid" | 1 |
|
"SELECT COUNT(id) FROM {h5p} WHERE " . $DB->sql_compare_text('filtered') . " IS NULL" | 1 |
|
"SELECT COUNT(id) FROM {h5p} WHERE mainlibraryid = :libraryid {$notinsql}" | 1 |
|
"SELECT h.mainlibraryid, l.machinename, l.majorversion, l.minorversion, COUNT(h.id) AS count FROM {h5p} h LEFT JOIN {h5p_libraries} l ON h.mainlibraryid = l.id GROUP BY h.mainlibraryid, l.machinename, l.majorversion, l.minorversion" | 1 |
|
"SELECT id FROM {h5p_libraries} WHERE machinename = :machinename AND (majorversion > :majorversion1 OR (majorversion = :majorversion2 AND minorversion > :minorversion))" | 1 |
|
'Delete MainLibrary' | 1 |
|
'Delete Library1' | 1 |
|
'Delete Library2' | 1 |
|
'Delete Library3' | 1 |
|
'Delete Library4' | 1 |
|
'Delete Library5' | 1 |
|
'Delete a library without dependencies' | 1 |
|
'Delete unexisting library' | 1 |
|
'update upload' | 1 |
|
'Show label for AT' | 1 |
|
'Insert using' | 1 |
|
'Update available' | 1 |
|
'Select content type' | 1 |
|
'Select a licence to view information about proper usage' | 1 |
|
'Select file to upload' | 1 |
|
'Show instructions' | 1 |
|
'Update to the latest version for an improved experience.' | 1 |
|
"SELECT $fields AS returnkey, a.* FROM {tag_area} a WHERE $sql" | 1 |
|
"SELECT $fields AS returnkey, t.* FROM {tag_coll} t WHERE $sql" | 1 |
|
"SELECT DISTINCT t.tagcollid " . "FROM {tag_instance} ti " . "JOIN {tag} t ON t.id = ti.tagid AND t.tagcollid <> :tagcollid1 " . "WHERE ti.itemtype = :itemtype2 AND ti.component = :component2 " | 1 |
|
"SELECT name, rawname, description, descriptionformat, userid, isstandard, flag, timemodified " . "FROM {tag} WHERE id IN " . "(SELECT r.id " . "FROM {tag_instance} ti " . "JOIN {tag} t ON t.id = ti.tagid AND t.tagcollid <> :tagcollid1 " . "JOIN {tag_instance} tr ON tr.itemtype = 'tag' and tr.component = 'core' AND tr.itemid = t.id " . "JOIN {tag} r ON r.id = tr.tagid " . "LEFT JOIN {tag} re ON re.name = r.name AND re.tagcollid = :tagcollid2 " . "WHERE ti.itemtype = :itemtype2 AND ti.component = :component2 " . " AND re.id IS NULL)" | 1 |
|
"SELECT t.name AS tagname, r.rawname AS relatedtag " . "FROM {tag_instance} ti " . "JOIN {tag} t ON t.id = ti.tagid AND t.tagcollid <> :tagcollid1 " . "JOIN {tag_instance} tr ON t.id = tr.tagid AND tr.itemtype = 'tag' and tr.component = 'core' " . "JOIN {tag} r ON r.id = tr.itemid " . "WHERE ti.itemtype = :itemtype2 AND ti.component = :component2 " . "ORDER BY t.id, tr.ordering " | 1 |
|
"SELECT id, name, rawname, description, descriptionformat, userid, isstandard, flag, timemodified FROM {tag} WHERE id IN (SELECT t.id FROM {tag_instance} ti JOIN {tag} t ON t.id = ti.tagid AND t.tagcollid <> :tagcollid1 LEFT JOIN {tag} tt ON tt.name = t.name AND tt.tagcollid = :tagcollid2 WHERE ti.itemtype = :itemtype2 AND ti.component = :component2 AND tt.id IS NULL)" | 1 |
|
"SELECT DISTINCT t.id, tt.id AS targettagid FROM {tag_instance} ti JOIN {tag} t ON t.id = ti.tagid AND t.tagcollid <> :tagcollid1 JOIN {tag} tt ON tt.name = t.name AND tt.tagcollid = :tagcollid2 WHERE ti.itemtype = :itemtype2 AND ti.component = :component2" | 1 |
|
"SELECT $returnfields FROM {tag} WHERE tagcollid = ? AND name $namesql" | 1 |
|
"SELECT ti.*, t.name, t.rawname, t.isstandard FROM {tag_instance} ti JOIN {tag} t ON ti.tagid = t.id WHERE ti.id {$idsql}" | 1 |
|
"SELECT ti.*, t.name, t.rawname, t.isstandard FROM {tag_instance} ti JOIN {tag} t ON ti.tagid = t.id WHERE ti.component = :component" | 1 |
|
"SELECT ti.id AS taginstanceid, tg.id, tg.isstandard, tg.name, tg.rawname, tg.flag, tg.tagcollid, ti.ordering, ti.contextid AS taginstancecontextid, ti.itemid FROM {tag_instance} ti JOIN {tag} tg ON tg.id = ti.tagid WHERE ti.itemtype = :itemtype AND ti.itemid $idsql " . ($component ? "AND ti.component = :component " : "") . ($tiuserid ? "AND ti.tiuserid = :tiuserid " : "") . (($standardonly == self::STANDARD_ONLY) ? "AND tg.isstandard = 1 " : "") . (($standardonly == self::NOT_STANDARD_ONLY) ? "AND tg.isstandard = 0 " : "") . "ORDER BY ti.ordering ASC, ti.id" | 1 |
|
'SELECT t.*, ti.id AS taginstanceid FROM {tag} t LEFT JOIN {tag_instance} ti ON ti.tagid = t.id AND ti.itemtype = :itemtype ' . $usersql . 'AND ti.itemid = :itemid AND ti.component = :component WHERE t.name = :name AND t.tagcollid = :tagcollid' | 1 |
|
'SELECT MAX(ordering) FROM {tag_instance} ti WHERE ti.itemtype = :itemtype AND ti.itemid = :itemid AND ti.component = :component' . $usersql | 1 |
|
'SELECT t.*, ti.id AS taginstanceid, ti.contextid AS taginstancecontextid, ti.ordering FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id ' . $usersql . ' WHERE t.name = :name AND ti.itemtype = :itemtype AND ti.itemid = :itemid ' . $componentsql | 1 |
|
"UPDATE {tag_instance} SET ordering = ordering - 1 WHERE itemtype = :itemtype AND itemid = :itemid $componentsql $usersql AND ordering > :ordering" | 1 |
|
"SELECT ti.id AS taginstanceid, tg.id, tg.isstandard, tg.name, tg.rawname, tg.flag, tg.tagcollid, ti.ordering, ti.contextid AS taginstancecontextid, ti.itemid FROM {tag} tg INNER JOIN {tag_instance} ti ON tg.id = ti.tagid WHERE tg.id $query AND tg.id <> ? AND tg.tagcollid = ? ORDER BY ti.ordering ASC, ti.id" | 1 |
|
"SELECT it.* FROM {" . $itemtype . "} it INNER JOIN {tag_instance} tt ON it.id = tt.itemid WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid" | 1 |
|
"SELECT COUNT(it.id) FROM {" . $itemtype . "} it INNER JOIN {tag_instance} tt ON it.id = tt.itemid WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid" | 1 |
|
'SELECT 1 FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE t.name = ? AND t.tagcollid = ? AND ti.itemtype = ? AND ti.itemid = ?' | 1 |
|
"DELETE FROM {tag_instance} $select" | 1 |
|
"DELETE FROM {tag_correlation} $select" | 1 |
|
"DELETE FROM {tag} $select" | 1 |
|
'SELECT ti.*, t.name, t.rawname, tim.id AS alreadyhasmaintag ' . 'FROM {tag_instance} ti ' . 'LEFT JOIN {tag} t ON t.id = ti.tagid ' . 'LEFT JOIN {tag_instance} tim ON ti.component = tim.component AND ' . ' ti.itemtype = tim.itemtype AND ti.itemid = tim.itemid AND ' . ' ti.tiuserid = tim.tiuserid AND tim.tagid = :mainid ' . 'WHERE ti.tagid = :tagid' | 1 |
|
"UPDATE {tag_instance} SET ordering = ordering - 1 WHERE itemtype = :itemtype AND itemid = :itemid AND component = :component AND tiuserid = :tiuserid AND ordering > :ordering" | 1 |
|
"SELECT DISTINCT t.id FROM {tag} t JOIN {tag_instance} ti ON t.id = ti.tagid WHERE component = ? AND itemtype = ? AND contextid {$contextsql}" | 1 |
|
"SELECT tt.* FROM ($subsql) tv JOIN {tag} tt ON tt.id = tv.id" | 1 |
|
"SELECT COUNT(tg.id) FROM {tag} tg WHERE tg.tagcollid = :tagcollid" | 1 |
|
" SELECT tg.id, tg.name, tg.rawname, tg.isstandard, tg.flag, tg.timemodified, u.id AS owner, $allusernames, COUNT(ti.id) AS count, tg.tagcollid FROM {tag} tg LEFT JOIN {tag_instance} ti ON ti.tagid = tg.id LEFT JOIN {user} u ON u.id = tg.userid WHERE tagcollid = :tagcollid $where GROUP BY tg.id, tg.name, tg.rawname, tg.isstandard, tg.flag, tg.timemodified, u.id, $allusernames, tg.tagcollid ORDER BY $sort" | 1 |
|
"SELECT c.id,c.visible,c.fullname,c.shortname,c.cacherev, $ctxquery FROM {course} c JOIN {context} ctx ON ctx.contextlevel = ? AND ctx.instanceid=c.id WHERE c.id = ?" | 1 |
|
"SELECT tg.id FROM {tag} tg LEFT OUTER JOIN {tag_instance} ti ON ti.tagid = tg.id WHERE ti.id IS NULL AND tg.isstandard = 0" | 1 |
|
"SELECT tg.id, tg.rawname, tg.name, tg.isstandard, COUNT(ti.id) AS count, tg.flag, tg.tagcollid $fromclause $whereclause GROUP BY tg.id, tg.rawname, tg.name, tg.flag, tg.isstandard, tg.tagcollid ORDER BY count DESC, tg.name ASC" | 1 |
|
"SELECT COUNT(DISTINCT tg.id) $fromclause $whereclause" | 1 |
|
"SELECT c.id FROM {context} c JOIN {tag} t ON t.userid = :userid WHERE contextlevel = :contextlevel" | 1 |
|
"SELECT userid FROM {tag}" | 1 |
|
"SELECT id, userid, tagcollid, name, rawname, isstandard, description, descriptionformat, flag, timemodified FROM {tag} WHERE userid = ?" | 1 |
|
"SELECT ti.*, t.name, t.rawname FROM {tag_instance} ti JOIN {tag} t ON t.id = ti.tagid" | 1 |
|
'DELETE FROM {tag_instance} WHERE tagid in (?,?)' | 1 |
|
'SELECT * FROM {tag_instance}' | 1 |
|
'SELECT * FROM {badge_issued} WHERE %s = ?' | 1 |
|
"SELECT b.id, b.name, b.version, b.language, b.type FROM {badge} b WHERE b.id <> :badgeid AND b.id NOT IN ( SELECT DISTINCT b.id FROM {badge_related} br JOIN {badge} b ON (br.relatedbadgeid = b.id OR br.badgeid = b.id) WHERE (br.badgeid = :badgeid2 OR br.relatedbadgeid = :badgeid3) AND b.id != :badgeid4)" | 1 |
|
'SELECT * FROM {role} WHERE id ' . $usertest | 1 |
|
"SELECT badgeid FROM {badge_criteria_param} cp JOIN {badge_criteria} c ON cp.critid = c.id WHERE c.criteriatype = ? AND cp.name = ?" | 1 |
|
'SELECT b.uniquehash FROM {badge_issued} b INNER JOIN {user} u ON b.userid = u.id WHERE b.badgeid = :badgeid AND u.deleted = 0' | 1 |
|
'SELECT b.userid, b.dateissued, b.uniquehash, u.firstname, u.lastname FROM {badge_issued} b INNER JOIN {user} u ON b.userid = u.id WHERE b.badgeid = :badgeid AND u.deleted = 0' | 1 |
|
"SELECT DISTINCT u.id, bi.badgeid FROM {user} u {$extrajoin} LEFT JOIN {badge_issued} bi ON u.id = bi.userid AND bi.badgeid = :badgeid WHERE bi.badgeid IS NULL AND u.id != :guestid AND u.deleted = 0 " . $extrawhere | 1 |
|
"SELECT DISTINCT u.id FROM {user} u {$extrajoin} JOIN ({$enrolledsql}) je ON je.id = u.id " . $wheresql . $extrawhere | 1 |
|
"SELECT bcm.id, bcm.critid FROM {badge_criteria_met} bcm INNER JOIN {badge_criteria} bc ON bcm.critid = bc.id WHERE bc.badgeid = :badgeid AND bcm.userid = :userid " | 1 |
|
"SELECT DISTINCT b.id FROM {badge_related} br JOIN {badge} b ON (br.relatedbadgeid = b.id OR br.badgeid = b.id) WHERE (br.badgeid = :badgeid OR br.relatedbadgeid = :badgeid2) AND b.id != :badgeid3" | 1 |
|
"SELECT DISTINCT b.id, b.name, b.version, b.language, b.type FROM {badge_related} br JOIN {badge} b ON (br.relatedbadgeid = b.id OR br.badgeid = b.id) WHERE (br.badgeid = :badgeid OR br.relatedbadgeid = :badgeid2) AND b.id != :badgeid3" | 1 |
|
" SELECT ctx.id FROM {badge} b JOIN {context} ctx ON (b.type = :typecourse AND b.courseid = ctx.instanceid AND ctx.contextlevel = :courselevel) OR (b.type = :typesite AND ctx.id = :syscontextid) WHERE b.usermodified = :userid1 OR b.usercreated = :userid2" | 1 |
|
" SELECT ctx.id FROM {badge_manual_award} bma JOIN {context} ctx ON ctx.instanceid = bma.recipientid AND ctx.contextlevel = :userlevel WHERE bma.issuerid = :userid" | 1 |
|
" SELECT ctx.id FROM {context} ctx LEFT JOIN {badge_manual_award} bma ON bma.recipientid = ctx.instanceid LEFT JOIN {badge_issued} bi ON bi.userid = ctx.instanceid LEFT JOIN {badge_criteria_met} bcm ON bcm.userid = ctx.instanceid LEFT JOIN {badge_backpack} bb ON bb.userid = ctx.instanceid WHERE ctx.contextlevel = :userlevel AND ctx.instanceid = :userid AND (bma.id IS NOT NULL OR bi.id IS NOT NULL OR bcm.id IS NOT NULL OR bb.id IS NOT NULL)" | 1 |
|
"SELECT b.usermodified, b.usercreated FROM {badge} b WHERE b.type = :badgetype $extrawhere" | 1 |
|
"SELECT issuerid, recipientid FROM {badge_manual_award} WHERE recipientid = :instanceid" | 1 |
|
"SELECT userid FROM {badge_issued} WHERE userid = :instanceid" | 1 |
|
"SELECT userid FROM {badge_criteria_met} WHERE userid = :instanceid" | 1 |
|
"SELECT userid FROM {badge_backpack} WHERE userid = :instanceid" | 1 |
|
" SELECT b.*, COALESCE(b.courseid, 0) AS normalisedcourseid FROM {badge} b WHERE (b.usermodified = :userid1 OR b.usercreated = :userid2) AND $sqlwhere ORDER BY b.courseid, b.id" | 1 |
|
" SELECT bma.id, bma.recipientid, bma.datemet, b.name, b.courseid, r.id AS roleid, r.name AS rolename, r.shortname AS roleshortname, r.archetype AS rolearchetype, $ctxfields FROM {badge_manual_award} bma JOIN {badge} b ON b.id = bma.badgeid JOIN {role} r ON r.id = bma.issuerrole JOIN {context} ctx ON (COALESCE(b.courseid, 0) > 0 AND ctx.instanceid = b.courseid AND ctx.contextlevel = :courselevel) OR (COALESCE(b.courseid, 0) = 0 AND ctx.id = :syscontextid) WHERE bma.recipientid $insql AND bma.issuerid = :userid ORDER BY bma.recipientid, bma.id" | 1 |
|
" SELECT $uniqueid AS uniqueid, b.id, bi.id AS biid, bi.dateissued, bi.dateexpire, bi.uniquehash, bma.id AS bmaid, bma.datemet, bma.issuerid, bcm.id AS bcmid, c.fullname AS coursename, be.id AS beid, be.issuername AS beissuername, be.issuerurl AS beissuerurl, be.issueremail AS beissueremail, be.claimid AS beclaimid, be.claimcomment AS beclaimcomment, be.dateissued AS bedateissued, brb.id as rbid, brb.badgeid as rbbadgeid, brb.relatedbadgeid as rbrelatedbadgeid, ba.id as baid, ba.targetname as batargetname, ba.targeturl as batargeturl, ba.targetdescription as batargetdescription, ba.targetframework as batargetframework, ba.targetcode as batargetcode, $ctxfields FROM {badge} b LEFT JOIN {badge_issued} bi ON bi.badgeid = b.id AND bi.userid = :userid1 LEFT JOIN {badge_related} brb ON ( b.id = brb.badgeid OR b.id = brb.relatedbadgeid ) LEFT JOIN {badge_alignment} ba ON ( b.id = ba.badgeid ) LEFT JOIN {badge_endorsement} be ON be.badgeid = b.id LEFT JOIN {badge_manual_award} bma ON bma.badgeid = b.id AND bma.recipientid = :userid2 LEFT JOIN {badge_criteria} bc ON bc.badgeid = b.id LEFT JOIN {badge_criteria_met} bcm ON bcm.critid = bc.id AND bcm.userid = :userid3 LEFT JOIN {course} c ON c.id = b.courseid AND b.type = :typecourse LEFT JOIN {context} ctx ON ctx.instanceid = c.id AND ctx.contextlevel = :courselevel WHERE bi.id IS NOT NULL OR bma.id IS NOT NULL OR bcm.id IS NOT NULL ORDER BY b.id" | 1 |
|
"SELECT COUNT(b.userid) FROM {badge_issued} b INNER JOIN {user} u ON b.userid = u.id WHERE b.badgeid = :badgeid AND u.deleted = 0" | 1 |
|
"SELECT COUNT(br.badgeid) FROM {badge_related} br WHERE (br.badgeid = :badgeid OR br.relatedbadgeid = :badgeid2)" | 1 |
|
"SELECT COUNT(bc.id) FROM {badge_alignment} bc WHERE bc.badgeid = :badgeid" | 1 |
|
"SELECT {$namefields}, b.email FROM {user} u INNER JOIN {badge_backpack} b ON u.id = b.userid WHERE b.userid = :userid" | 1 |
|
'SELECT userid, visible, badgeid FROM {badge_issued} WHERE ' . $DB->sql_compare_text('uniquehash', 40) . ' = ' . $DB->sql_compare_text(':hash', 40) | 1 |
|
"SELECT u.id, $namefields, u.deleted, u.email FROM {user} u WHERE u.id = :userid" | 1 |
|
"SELECT $fields FROM {user} u JOIN ($esql) je ON je.id = u.id JOIN {badge_manual_award} s ON s.recipientid = u.id $groupsql WHERE $wherecondition AND s.badgeid = :badgeid AND s.issuerrole = :issuerrole $groupwheresql ORDER BY $sort" | 1 |
|
"SELECT DISTINCT bc.badgeid FROM {badge_criteria} bc JOIN {badge_criteria_param} bcp ON bc.id = bcp.critid WHERE bc.criteriatype = :criteriatype AND value $insql" | 1 |
|
"SELECT 1 FROM {user} u " . $join . " WHERE u.id = :userid $where" | 1 |
|
"SELECT bc.*, bcm.critid, bcm.userid, bcm.datemet FROM {badge_criteria} bc LEFT JOIN {badge_criteria_met} bcm ON bc.id = bcm.critid AND bcm.userid = :userid WHERE bc.badgeid = :badgeid AND bc.criteriatype != :criteriatype " | 1 |
|
"SELECT md.name FROM {course_modules} cm, {modules} md WHERE cm.id = ? AND md.id = cm.module" | 1 |
|
"SELECT DISTINCT userid FROM {course_modules_completion} cmc " . "WHERE coursemoduleid " . $cmcmodulessql . " AND " . "( cmc.completionstate IN ( :completionpass, :completionfail, :completioncomplete ) )" | 1 |
|
"SELECT * FROM {user} WHERE " . $DB->sql_equal('email', ':email1', false, true) . " AND id IN (SELECT id FROM {user} WHERE mnethostid = :mnethostid AND deleted = 0 AND suspended = 0 AND " . $DB->sql_equal('email', ':email2', false, false) . ")" | 1 |
|
"SELECT u.*, upr.token, upr.timerequested, upr.id as tokenid FROM {user} u JOIN {user_password_resets} upr ON upr.userid = u.id WHERE upr.token = ?" | 1 |
|
"SELECT * FROM ($sql) tmp" | 1 |
|
"SELECT COUNT(*) FROM {user} uxx JOIN ({$sql}) pxx ON uxx.id = pxx.id WHERE uxx.id = :uxxid" | 1 |
|
'SELECT a.id, a.submissionid, a.reviewerid, s.authorid FROM {workshop_assessments} a INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id) WHERE s.example = 0 AND s.workshopid = :workshopid' | 1 |
|
"SELECT COUNT(s.id) FROM {workshop_submissions} s JOIN {user} u ON (s.authorid = u.id)" | 1 |
|
"SELECT s.id, s.workshopid, s.example, s.authorid, s.timecreated, s.timemodified, s.title, s.grade, s.gradeover, s.gradeoverby, s.published, $authorfields, $gradeoverbyfields FROM {workshop_submissions} s JOIN {user} u ON (s.authorid = u.id)" | 1 |
|
"SELECT s.*" | 1 |
|
"SELECT COUNT(s.id)" | 1 |
|
"SELECT s.*, $authorfields, $gradeoverbyfields FROM {workshop_submissions} s INNER JOIN {user} u ON (s.authorid = u.id) LEFT JOIN {user} g ON (s.gradeoverby = g.id) WHERE s.example = 0 AND s.workshopid = :workshopid AND s.id = :id" | 1 |
|
"SELECT s.*, $authorfields, $gradeoverbyfields FROM {workshop_submissions} s INNER JOIN {user} u ON (s.authorid = u.id) LEFT JOIN {user} g ON (s.gradeoverby = g.id) WHERE s.example = 0 AND s.workshopid = :workshopid AND s.authorid = :authorid" | 1 |
|
"SELECT s.id, s.authorid, s.timecreated, s.timemodified, s.title, s.grade, s.gradeover, COALESCE(s.gradeover,s.grade) AS finalgrade, $authorfields FROM {workshop_submissions} s INNER JOIN {user} u ON (s.authorid = u.id) WHERE s.example = 0 AND s.workshopid = :workshopid AND s.published = 1 ORDER BY $orderby" | 1 |
|
'SELECT s.id, s.title, a.id AS assessmentid, a.grade, a.gradinggrade FROM {workshop_submissions} s LEFT JOIN {workshop_assessments} a ON (a.submissionid = s.id AND a.weight = 1) WHERE s.example = 1 AND s.workshopid = :workshopid ORDER BY s.title' | 1 |
|
'SELECT s.id, s.title, a.id AS assessmentid, a.grade, a.gradinggrade FROM {workshop_submissions} s LEFT JOIN {workshop_assessments} a ON (a.submissionid = s.id AND a.reviewerid = :reviewerid AND a.weight = 0) WHERE s.example = 1 AND s.workshopid = :workshopid ORDER BY s.title' | 1 |
|
"SELECT a.id, a.submissionid, a.reviewerid, a.timecreated, a.timemodified, a.grade, a.gradinggrade, a.gradinggradeover, a.gradinggradeoverby, $reviewerfields, $authorfields, $overbyfields, s.title FROM {workshop_assessments} a INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id) INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id) INNER JOIN {user} author ON (s.authorid = author.id) LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id) WHERE s.workshopid = :workshopid AND s.example = 0 ORDER BY $sort" | 1 |
|
"SELECT a.*, s.title, $reviewerfields, $authorfields, $overbyfields FROM {workshop_assessments} a INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id) INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id) INNER JOIN {user} author ON (s.authorid = author.id) LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id) WHERE a.id = :id AND s.workshopid = :workshopid" | 1 |
|
"SELECT a.*, s.title, $reviewerfields, $authorfields, $overbyfields FROM {workshop_assessments} a INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id) INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id AND s.example = 0) INNER JOIN {user} author ON (s.authorid = author.id) LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id) WHERE s.id = :sid AND reviewer.id = :rid AND s.workshopid = :workshopid" | 1 |
|
"SELECT a.*, s.title, $reviewerfields, $overbyfields FROM {workshop_assessments} a INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id) INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id) LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id) WHERE s.example = 0 AND s.id = :submissionid AND s.workshopid = :workshopid ORDER BY $sort" | 1 |
|
"SELECT a.*, $reviewerfields, $authorfields, $overbyfields, s.id AS submissionid, s.title AS submissiontitle, s.timecreated AS submissioncreated, s.timemodified AS submissionmodified FROM {workshop_assessments} a INNER JOIN {user} reviewer ON (a.reviewerid = reviewer.id) INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id) INNER JOIN {user} author ON (s.authorid = author.id) LEFT JOIN {user} overby ON (a.gradinggradeoverby = overby.id) WHERE s.example = 0 AND reviewer.id = :reviewerid AND s.workshopid = :workshopid" | 1 |
|
"SELECT $picturefields, s.title AS submissiontitle, s.timemodified AS submissionmodified, s.grade AS submissiongrade, ag.gradinggrade FROM {user} u LEFT JOIN {workshop_submissions} s ON (s.authorid = u.id AND s.workshopid = :workshopid1 AND s.example = 0) LEFT JOIN {workshop_aggregations} ag ON (ag.userid = u.id AND ag.workshopid = :workshopid2) WHERE u.id $participantids ORDER BY $sqlsort" | 1 |
|
"SELECT a.id AS assessmentid, a.submissionid, a.grade, a.gradinggrade, a.gradinggradeover, a.weight, $picturefields, s.id AS submissionid, s.authorid FROM {workshop_assessments} a JOIN {user} r ON (a.reviewerid = r.id) JOIN {workshop_submissions} s ON (a.submissionid = s.id AND s.example = 0) WHERE a.submissionid $submissionids ORDER BY a.weight DESC, $sort" | 1 |
|
"SELECT a.id AS assessmentid, a.submissionid, a.grade, a.gradinggrade, a.gradinggradeover, a.reviewerid, a.weight, s.id AS submissionid, $picturefields FROM {user} u JOIN {workshop_assessments} a ON (a.reviewerid = u.id) JOIN {workshop_submissions} s ON (a.submissionid = s.id AND s.example = 0) JOIN {user} e ON (s.authorid = e.id) WHERE u.id $participantids AND s.workshopid = :workshopid ORDER BY a.weight DESC, $sort" | 1 |
|
'SELECT s.id AS submissionid, s.grade AS submissiongrade, a.weight, a.grade FROM {workshop_submissions} s LEFT JOIN {workshop_assessments} a ON (a.submissionid = s.id) WHERE s.example=0 AND s.workshopid=:workshopid' | 1 |
|
'SELECT a.reviewerid, a.gradinggrade, a.gradinggradeover, ag.id AS aggregationid, ag.gradinggrade AS aggregatedgrade FROM {workshop_assessments} a INNER JOIN {workshop_submissions} s ON (a.submissionid = s.id) LEFT JOIN {workshop_aggregations} ag ON (ag.userid = a.reviewerid AND ag.workshopid = s.workshopid) WHERE s.example=0 AND s.workshopid=:workshopid' | 1 |
|
"SELECT COUNT(s.id) FROM {workshop_submissions} s JOIN {workshop} w ON (s.workshopid = w.id) JOIN {course_modules} cm ON (w.id = cm.instance) JOIN {modules} m ON (m.name = 'workshop' AND m.id = cm.module) WHERE cm.id = ? AND s.authorid = ? AND s.example = 0" | 1 |
|
"SELECT $userfields FROM {user} u JOIN ($esql) je ON (je.id = u.id AND u.deleted = 0) " | 1 |
|
"SELECT a.id FROM {workshop_assessments} a JOIN {workshop_submissions} s ON (a.submissionid = s.id) WHERE s.workshopid = :workshopid AND (s.example = 0 OR (s.example = 1 AND a.weight = 0))" | 1 |
|
'SELECT COUNT(s.id) AS nonallocated FROM {workshop_submissions} s LEFT JOIN {workshop_assessments} a ON (a.submissionid=s.id) WHERE s.workshopid = :workshopid AND s.example=0 AND a.submissionid IS NULL' | 1 |
|
"SELECT DISTINCT itemid FROM {files} WHERE contextid = :contextid AND component = :component AND filearea = :filearea" | 1 |
|
"SELECT s.id AS submissionid, s.title AS submissiontitle, s.timemodified AS submissionmodified, author.id AS authorid, $authoramefields, a.id AS assessmentid, a.timemodified AS assessmentmodified, reviewer.id AS reviewerid, $reviewerfields, cm.id AS cmid FROM {workshop} w INNER JOIN {course_modules} cm ON cm.instance = w.id INNER JOIN {modules} md ON md.id = cm.module INNER JOIN {workshop_submissions} s ON s.workshopid = w.id INNER JOIN {user} author ON s.authorid = author.id LEFT JOIN {workshop_assessments} a ON a.submissionid = s.id LEFT JOIN {user} reviewer ON a.reviewerid = reviewer.id WHERE cm.course = ? AND md.name = 'workshop' AND s.example = 0 AND (s.timemodified > ? OR a.timemodified > ?) ORDER BY s.timemodified" | 1 |
|
"SELECT s.id AS submissionid, s.title AS submissiontitle, s.timemodified AS submissionmodified, author.id AS authorid, $authornamefields, author.picture AS authorpicture, author.imagealt AS authorimagealt, author.email AS authoremail, a.id AS assessmentid, a.timemodified AS assessmentmodified, reviewer.id AS reviewerid, $reviewerfields, reviewer.picture AS reviewerpicture, reviewer.imagealt AS reviewerimagealt, reviewer.email AS revieweremail FROM {workshop_submissions} s INNER JOIN {workshop} w ON s.workshopid = w.id INNER JOIN {user} author ON s.authorid = author.id LEFT JOIN {workshop_assessments} a ON a.submissionid = s.id LEFT JOIN {user} reviewer ON a.reviewerid = reviewer.id $groupjoin WHERE w.id = :cminstance AND s.example = 0 $userselect $groupselect AND (s.timemodified > :submissionmodified OR a.timemodified > :assessmentmodified) ORDER BY s.timemodified ASC, a.timemodified ASC" | 1 |
|
'SELECT authorid, grade, gradeover, gradeoverby, feedbackauthor, feedbackauthorformat, timemodified, timegraded FROM {workshop_submissions} WHERE workshopid = :workshopid AND example=0' . $whereuser | 1 |
|
'SELECT userid, gradinggrade, timegraded FROM {workshop_aggregations} WHERE workshopid = :workshopid' . $whereuser | 1 |
|
"SELECT 'x' FROM {workshop_submissions} s JOIN {user} a ON (a.id = s.authorid) JOIN {groups_members} agm ON (a.id = agm.userid) JOIN {user} u ON (u.id = ?) JOIN {groups_members} ugm ON (u.id = ugm.userid) WHERE s.example = 0 AND s.workshopid = ? AND s.id = ? AND agm.groupid = ugm.groupid" | 1 |
|
"SELECT 'x' FROM {workshop_submissions} s JOIN {user} a ON (a.id = s.authorid) JOIN {groups_members} agm ON (a.id = agm.userid) JOIN {user} u ON (u.id = ?) JOIN {groups_members} ugm ON (u.id = ugm.userid) WHERE s.example = 0 AND s.workshopid = ? AND s.id = ? AND agm.groupid = ugm.groupid" | 1 |
|
"SELECT s.id, $userfields FROM {workshop_submissions} s JOIN {user} u ON (s.authorid = u.id) WHERE s.example = 0 AND s.workshopid = ?" | 1 |
|
"SELECT a.id FROM {workshop_assessments} a JOIN {workshop_submissions} s ON a.submissionid = s.id WHERE s.workshopid = ? AND (a.timecreated > ? OR a.timemodified > ?) AND (s.authorid = ? OR a.reviewerid = ?)" | 1 |
|
"SELECT a.id FROM {workshop_assessments} a JOIN {workshop_submissions} s ON a.submissionid = s.id WHERE s.workshopid = ? AND (a.timecreated > ? OR a.timemodified > ?)" | 1 |
|
"DELETE FROM {workshopform_numerrors_map} WHERE (($insql nonegative > :maxnonegative) AND (workshopid = :workshopid))" | 1 |
|
'SELECT * FROM {workshopform_numerrors} WHERE workshopid = :workshopid ORDER BY sort' | 1 |
|
"SELECT dim.id, dim.workshopid, dim.description, dim.descriptionformat, dim.grade0, dim.grade1, dim.weight, wg.grade, wg.peercomment, wg.peercommentformat FROM {course_modules} cm JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id JOIN {workshopform_numerrors} dim ON dim.workshopid = w.id LEFT JOIN {workshop_grades} wg ON wg.strategy = :strategy AND wg.dimensionid = dim.id AND wg.assessmentid = :assessmentid WHERE ctx.id = :contextid ORDER BY dim.sort" | 1 |
|
"SELECT id, dimensionid, grade, peercomment, peercommentformat FROM {workshop_grades} WHERE strategy = 'numerrors' AND assessmentid = ?" | 1 |
|
'SELECT s.id AS submissionid, a.id AS assessmentid, a.weight AS assessmentweight, a.reviewerid, a.gradinggrade, g.dimensionid, 100.00000 AS grade FROM {workshop_submissions} s JOIN {workshop_assessments} a ON (a.submissionid = s.id) JOIN {workshop_grades} g ON (g.assessmentid = a.id AND g.strategy = :strategy) WHERE s.example=0 AND s.workshopid=:workshopid' | 1 |
|
"SELECT dim.id, dim.description, dim.descriptionformat, wg.peercomment, wg.peercommentformat FROM {course_modules} cm JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id JOIN {workshopform_comments} dim ON dim.workshopid = w.id LEFT JOIN {workshop_grades} wg ON wg.strategy = :strategy AND wg.dimensionid = dim.id AND wg.assessmentid = :assessmentid WHERE ctx.id = :contextid ORDER BY dim.sort" | 1 |
|
"SELECT id, dimensionid, peercomment, peercommentformat FROM {workshop_grades} WHERE strategy = 'comments' AND assessmentid = ?" | 1 |
|
'SELECT d.id, d.grade, d.weight, s.scale FROM {workshopform_accumulative} d LEFT JOIN {scale} s ON (d.grade < 0 AND -d.grade = s.id) WHERE d.workshopid = :workshopid' | 1 |
|
'SELECT * FROM {workshopform_accumulative} WHERE workshopid = :workshopid ORDER BY sort' | 1 |
|
"SELECT dim.id, dim.description, dim.descriptionformat, dim.grade AS dimgrade, dim.weight, wg.grade, wg.peercomment, wg.peercommentformat FROM {course_modules} cm JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id JOIN {workshopform_accumulative} dim ON dim.workshopid = w.id LEFT JOIN {workshop_grades} wg ON wg.strategy = :strategy AND wg.dimensionid = dim.id AND wg.assessmentid = :assessmentid WHERE ctx.id = :contextid ORDER BY dim.sort" | 1 |
|
"SELECT id, dimensionid, grade, peercomment, peercommentformat FROM {workshop_grades} WHERE strategy = 'accumulative' AND assessmentid = ?" | 1 |
|
'SELECT d.id AS id, MIN(l.grade) AS min, MAX(l.grade) AS max, 1 AS weight FROM {workshopform_rubric} d INNER JOIN {workshopform_rubric_levels} l ON (d.id = l.dimensionid) WHERE d.workshopid = :workshopid GROUP BY d.id' | 1 |
|
"SELECT r.id AS rid, r.sort, r.description, r.descriptionformat, l.id AS lid, l.grade, l.definition, l.definitionformat FROM {workshopform_rubric} r LEFT JOIN {workshopform_rubric_levels} l ON (l.dimensionid = r.id) WHERE r.workshopid = :workshopid ORDER BY r.sort, l.grade" | 1 |
|
"SELECT r.id, r.workshopid, r.description, r.descriptionformat, rl.id AS levelid, rl.grade AS levelgrade, rl.definition, rl.definitionformat, wg.grade FROM {course_modules} cm JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id JOIN {workshopform_rubric} r ON r.workshopid = w.id JOIN {workshopform_rubric_levels} rl ON rl.dimensionid = r.id LEFT JOIN {workshop_grades} wg ON wg.strategy = :strategy AND wg.dimensionid = r.id AND wg.assessmentid = :assessmentid WHERE ctx.id = :contextid ORDER BY r.sort, rl.grade DESC" | 1 |
|
"SELECT id, dimensionid, grade FROM {workshop_grades} WHERE strategy = 'rubric' AND assessmentid = ?" | 1 |
|
'delete submission' | 1 |
|
"SELECT ctx.id FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id LEFT JOIN {workshop_submissions} ws ON ws.workshopid = w.id LEFT JOIN {workshop_assessments} wa ON wa.submissionid = ws.id AND ( wa.reviewerid = :wareviewerid OR wa.gradinggradeoverby = :wagradinggradeoverby ) LEFT JOIN {workshop_aggregations} wr ON wr.workshopid = w.id AND wr.userid = :wruserid WHERE ws.authorid = :wsauthorid OR ws.gradeoverby = :wsgradeoverby OR wa.id IS NOT NULL OR wr.id IS NOT NULL" | 1 |
|
"SELECT ws.authorid, ws.gradeoverby, wa.reviewerid, wa.gradinggradeoverby, wr.userid FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {workshop} w ON cm.instance = w.id JOIN {workshop_submissions} ws ON ws.workshopid = w.id LEFT JOIN {workshop_assessments} wa ON wa.submissionid = ws.id LEFT JOIN {workshop_aggregations} wr ON wr.workshopid = w.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT w.instructauthors, w.instructauthorsformat, w.instructreviewers, w.instructreviewersformat, w.phase, w.strategy, w.evaluation, w.latesubmissions, w.submissionstart, w.submissionend, w.assessmentstart, w.assessmentend, w.conclusion, w.conclusionformat FROM {course_modules} cm JOIN {workshop} w ON cm.instance = w.id WHERE cm.id = :cmid" | 1 |
|
"SELECT ws.id, ws.authorid, ws.example, ws.timecreated, ws.timemodified, ws.title, ws.content, ws.contentformat, ws.grade, ws.gradeover, ws.feedbackauthor, ws.feedbackauthorformat, ws.published, ws.late, w.phase, w.course, cm.id AS cmid, " . \context_helper::get_preload_record_columns_sql('ctx') . " FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id JOIN {workshop_submissions} ws ON ws.workshopid = w.id AND ws.authorid = :authorid WHERE ctx.id {$contextsql}" | 1 |
|
"SELECT ws.authorid, ws.example, ws.timecreated, ws.timemodified, ws.title, ws.content, ws.contentformat, wa.id, wa.submissionid, wa.reviewerid, wa.weight, wa.timecreated, wa.timemodified, wa.grade, wa.gradinggrade, wa.gradinggradeover, wa.feedbackauthor, wa.feedbackauthorformat, wa.feedbackreviewer, wa.feedbackreviewerformat, cm.id AS cmid, " . \context_helper::get_preload_record_columns_sql('ctx') . " FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {workshop} w ON cm.instance = w.id JOIN {workshop_submissions} ws ON ws.workshopid = w.id JOIN {workshop_assessments} wa ON wa.submissionid = ws.id AND wa.reviewerid = :reviewerid WHERE ctx.id {$contextsql}" | 1 |
|
"SELECT ws.id AS submissionid FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {context} ctx ON ctx.contextlevel = :contextlevel AND ctx.instanceid = cm.id JOIN {workshop} w ON cm.instance = w.id JOIN {workshop_submissions} ws ON ws.workshopid = w.id AND ws.authorid = :authorid WHERE ctx.id {$contextsql}" | 1 |
|
"SELECT wa.id AS assessmentid FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {workshop} w ON cm.instance = w.id JOIN {workshop_submissions} ws ON ws.workshopid = w.id AND ws.authorid = :authorid JOIN {workshop_assessments} wa ON wa.submissionid = ws.id WHERE ctx.id {$contextsql}" | 1 |
|
"SELECT wa.id AS assessmentid FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :module JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {workshop} w ON cm.instance = w.id JOIN {workshop_submissions} ws ON ws.workshopid = w.id JOIN {workshop_assessments} wa ON wa.submissionid = ws.id AND wa.reviewerid = :reviewerid WHERE ctx.id {$contextsql}" | 1 |
|
"SELECT ws.id AS submissionid FROM {workshop} w JOIN {workshop_submissions} ws ON ws.workshopid = w.id WHERE w.id = :workshopid AND ws.authorid $usersql" | 1 |
|
"SELECT wa.id AS assessmentid FROM {workshop} w JOIN {workshop_submissions} ws ON ws.workshopid = w.id JOIN {workshop_assessments} wa ON wa.submissionid = ws.id WHERE w.id = :workshopid AND ws.authorid $usersql" | 1 |
|
"SELECT wa.id AS assessmentid FROM {workshop} w JOIN {workshop_submissions} ws ON ws.workshopid = w.id JOIN {workshop_assessments} wa ON wa.submissionid = ws.id WHERE w.id = :workshopid AND wa.reviewerid $usersql" | 1 |
|
'Delete submission' | 1 |
|
'Delete example' | 1 |
|
'Delete all assessments' | 1 |
|
'Delete submissions' | 1 |
|
'Update the given submission.' | 1 |
|
'update switch phase' | 1 |
|
" SELECT * FROM {workshop_submissions} WHERE workshopid = ? AND example = 1" | 1 |
|
" SELECT * FROM {workshop_assessments} WHERE weight = 1 AND submissionid = ?" | 1 |
|
" SELECT * FROM {workshop_assessments} WHERE weight = 0 AND submissionid = ?" | 1 |
|
" SELECT * FROM {workshop_submissions} WHERE workshopid = ? AND example = 0" | 1 |
|
"SELECT a.id AS assessmentid, a.submissionid, $picturefields, s.id AS submissionid, s.authorid FROM {workshop_assessments} a JOIN {user} r ON (a.reviewerid = r.id) JOIN {workshop_submissions} s ON (a.submissionid = s.id) WHERE a.submissionid $submissionids" | 1 |
|
"SELECT a.id AS assessmentid, a.submissionid, u.id AS reviewerid, s.id AS submissionid, e.id AS revieweeid, e.lastname, e.firstname, $namefields, e.picture, e.imagealt, e.email FROM {user} u JOIN {workshop_assessments} a ON (a.reviewerid = u.id) JOIN {workshop_submissions} s ON (a.submissionid = s.id) JOIN {user} e ON (s.authorid = e.id) WHERE u.id $participantids AND s.workshopid = :workshopid AND s.example = 0" | 1 |
|
'Show all participants' | 1 |
|
"SELECT a.id FROM {workshopallocation_scheduled} a JOIN {workshop} w ON a.workshopid = w.id WHERE w.id = :workshopid AND a.enabled = 1 AND w.phase = :phase AND w.submissionend > 0 AND w.submissionend < :now AND (a.timeallocated IS NULL OR a.timeallocated < w.submissionend)" | 1 |
|
"SELECT w.* FROM {workshopallocation_scheduled} a JOIN {workshop} w ON a.workshopid = w.id WHERE a.enabled = 1 AND w.phase = 20 AND w.submissionend > 0 AND w.submissionend < ? AND (a.timeallocated IS NULL OR a.timeallocated < w.submissionend)" | 1 |
|
'Select display type.' | 1 |
|
"SELECT cm.id, MAX(chm.timestamp) AS lasttime FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module JOIN {chat} ch ON ch.id = cm.instance JOIN {chat_messages} chm ON chm.chatid = ch.id WHERE chm.timestamp > ? AND ch.course = ? AND md.name = 'chat' GROUP BY cm.id ORDER BY lasttime ASC" | 1 |
|
"SELECT cm.id, MAX(chm.timestamp) AS lasttime FROM {course_modules} cm JOIN {chat} ch ON ch.id = cm.instance JOIN {chat_messages_current} chm ON chm.chatid = ch.id WHERE chm.timestamp > ? AND cm.id = ? AND (chm.groupid IN ($mygroupids) OR chm.groupid = 0) GROUP BY cm.id" | 1 |
|
"SELECT $userfields FROM {course_modules} cm JOIN {chat} ch ON ch.id = cm.instance JOIN {chat_users} chu ON chu.chatid = ch.id JOIN {user} u ON u.id = chu.userid WHERE cm.id = :cmid $timeout $groupselect GROUP BY $userfields" | 1 |
|
"SELECT DISTINCT $ufields, c.lastmessageping, c.firstping FROM {chat_users} c JOIN {user} u ON u.id = c.userid $groupingjoin WHERE c.chatid = :chatid $groupselect ORDER BY c.firstping ASC" | 1 |
|
"SELECT * FROM {chat_messages_current} WHERE chatid = :chatid $groupselect ORDER BY timestamp DESC, id DESC" | 1 |
|
"SELECT ch.id FROM {chat} ch WHERE ch.course=?" | 1 |
|
" SELECT DISTINCT ctx.id FROM {chat} c JOIN {modules} m ON m.name = :chat JOIN {course_modules} cm ON cm.instance = c.id AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulelevel JOIN {chat_messages} chm ON chm.chatid = c.id WHERE chm.userid = :userid" | 1 |
|
"SELECT chm.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {chat} c ON c.id = cm.instance JOIN {chat_messages} chm ON chm.chatid = c.id WHERE cm.id = :instanceid" | 1 |
|
" SELECT c.id, cm.id AS cmid FROM {chat} c JOIN {modules} m ON m.name = :chat JOIN {course_modules} cm ON cm.instance = c.id AND cm.module = m.id WHERE cm.id $insql" | 1 |
|
"SELECT c.keepdays FROM {chat} c WHERE c.id = {chat_messages}.chatid" | 1 |
|
'Delete this session' | 1 |
|
'Delete chat logs' | 1 |
|
'Update method' | 1 |
|
'Update rate:' | 1 |
|
'Show download folder button' | 1 |
|
'Show subfolders expanded' | 1 |
|
'SELECT q.* FROM {quiz_slots} slot JOIN {question_references} qre ON qre.itemid = slot.id JOIN {question_bank_entries} qbe ON qbe.id = qre.questionbankentryid JOIN {question_versions} qve ON qve.questionbankentryid = qbe.id JOIN {question} q ON q.id = qve.questionid WHERE slot.quizid = ? AND slot.slot = ? AND qre.component = ? AND qre.questionarea = ?' | 1 |
|
" SELECT MAX(CASE WHEN attempts = 0 THEN 1000 ELSE attempts END) FROM {quiz_overrides} WHERE quiz = ?" | 1 |
|
' SELECT qg.quiz, qg.grade FROM {quiz_grades} qg JOIN {quiz} q ON q.id = qg.quiz WHERE q.course = ? AND qg.userid = ?' | 1 |
|
'SELECT o.id FROM {quiz_overrides} o LEFT JOIN {groups} g ON o.groupid = g.id WHERE o.groupid IS NOT NULL AND g.id IS NULL AND o.quiz = ?' | 1 |
|
"SELECT o.*, g.name FROM {quiz_overrides} o JOIN {groups} g ON o.groupid = g.id WHERE o.quiz = :quizid AND g.id $insql ORDER BY g.name" | 1 |
|
" SELECT o.*, {$userfieldssql->selects} FROM {quiz_overrides} o JOIN {user} u ON o.userid = u.id {$userfieldssql->joins} $groupsjoin WHERE o.quiz = :quizid $groupswhere ORDER BY $sort " | 1 |
|
" SELECT COUNT(1) FROM {quiz_overrides} o JOIN {groups_members} gm ON o.userid = gm.userid WHERE o.quiz = ? AND gm.groupid = ? " | 1 |
|
" SELECT COUNT(1) FROM {quiz_overrides} o JOIN {groups_members} gm ON o.userid = gm.userid WHERE gm.groupid $groupidtest AND o.quiz = ? " | 1 |
|
"UPDATE {quiz_attempts} quiza JOIN {quiz} quiz ON quiz.id = quiza.quiz JOIN ( $quizausersql ) quizauser ON quizauser.id = quiza.id SET quiza.timecheckstate = $timecheckstatesql WHERE $attemptselect" | 1 |
|
"UPDATE {quiz_attempts} quiza SET timecheckstate = $timecheckstatesql FROM {quiz} quiz, ( $quizausersql ) quizauser WHERE quiz.id = quiza.quiz AND quizauser.id = quiza.id AND $attemptselect" | 1 |
|
"UPDATE quiza SET timecheckstate = $timecheckstatesql FROM {quiz_attempts} quiza JOIN {quiz} quiz ON quiz.id = quiza.quiz JOIN ( $quizausersql ) quizauser ON quizauser.id = quiza.id WHERE $attemptselect" | 1 |
|
"UPDATE {quiz_attempts} quiza SET timecheckstate = ( SELECT $timecheckstatesql FROM {quiz} quiz, ( $quizausersql ) quizauser WHERE quiz.id = quiza.quiz AND quizauser.id = quiza.id ) WHERE $attemptselect" | 1 |
|
" SELECT iquiza.id, COALESCE(MAX(quo.timeclose), MAX(qgo1.timeclose), MAX(qgo2.timeclose), iquiz.timeclose) AS usertimeclose, COALESCE(MAX(quo.timelimit), MAX(qgo3.timelimit), MAX(qgo4.timelimit), iquiz.timelimit) AS usertimelimit FROM {quiz_attempts} iquiza JOIN {quiz} iquiz ON iquiz.id = iquiza.quiz LEFT JOIN {quiz_overrides} quo ON quo.quiz = iquiza.quiz AND quo.userid = iquiza.userid LEFT JOIN {groups_members} gm ON gm.userid = iquiza.userid LEFT JOIN {quiz_overrides} qgo1 ON qgo1.quiz = iquiza.quiz AND qgo1.groupid = gm.groupid AND qgo1.timeclose = 0 LEFT JOIN {quiz_overrides} qgo2 ON qgo2.quiz = iquiza.quiz AND qgo2.groupid = gm.groupid AND qgo2.timeclose > 0 LEFT JOIN {quiz_overrides} qgo3 ON qgo3.quiz = iquiza.quiz AND qgo3.groupid = gm.groupid AND qgo3.timelimit = 0 LEFT JOIN {quiz_overrides} qgo4 ON qgo4.quiz = iquiza.quiz AND qgo4.groupid = gm.groupid AND qgo4.timelimit > 0 $redundantwhereclauses GROUP BY iquiza.id, iquiz.id, iquiz.timeclose, iquiz.timelimit" | 1 |
|
"SELECT quiz.id, quiz.timeclose AS usertimeclose FROM {quiz} quiz WHERE quiz.course = :courseid" | 1 |
|
"SELECT q.id, COALESCE(v.userclose, v.groupclose, q.timeclose, 0) AS usertimeclose FROM ( SELECT quiz.id as quizid, MAX(quo.timeclose) AS userclose, MAX(qgo.timeclose) AS groupclose FROM {quiz} quiz LEFT JOIN {quiz_overrides} quo on quiz.id = quo.quiz AND quo.userid = :userid LEFT JOIN {groups_members} gm ON gm.userid = :useringroupid LEFT JOIN {quiz_overrides} qgo on quiz.id = qgo.quiz AND qgo.groupid = gm.groupid WHERE quiz.course = :courseid GROUP BY quiz.id) v JOIN {quiz} q ON q.id = v.quizid" | 1 |
|
"SELECT o.id, o.quiz, o.groupid FROM {quiz_overrides} o JOIN {quiz} quiz ON quiz.id = o.quiz LEFT JOIN {groups} grp ON grp.id = o.groupid WHERE quiz.course = :courseid AND o.groupid IS NOT NULL AND grp.id IS NULL" | 1 |
|
"SELECT qbe.id FROM {quiz_slots} slot JOIN {question_references} qr ON qr.itemid = slot.id JOIN {question_bank_entries} qbe ON qbe.id = qr.questionbankentryid WHERE slot.quizid = ? AND qr.component = ? AND qr.questionarea = ? AND qr.usingcontextid = ?" | 1 |
|
"SELECT slot.slot, slot.page, slot.id FROM {quiz_slots} slot WHERE slot.quizid = ? ORDER BY slot.slot" | 1 |
|
"SELECT DISTINCT qr.id, qr.itemid FROM {question} q JOIN {question_versions} qv ON q.id = qv.questionid JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_references} qr ON qbe.id = qr.questionbankentryid AND qr.version = qv.version JOIN {quiz_slots} qs ON qs.id = qr.itemid WHERE q.id = ? AND qs.id = ? AND qr.component = ? AND qr.questionarea = ?" | 1 |
|
"SELECT * FROM {quiz_overrides} WHERE groupid $extra AND quiz = ?" | 1 |
|
" SELECT qa.*, {$ufields} FROM {quiz_attempts} qa JOIN {user} u ON u.id = qa.userid $groupjoin WHERE qa.timefinish > :timestart AND qa.quiz = :quizid AND qa.preview = 0 $userselect $groupselect ORDER BY qa.timefinish ASC" | 1 |
|
" SELECT q.*, cm.idnumber as cmidnumber, q.course as courseid FROM {modules} m JOIN {course_modules} cm ON m.id = cm.module JOIN {quiz} q ON cm.instance = q.id WHERE m.name = 'quiz' AND cm.course = ?" | 1 |
|
"UPDATE {quiz_overrides} SET timeopen = timeopen + ? WHERE quiz IN (SELECT id FROM {quiz} WHERE course = ?) AND timeopen <> 0" | 1 |
|
"UPDATE {quiz_overrides} SET timeclose = timeclose + ? WHERE quiz IN (SELECT id FROM {quiz} WHERE course = ?) AND timeclose <> 0" | 1 |
|
'SELECT COUNT(DISTINCT qa.id) FROM ' . '{quiz_attempts} qa JOIN ' . '{groups_members} gm ON qa.userid = gm.userid ' . 'WHERE quiz = ? AND preview = 0 AND groupid = ?' | 1 |
|
'SELECT COUNT(DISTINCT qa.id) FROM ' . '{quiz_attempts} qa JOIN ' . '{groups_members} gm ON qa.userid = gm.userid ' . 'WHERE quiz = ? AND preview = 0 AND ' . "groupid $usql" | 1 |
|
" SELECT COALESCE(MAX(page), 1) FROM {quiz_slots} WHERE quizid = ?" | 1 |
|
" SELECT DISTINCT page - 1 FROM {quiz_slots} slot WHERE quizid = ? AND page > 1 AND NOT EXISTS (SELECT 1 FROM {quiz_slots} WHERE quizid = ? AND page = slot.page - 1) ORDER BY page - 1 DESC " | 1 |
|
" UPDATE {quiz_slots} SET page = page - 1 WHERE quizid = ? AND page > ? " | 1 |
|
'SELECT MAX(slot) FROM {quiz_slots} WHERE quizid = ?' | 1 |
|
"SELECT $allfields FROM $alljoins WHERE quiz.id = :quizid" | 1 |
|
" UPDATE {quiz} SET sumgrades = COALESCE(( SELECT SUM(maxmark) FROM {quiz_slots} WHERE quizid = {quiz}.id ), 0) WHERE id = ? " | 1 |
|
" UPDATE {quiz_attempts} SET timemodified = :timenow, sumgrades = ( {$dm->sum_usage_marks_subquery('uniqueid')} ) WHERE quiz = :quizid AND state = :finishedstate " | 1 |
|
" SELECT quiza.userid, $finalgrade AS newgrade FROM {quiz_attempts} quiza $join WHERE $where quiza.state = :statefinished AND quiza.preview = 0 AND quiza.quiz = :quizid3 GROUP BY quiza.userid" | 1 |
|
" SELECT users.userid, qg.id, qg.grade, newgrades.newgrade FROM ( SELECT userid FROM {quiz_grades} qg WHERE quiz = :quizid UNION SELECT DISTINCT userid FROM {quiz_attempts} quiza2 WHERE quiza2.state = :statefinished2 AND quiza2.preview = 0 AND quiza2.quiz = :quizid2 ) users LEFT JOIN {quiz_grades} qg ON qg.userid = users.userid AND qg.quiz = :quizid4 LEFT JOIN ( $finalgradesubquery ) newgrades ON newgrades.userid = users.userid WHERE ABS(newgrades.newgrade - qg.grade) > :almostzero OR ((newgrades.newgrade IS NULL OR qg.grade IS NULL) AND NOT (newgrades.newgrade IS NULL AND qg.grade IS NULL))" | 1 |
|
" UPDATE {quiz_grades} SET grade = ? * grade, timemodified = ? WHERE quiz = ? " | 1 |
|
" UPDATE {quiz_feedback} SET mingrade = ? * mingrade, maxgrade = ? * maxgrade WHERE quizid = ? " | 1 |
|
" SELECT DISTINCT $userfieldsql->selects FROM {user} u $enrolledjoin->joins $userfieldsql->joins LEFT JOIN {quiz_overrides} existingoverride ON existingoverride.userid = u.id AND existingoverride.quiz = :quizid WHERE existingoverride.id IS NULL AND $enrolledjoin->wheres ORDER BY $sort " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {quiz} q ON q.id = cm.instance JOIN {quiz_attempts} qa ON qa.quiz = q.id WHERE qa.userid = :userid AND qa.preview = 0" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {quiz} q ON q.id = cm.instance JOIN {quiz_overrides} qo ON qo.quiz = q.id WHERE qo.userid = :userid" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {quiz} q ON q.id = cm.instance JOIN {quiz_attempts} qa ON qa.quiz = q.id " . $qubaid->from . " WHERE " . $qubaid->where( ) . " AND qa.preview = 0" | 1 |
|
"SELECT qa.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {quiz} q ON q.id = cm.instance JOIN {quiz_attempts} qa ON qa.quiz = q.id WHERE cm.id = :cmid AND qa.preview = 0" | 1 |
|
"SELECT qo.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {quiz} q ON q.id = cm.instance JOIN {quiz_overrides} qo ON qo.quiz = q.id WHERE cm.id = :cmid" | 1 |
|
"SELECT qa.uniqueid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {quiz} q ON q.id = cm.instance JOIN {quiz_attempts} qa ON qa.quiz = q.id WHERE cm.id = :cmid AND qa.preview = 0" | 1 |
|
" SELECT allversions.id AS versionid, allversions.version, allversions.questionid FROM {question_versions} allversions WHERE allversions.questionbankentryid = ( SELECT givenversion.questionbankentryid FROM {question_versions} givenversion WHERE givenversion.questionid = ? ) AND allversions.status <> ? ORDER BY allversions.version DESC " | 1 |
|
" SELECT slot.slot, slot.id AS slotid, slot.page, slot.maxmark, slot.displaynumber, slot.requireprevious, qsr.filtercondition, qsr.usingcontextid, qv.status, qv.id AS versionid, qv.version, qr.version AS requestedversion, qv.questionbankentryid, q.id AS questionid, q.*, qc.id AS category, COALESCE(qc.contextid, qsr.questionscontextid) AS contextid FROM {quiz_slots} slot -- case where a particular question has been added to the quiz. LEFT JOIN {question_references} qr ON qr.usingcontextid = :quizcontextid AND qr.component = 'mod_quiz' AND qr.questionarea = 'slot' AND qr.itemid = slot.id LEFT JOIN {question_bank_entries} qbe ON qbe.id = qr.questionbankentryid -- This way of getting the latest version for each slot is a bit more complicated -- than we would like, but the simpler SQL did not work in Oracle 11.2. -- (It did work fine in Oracle 19.x, so once we have updated our min supported -- version we could consider digging the old code out of git history from -- just before the commit that added this comment. -- For relevant question_bank_entries, this gets the latest non-draft slot number. LEFT JOIN ( SELECT lv.questionbankentryid, MAX(CASE WHEN lv.status <> :draft THEN lv.version END) AS usableversion, MAX(lv.version) AS anyversion FROM {quiz_slots} lslot JOIN {question_references} lqr ON lqr.usingcontextid = :quizcontextid2 AND lqr.component = 'mod_quiz' AND lqr.questionarea = 'slot' AND lqr.itemid = lslot.id JOIN {question_versions} lv ON lv.questionbankentryid = lqr.questionbankentryid WHERE lslot.quizid = :quizid2 $slotidtest2 AND lqr.version IS NULL GROUP BY lv.questionbankentryid ) latestversions ON latestversions.questionbankentryid = qr.questionbankentryid LEFT JOIN {question_versions} qv ON qv.questionbankentryid = qbe.id -- Either specified version, or latest usable version, or a draft version. AND qv.version = COALESCE(qr.version, latestversions.usableversion, latestversions.anyversion) LEFT JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid LEFT JOIN {question} q ON q.id = qv.questionid -- Case where a random question has been added. LEFT JOIN {question_set_references} qsr ON qsr.usingcontextid = :quizcontextid3 AND qsr.component = 'mod_quiz' AND qsr.questionarea = 'slot' AND qsr.itemid = slot.id WHERE slot.quizid = :quizid $slotidtest ORDER BY slot.slot " | 1 |
|
" SELECT qa.slot AS questionattemptslot, qa.id AS questionattemptid, slot.slot AS quizslot, slot.id AS quizslotid, qr.id AS questionreferenceid, currentqv.version AS currentversion, currentqv.questionid AS currentquestionid, newqv.version AS newversion, newqv.questionid AS newquestionid -- Start with the question currently used in the attempt. FROM {question_attempts} qa JOIN {question_versions} currentqv ON currentqv.questionid = qa.questionid -- Join in the question metadata which says if this is a qa from a 'Try another question like this one'. JOIN {question_attempt_steps} firststep ON firststep.questionattemptid = qa.id AND firststep.sequencenumber = 0 LEFT JOIN {question_attempt_step_data} otherslotinfo ON otherslotinfo.attemptstepid = firststep.id AND otherslotinfo.name = :otherslotmetadataname -- Join in the quiz slot information, and hence for non-random slots, the questino_reference. JOIN {quiz_slots} slot ON slot.quizid = :quizid AND slot.slot = COALESCE({$DB->sql_cast_char2int('otherslotinfo.value', true)}, qa.slot) LEFT JOIN {question_references} qr ON qr.usingcontextid = :quizcontextid AND qr.component = 'mod_quiz' AND qr.questionarea = 'slot' AND qr.itemid = slot.id -- Finally, get the new version for this slot. JOIN {question_versions} newqv ON newqv.questionbankentryid = currentqv.questionbankentryid AND newqv.version = COALESCE( -- If the quiz setting say use a particular version, use that. qr.version, -- Otherwise, we need the latest non-draft version of the current questions. (SELECT MAX(version) FROM {question_versions} WHERE questionbankentryid = currentqv.questionbankentryid AND status <> :draft), -- Otherwise, there is not a suitable other version, so stick with the current one. currentqv.version ) -- We want this for questions in the current attempt. WHERE qa.questionusageid = :questionusageid -- Order not essential, but fast and good for debugging. ORDER BY qa.slot " | 1 |
|
"SELECT quiza.* FROM {quiz_attempts} quiza JOIN {user} u ON u.id = quiza.userid WHERE quiza.id = :attemptid" | 1 |
|
"SELECT quiza.* FROM {quiz_attempts} quiza JOIN {user} u ON u.id = quiza.userid {$allowedjoins->joins} WHERE {$allowedjoins->wheres} AND quiza.id = :attemptid" | 1 |
|
"SELECT qa.* FROM {quiz_attempts} qa JOIN {quiz} quiz ON quiz.id = qa.quiz WHERE qa.state = 'finished' AND qa.gradednotificationsenttime IS NULL AND qa.sumgrades IS NOT NULL AND qa.timemodified < :delaytime ORDER BY quiz.course, qa.quiz" | 1 |
|
" SELECT quiza.*, quizauser.usertimeclose, quizauser.usertimelimit FROM {quiz_attempts} quiza JOIN {quiz} quiz ON quiz.id = quiza.quiz JOIN ( $quizausersql ) quizauser ON quizauser.id = quiza.id WHERE quiza.state IN ('inprogress', 'overdue') AND quiza.timecheckstate <= :processto ORDER BY quiz.course, quiza.quiz" | 1 |
|
" SELECT * FROM {quiz_attempts} qa_alias WHERE userid = ? AND quiz = ? AND " . quiz_report_qm_filter_select($quiz, 'qa_alias') | 1 |
|
"SELECT COUNT(q.id) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc on qc.id = qbe.questioncategoryid WHERE qc.contextid = ? $extracondition" | 1 |
|
'SELECT qsr.* FROM {question_set_references} qsr JOIN {quiz_slots} qs ON qs.id = qsr.itemid WHERE qs.quizid = ? AND qsr.component = ? AND qsr.questionarea = ?' | 1 |
|
'SELECT q.id AS id, qbe.questioncategoryid AS category, q.qtype AS qtype FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE q.name = :name' | 1 |
|
'Select which attempts to analyze per user:' | 1 |
|
'Show only students with attempts' | 1 |
|
'Show students with and without attempts' | 1 |
|
'Show blocks during quiz attempts.' | 1 |
|
'Show the user\'s picture on screen during attempts.' | 1 |
|
'Delete selected' | 1 |
|
'Show quiz in a \'secure\' window' | 1 |
|
'Delete quiz attempts' | 1 |
|
'Delete all quiz attempts' | 1 |
|
'Show the reordering tool' | 1 |
|
'Show only attempts' | 1 |
|
'Show at most one finished attempt per user ({$a})' | 1 |
|
'Select attempt' | 1 |
|
'Select multiple items' | 1 |
|
'Select multiple toolbar' | 1 |
|
'Select question {$a}' | 1 |
|
'Show all questions on one page' | 1 |
|
'Show blocks during quiz attempts' | 1 |
|
'Show page breaks' | 1 |
|
'Show category contents {$a->arrow}' | 1 |
|
'Show mark details' | 1 |
|
'Show one page at a time' | 1 |
|
'Show students with no attempts' | 1 |
|
'Show only students with no attempts' | 1 |
|
'Show teacher attempts' | 1 |
|
'Show the user\'s picture' | 1 |
|
'Update filter conditions' | 1 |
|
'Update quiz settings' | 1 |
|
'Update filter condition for a random question slot.' | 1 |
|
" SELECT band, COUNT(1) FROM ( SELECT FLOOR(qg.grade / :bandwidth) AS band FROM {quiz_grades} qg $userjoin WHERE $usertest AND qg.quiz = :quizid ) subquery GROUP BY band ORDER BY band" | 1 |
|
"SELECT DISTINCT u.id FROM {user} u {$groupstudentsjoins->joins} WHERE {$groupstudentsjoins->wheres}" | 1 |
|
" SELECT COUNT(1) FROM $fromqa WHERE $whereqa AND quiza.timefinish > {$lastcachetime}" | 1 |
|
"SELECT COUNT(*) AS rcount, AVG(sumgrades) AS average FROM $fromqa WHERE $whereqa" | 1 |
|
"SELECT quiza.id, quiza.sumgrades FROM $fromqa WHERE $whereqa ORDER BY sumgrades" | 1 |
|
" SELECT $fields FROM {quiz_attempts} quiza JOIN {user} u ON u.id = quiza.userid {$userfieldssql->joins} WHERE quiza.uniqueid $asql AND quiza.state = ? AND quiza.quiz = ?" | 1 |
|
'Show student names' | 1 |
|
'update grades' | 1 |
|
'Show the' | 1 |
|
" SELECT 1 FROM {user} u {$this->groupstudentsjoins->joins} WHERE {$this->groupstudentsjoins->wheres} " | 1 |
|
" SELECT 1 FROM {user} u {$this->studentsjoins->joins} WHERE {$this->studentsjoins->wheres} " | 1 |
|
" SELECT AVG(quizaouter.sumgrades) AS grade, COUNT(quizaouter.sumgrades) AS numaveraged FROM {quiz_attempts} quizaouter JOIN ( SELECT DISTINCT quiza.id FROM $from WHERE $where ) relevant_attempt_ids ON quizaouter.id = relevant_attempt_ids.id " | 1 |
|
"SELECT qg.id FROM {quiz_grades} qg JOIN {user} u on u.id = qg.userid {$groupstudentsjoins->joins} WHERE qg.quiz = $quiz->id AND {$groupstudentsjoins->wheres}" | 1 |
|
"SELECT quiza.*, " . $userfieldsapi->get_sql('u', false, '', '', false)->selects . " FROM {quiz_attempts} quiza JOIN {user} u ON u.id = quiza.userid" | 1 |
|
" SELECT quiza.uniqueid, qqr.slot FROM {quiz_attempts} quiza JOIN $join WHERE $where" | 1 |
|
" SELECT quiza.*, " . $userfieldsapi->get_sql('u', false, '', '', false)->selects . " FROM {quiz_attempts} quiza JOIN {user} u ON u.id = quiza.userid WHERE quiza.uniqueid $uniqueidcondition " | 1 |
|
"SELECT COUNT(DISTINCT quiza.id) FROM {quiz_attempts} quiza JOIN {quiz_overview_regrades} qqr ON quiza.uniqueid = qqr.questionusageid $userjoin WHERE $usertest quiza.quiz = :cquiz AND quiza.preview = 0 AND qqr.regraded = 0" | 1 |
|
" SELECT 1 FROM {$from} JOIN {quiz_overview_regrades} qor ON qor.questionusageid = quiza.uniqueid WHERE {$where}" | 1 |
|
'Show all attempts' | 1 |
|
'Show all {$a}' | 1 |
|
'Show {$a} with attempts only' | 1 |
|
'Show / download {$a} with no attempts only' | 1 |
|
'Show / download' | 1 |
|
"SELECT c.id FROM {quizaccess_seb_quizsettings} qs JOIN {course_modules} cm ON cm.instance = qs.quizid JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {context} c ON c.instanceid = cm.id AND c.contextlevel = :context WHERE qs.usermodified = :userid GROUP BY c.id" | 1 |
|
"SELECT c.id FROM {quizaccess_seb_template} tem JOIN {quizaccess_seb_quizsettings} qs ON qs.templateid = tem.id JOIN {course_modules} cm ON cm.instance = qs.quizid JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {context} c ON c.instanceid = cm.id AND c.contextlevel = :context WHERE qs.usermodified = :userid GROUP BY c.id" | 1 |
|
"SELECT qs.id as id, qs.quizid as quizid, qs.usermodified as usermodified, qs.timecreated as timecreated, qs.timemodified as timemodified FROM {quizaccess_seb_quizsettings} qs JOIN {course_modules} cm ON cm.instance = qs.quizid JOIN {modules} m ON cm.module = m.id AND m.name = :modulename WHERE cm.id {$insql}" | 1 |
|
"SELECT tem.id as id, qs.quizid as quizid, tem.usermodified as usermodified, tem.timecreated as timecreated, tem.timemodified as timemodified FROM {quizaccess_seb_template} tem JOIN {quizaccess_seb_quizsettings} qs ON qs.templateid = tem.id JOIN {course_modules} cm ON cm.instance = qs.quizid JOIN {modules} m ON cm.module = m.id AND m.name = :modulename WHERE cm.id {$insql}" | 1 |
|
"SELECT qs.usermodified AS userid FROM {quizaccess_seb_quizsettings} qs JOIN {course_modules} cm ON cm.instance = qs.quizid JOIN {modules} m ON cm.module = m.id AND m.name = ? WHERE cm.id = ?" | 1 |
|
'Update string' | 1 |
|
'Update bool' | 1 |
|
'Update number' | 1 |
|
'Update string with bool' | 1 |
|
'Update string with number' | 1 |
|
'Update string with null' | 1 |
|
'Update string with array' | 1 |
|
'Update bool with string' | 1 |
|
'Update bool with number' | 1 |
|
'Update bool with null' | 1 |
|
'Update bool with array' | 1 |
|
'Update number with string' | 1 |
|
'Update number with bool' | 1 |
|
'Update number with null' | 1 |
|
'Update number with array' | 1 |
|
'Update date with string' | 1 |
|
'Update data with number' | 1 |
|
'Show Exit Safe Exam Browser button, configured with this quit link' | 1 |
|
'Show keyboard layout' | 1 |
|
'Show reload button' | 1 |
|
'Show SEB task bar' | 1 |
|
'Show time' | 1 |
|
'Show Wi-Fi control' | 1 |
|
'Show Safe Exam Browser download button' | 1 |
|
'Show http:// link' | 1 |
|
'Show seb:// link' | 1 |
|
'Show Safe Exam Browser config links' | 1 |
|
'SELECT qbe.id as questionbankentryid, qc.contextid as questioncontextid, qc.id as category, qv.version, q.qtype, q.id as questionid FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid JOIN {question_categories} qc ON qc.id = qbe.questioncategoryid WHERE q.id = ?' | 1 |
|
' SELECT * FROM {quiz_attempts} WHERE quiz = :quiz AND preview = 0' | 1 |
|
"SELECT w.* FROM {wiki} w, {wiki_subwikis} s, {wiki_pages} p WHERE p.id = ? AND p.subwikiid = s.id AND s.wikiid = w.id" | 1 |
|
"SELECT * FROM {wiki_versions} WHERE pageid = ? ORDER BY version DESC" | 1 |
|
"SELECT p.* FROM {wiki} w, {wiki_subwikis} s, {wiki_pages} p WHERE s.id = ? AND s.wikiid = w.id AND w.firstpagetitle = p.title AND p.subwikiid = s.id" | 1 |
|
"UPDATE {wiki_pages} SET timerendered = 0 WHERE id IN ( SELECT l.frompageid FROM {wiki_links} l WHERE l.tomissingpage = ? )" | 1 |
|
"SELECT v.* FROM {wiki_versions} v, {wiki_pages} p WHERE p.subwikiid = ? AND v.pageid = p.id AND v.userid = ?" | 1 |
|
"SELECT DISTINCT p.title, p.id, p.subwikiid FROM {wiki} w, {wiki_subwikis} s, {wiki_pages} p WHERE s.wikiid = w.id and s.id = ? and w.firstpagetitle != p.title and p.subwikiid = ? and 1 = (SELECT count(*) FROM {wiki_versions} v WHERE v.pageid = p.id) UNION SELECT DISTINCT l.tomissingpage as title, 0 as id, l.subwikiid FROM {wiki_links} l WHERE l.subwikiid = ? and l.topageid = 0" | 1 |
|
"SELECT p.id, p.title FROM {wiki_pages} p, {wiki} w , {wiki_subwikis} s WHERE p.subwikiid = ? AND s.id = ? AND w.id = s.wikiid AND p.title != w.firstpagetitle AND p.id NOT IN (SELECT topageid FROM {wiki_links} WHERE subwikiid = ?)" | 1 |
|
"SELECT p.id, p.title FROM {wiki_pages} p JOIN {wiki_links} l ON l.topageid = p.id WHERE l.frompageid = ? ORDER BY p.title ASC" | 1 |
|
"SELECT * FROM {wiki_pages} WHERE subwikiid = ? AND timemodified > ? ORDER BY timemodified DESC" | 1 |
|
"SELECT wp.id, wp.title, ws.userid, ws.wikiid, ws.id AS subwikiid, ws.groupid, w.wikimode, cm.id AS cmid, c.id AS courseid, c.shortname, c.fullname, $ctxselect FROM {wiki_pages} wp JOIN {wiki_subwikis} ws ON wp.subwikiid = ws.id JOIN {wiki} w ON w.id = ws.wikiid JOIN {modules} m ON m.name='wiki' JOIN {course_modules} cm ON cm.module = m.id AND cm.instance = w.id JOIN {tag_instance} tt ON wp.id = tt.itemid JOIN {course} c ON cm.course = c.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component AND cm.deletioninprogress = 0 AND wp.id %ITEMFILTER% AND c.id %COURSEFILTER%" | 1 |
|
"SELECT p.id, p.timemodified, p.subwikiid, sw.wikiid, w.wikimode, sw.userid, sw.groupid FROM {wiki_pages} p JOIN {wiki_subwikis} sw ON sw.id = p.subwikiid JOIN {wiki} w ON w.id = sw.wikiid WHERE p.timemodified > ? AND w.course = ? ORDER BY p.timemodified ASC" | 1 |
|
'SELECT ctx.id FROM {modules} m JOIN {course_modules} cm ON cm.module = m.id AND m.name = :modname JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :contextlevel JOIN {wiki_subwikis} s ON cm.instance = s.wikiid LEFT JOIN {wiki_pages} p ON p.subwikiid = s.id LEFT JOIN {wiki_versions} v ON v.pageid = p.id AND v.userid = :userid3 LEFT JOIN {wiki_locks} l ON l.pageid = p.id AND l.userid = :userid4 LEFT JOIN {comments} com ON com.itemid = p.id AND com.commentarea = :commentarea AND com.contextid = ctx.id AND com.userid = :userid5 WHERE s.userid = :userid1 OR p.userid = :userid2 OR v.id IS NOT NULL OR l.id IS NOT NULL OR com.id IS NOT NULL' | 1 |
|
" SELECT s.userid FROM {modules} m JOIN {course_modules} cm ON cm.module = m.id AND m.name = :modname JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :contextlevel JOIN {wiki_subwikis} s ON cm.instance = s.wikiid WHERE ctx.id = :contextid" | 1 |
|
" SELECT p.userid FROM {modules} m JOIN {course_modules} cm ON cm.module = m.id AND m.name = :modname JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :contextlevel JOIN {wiki_subwikis} s ON cm.instance = s.wikiid JOIN {wiki_pages} p ON p.subwikiid = s.id WHERE ctx.id = :contextid" | 1 |
|
" SELECT v.userid FROM {modules} m JOIN {course_modules} cm ON cm.module = m.id AND m.name = :modname JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :contextlevel JOIN {wiki_subwikis} s ON cm.instance = s.wikiid JOIN {wiki_pages} p ON p.subwikiid = s.id JOIN {wiki_versions} v ON v.pageid = p.id WHERE ctx.id = :contextid" | 1 |
|
" SELECT l.userid FROM {modules} m JOIN {course_modules} cm ON cm.module = m.id AND m.name = :modname JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :contextlevel JOIN {wiki_subwikis} s ON cm.instance = s.wikiid JOIN {wiki_pages} p ON p.subwikiid = s.id JOIN {wiki_locks} l ON l.pageid = p.id WHERE ctx.id = :contextid" | 1 |
|
"SELECT c.id, c.content, c.format, c.timecreated, c.userid FROM {comments} c WHERE c.contextid = :contextid AND c.commentarea = :commentarea AND c.itemid = :itemid" | 1 |
|
'SELECT w.wikimode, s.id AS subwikiid, s.groupid AS subwikigroupid, s.userid AS subwikiuserid, p.id AS pageid, p.userid AS pageuserid, p.title, p.cachedcontent, p.timecreated AS pagetimecreated, p.timemodified AS pagetimemodified, p.timerendered AS pagetimerendered, p.pageviews, p.readonly, v.id AS versionid, v.content, v.contentformat, v.version, v.timecreated AS versiontimecreated, l.id AS lockid, l.sectionname, l.lockedat FROM {course_modules} cm JOIN {wiki} w ON w.id = cm.instance JOIN {wiki_subwikis} s ON cm.instance = s.wikiid LEFT JOIN {wiki_pages} p ON p.subwikiid = s.id LEFT JOIN {wiki_versions} v ON v.pageid = p.id AND v.userid = :user4 LEFT JOIN {wiki_locks} l ON l.pageid = p.id AND l.userid = :user5 WHERE cm.id = :cmid AND (s.userid = :user1 OR p.userid = :user2 OR v.userid = :user3 OR l.userid = :user6 OR EXISTS (SELECT 1 FROM {comments} com WHERE com.itemid = p.id AND com.commentarea = :commentarea AND com.contextid = :ctxid AND com.userid = :user7) ) ORDER BY s.id, p.id, v.id' | 1 |
|
'SELECT s.id FROM {course_modules} cm JOIN {modules} m ON m.name = :wiki AND cm.module = m.id JOIN {wiki_subwikis} s ON s.wikiid = cm.instance WHERE cm.id = :cmid' | 1 |
|
'SELECT s.id, ctx.id AS ctxid FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextmod JOIN {modules} m ON m.name = :wiki AND cm.module = m.id JOIN {wiki_subwikis} s ON s.wikiid = cm.instance AND s.userid = :userid WHERE ctx.id ' . $ctxsql | 1 |
|
"DELETE FROM {tag_instance} WHERE component=:component AND itemtype=:itemtype AND itemid IN (SELECT id FROM {wiki_pages} WHERE subwikiid $sql)" | 1 |
|
"SELECT s.id FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextmod JOIN {modules} m ON m.name = :wiki AND cm.module = m.id JOIN {wiki_subwikis} s ON s.wikiid = cm.instance WHERE ctx.id = :contextid AND s.userid {$insql}" | 1 |
|
"DELETE FROM {tag_instance} WHERE component=:component AND itemtype=:itemtype AND itemid IN (SELECT id FROM {wiki_pages} WHERE subwikiid $insql)" | 1 |
|
"SELECT p.*, w.id AS wikiid, w.course AS courseid, s.groupid AS groupid FROM {wiki_pages} p JOIN {wiki_subwikis} s ON s.id = p.subwikiid JOIN {wiki} w ON w.id = s.wikiid $contextjoin WHERE p.timemodified >= ? AND w.wikimode = ? ORDER BY p.timemodified ASC" | 1 |
|
'SELECT w.* FROM {wiki_subwikis} s JOIN {wiki} w ON w.id = s.wikiid WHERE s.id = ?' | 1 |
|
'SELECT cm.id, cm.course FROM {course_modules} cm JOIN {modules} m ON m.name = ? AND m.id = cm.module JOIN {wiki} w ON cm.instance = w.id JOIN {wiki_subwikis} s ON s.wikiid = w.id WHERE s.id=?' | 1 |
|
'Delete all wiki pages' | 1 |
|
'Delete page versions' | 1 |
|
'Insert comment' | 1 |
|
'Insert an image...' | 1 |
|
'Show {$a} versions per page' | 1 |
|
' SELECT * FROM {wiki_subwikis} WHERE wikiid = ?' | 1 |
|
'SELECT t.id, t.name, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = ? AND ti.component = ? AND ti.itemid = ?' | 1 |
|
"SELECT cha.* FROM {choice} ch, {choice_answers} cha WHERE cha.choiceid = ch.id AND ch.course = ? AND cha.userid = ?" | 1 |
|
"SELECT ca.* FROM {choice_answers} ca INNER JOIN {groups_members} gm ON ca.userid=gm.userid WHERE optionid $insql AND gm.groupid= :groupid" | 1 |
|
"SELECT ca.* FROM {choice_answers} ca WHERE optionid $insql" | 1 |
|
"SELECT ch.id FROM {choice} ch WHERE ch.course=?" | 1 |
|
'Show users who not answered yet' | 1 |
|
'Show preview before timeopen' | 1 |
|
"SELECT c.id FROM {context} c INNER JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {choice} ch ON ch.id = cm.instance INNER JOIN {choice_options} co ON co.choiceid = ch.id INNER JOIN {choice_answers} ca ON ca.optionid = co.id AND ca.choiceid = ch.id WHERE ca.userid = :userid" | 1 |
|
"SELECT ca.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {choice} ch ON ch.id = cm.instance JOIN {choice_options} co ON co.choiceid = ch.id JOIN {choice_answers} ca ON ca.optionid = co.id AND ca.choiceid = ch.id WHERE cm.id = :cmid" | 1 |
|
"SELECT cm.id AS cmid, co.text as answer, ca.timemodified FROM {context} c INNER JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {choice} ch ON ch.id = cm.instance INNER JOIN {choice_options} co ON co.choiceid = ch.id INNER JOIN {choice_answers} ca ON ca.optionid = co.id AND ca.choiceid = ch.id WHERE c.id {$contextsql} AND ca.userid = :userid ORDER BY cm.id" | 1 |
|
'Show results to students after they answer' | 1 |
|
'Show results to students only after the choice is closed' | 1 |
|
'Select all "{$a}"' | 1 |
|
'Show participants the limit for each option and the number of responses for it so far.' | 1 |
|
'Show preview' | 1 |
|
'Show column for unanswered' | 1 |
|
'Delete the given submitted responses in a choice' | 1 |
|
"SELECT fv.course_id, c.shortname, $sumvalue AS sumvalue, COUNT(value) as countvalue FROM {feedback_value} fv, {course} c, {feedback_item} fi WHERE fv.course_id = c.id AND fi.id = fv.item AND fi.typ = ? AND fv.item = ? GROUP BY course_id, shortname ORDER BY sumvalue desc" | 1 |
|
" SELECT fk . * , fc . * , $userfields FROM {feedback_completed} fc JOIN {feedback} fk ON fk.id = fc.feedback JOIN {user} u ON u.id = fc.userid " | 1 |
|
'SELECT COUNT(u.id) FROM {user} u, {feedback_completed} c' . $fromgroup . ' WHERE anonymous_response = ? AND u.id = c.userid AND c.feedback = ? ' . $wheregroup | 1 |
|
'SELECT DISTINCT ' . $ufields . ', c.timemodified as completed_timemodified FROM {user} u, {feedback_completed} c ' . $fromgroup . ' WHERE ' . $where . ' anonymous_response = :anon AND u.id = c.userid AND c.feedback = :instance ' . $wheregroup . $sortsql | 1 |
|
'SELECT fbv . * FROM {feedback_value} fbv, {feedback_completed} fbc, {groups_members} gm WHERE fbv.item = :itemid AND fbv.completed = fbc.id AND fbc.userid = gm.userid ' . $ignore_empty_select . ' AND gm.groupid = :groupid ORDER BY fbc.timemodified' | 1 |
|
"SELECT fbc.* FROM {feedback_completed} fbc, {groups_members} gm WHERE fbc.feedback = ? AND gm.groupid = ? AND fbc.userid = gm.userid" | 1 |
|
"SELECT DISTINCT fbc.* FROM {feedback_completed} fbc, {feedback_value} fbv WHERE fbc.id = fbv.completed AND fbc.feedback = ? AND fbv.course_id = ? ORDER BY random_response" | 1 |
|
"SELECT id, COUNT(item) AS ci FROM {feedback_value} WHERE course_id = ? GROUP BY item ORDER BY ci DESC" | 1 |
|
"SELECT f.id AS id, cm.id AS cmid, f.name AS name, f.timeopen AS timeopen, f.timeclose AS timeclose FROM {feedback} f, {course_modules} cm, {feedback_sitecourse_map} sm, {modules} m WHERE f.id = cm.instance AND f.course = '" . SITEID . "' AND m.id = cm.module AND m.name = 'feedback' AND sm.courseid = ? AND sm.feedbackid = f.id" | 1 |
|
"SELECT f.id AS id, cm.id AS cmid, f.name AS name, f.timeopen AS timeopen, f.timeclose AS timeclose FROM {feedback} f, {course_modules} cm, {modules} m WHERE f.id = cm.instance AND f.course = '" . SITEID . "' AND m.id = cm.module AND m.name = 'feedback'" | 1 |
|
"SELECT c.id, c.fullname, c.shortname FROM {feedback_sitecourse_map} f, {course} c WHERE c.id = f.courseid AND f.feedbackid = ? ORDER BY c.fullname" | 1 |
|
"SELECT g.name, g.id FROM {groups} g, {groups_members} m WHERE g.courseid = ? AND g.id = m.groupid AND m.userid = ? ORDER BY name ASC" | 1 |
|
"SELECT COUNT(DISTINCT fbc.id) FROM {feedback_completed} fbc, {groups_members} gm WHERE fbc.feedback = :feedback AND gm.groupid = :groupid AND fbc.userid = gm.userid" | 1 |
|
"SELECT COUNT(fbc.id) FROM {feedback_completed} fbc WHERE fbc.feedback = :feedback AND fbc.courseid = :courseid" | 1 |
|
"SELECT COUNT(fbc.id) FROM {feedback_completed} fbc WHERE fbc.feedback = :feedback" | 1 |
|
"SELECT fbc.courseid FROM {feedback_completed} fbc WHERE fbc.feedback = :feedbackid" | 1 |
|
'SELECT c.id, c.shortname, c.fullname, c.idnumber, c.visible, ' . $ctxselect . ' FROM {course} c JOIN {context} ctx ON c.id = ctx.instanceid AND ctx.contextlevel = :contextcourse WHERE c.id IN (' . $courseselect . ') ORDER BY c.sortorder' | 1 |
|
"SELECT $fields FROM $from WHERE c.id " . $idsql | 1 |
|
" SELECT DISTINCT ctx.id FROM {%s} fc JOIN {modules} m ON m.name = :feedback JOIN {course_modules} cm ON cm.instance = fc.feedback AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modlevel WHERE fc.userid = :userid" | 1 |
|
" SELECT fc.userid FROM {%s} fc JOIN {modules} m ON m.name = :feedback JOIN {course_modules} cm ON cm.instance = fc.feedback AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modlevel WHERE ctx.id = :contextid" | 1 |
|
" SELECT fc.id FROM {%s} fc JOIN {modules} m ON m.name = :feedback JOIN {course_modules} cm ON cm.instance = fc.feedback AND cm.module = m.id WHERE cm.id = :cmid" | 1 |
|
" SELECT fc.id FROM {%s} fc JOIN {modules} m ON m.name = :feedback JOIN {course_modules} cm ON cm.instance = fc.feedback AND cm.module = m.id WHERE fc.userid = :userid AND cm.id $insql" | 1 |
|
" SELECT fc.id FROM {%s} fc JOIN {modules} m ON m.name = :feedback JOIN {course_modules} cm ON cm.instance = fc.feedback AND cm.module = m.id WHERE cm.id = :instanceid AND fc.userid $insql" | 1 |
|
" SELECT $uniqid AS uniqid, f.id AS feedbackid, ctx.id AS contextid, $istmpsqlval AS istmp, fc.id AS submissionid, fc.anonymous_response AS anonymousresponse, fc.timemodified AS timemodified, fv.id AS valueid, fv.course_id AS valuecourse_id, fv.item AS valueitem, fv.completed AS valuecompleted, fv.tmp_completed AS valuetmp_completed, $ctxfields FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {feedback} f ON f.id = cm.instance JOIN {%s} fc ON fc.feedback = f.id JOIN {%s} fv ON fv.completed = fc.id WHERE ctx.id $insql AND fc.userid = :userid{$i}" | 1 |
|
" SELECT q.*, COALESCE(fv.value, fvt.value) AS valuevalue, fi.id AS itemid, fi.feedback AS itemfeedback, fi.template AS itemtemplate, fi.name AS itemname, fi.label AS itemlabel, fi.presentation AS itempresentation, fi.typ AS itemtyp, fi.hasvalue AS itemhasvalue, fi.position AS itemposition, fi.required AS itemrequired, fi.dependitem AS itemdependitem, fi.dependvalue AS itemdependvalue, fi.options AS itemoptions FROM ($nontmpsql UNION $tmpsql) q LEFT JOIN {feedback_value} fv ON fv.id = q.valueid AND q.istmp = 0 LEFT JOIN {feedback_valuetmp} fvt ON fvt.id = q.valueid AND q.istmp = 1 JOIN {feedback_item} fi ON (fi.id = fv.item OR fi.id = fvt.item) ORDER BY q.contextid, q.istmp, q.submissionid, q.valueid" | 1 |
|
" SELECT fv.id FROM {%s} fv LEFT JOIN {%s} fc ON fc.id = fv.completed WHERE fc.id IS NULL" | 1 |
|
'Delete old items' | 1 |
|
'Delete page break' | 1 |
|
'Delete template...' | 1 |
|
'Delete completed submissions' | 1 |
|
'Show analysis page' | 1 |
|
'Show responses' | 1 |
|
'Show response' | 1 |
|
'Show non-respondents' | 1 |
|
'SELECT cc.id, cc.name FROM {course_categories} cc, {course} c ' . 'WHERE c.category = cc.id AND c.id = ?' | 1 |
|
' SELECT * FROM {feedback_completed} WHERE feedback = ?' | 1 |
|
"SELECT e.element, v.value, v.timemodified, v.id as valueid FROM {scorm_scoes_value} v JOIN {scorm_attempt} a ON a.id = v.attemptid JOIN {scorm_element} e on e.id = v.elementid WHERE a.scormid = :scormid AND a.userid = :userid AND v.scoid = :scoid AND a.attempt = :attempt" | 1 |
|
"SELECT v.id, a.userid, a.scormid, v.scoid, a.attempt, v.value, v.timemodified, e.element FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e ON e.id = v.elementid WHERE a.userid = ? AND v.scoid = ? AND a.attempt = ? ORDER BY e.element ASC" | 1 |
|
"SELECT min(timemodified) as start, max(timemodified) as finish FROM {scorm_scoes_value} v JOIN {scorm_attempt} a on a.id = v.attemptid WHERE a.userid = :userid AND a.scormid = :scormid AND a.attempt = :attempt" | 1 |
|
"SELECT MAX(attempt) FROM {scorm_attempt} WHERE userid = ? AND scormid = ?" | 1 |
|
"SELECT MIN(attempt) FROM {scorm_attempt} WHERE userid = ? AND scormid = ?" | 1 |
|
"SELECT MAX(a.attempt) FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e ON e.id = v.elementid WHERE userid = ? AND scormid = ? AND (" . $DB->sql_compare_text('v.value') . " = " . $DB->sql_compare_text('?') . " OR " . $DB->sql_compare_text('v.value') . " = " . $DB->sql_compare_text('?') . ")" | 1 |
|
"SELECT DISTINCT attempt FROM {scorm_attempt} WHERE userid = ? AND scormid = ? ORDER BY attempt" | 1 |
|
"SELECT COUNT(DISTINCT st.userid) FROM {scorm_attempt} st INNER JOIN {groups_members} gm ON st.userid = gm.userid INNER JOIN {groupings_groups} gg ON gm.groupid = gg.groupid WHERE st.scormid = ? AND gg.groupingid = ? " | 1 |
|
"SELECT COUNT(DISTINCT st.userid) FROM {scorm_attempt} st WHERE st.scormid = ? " | 1 |
|
"SELECT DISTINCT a.attempt AS attemptnumber FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e ON e.id = v.elementid WHERE a.userid = :userid AND a.scormid = :scormid AND e.element = :element ORDER BY a.attempt" | 1 |
|
"SELECT COUNT(DISTINCT a.attempt) FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e ON e.id = v.elementid WHERE a.userid = :userid AND a.scormid = :scormid AND e.element = :element" | 1 |
|
"SELECT COUNT(DISTINCT attempt) FROM {scorm_attempt} WHERE userid = :userid AND scormid = :scormid" | 1 |
|
"SELECT a.id, a.userid, a.scormid, a.attempt, v.id as valueid, v.scoid, v.value, v.timemodified, e.element FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e on e.id = v.elementid WHERE v.scoid = :scoid AND a.userid = :userid AND e.element = :element" | 1 |
|
"SELECT DISTINCT userid FROM {scorm_attempt} WHERE scormid = ?" | 1 |
|
"SELECT s.*, cm.idnumber as cmidnumber, s.course as courseid FROM {scorm} s, {course_modules} cm, {modules} m WHERE m.name='scorm' AND m.id=cm.module AND cm.instance=s.id AND s.course=?" | 1 |
|
"SELECT sc.id, sub.value FROM {scorm_scoes} sc LEFT JOIN (SELECT v.scoid, v.value FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON a.id = v.attemptid JOIN {scorm_element} e on e.id = v.elementid AND e.element = :element WHERE a.userid = :userid AND a.attempt = :attempt AND a.scormid = :scormid) sub ON sub.scoid = sc.id WHERE sc.scormtype = 'sco' AND sc.scorm = :scormid2" | 1 |
|
"SELECT v.id FROM {scorm_scoes_value} v JOIN {scorm_attempt} a ON a.id = v.attemptid WHERE a.scormid = :scormid AND v.timemodified > :timemodified" | 1 |
|
"SELECT max(attempt) as attempt FROM {scorm_attempt} a JOIN {scorm_scoes_value} v on v.attemptid = a.id WHERE v.scoid = :scoid AND a.userid = :userid" | 1 |
|
'Show navigation buttons' | 1 |
|
"SELECT ctx.id FROM {%s} ss JOIN {modules} m ON m.name = 'scorm' JOIN {course_modules} cm ON cm.instance = ss.scormid AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modlevel WHERE ss.userid = :userid" | 1 |
|
"SELECT ss.userid FROM {%s} ss JOIN {modules} m ON m.name = 'scorm' JOIN {course_modules} cm ON cm.instance = ss.scormid AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modlevel WHERE ctx.id = :contextid" | 1 |
|
"SELECT v.id, a.attempt, e.element, v.value, v.timemodified, ctx.id as contextid FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON a.id = v.attemptid JOIN {scorm_element} e on e.id = v.elementid JOIN {course_modules} cm ON cm.instance = a.scormid JOIN {context} ctx ON ctx.instanceid = cm.id WHERE ctx.id $insql AND a.userid = :userid" | 1 |
|
"SELECT ss.id, ss.scormmode, ss.scormstatus, ss.attempt, ss.lessonstatus, ss.sessiontime, ss.timecreated, ss.timemodified, ctx.id as contextid FROM {scorm_aicc_session} ss JOIN {course_modules} cm ON cm.instance = ss.scormid JOIN {context} ctx ON ctx.instanceid = cm.id WHERE ctx.id $insql AND ss.userid = :userid" | 1 |
|
"SELECT ss.id FROM {%s} ss JOIN {modules} m ON m.name = 'scorm' JOIN {course_modules} cm ON cm.instance = ss.scormid AND cm.module = m.id WHERE cm.id = :cmid" | 1 |
|
"SELECT ss.id FROM {%s} ss JOIN {modules} m ON m.name = 'scorm' JOIN {course_modules} cm ON cm.instance = ss.scormid AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id WHERE ss.userid = :userid AND ctx.id $insql" | 1 |
|
"SELECT ss.id FROM {%s} ss JOIN {modules} m ON m.name = 'scorm' JOIN {course_modules} cm ON cm.instance = ss.scormid AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id WHERE ctx.id = :contextid AND ss.userid $insql" | 1 |
|
"SELECT element, id FROM {scorm_element} WHERE element " . $elementsql | 1 |
|
"SELECT v.id, v.scoid, e.element, v.value FROM {scorm_scoes_value} v JOIN {scorm_attempt} a ON a.id = v.attemptid JOIN {scorm_element} e ON e.id = v.elementid WHERE a.scormid = ? AND a.userid = ?" | 1 |
|
"SELECT v.id FROM {scorm_scoes_value} v JOIN {scorm_attempt} a ON a.id = v.attemptid WHERE a.userid = :userid AND a.attempt = :attempt AND a.scormid = :scormid AND v.scoid = :scoid" | 1 |
|
"SELECT * FROM {scorm_scoes_value} v JOIN {scorm_attempt} a ON a.id = v.attemptid WHERE a.scormid = ?" | 1 |
|
'Delete all SCORM attempts' | 1 |
|
'Show the directory links' | 1 |
|
'Update external packages timing' | 1 |
|
'Show the location bar' | 1 |
|
'Show the menu bar' | 1 |
|
'Show Navigation' | 1 |
|
'Delete SCORM attempts' | 1 |
|
'Delete own attempts' | 1 |
|
'Show the status bar' | 1 |
|
'Show the toolbar' | 1 |
|
"INSERT INTO {scorm_element} (element) SELECT DISTINCT element FROM {scorm_scoes_track}" | 1 |
|
"INSERT INTO {scorm_attempt} (userid, scormid, attempt) SELECT DISTINCT userid, scormid, attempt FROM {scorm_scoes_track}" | 1 |
|
"INSERT INTO {scorm_scoes_value} (attemptid, scoid, elementid, value, timemodified) SELECT a.id as attemptid, t.scoid as scoid, e.id as elementid, t.value as value, t.timemodified FROM {scorm_scoes_track} t JOIN {scorm_element} e ON e.element = t.element JOIN {scorm_attempt} a ON (t.userid = a.userid AND t.scormid = a.scormid AND a.attempt = t.attempt)" | 1 |
|
"SELECT min(timemodified) FROM {upgrade_log} WHERE plugin = 'mod_scorm' AND version = '2023042403'" | 1 |
|
"SELECT DISTINCT s.id, sa.userid FROM {scorm} s JOIN {scorm_attempt} sa ON sa.scormid = s.id JOIN {scorm_scoes_value} sv on sv.attemptid = sa.id WHERE sv.timemodified > ?" | 1 |
|
"SELECT DISTINCT e.id, e.element FROM {scorm_element} e JOIN {scorm_scoes_value} v ON e.id = v.elementid JOIN {scorm_attempt} a ON a.id = v.attemptid WHERE a.scormid = ? AND " . $DB->sql_like("element", "?", false) . " ORDER BY e.element" | 1 |
|
"SELECT a.id, a.userid, a.scormid, v.scoid, a.attempt, v.value, v.timemodified, e.element FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e ON e.id = v.elementid WHERE a.userid = :userid AND a.scormid = :scormid AND a.attempt = :attempt" | 1 |
|
"SELECT DISTINCT $value as value, ss.id FROM {scorm_scoes_value} v JOIN {scorm_scoes} ss ON ss.id = v.scoid AND ss.scorm = :scormid JOIN {scorm_element} e ON v.elementid = e.id WHERE " . $DB->sql_like("element", ":search", false) | 1 |
|
'Show objective score' | 1 |
|
"SELECT DISTINCT " . $DB->sql_concat('a.userid', '\'#\'', 'COALESCE(a.attempt, 0)') . " AS uniqueid, a.userid AS userid, a.scormid AS scormid, a.attempt AS attempt, v.scoid AS scoid FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id WHERE a.userid IN ({$allowedlist}) AND v.scoid = :scoid" | 1 |
|
'delete attempts' | 1 |
|
'SELECT v.id, a.userid, a.attempt, e.element, v.value, v.timemodified FROM {scorm_attempt} a JOIN {scorm_scoes_value} v ON v.attemptid = a.id JOIN {scorm_element} e ON e.id = v.elementid WHERE v.scoid = :scoid' | 1 |
|
" SELECT f.*, d.maildigest FROM {forum} f LEFT JOIN {forum_digests} d ON d.forum = f.id AND d.userid = ? WHERE f.course = ? " | 1 |
|
"SELECT fp.id, fp.subject, fd.forum, fp.discussion, f.type, fd.timestart, fd.timeend, fd.groupid, fd.firstpost, fp.parent, fp.userid, cm.id AS cmid, c.id AS courseid, c.shortname, c.fullname, $ctxselect FROM {forum_posts} fp JOIN {forum_discussions} fd ON fp.discussion = fd.id JOIN {forum} f ON f.id = fd.forum JOIN {modules} m ON m.name='forum' JOIN {course_modules} cm ON cm.module = m.id AND cm.instance = f.id JOIN {tag_instance} tt ON fp.id = tt.itemid JOIN {course} c ON cm.course = c.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component AND cm.deletioninprogress = 0 AND fp.id %ITEMFILTER% AND c.id %COURSEFILTER%" | 1 |
|
"SELECT $postdata, d.id as discussionid, d.name as discussionname, d.timemodified, d.usermodified, d.groupid, d.timestart, d.timeend, $userpicturefields FROM {forum_discussions} d JOIN {forum_posts} p ON p.discussion = d.id JOIN {user} u ON p.userid = u.id WHERE d.forum = {$forum->id} AND p.parent = 0 AND p.deleted <> 1 $timelimit $groupselect $newsince ORDER BY $forumsort" | 1 |
|
"SELECT p.id AS postid, d.id AS discussionid, d.name AS discussionname, d.groupid, d.timestart, d.timeend, u.id AS userid, $usernamefields, p.subject AS postsubject, p.message AS postmessage, p.created AS postcreated, p.messageformat AS postformat, p.messagetrust AS posttrust, p.parent as postparent FROM {forum_discussions} d, {forum_posts} p, {user} u WHERE d.forum = {$forum->id} AND p.discussion = d.id AND p.deleted <> 1 AND u.id = p.userid $newsince $privatewhere $groupselect ORDER BY p.created desc" | 1 |
|
"SELECT p.*, f.course, f.type AS forumtype, f.name AS forumname, f.intro, f.introformat, f.duedate, f.cutoffdate, f.assessed AS forumassessed, f.assesstimestart, f.assesstimefinish, f.scale, f.grade_forum, f.maxbytes, f.maxattachments, f.forcesubscribe, f.trackingtype, f.rsstype, f.rssarticles, f.timemodified, f.warnafter, f.blockafter, f.blockperiod, f.completiondiscussions, f.completionreplies, f.completionposts, f.displaywordcount, f.lockdiscussionafter, f.grade_forum_notify, d.name AS discussionname, d.firstpost, d.userid AS discussionstarter, d.assessed AS discussionassessed, d.timemodified, d.usermodified, d.forum, d.groupid, d.timestart, d.timeend, d.pinned, d.timelocked, $allnamefields FROM {forum_posts} p JOIN {forum_discussions} d ON d.id = p.discussion JOIN {forum} f ON f.id = d.forum JOIN {user} u ON u.id = p.userid WHERE p.created > ? AND f.course = ? AND p.deleted <> 1 ORDER BY p.id ASC" | 1 |
|
"SELECT p.*, d.forum, $allnames, u.email, u.picture, u.imagealt FROM {forum_posts} p JOIN {forum_discussions} d ON p.discussion = d.id LEFT JOIN {user} u ON p.userid = u.id WHERE p.id = ?" | 1 |
|
"SELECT p.*, $allnames, u.email, u.picture, u.imagealt $tr_sel FROM {forum_posts} p LEFT JOIN {user} u ON p.userid = u.id $tr_join WHERE p.discussion = ? ORDER BY $sort" | 1 |
|
"SELECT COUNT(*) FROM $fromsql WHERE $selectsql" | 1 |
|
"SELECT p.*, d.forum, $allnames, u.email, u.picture, u.imagealt FROM $fromsql WHERE $selectsql ORDER BY p.modified DESC" | 1 |
|
"SELECT p.*, d.forum, $allnames, u.email, u.picture, u.imagealt FROM {forum} f JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON p.discussion = d.id JOIN {user} u ON u.id = p.userid WHERE f.id = ? AND p.userid = ? $timedsql ORDER BY p.modified ASC" | 1 |
|
"SELECT DISTINCT d.* FROM {forum} f JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON p.discussion = d.id WHERE f.id = ? AND p.userid = ? $timedsql" | 1 |
|
"SELECT COUNT(p.id) AS postcount, MAX(p.modified) AS lastpost FROM {forum} f JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON p.discussion = d.id JOIN {user} u ON u.id = p.userid WHERE f.id = ? AND p.userid = ? $timedsql" | 1 |
|
"SELECT p.*, f.type AS forumtype, d.forum, d.groupid, $allnames, u.email, u.picture FROM {forum_discussions} d, {forum_posts} p, {forum} f, {user} u WHERE p.id = ? AND d.id = p.discussion AND p.userid = u.id AND u.deleted <> '1' AND f.id = d.forum" | 1 |
|
"SELECT p.*, f.type AS forumtype, d.forum, d.groupid, $allnames, u.email, u.picture FROM {forum_discussions} d, {forum_posts} p, {forum} f, {user} u WHERE d.id = ? AND d.firstpost = p.id AND p.userid = u.id AND u.deleted <> '1' AND f.id = d.forum" | 1 |
|
"SELECT p.* FROM {forum_discussions} d, {forum_posts} p WHERE d.id = ? AND d.firstpost = p.id " | 1 |
|
"SELECT p.discussion, COUNT(p.id) AS replies, MAX(p.id) AS lastpostid FROM {forum_posts} p JOIN {forum_discussions} d ON p.discussion = d.id WHERE p.parent > 0 AND d.forum = :forumid $privatewhere GROUP BY p.discussion" | 1 |
|
"SELECT p.discussion, (COUNT(p.id) - 1) AS replies, MAX(p.id) AS lastpostid FROM {forum_posts} p JOIN {forum_discussions} d ON p.discussion = d.id WHERE d.forum = :forumid $privatewhere GROUP BY p.discussion $groupby $orderby" | 1 |
|
"SELECT f.id, COUNT(d.id) as dcount FROM {forum} f JOIN {forum_discussions} d ON d.forum = f.id WHERE f.course = ? $timedsql GROUP BY f.id" | 1 |
|
"SELECT COUNT(d.id) FROM {forum_discussions} d WHERE d.groupid $mygroups_sql AND d.forum = ? $timedsql" | 1 |
|
"SELECT $postdata, $discussionfields, $allnames, u.email, u.picture, u.imagealt, u.deleted AS userdeleted $umfields FROM {forum_discussions} d JOIN {forum_posts} p ON p.discussion = d.id JOIN {user} u ON p.userid = u.id $umtable WHERE d.forum = ? AND p.parent = 0 $timelimit $groupselect $updatedsincesql ORDER BY $forumsort, d.id DESC" | 1 |
|
"SELECT d.id, d.name, d.timemodified, d.groupid, d.timestart, d.timeend FROM {forum_discussions} d JOIN {forum_posts} p ON d.firstpost = p.id WHERE d.forum = :forumid AND d.id <> :discid1 $timelimit $groupselect" | 1 |
|
"SELECT pp.created FROM {forum_discussions} dd JOIN {forum_posts} pp ON dd.firstpost = pp.id " | 1 |
|
"SELECT d.id, COUNT(p.id) AS unread FROM {forum_discussions} d JOIN {forum_posts} p ON p.discussion = d.id LEFT JOIN {forum_read} r ON (r.postid = p.id AND r.userid = $USER->id) WHERE d.forum = {$cm->instance} AND p.modified >= :cutoffdate AND r.id is NULL $groupselect $timedsql GROUP BY d.id" | 1 |
|
"SELECT COUNT(d.id) FROM {forum_discussions} d JOIN {forum_posts} p ON p.discussion = d.id WHERE d.forum = ? AND p.parent = 0 $groupselect $timelimit" | 1 |
|
"SELECT 'x' FROM {forum_discussions} d, {forum_posts} p WHERE d.forum = ? AND p.discussion = d.id AND p.parent = 0 AND p.userid = ?" | 1 |
|
"SELECT d.id AS id, d.* FROM {forum_posts} p, {forum_discussions} d WHERE p.discussion = d.id AND d.forum = ? AND p.userid = ?" | 1 |
|
"SELECT 'x' FROM {forum_posts} p JOIN {forum_discussions} d ON d.id = p.discussion WHERE p.userid = :userid AND d.forum = :forumid" | 1 |
|
"SELECT p.*, f.type AS forumtype, d.forum, d.groupid, d.timestart, d.timeend, d.userid AS duserid, $allnames, u.email, u.picture, u.imagealt, u.email FROM {forum_posts} p JOIN {forum_discussions} d ON d.id = p.discussion JOIN {forum} f ON f.id = d.forum JOIN {user} u ON u.id = p.userid WHERE p.created > ? AND f.id = ? $userselect $groupselect ORDER BY p.id ASC" | 1 |
|
"INSERT INTO {forum_read} (userid, postid, discussionid, forumid, firstread, lastread) SELECT :userid1, p.id, p.discussion, d.forum, :firstread, :lastread FROM {forum_posts} p JOIN {forum_discussions} d ON d.id = p.discussion JOIN {forum} f ON f.id = d.forum LEFT JOIN {forum_track_prefs} tf ON (tf.userid = :userid2 AND tf.forumid = f.id) LEFT JOIN {forum_read} fr ON ( fr.userid = :userid3 AND fr.postid = p.id AND fr.discussionid = d.id AND fr.forumid = f.id ) WHERE p.id $usql AND p.modified >= :cutoffdate $trackingsql AND fr.id IS NULL" | 1 |
|
"INSERT INTO {forum_read} (userid, postid, discussionid, forumid, firstread, lastread) SELECT ?, p.id, p.discussion, d.forum, ?, ? FROM {forum_posts} p JOIN {forum_discussions} d ON d.id = p.discussion WHERE p.id = ? AND p.modified >= ?" | 1 |
|
"UPDATE {forum_read} SET lastread = ? WHERE userid = ? AND postid = ?" | 1 |
|
"SELECT p.id FROM {forum_posts} p LEFT JOIN {forum_discussions} d ON d.id = p.discussion LEFT JOIN {forum_read} r ON (r.postid = p.id AND r.userid = ?) WHERE d.forum = ? AND p.modified >= ? AND r.id is NULL $groupsel" | 1 |
|
"SELECT p.id FROM {forum_posts} p LEFT JOIN {forum_read} r ON (r.postid = p.id AND r.userid = ?) WHERE p.discussion = ? AND p.modified >= ? AND r.id is NULL" | 1 |
|
"SELECT f.id, COUNT(p.id) AS unread, COUNT(p.privatereply) as privatereplies, COUNT(p.privatereplytouser) as privaterepliestouser FROM ( SELECT id, discussion, CASE WHEN privatereplyto <> 0 THEN 1 END privatereply, CASE WHEN privatereplyto = :privatereplyto THEN 1 END privatereplytouser FROM {forum_posts} WHERE modified >= :modified ) p JOIN {forum_discussions} d ON d.id = p.discussion JOIN {forum} f ON f.id = d.forum JOIN {course} c ON c.id = f.course LEFT JOIN {forum_read} r ON (r.postid = p.id AND r.userid = :readuserid) LEFT JOIN {forum_track_prefs} tf ON (tf.userid = :trackprefsuser AND tf.forumid = f.id) WHERE f.course = :courseid AND r.id is NULL $trackingsql $timedsql GROUP BY f.id" | 1 |
|
"SELECT COUNT(p.id) FROM {forum_posts} p JOIN {forum_discussions} d ON p.discussion = d.id LEFT JOIN {forum_read} r ON (r.postid = p.id AND r.userid = :readuser) WHERE d.forum = :forum AND p.modified >= :cutoffdate AND r.id is NULL $timedsql AND d.groupid $groupssql AND (p.privatereplyto = 0 OR p.privatereplyto = :privatereplyto)" | 1 |
|
"SELECT f.id FROM {forum} f LEFT JOIN {forum_track_prefs} ft ON (ft.forumid = f.id AND ft.userid = ?) WHERE f.course = ? $trackingsql" | 1 |
|
"SELECT MIN(fp.modified) AS first FROM {forum_posts} fp JOIN {forum_read} fr ON fr.postid=fp.id" | 1 |
|
"SELECT id, userid, modified FROM {forum_posts} WHERE discussion=? ORDER BY modified DESC" | 1 |
|
'SELECT COUNT(p.id) FROM {forum_posts} p JOIN {forum_discussions} d ON p.discussion = d.id WHERE d.forum = ? AND p.userid = ? AND p.created > ?' | 1 |
|
"SELECT f.*, cm.idnumber as cmidnumber, f.course as courseid FROM {forum} f, {course_modules} cm, {modules} m WHERE m.name='forum' AND m.id=cm.module AND cm.instance=f.id AND f.course=? $wheresql" | 1 |
|
"SELECT fd.id FROM {forum_discussions} fd, {forum} f WHERE f.course=? AND f.id=fd.forum" | 1 |
|
"SELECT f.id FROM {forum} f WHERE f.course=?" | 1 |
|
"SELECT fp.id FROM {forum_posts} fp, {forum_discussions} fd, {forum} f WHERE f.course=? AND f.id=fd.forum AND fd.id=fp.discussion" | 1 |
|
"SELECT c.* $ctxselect FROM {course} c $ctxjoin WHERE c.id IN ($subquery)" | 1 |
|
"SELECT f.*, cm.id AS cmid FROM {forum} f JOIN {course_modules} cm ON cm.instance = f.id JOIN {modules} m ON m.id = cm.module JOIN ( SELECT f.id FROM {forum} f {$join} WHERE ff.userid = :userid GROUP BY f.id ) j ON j.id = f.id WHERE m.name = :forum {$coursewhere}" | 1 |
|
'SELECT COUNT(*) ' | 1 |
|
'SELECT p.*, d.forum, d.name AS discussionname, ' . $userfields . ' ' | 1 |
|
"SELECT f.id, cm.id as cm, cm.visible, f.course FROM {forum} f JOIN {course_modules} cm ON cm.instance = f.id JOIN {modules} m ON m.name = :modulename AND m.id = cm.module LEFT JOIN {forum_subscriptions} fs ON (fs.forum = f.id AND fs.userid = :userid) WHERE f.forcesubscribe <> :forcesubscribe AND fs.id IS NOT NULL AND cm.course $coursesql" | 1 |
|
"SELECT $fields FROM {user} u JOIN ($esql) je ON je.id = u.id WHERE u.auth <> 'nologin' AND u.suspended = 0 AND u.confirmed = 1 ORDER BY $sort" | 1 |
|
"SELECT $fields FROM ( SELECT userid FROM {forum_subscriptions} s WHERE s.forum = :sforumid UNION SELECT userid FROM {forum_discussion_subs} ds WHERE ds.forum = :dsforumid AND ds.preference <> :unsubscribed ) subscriptions JOIN {user} u ON u.id = subscriptions.userid JOIN ($esql) je ON je.id = u.id WHERE u.auth <> 'nologin' AND u.suspended = 0 AND u.confirmed = 1 ORDER BY $sort" | 1 |
|
"SELECT $fields FROM {user} u JOIN ($esql) je ON je.id = u.id JOIN {forum_subscriptions} s ON s.userid = u.id WHERE s.forum = :forumid AND u.auth <> 'nologin' AND u.suspended = 0 AND u.confirmed = 1 ORDER BY $sort" | 1 |
|
"SELECT f.id, f.course as course, cm.id AS cmid, f.forcesubscribe FROM {forum} f JOIN {course_modules} cm ON (cm.instance = f.id) JOIN {modules} m ON (m.id = cm.module) LEFT JOIN {forum_subscriptions} fs ON (fs.forum = f.id AND fs.userid = :userid) WHERE f.course = :courseid AND f.forcesubscribe = :initial AND m.name = 'forum' AND fs.id IS NULL" | 1 |
|
"SELECT $fields FROM {user} u JOIN ($esql) je ON je.id = u.id JOIN {forum_subscriptions} s ON s.userid = u.id WHERE $wherecondition AND s.forum = :forumid ORDER BY $sort" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussions} d ON d.forum = f.id WHERE d.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON p.discussion = d.id WHERE p.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_digests} dig ON dig.forum = f.id WHERE dig.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_subscriptions} sub ON sub.forum = f.id WHERE sub.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussion_subs} dsub ON dsub.forum = f.id WHERE dsub.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_track_prefs} pref ON pref.forumid = f.id WHERE pref.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_read} hasread ON hasread.forumid = f.id WHERE hasread.userid = :userid " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON p.discussion = d.id {$ratingsql->join} WHERE {$ratingsql->userwhere} " | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {forum} f ON f.id = cm.instance JOIN {forum_grades} fg ON fg.forum = f.id WHERE fg.userid = :userid " | 1 |
|
"SELECT d.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussions} d ON d.forum = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT p.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON d.id = p.discussion WHERE cm.id = :instanceid" | 1 |
|
"SELECT p.id FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON d.id = p.discussion WHERE cm.id = :instanceid" | 1 |
|
"SELECT dig.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_digests} dig ON dig.forum = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT sub.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_subscriptions} sub ON sub.forum = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT dsub.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_discussion_subs} dsub ON dsub.forum = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT hasread.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_read} hasread ON hasread.forumid = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT pref.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_track_prefs} pref ON pref.forumid = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT fg.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {forum} f ON f.id = cm.instance JOIN {forum_grades} fg ON fg.forum = f.id WHERE cm.id = :instanceid" | 1 |
|
"SELECT p.discussion AS id, f.id AS forumid, d.name, d.groupid FROM {forum} f JOIN {forum_discussions} d ON d.forum = f.id JOIN {forum_posts} p ON p.discussion = d.id" | 1 |
|
"SELECT * FROM ({$sql1} UNION {$sql2} UNION {$sql3}) united GROUP BY id, forumid, name, groupid" | 1 |
|
"SELECT COUNT(*) FROM {forum_posts} fp JOIN {forum_discussions} fd ON fp.discussion = fd.id WHERE fp.userid = :userid AND fd.forum = :forumid" | 1 |
|
"SELECT fp.*, f.id AS forumid, f.course AS courseid, fd.groupid AS groupid FROM {forum_posts} fp JOIN {forum_discussions} fd ON fd.id = fp.discussion JOIN {forum} f ON f.id = fd.forum $contextjoin WHERE fp.modified >= ? ORDER BY fp.modified ASC" | 1 |
|
"SELECT {$fields} FROM {$tables} WHERE p.id = :postid" | 1 |
|
"SELECT {$fields} FROM {$tables}" | 1 |
|
"SELECT discussion, COUNT(1) FROM {" . self::TABLE . "} p WHERE p.discussion {$insql} AND p.parent > 0 {$privatewhere} GROUP BY discussion" | 1 |
|
"SELECT {$alias}.id, {$alias}.parent FROM {{$table}} {$alias} WHERE p.discussion = :discussionid {$privatewhere}" | 1 |
|
"SELECT p.discussion, COUNT(p.id) FROM {" . self::TABLE . "} p LEFT JOIN {forum_read} r ON r.postid = p.id AND r.userid = :userid WHERE p.discussion {$insql} AND p.modified > :cutofftime AND r.id IS NULL {$privatewhere} GROUP BY p.discussion" | 1 |
|
" SELECT posts.* FROM {" . self::TABLE . "} posts JOIN ( SELECT p.discussion, MAX(p.id) as latestpostid FROM {" . self::TABLE . "} p JOIN ( SELECT mp.discussion, MAX(mp.created) AS created FROM {" . self::TABLE . "} mp WHERE mp.discussion {$insql} {$privatewhere} GROUP BY mp.discussion ) lp ON lp.discussion = p.discussion AND lp.created = p.created GROUP BY p.discussion ) plp on plp.discussion = posts.discussion AND plp.latestpostid = posts.id" | 1 |
|
" SELECT p.* FROM {" . self::TABLE . "} p JOIN ( SELECT mp.discussion, MIN(mp.created) AS created FROM {" . self::TABLE . "} mp WHERE mp.discussion {$insql} GROUP BY mp.discussion ) lp ON lp.discussion = p.discussion AND lp.created = p.created" | 1 |
|
"SELECT COUNT(1) FROM {" . self::TABLE . "} {$alias}" | 1 |
|
"SELECT instanceid, id FROM {context} WHERE contextlevel = ? AND instanceid {$insql}" | 1 |
|
"SELECT p.*, f.id AS forum, f.course FROM {forum_queue} q INNER JOIN {forum_posts} p ON p.id = q.postid INNER JOIN {forum_discussions} d ON d.id = p.discussion INNER JOIN {forum} f ON f.id = d.forum WHERE q.userid = :userid AND q.timemodified < :timemodified ORDER BY d.id, q.timemodified ASC" | 1 |
|
"SELECT p.*, f.id AS forum, f.course FROM {forum_posts} p INNER JOIN {forum_discussions} d ON d.id = p.discussion INNER JOIN {forum} f ON f.id = d.forum WHERE p.id {$in}" | 1 |
|
"UPDATE {forum_posts} SET modified = modified - 1" | 1 |
|
"UPDATE {forum_posts} SET created = created - 1" | 1 |
|
"UPDATE {forum_discussions} SET timemodified = timemodified - 1" | 1 |
|
"UPDATE {forum_queue} SET timemodified = timemodified - 1" | 1 |
|
'Delete any posts (anytime)' | 1 |
|
'Delete own posts (within deadline)' | 1 |
|
'Show parent' | 1 |
|
'Delete posts from' | 1 |
|
'Delete all posts' | 1 |
|
'Delete all per-user forum digest preferences' | 1 |
|
'Delete all forum subscriptions' | 1 |
|
'Delete all forum tracking preferences' | 1 |
|
'Show grader panel' | 1 |
|
'Show previous replies ({$a})' | 1 |
|
'Show user search' | 1 |
|
'Show more users' | 1 |
|
"UPDATE {forum_discussions} SET usermodified = userid WHERE usermodified = 0" | 1 |
|
'SELECT COUNT(fi.id) AS attcount, fi.itemid AS postid, fi.userid FROM {files} fi WHERE fi.component = :component AND fi.filesize > 0 GROUP BY fi.itemid, fi.userid' | 1 |
|
"SELECT {$selectfields} FROM {$this->sql->basefromjoins} {$this->sql->filterfromjoins} WHERE {$this->sql->basewhere} {$this->sql->filterwhere} {$groupby} {$orderby}" | 1 |
|
"INSERT INTO {" . self::LOG_SUMMARY_TEMP_TABLE . "} (userid, viewcount) SELECT userid, COUNT(*) AS viewcount FROM {" . $logtable . "} WHERE contextid {$contextidin} $datewhere $nonanonymous GROUP BY userid" | 1 |
|
"SELECT 'x' FROM {forum_posts} fp JOIN {forum_discussions} fd ON fd.id = fp.discussion WHERE fd.forum {$forumidin} AND (fp.wordcount IS NULL OR fp.charcount IS NULL)" | 1 |
|
' SELECT * FROM {forum_discussions} WHERE forum = ?' | 1 |
|
'delete discussi' | 1 |
|
"SELECT name, value FROM {lti_types_config} WHERE typeid = :typeid1 UNION ALL SELECT 'toolurl' AS name, baseurl AS value FROM {lti_types} WHERE id = :typeid2 UNION ALL SELECT 'icon' AS name, icon AS value FROM {lti_types} WHERE id = :typeid3 UNION ALL SELECT 'secureicon' AS name, secureicon AS value FROM {lti_types} WHERE id = :typeid4" | 1 |
|
"SELECT t.* FROM {lti_types} t LEFT JOIN {lti_types_categories} tc on t.id = tc.typeid WHERE t.tooldomain = :tooldomain AND (t.course = :siteid $coursefilter) $statefilter AND (tc.id IS NULL OR tc.categoryid = :categoryid)" | 1 |
|
"SELECT t.id, t.name, t.baseurl, t.state, t.toolproxyid, t.timecreated, tp.name tpname FROM {lti_types} t LEFT OUTER JOIN {lti_tool_proxies} tp ON t.toolproxyid = tp.id {$where}" | 1 |
|
"SELECT " . $DB->sql_compare_text('t2.value', 256) . " AS value FROM {lti_types_config} t1 JOIN {lti_types_config} t2 ON t1.typeid = t2.typeid JOIN {lti_types} type ON t2.typeid = type.id WHERE t1.name = 'resourcekey' AND " . $DB->sql_compare_text('t1.value', 256) . " = :key1 AND t2.name = 'password' AND type.state = :configured1 AND type.ltiversion <> :ltiversion UNION SELECT tp.secret AS value FROM {lti_tool_proxies} tp JOIN {lti_types} t ON tp.id = t.toolproxyid WHERE tp.guid = :key2 AND t.state = :configured2 UNION SELECT password AS value FROM {lti} WHERE resourcekey = :key3" | 1 |
|
"SELECT cm.id, cm.course FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id JOIN {lti} l ON l.course = cm.course WHERE m.name = :name AND l.typeid = :typeid" | 1 |
|
'SELECT * FROM {lti_tool_proxies} WHERE ' . $DB->sql_compare_text('regurl', 256) . ' = :regurl' | 1 |
|
"SELECT count(*) FROM {lti_types}" | 1 |
|
"SELECT ($typessql) + ($proxiessql) as total" . $DB->sql_null_from_clause( ) | 1 |
|
'Show title launch' | 1 |
|
'Show description launch' | 1 |
|
"SELECT count(*) as type_count" | 1 |
|
"SELECT ltp.id, ltp.name, ltp.regurl, ltp.state, ltp.guid, ltp.secret, ltp.vendorcode, ltp.capabilityoffered, ltp.serviceoffered, ltp.toolproxy, ltp.createdby, ltp.timecreated, ltp.timemodified" | 1 |
|
"SELECT c.id FROM {context} c INNER JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {lti} lti ON lti.id = cm.instance INNER JOIN {lti_submission} ltisub ON ltisub.ltiid = lti.id WHERE ltisub.userid = :userid" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course} course ON c.contextlevel = :contextlevel AND c.instanceid = course.id JOIN {lti_types} ltit ON ltit.course = course.id WHERE ltit.createdby = :userid" | 1 |
|
"SELECT ltisub.userid FROM {context} c INNER JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {lti} lti ON lti.id = cm.instance INNER JOIN {lti_submission} ltisub ON ltisub.ltiid = lti.id WHERE c.id = :contextid" | 1 |
|
"SELECT ltit.createdby AS userid FROM {context} c JOIN {course} course ON c.contextlevel = :contextlevel AND c.instanceid = course.id JOIN {lti_types} ltit ON ltit.course = course.id WHERE c.id = :contextid" | 1 |
|
"SELECT lti.id, cm.id AS cmid FROM {lti} lti JOIN {modules} m ON m.name = :lti JOIN {course_modules} cm ON cm.instance = lti.id AND cm.module = m.id WHERE cm.id $insql" | 1 |
|
'SELECT COUNT(1) FROM {lti_types} tt WHERE tt.course IN(:siteid, :courseid) AND tt.coursevisible NOT IN(:coursevisible)' | 1 |
|
"SELECT * FROM (SELECT t.*, c.coursevisible as coursevisibleoverridden FROM {lti_types} t LEFT JOIN {lti_types_categories} tc ON t.id = tc.typeid LEFT JOIN {lti_coursevisible} c ON c.typeid = t.id AND c.courseid = $courseid WHERE (t.coursevisible $coursevisiblesql OR (c.coursevisible $coursevisiblesql1 AND t.coursevisible NOT IN (:lticoursevisibleno))) AND ($coursecond) AND t.state = :active AND (tc.id IS NULL OR tc.categoryid = :categoryid)) tt WHERE tt.coursevisibleoverridden IS NULL OR tt.coursevisibleoverridden $coursevisibleoverriddensql" | 1 |
|
"SELECT COUNT(*) AS count FROM {lti_types_categories} tc WHERE tc.typeid = :typeid" | 1 |
|
"SELECT id FROM {course_categories} WHERE idnumber $insql" | 1 |
|
"SELECT lt.coursevisible coursevisible FROM {lti_types} lt WHERE lt.id = ?" | 1 |
|
"SELECT lt.coursevisible coursevisible1, lc.coursevisible AS coursevisible2 FROM {lti_types} lt LEFT JOIN {lti_coursevisible} lc ON lt.id = lc.typeid WHERE lt.id = ? AND lc.courseid = ?" | 1 |
|
'Select those capabilities which you wish to offer to the tool provider. More than one capability can be selected.' | 1 |
|
'Select content' | 1 |
|
'Select those services which you wish to offer to the tool provider. More than one service can be selected.' | 1 |
|
'Show in activity chooser and as a preconfigured tool' | 1 |
|
'Show as preconfigured tool when adding an external tool' | 1 |
|
'Delete preconfigured tool' | 1 |
|
'Delete a tool proxy' | 1 |
|
'Update a tool type' | 1 |
|
'Delete a tool type' | 1 |
|
'Delete a course tool type' | 1 |
|
"SELECT i.* FROM {grade_items} i WHERE (i.courseid = :courseid) ORDER BY i.id" | 1 |
|
'SELECT lti.* FROM {lti} lti INNER JOIN {lti_types} typ ON lti.typeid = typ.id WHERE lti.id = ? AND lti.course = ? AND typ.toolproxyid = ?' | 1 |
|
'SELECT lti.* FROM {lti} lti INNER JOIN {lti_types} typ ON lti.typeid = typ.id WHERE lti.id = ? AND lti.course = ? AND typ.id = ?' | 1 |
|
"SELECT l.*, t.vendorcode as vendorcode, t.guid as guid FROM {ltiservice_gradebookservices} l INNER JOIN {lti_tool_proxies} t ON (t.id = l.toolproxyid) WHERE l.courseid = ? AND l.toolproxyid = ? AND l.typeid is null" | 1 |
|
"SELECT l.*, null as vendorcode, null as guid FROM {ltiservice_gradebookservices} l WHERE l.courseid = ? AND l.typeid = ? AND l.toolproxyid is null" | 1 |
|
"SELECT id, name, value FROM {lti_types_config} WHERE typeid = ? AND name <> ? AND name <> ?" | 1 |
|
"SELECT id, name, value FROM {lti_types_config} WHERE typeid = ? AND (name = ? OR name = ?)" | 1 |
|
"SELECT * FROM {lti_tool_settings} WHERE toolproxyid = ? AND course = ? AND coursemoduleid = ?" | 1 |
|
'SELECT id FROM {lti_types} WHERE ' . $DB->sql_compare_text('baseurl', 255) . ' = ' . $DB->sql_compare_text(':baseurl', 255) . ' AND course = :course AND name = :name AND toolproxyid IS NULL' | 1 |
|
'SELECT o.id FROM {assign_overrides} o LEFT JOIN {groups} g ON o.groupid = g.id WHERE o.groupid IS NOT NULL AND g.id IS NULL AND o.assignid = ?' | 1 |
|
"SELECT o.*, g.name FROM {assign_overrides} o JOIN {groups} g ON o.groupid = g.id WHERE o.assignid = :assignid AND g.id $insql ORDER BY o.sortorder" | 1 |
|
'SELECT o.*, ' . $userfieldsapi->get_sql('u', false, '', '', false)->selects . ' FROM {assign_overrides} o JOIN {user} u ON o.userid = u.id WHERE o.assignid = :assignid ORDER BY ' . $sort | 1 |
|
'SELECT o.*, ' . $userfieldsapi->get_sql('u', false, '', '', false)->selects . ' FROM {assign_overrides} o JOIN {user} u ON o.userid = u.id JOIN {groups_members} gm ON u.id = gm.userid WHERE o.assignid = :assignid AND gm.groupid ' . $insql . ' ORDER BY ' . $sort | 1 |
|
"SELECT * FROM {assign_overrides} WHERE groupid $extra AND assignid = ? ORDER BY sortorder ASC" | 1 |
|
"UPDATE {assign_overrides} SET allowsubmissionsfromdate = allowsubmissionsfromdate + ? WHERE assignid = ? AND allowsubmissionsfromdate <> 0" | 1 |
|
"UPDATE {assign_overrides} SET duedate = duedate + ? WHERE assignid = ? AND duedate <> 0" | 1 |
|
"UPDATE {assign_overrides} SET cutoffdate = cutoffdate + ? WHERE assignid =? AND cutoffdate <> 0" | 1 |
|
'SELECT u.id, s.status, s.timemodified AS stime, g.timemodified AS gtime, g.grade, uf.extensionduedate' | 1 |
|
"SELECT {$prefix}s.userid FROM {assign_submission} {$prefix}s JOIN {user} {$prefix}u ON {$prefix}u.id = {$prefix}s.userid $capjoin->joins WHERE {$prefix}s.assignment = :{$prefix}assignment AND {$prefix}s.status <> :{$prefix}status AND $capjoin->wheres" | 1 |
|
"SELECT $fields FROM {user} u JOIN ($esql UNION $ssql) je ON je.id = u.id $additionaljoins WHERE u.deleted = 0 $additionalfilters ORDER BY $orderby" | 1 |
|
'SELECT COUNT(s.userid) FROM {assign_submission} s LEFT JOIN {assign_grades} g ON s.assignment = g.assignment AND s.userid = g.userid AND g.attemptnumber = s.attemptnumber JOIN(' . $esql . ') e ON e.id = s.userid WHERE s.latest = 1 AND s.assignment = :assignid AND s.timemodified IS NOT NULL AND s.status = :submitted AND (s.timemodified >= g.timemodified OR g.timemodified IS NULL OR g.grade IS NULL ' . $sqlscalegrade . ')' | 1 |
|
'SELECT COUNT(g.userid) FROM {assign_grades} g JOIN(' . $esql . ') e ON e.id = g.userid WHERE g.assignment = :assignid' | 1 |
|
'SELECT COUNT(DISTINCT s.groupid) FROM {assign_submission} s WHERE s.assignment = :assignid AND s.timemodified IS NOT NULL AND s.userid = :groupuserid' . $sqlnew | 1 |
|
'SELECT COUNT(DISTINCT s.userid) FROM {assign_submission} s JOIN(' . $esql . ') e ON e.id = s.userid WHERE s.assignment = :assignid AND s.timemodified IS NOT NULL ' . $sqlnew | 1 |
|
'SELECT COUNT(s.groupid) FROM {assign_submission} s WHERE s.latest = 1 AND s.assignment = :assignid AND s.timemodified IS NOT NULL AND s.userid = :groupuserid AND ' . $groupsstr . ' s.status = :submissionstatus' | 1 |
|
'SELECT COUNT(s.userid) FROM {assign_submission} s JOIN(' . $esql . ') e ON e.id = s.userid WHERE s.latest = 1 AND s.assignment = :assignid AND s.timemodified IS NOT NULL AND s.status = :submissionstatus' | 1 |
|
"SELECT g.id as gradeid, a.course, a.name, a.blindmarking, a.revealidentities, a.hidegrader, g.*, g.timemodified as lastmodified, cm.id as cmid, um.id as recordid FROM {assign} a JOIN {assign_grades} g ON g.assignment = a.id LEFT JOIN {assign_user_flags} uf ON uf.assignment = a.id AND uf.userid = g.userid JOIN {course_modules} cm ON cm.course = a.course AND cm.instance = a.id JOIN {modules} md ON md.id = cm.module AND md.name = 'assign' JOIN {grade_items} gri ON gri.iteminstance = a.id AND gri.courseid = a.course AND gri.itemmodule = md.name LEFT JOIN {assign_user_mapping} um ON g.id = um.userid AND um.assignment = a.id WHERE (a.markingworkflow = 0 OR (a.markingworkflow = 1 AND uf.workflowstate = :wfreleased)) AND g.grader > 0 AND uf.mailed = 0 AND gri.hidden = 0 AND g.timemodified >= :yesterday AND g.timemodified <= :today ORDER BY a.course, cm.id" | 1 |
|
'SELECT c.*, ' . $ctxselect . ' FROM {course} c LEFT JOIN {context} ctx ON ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel WHERE c.id ' . $courseidsql | 1 |
|
'SELECT id FROM {assign} WHERE allowsubmissionsfromdate >= :lastruntime AND allowsubmissionsfromdate <= :timenow AND alwaysshowdescription = 0' | 1 |
|
'SELECT s.userid, s.attemptnumber AS maxattempt FROM {assign_submission} s WHERE s.assignment = :assignid1 AND s.latest = 1' | 1 |
|
'SELECT u.id AS userid, g.grade AS grade, g.timemodified AS lastmodified, uf.workflowstate, uf.allocatedmarker, gmx.maxattempt AS attemptnumber FROM {user} u LEFT JOIN ( ' . $grademaxattempt . ' ) gmx ON u.id = gmx.userid LEFT JOIN {assign_grades} g ON u.id = g.userid AND g.assignment = :assignid2 AND g.attemptnumber = gmx.maxattempt LEFT JOIN {assign_user_flags} uf ON uf.assignment = g.assignment AND uf.userid = g.userid WHERE u.id ' . $userids | 1 |
|
"SELECT o.id, o.assignid, o.groupid FROM {assign_overrides} o JOIN {assign} assign ON assign.id = o.assignid WHERE assign.course = :courseid AND o.groupid = :groupid" | 1 |
|
"SELECT o.id, o.assignid, o.groupid FROM {assign_overrides} o JOIN {assign} assign ON assign.id = o.assignid LEFT JOIN {groups} grp ON grp.id = o.groupid WHERE assign.course = :courseid AND o.groupid IS NOT NULL AND grp.id IS NULL" | 1 |
|
"SELECT a.id FROM {assign} a WHERE a.course=:courseid" | 1 |
|
'SELECT a.*, cm.idnumber as cmidnumber, a.course as courseid FROM {assign} a, {course_modules} cm, {modules} m WHERE m.name=:moduletype AND m.id=cm.module AND cm.instance=a.id AND a.course=:courseid' | 1 |
|
"SELECT asb.id, asb.timemodified, cm.id AS cmid, um.id as recordid, $namefields FROM {assign_submission} asb JOIN {assign} a ON a.id = asb.assignment JOIN {course_modules} cm ON cm.instance = a.id JOIN {modules} md ON md.id = cm.module JOIN {user} u ON u.id = asb.userid LEFT JOIN {assign_user_mapping} um ON um.userid = u.id AND um.assignment = a.id WHERE asb.timemodified > ? AND asb.latest = 1 AND a.course = ? AND md.name = ? AND asb.status = ? ORDER BY asb.timemodified ASC" | 1 |
|
'SELECT asb.id, asb.timemodified, ' . $userfields . ' FROM {assign_submission} asb JOIN {assign} a ON a.id = asb.assignment JOIN {user} u ON u.id = asb.userid ' . $groupjoin . ' WHERE asb.timemodified > :timestart AND asb.status = :submitted AND a.id = :cminstance ' . $userselect . ' ' . $groupselect . ' ORDER BY asb.timemodified ASC' | 1 |
|
'UPDATE {assign_grades} set grade = (((grade - :p1) * :p2) + :p3) where assignment = :a and grade >= 0' | 1 |
|
"SELECT ag.id, ag.assignment, ag.userid, ag.timecreated, ag.timemodified, ag.grader, ag.grade, ag.attemptnumber FROM {assign_grades} ag, {assign_submission} s WHERE s.assignment $inorequalsql AND s.userid = ag.userid AND s.latest = 1 AND s.attemptnumber = ag.attemptnumber AND ag.timemodified >= :since AND ag.assignment = s.assignment ORDER BY ag.assignment, ag.id" | 1 |
|
'show identities for a blind marking assignment' | 1 |
|
"SELECT cm.id, cm.instance FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module " . "WHERE md.name = :modname AND cm.instance " . $inorequalsql | 1 |
|
'SELECT mxs.userid, mxs.groupid, MAX(mxs.attemptnumber) AS maxattempt FROM {assign_submission} mxs WHERE mxs.assignment = :assignid1 GROUP BY mxs.userid, mxs.groupid' | 1 |
|
"SELECT mas.id, mas.assignment,mas.userid," . "mas.timecreated,mas.timemodified,mas.timestarted,mas.status,mas.groupid,mas.attemptnumber " . "FROM {assign_submission} mas " . "JOIN ( " . $submissionmaxattempt . " ) smx ON mas.userid = smx.userid " . "AND mas.groupid = smx.groupid " . "WHERE mas.assignment = :assignid2 AND mas.attemptnumber = smx.maxattempt" | 1 |
|
"SELECT auf.id,auf.assignment,auf.userid,auf.locked,auf.mailed," . "auf.extensionduedate,auf.workflowstate,auf.allocatedmarker " . "FROM {assign_user_flags} auf " . "WHERE auf.assignment " . $inorequalsql . " ORDER BY auf.assignment, auf.id" | 1 |
|
"SELECT aum.id,aum.assignment,aum.userid " . "FROM {assign_user_mapping} aum " . "WHERE aum.assignment " . $inorequalsql . " ORDER BY aum.assignment, aum.id" | 1 |
|
"SELECT ctx.id FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {assign} a ON cm.instance = a.id JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {assign_grades} ag ON a.id = ag.assignment AND (ag.userid = :userid OR ag.grader = :graderid)" | 1 |
|
"SELECT ctx.id FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {assign} a ON cm.instance = a.id JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {assign_overrides} ao ON a.id = ao.assignid WHERE ao.userid = :aouserid" | 1 |
|
"SELECT ctx.id FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {assign} a ON cm.instance = a.id JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {assign_submission} asn ON a.id = asn.assignment WHERE asn.userid = :asnuserid" | 1 |
|
"SELECT ctx.id FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {assign} a ON cm.instance = a.id JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {assign_user_flags} auf ON a.id = auf.assignment WHERE auf.userid = :aufuserid" | 1 |
|
"SELECT ctx.id FROM {course_modules} cm JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {assign} a ON cm.instance = a.id JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel JOIN {assign_user_mapping} aum ON a.id = aum.assignment WHERE aum.userid = :aumuserid" | 1 |
|
"SELECT g.userid, g.grader FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {assign} a ON a.id = cm.instance JOIN {assign_grades} g ON a.id = g.assignment WHERE ctx.id = :contextid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT o.userid FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {assign} a ON a.id = cm.instance JOIN {assign_overrides} o ON a.id = o.assignid WHERE ctx.id = :contextid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT s.userid FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {assign} a ON a.id = cm.instance JOIN {assign_submission} s ON a.id = s.assignment WHERE ctx.id = :contextid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT uf.userid FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {assign} a ON a.id = cm.instance JOIN {assign_user_flags} uf ON a.id = uf.assignment WHERE ctx.id = :contextid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT um.userid FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {assign} a ON a.id = cm.instance JOIN {assign_user_mapping} um ON a.id = um.assignment WHERE ctx.id = :contextid AND ctx.contextlevel = :contextlevel" | 1 |
|
"SELECT DISTINCT userid AS id FROM {assign_grades} WHERE grader = :grader AND assignment = :assignid" | 1 |
|
"SELECT u.id FROM {user} u JOIN {groups_members} gm ON gm.userid = u.id {$enrolledjoin->joins} WHERE gm.groupid $ingroupsql AND {$enrolledjoin->wheres}" | 1 |
|
'UPDATE {assign_submission} SET timecreated = timecreated - 1, timemodified = timemodified - 1 WHERE userid = :userid' | 1 |
|
"SELECT DISTINCT f.contextid, f.component, f.filearea, f.itemid FROM {files} f LEFT JOIN {assign_grades} g ON g.id = f.itemid WHERE f.component = :assigneditpdf AND NOT (filearea = :stamps AND f.itemid = 0) AND g.id IS NULL" | 1 |
|
"SELECT er.id AS erid FROM {assignfeedback_editpdf_rot} er LEFT JOIN {assign_grades} g ON g.id = er.gradeid WHERE g.id IS NULL" | 1 |
|
"SELECT MIN(timecreated) AS min FROM {files} WHERE filearea = 'documentconversion'" | 1 |
|
"SELECT f3.id, f3.timemodified as fmodified, asu.id as submissionid FROM {files} f1 LEFT JOIN {files} f2 ON f1.contenthash = f2.filename AND f2.component = 'core' AND f2.filearea = 'documentconversion' JOIN {assign_submission} asu ON asu.id = f1.itemid JOIN {assign_grades} asg ON asg.userid = asu.userid AND asg.assignment = asu.assignment JOIN {files} f3 ON f3.itemid = asg.id WHERE f1.filearea = 'submission_files' AND f3.timecreated >= :earliest AND ($extensionsql) AND f2.filename IS NULL AND f3.component = 'assignfeedback_editpdf' AND f3.filearea = 'combined' AND f3.filename = 'combined.pdf' AND f3.timemodified >= asu.timemodified" | 1 |
|
'Delete annotation' | 1 |
|
'Delete feedback PDF' | 1 |
|
'SELECT id AS gradeid from {assign_grades} where id = :gradeid' | 1 |
|
'Update record' | 1 |
|
'Select {$a}' | 1 |
|
'Show recent submissions' | 1 |
|
'Update grade' | 1 |
|
'Update the current students submission' | 1 |
|
'Update the module completion status.' | 1 |
|
'SELECT g.id, g.userid, g.attemptnumber FROM {assign_grades} g LEFT JOIN {assign_submission} s ON s.assignment = g.assignment AND s.userid = g.userid WHERE s.id IS NULL AND g.assignment = ?' | 1 |
|
'SELECT DISTINCT userid FROM {assign_submission} WHERE assignment = ? AND groupid = ?' | 1 |
|
'SELECT DISTINCT groupid FROM {assign_submission} WHERE assignment = ? AND userid = ?' | 1 |
|
"SELECT contextid FROM {comments} WHERE component = :component AND commentarea = :commentarea AND userid = :userid" | 1 |
|
"SELECT DISTINCT c.userid AS id FROM {comments} c JOIN (SELECT c.itemid FROM {comments} c JOIN {assign_submission} s ON s.id = c.itemid AND s.assignment = :assignid WHERE c.userid = :commentuserid) aa ON aa.itemid = c.itemid WHERE c.userid NOT IN (:commentuserid2)" | 1 |
|
"SELECT a.id FROM {h5pactivity} a WHERE a.course=:courseid" | 1 |
|
"SELECT a.*, cm.idnumber as cmidnumber, a.course as courseid FROM {h5pactivity} a, {course_modules} cm, {modules} m WHERE m.name='h5pactivity' AND m.id=cm.module AND cm.instance=a.id AND a.course=?" | 1 |
|
"SELECT h5pa.id, h5pa.timemodified, cm.id as cmid, $namefields FROM {h5pactivity_attempts} h5pa JOIN {h5pactivity} h5p ON h5p.id = h5pa.h5pactivityid JOIN {course_modules} cm ON cm.instance = h5p.id JOIN {modules} md ON md.id = cm.module JOIN {user} u ON u.id = h5pa.userid WHERE h5pa.timemodified >= ? AND h5p.course = ? AND md.name = ? ORDER BY h5pa.timemodified ASC" | 1 |
|
"SELECT h5pa.id, h5pa.timemodified, cm.id as cmid, $userfields FROM {h5pactivity_attempts} h5pa JOIN {h5pactivity} h5p ON h5p.id = h5pa.h5pactivityid JOIN {course_modules} cm ON cm.instance = h5p.id JOIN {modules} md ON md.id = cm.module JOIN {user} u ON u.id = h5pa.userid $groupjoin WHERE h5pa.timemodified >= :timestart AND h5p.id = :cminstance $userselect $groupselect AND cm.id = :cmid ORDER BY h5pa.timemodified ASC" | 1 |
|
"SELECT ctx.id FROM {h5pactivity_attempts} ss JOIN {modules} m ON m.name = :activityname JOIN {course_modules} cm ON cm.instance = ss.h5pactivityid AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modlevel WHERE ss.userid = :userid" | 1 |
|
"SELECT ss.userid FROM {h5pactivity_attempts} ss JOIN {modules} m ON m.name = 'h5pactivity' JOIN {course_modules} cm ON cm.instance = ss.h5pactivityid AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modlevel WHERE ctx.id = :contextid" | 1 |
|
"SELECT har.id, ha.attempt, har.description, har.interactiontype, har.response, har.additionals, har.rawscore, har.maxscore, har.duration, har.timecreated, ctx.id as contextid FROM {h5pactivity_attempts_results} har JOIN {h5pactivity_attempts} ha ON har.attemptid = ha.id JOIN {course_modules} cm ON cm.instance = ha.h5pactivityid JOIN {context} ctx ON ctx.instanceid = cm.id WHERE ctx.id $insql AND ha.userid = :userid" | 1 |
|
"SELECT a.userid, AVG(a.scaled) AS scaled, 0 AS attemptid, MAX(timemodified) AS timemodified FROM {h5pactivity_attempts} a WHERE $where AND a.completion = 1 GROUP BY a.userid" | 1 |
|
"SELECT a.userid, a.scaled, MAX(a.id) AS attemptid, MAX(a.timemodified) AS timemodified FROM {h5pactivity_attempts} a LEFT JOIN {h5pactivity_attempts} b ON a.h5pactivityid = b.h5pactivityid AND a.userid = b.userid AND b.completion = 1 AND $join WHERE $where AND b.id IS NULL AND a.completion = 1 GROUP BY a.userid, a.scaled" | 1 |
|
"SELECT COUNT(*) FROM {user} u $usersjoin->joins WHERE $usersjoin->wheres" | 1 |
|
"SELECT userid, count(*) FROM {h5pactivity_attempts} WHERE h5pactivityid = :h5pactivityid GROUP BY userid" | 1 |
|
"SELECT DISTINCT {$userfields} FROM {user} u {$capjoin->joins} WHERE {$capjoin->wheres} {$sortorder}" | 1 |
|
"SELECT h5pa.id, h5pa.timemodified, cm.id as cmid, $namefields FROM {h5pactivity_attempts} h5pa JOIN {h5pactivity} h5p ON h5p.id = h5pa.h5pactivityid JOIN {course_modules} cm ON cm.instance = h5p.id JOIN {modules} md ON md.id = cm.module JOIN {user} u ON u.id = h5pa.userid WHERE h5pa.timemodified > ? AND h5p.course = ? AND md.name = ? ORDER BY h5pa.timemodified ASC" | 1 |
|
'Delete all attempts from activity' | 1 |
|
'Delete all attempts from user' | 1 |
|
"SELECT COUNT(DISTINCT u.id) FROM {user} u $usersjoin->joins WHERE $usersjoin->wheres" | 1 |
|
"SELECT u.username FROM {user} u {$usersjoin->joins} WHERE {$usersjoin->wheres}" | 1 |
|
'Select the correct answers' | 1 |
|
'Delete all H5P attempts' | 1 |
|
"SELECT bc.id, bc.title, bc.bookid, bc.hidden, cm.id AS cmid, c.id AS courseid, c.shortname, c.fullname, $ctxselect FROM {book_chapters} bc JOIN {book} b ON b.id = bc.bookid JOIN {modules} m ON m.name='book' JOIN {course_modules} cm ON cm.module = m.id AND cm.instance = b.id JOIN {tag_instance} tt ON bc.id = tt.itemid JOIN {course} c ON cm.course = c.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component AND cm.deletioninprogress = 0 AND bc.id %ITEMFILTER% AND c.id %COURSEFILTER%" | 1 |
|
'SELECT DISTINCT bc.id, bc.pagenum FROM {files} f, {book_chapters} bc WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea AND bc.bookid = :bookid AND bc.id = f.itemid' | 1 |
|
"SELECT c.*, b.id AS bookid, b.course AS courseid FROM {book_chapters} c JOIN {book} b ON b.id = c.bookid $contextjoin WHERE c.timemodified >= ? ORDER BY c.timemodified ASC" | 1 |
|
"UPDATE {book} SET revision = revision + 1 WHERE id = ?" | 1 |
|
'Delete chapter "{$a}"' | 1 |
|
'Show chapter "{$a}"' | 1 |
|
'SELECT t.id, ti.itemid, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = ? AND ti.component = ? AND ti.contextid = ?' | 1 |
|
'SELECT MAX(pagenum) FROM {book_chapters} WHERE bookid = ?' | 1 |
|
'Select a zip file containing HTML files and optional multimedia files and folders. To upload subchapters, add "_sub" to the end of HTML file or folder names.' | 1 |
|
"SELECT DISTINCT itemid FROM {files} WHERE contextid = :contextid AND component = 'booktool_exportimscp' AND itemid < :revision" | 1 |
|
"SELECT COUNT(*) FROM {glossary_entries} WHERE (glossaryid = ? OR sourceglossaryid = ?)" | 1 |
|
'SELECT ec.entryid, c.name FROM {glossary_entries_categories} ec JOIN {glossary_categories} c ON c.id = ec.categoryid WHERE ec.entryid ' . $where | 1 |
|
'SELECT ec.entryid, c.name FROM {glossary_entries_categories} ec JOIN {glossary_categories} c ON c.id = ec.categoryid WHERE ec.entryid = ?' | 1 |
|
'SELECT DISTINCT f.itemid, ge.concept FROM {files} f JOIN {modules} m ON (m.name = :modulename AND m.visible = 1) JOIN {course_modules} cm ON (cm.module = m.id AND cm.id = :instanceid) JOIN {glossary} g ON g.id = cm.instance JOIN {glossary_entries} ge ON (ge.glossaryid = g.id AND ge.id = f.itemid) WHERE f.contextid = :contextid AND f.component = :component AND f.filearea = :filearea' | 1 |
|
"SELECT ge.id, ge.concept, ge.glossaryid, ge.approved, ge.userid, cm.id AS cmid, c.id AS courseid, c.shortname, c.fullname, $ctxselect FROM {glossary_entries} ge JOIN {glossary} g ON g.id = ge.glossaryid JOIN {modules} m ON m.name='glossary' JOIN {course_modules} cm ON cm.module = m.id AND cm.instance = g.id JOIN {tag_instance} tt ON ge.id = tt.itemid JOIN {course} c ON cm.course = c.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component AND cm.deletioninprogress = 0 AND ge.id %ITEMFILTER% AND c.id %COURSEFILTER%" | 1 |
|
"SELECT e.id AS entryid, e.concept AS entryconcept, e.definition AS entrydefinition, e.definitionformat AS entryformat, e.definitiontrust AS entrytrust, e.timecreated AS entrytimecreated, u.id AS userid, $allnamefields FROM {glossary_entries} e, {user} u WHERE e.glossaryid = {$glossary->id} AND u.id = e.userid AND e.approved = 1 $time ORDER BY e.timecreated desc" | 1 |
|
"SELECT e.id AS entryid, e.concept AS entryconcept, e.definition AS entrydefinition, e.definitionformat AS entryformat, e.definitiontrust AS entrytrust, e.timecreated AS entrytimecreated, u.id AS userid FROM {glossary_entries} e, {user} u WHERE e.glossaryid = {$glossary->id} AND u.id = e.userid AND e.approved = 1 $time ORDER BY e.timecreated desc" | 1 |
|
"UPDATE {glossary_entries} SET approved = 1 where approved <> 1 and glossaryid = ?" | 1 |
|
"SELECT ge.id, ge.sourceglossaryid, cm.id AS sourcecmid FROM {glossary_entries} ge JOIN {modules} m ON m.name = 'glossary' JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = ge.sourceglossaryid) WHERE ge.glossaryid = ? AND ge.sourceglossaryid > 0" | 1 |
|
"UPDATE {glossary_entries} SET sourceglossaryid = 0 WHERE sourceglossaryid = ?" | 1 |
|
"SELECT id FROM {glossary_entries} WHERE glossaryid = ?" | 1 |
|
"SELECT id FROM {glossary_categories} WHERE glossaryid = ?" | 1 |
|
"SELECT e.*, u.firstname, u.lastname, u.email, u.picture FROM {glossary} g, {glossary_entries} e, {user} u WHERE g.id = ? AND e.glossaryid = g.id AND e.userid = ? AND e.userid = u.id ORDER BY e.timemodified ASC" | 1 |
|
" SELECT ge.id AS entryid, ge.glossaryid, ge.concept, ge.definition, ge.approved, ge.timemodified, $ufields FROM {glossary_entries} ge JOIN {user} u ON u.id = ge.userid $groupjoin WHERE ge.timemodified > :timestart AND ge.glossaryid = :glossaryid $approvedselect $userselect $groupselect ORDER BY ge.timemodified ASC" | 1 |
|
'SELECT ge.id, ge.concept, ge.approved, ge.timemodified, ge.glossaryid, ' . $userfields | 1 |
|
"SELECT e.*, u.firstname, u.lastname FROM {glossary_entries} e, {user} u WHERE e.id = ? AND u.id = ?" | 1 |
|
"SELECT g.id as glossaryid, g.scale, g.course, e.userid as userid, e.approved, e.timecreated, g.assesstimestart, g.assesstimefinish FROM {glossary_entries} e JOIN {glossary} g ON e.glossaryid = g.id WHERE e.id = :itemid" | 1 |
|
"SELECT $pivot id,userid,concept,definition,format FROM {glossary_entries} WHERE glossaryid = ? AND id IN ($entrylist)" | 1 |
|
"SELECT e.*, g.name as glossaryname, cm.id as cmid, cm.course as courseid FROM {glossary_entries} e, {glossary} g, {course_modules} cm, {modules} m WHERE m.name = 'glossary' AND cm.module = m.id AND (cm.visible = 1 OR cm.visible = $bypassadmin OR (cm.course = :courseid1 AND cm.visible = $bypassteacher)) AND g.id = cm.instance AND e.glossaryid = g.id AND ( (e.casesensitive != 1 AND LOWER(concept) = :conceptlower) OR (e.casesensitive = 1 and $sensitiveconceptsql)) AND (g.course = :courseid2 OR g.globalglossary = 1) AND e.usedynalink != 0 AND g.usedynalink != 0" | 1 |
|
"SELECT e.* FROM {glossary_entries} e, {glossary} g $onlyvisibletable WHERE $searchcond AND (e.glossaryid = g.id or e.sourceglossaryid = g.id) $onlyvisible AND g.id IN ($glos) AND e.approved <> 0" | 1 |
|
"SELECT COUNT('x') as num FROM {glossary_entries} WHERE glossaryid = :glossaryid AND userid <> :userid" | 1 |
|
"SELECT ctx.id FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module JOIN {glossary} g ON g.id = cm.instance WHERE ctx.contextlevel = :contextlevel AND m.name = 'glossary' AND g.id = :glossaryid" | 1 |
|
"SELECT COUNT('x') AS num FROM {glossary_entries} e JOIN {rating} r ON r.itemid = e.id WHERE e.glossaryid = :glossaryid AND r.userid = :userid AND r.component = 'mod_glossary' AND r.ratingarea = 'entry' AND r.contextid = :contextid" | 1 |
|
"SELECT g.*, cm.idnumber as cmidnumber, g.course as courseid FROM {glossary} g, {course_modules} cm, {modules} m WHERE m.name='glossary' AND m.id=cm.module AND cm.instance=g.id AND g.course=? $type" | 1 |
|
"SELECT e.id FROM {glossary_entries} e JOIN {glossary} g ON e.glossaryid = g.id WHERE g.course = ?" | 1 |
|
"SELECT g.id FROM {glossary} g WHERE g.course = ?" | 1 |
|
"UPDATE {glossary_entries} SET sourceglossaryid=0 WHERE glossaryid IN ($mainglossariessql)" | 1 |
|
"SELECT e.id, e.userid, e.glossaryid, u.id AS userexists, u.deleted AS userdeleted FROM {glossary_entries} e JOIN {glossary} g ON e.glossaryid = g.id LEFT JOIN {user} u ON e.userid = u.id WHERE g.course = ? AND e.userid > 0" | 1 |
|
"SELECT 1 FROM {glossary} g, {glossary_categories} gc WHERE g.id = gc.glossaryid and g.displayformat = ?" | 1 |
|
"SELECT COUNT(DISTINCT(u.id))" | 1 |
|
"SELECT DISTINCT(u.id) AS userId, $userfields" | 1 |
|
'SELECT ge.*, ge.concept AS glossarypivot, ' . $userfields . ' FROM {glossary_entries} ge LEFT JOIN {user} u ON u.id = ge.userid JOIN ( ' | 1 |
|
"SELECT DISTINCT ge.id" | 1 |
|
"SELECT COUNT(DISTINCT(ge.id)) $sqlfrom $sqlwhere" | 1 |
|
"SELECT * FROM {glossary_categories} WHERE " . $DB->sql_like('name', '?', false) . " AND glossaryid=?" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {glossary} g ON g.id = cm.instance JOIN {glossary_entries} ge ON ge.glossaryid = g.id WHERE ge.userid = :glossaryentryuserid" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {glossary} g ON g.id = cm.instance JOIN {glossary_entries} ge ON ge.glossaryid = g.id {$ratingquery->join} WHERE {$ratingquery->userwhere}" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {glossary} g ON g.id = cm.instance JOIN {glossary_entries} ge ON ge.glossaryid = g.id JOIN {comments} com ON com.commentarea =:commentarea AND com.itemid = ge.id WHERE com.userid = :commentuserid" | 1 |
|
"SELECT ge.userid FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {glossary} g ON g.id = cm.instance JOIN {glossary_entries} ge ON ge.glossaryid = g.id WHERE c.id = :contextid" | 1 |
|
"SELECT ge.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {glossary} g ON g.id = cm.instance JOIN {glossary_entries} ge ON ge.glossaryid = g.id WHERE c.id = :contextid" | 1 |
|
"SELECT ge.id as entryid, cm.id AS cmid, ge.userid, ge.concept, ge.definition, ge.definitionformat, ge.attachment, ge.timecreated, ge.timemodified FROM {glossary_entries} ge JOIN {glossary} g ON ge.glossaryid = g.id JOIN {course_modules} cm ON g.id = cm.instance JOIN {modules} m ON cm.module = m.id AND m.name = :modulename JOIN {context} c ON cm.id = c.instanceid AND c.contextlevel = :contextlevel LEFT JOIN {comments} com ON com.itemid = ge.id AND com.commentarea = :commentarea AND com.userid = :commentuserid {$ratingquery->join} WHERE c.id {$contextsql} AND (ge.userid = :userid OR com.id IS NOT NULL OR {$ratingquery->userwhere}) ORDER BY ge.id, cm.id" | 1 |
|
"SELECT ge.*, g.course FROM {glossary_entries} ge JOIN {glossary} g ON g.id = ge.glossaryid $contextjoin WHERE ge.timemodified >= ? ORDER BY ge.timemodified ASC" | 1 |
|
"SELECT ge.*, g.course, g.defaultapproval FROM {glossary_entries} ge JOIN {glossary} g ON g.id = ge.glossaryid WHERE ge.id = ?" | 1 |
|
"SELECT id, glossaryid, concept, casesensitive, 0 AS category, fullmatch FROM {glossary_entries} WHERE glossaryid IN ($glossarylist) AND usedynalink = 1 AND approved = 1 UNION SELECT id, glossaryid, name AS concept, 1 AS casesensitive, 1 AS category, 1 AS fullmatch FROM {glossary_categories} WHERE glossaryid IN ($glossarylist) AND usedynalink = 1 UNION SELECT ge.id, ge.glossaryid, ga.alias AS concept, ge.casesensitive, 0 AS category, ge.fullmatch FROM {glossary_alias} ga JOIN {glossary_entries} ge ON (ga.entryid = ge.id) WHERE ge.glossaryid IN ($glossarylist) AND ge.usedynalink = 1 AND ge.approved = 1" | 1 |
|
"SELECT g.id, g.name FROM {glossary} g JOIN {course_modules} cm ON (cm.instance = g.id) JOIN {modules} m ON (m.name = 'glossary' AND m.id = cm.module) WHERE g.usedynalink = 1 AND g.course = :course AND cm.visible = 1 AND m.visible = 1 ORDER BY g.globalglossary, g.id" | 1 |
|
"SELECT g.id, g.name FROM {glossary} g JOIN {course_modules} cm ON (cm.instance = g.id) JOIN {modules} m ON (m.name = 'glossary' AND m.id = cm.module) WHERE g.usedynalink = 1 AND g.globalglossary = 1 AND cm.visible = 1 AND m.visible = 1 ORDER BY g.globalglossary, g.id" | 1 |
|
'Select the default selection to show when the glossary is first viewed' | 1 |
|
'Select the default frame to show when the glossary is first viewed.' | 1 |
|
'Select the display format to be used for automatic linking and entry view.' | 1 |
|
'Select the sorting key by default.' | 1 |
|
'Select the sorting order by default.' | 1 |
|
'Select visible tabs for this glossary format' | 1 |
|
'Delete entry: {$a}' | 1 |
|
'Delete entries from' | 1 |
|
'Delete entries from all glossaries' | 1 |
|
'Show \'ALL\' link' | 1 |
|
'Show alphabet links' | 1 |
|
'Show \'Special\' link' | 1 |
|
'Delete the given entry from the glossary.' | 1 |
|
'update category' | 1 |
|
" SELECT u.* FROM {user} u JOIN ( SELECT DISTINCT userid FROM {lesson_attempts} WHERE lessonid = :lessonid ) ui ON u.id = ui.userid JOIN ($esql) ue ON ue.id = u.id ORDER BY $sort" | 1 |
|
"SELECT a.* FROM {lesson_attempts} a JOIN ($esql) ue ON a.userid = ue.id WHERE pageid $usql" | 1 |
|
"SELECT DISTINCT $ufields FROM {user} u JOIN {lesson_attempts} a ON u.id = a.userid JOIN ($esql) ue ON ue.id = a.userid WHERE a.lessonid = :lessonid ORDER BY $sort" | 1 |
|
'SELECT o.id FROM {lesson_overrides} o LEFT JOIN {groups} g ON o.groupid = g.id WHERE o.groupid IS NOT NULL AND g.id IS NULL AND o.lessonid = ?' | 1 |
|
"SELECT o.*, g.name FROM {lesson_overrides} o JOIN {groups} g ON o.groupid = g.id WHERE o.lessonid = :lessonid AND g.id $insql ORDER BY g.name" | 1 |
|
'SELECT o.*, ' . $userfieldsapi->get_sql('u', false, '', '', false)->selects . ' FROM {lesson_overrides} o JOIN {user} u ON o.userid = u.id WHERE o.lessonid = :lessonid ORDER BY ' . $sort | 1 |
|
'SELECT o.*, ' . $userfieldsapi->get_sql('u', false, '', '', false)->selects . ' FROM {lesson_overrides} o JOIN {user} u ON o.userid = u.id JOIN {groups_members} gm ON u.id = gm.userid WHERE o.lessonid = :lessonid AND gm.groupid ' . $insql . ' ORDER BY ' . $sort | 1 |
|
'SELECT userid, MAX(grade) AS maxgrade FROM {lesson_grades} WHERE userid = :userid AND lessonid = :lessonid GROUP BY userid' | 1 |
|
"SELECT o.id, o.lessonid, o.groupid FROM {lesson_overrides} o JOIN {lesson} lesson ON lesson.id = o.lessonid WHERE lesson.course = :courseid AND o.groupid = :groupid" | 1 |
|
"SELECT o.id, o.lessonid, o.groupid FROM {lesson_overrides} o JOIN {lesson} lesson ON lesson.id = o.lessonid LEFT JOIN {groups} grp ON grp.id = o.groupid WHERE lesson.course = :courseid AND o.groupid IS NOT NULL AND grp.id IS NULL" | 1 |
|
"SELECT DISTINCT $ufields FROM {user} u JOIN ( SELECT userid, lessonid FROM {lesson_attempts} a1 WHERE a1.lessonid = :a1lessonid UNION SELECT userid, lessonid FROM {lesson_branch} b1 WHERE b1.lessonid = :b1lessonid UNION SELECT userid, lessonid FROM {lesson_timer} c1 WHERE c1.lessonid = :c1lessonid ) a ON u.id = a.userid JOIN ($esql) ue ON ue.id = a.userid ORDER BY $sort" | 1 |
|
"SELECT lesson.id, lesson.deadline AS userdeadline FROM {lesson} lesson WHERE lesson.course = :courseid" | 1 |
|
"SELECT a.id, COALESCE(v.userclose, v.groupclose, a.deadline, 0) AS userdeadline FROM ( SELECT lesson.id as lessonid, MAX(leo.deadline) AS userclose, MAX(qgo.deadline) AS groupclose FROM {lesson} lesson LEFT JOIN {lesson_overrides} leo on lesson.id = leo.lessonid AND leo.userid = :userid LEFT JOIN {groups_members} gm ON gm.userid = :useringroupid LEFT JOIN {lesson_overrides} qgo on lesson.id = qgo.lessonid AND qgo.groupid = gm.groupid WHERE lesson.course = :courseid GROUP BY lesson.id ) v JOIN {lesson} a ON a.id = v.lessonid" | 1 |
|
"SELECT * FROM {lesson_overrides} WHERE groupid $extra AND lessonid = ?" | 1 |
|
"SELECT SUM(lessontime - starttime) FROM {lesson_timer} WHERE lessonid = :lessonid AND userid = :userid" | 1 |
|
"SELECT * FROM {lesson_timer} WHERE lessonid = :lessonid AND userid = :userid ORDER BY starttime DESC" | 1 |
|
"SELECT * FROM {lesson_timer} WHERE lessonid = :lessonid AND userid = :userid ORDER by starttime desc" | 1 |
|
"SELECT u.id, u.id AS userid, MAX(g.grade) AS rawgrade FROM {user} u, {lesson_grades} g WHERE u.id = g.userid AND g.lessonid = :lessonid $user GROUP BY u.id" | 1 |
|
"SELECT u.id, u.id AS userid, AVG(g.grade) AS rawgrade FROM {user} u, {lesson_grades} g WHERE u.id = g.userid AND g.lessonid = :lessonid $user GROUP BY u.id" | 1 |
|
"SELECT uu.id AS userid, MIN(gg.id) AS firstcompleted FROM {user} uu, {lesson_grades} gg WHERE uu.id = gg.userid AND gg.lessonid = :lessonid2 $fuser GROUP BY uu.id" | 1 |
|
"SELECT u.id, u.id AS userid, g.grade AS rawgrade FROM {user} u, {lesson_grades} g, ($firstonly) f WHERE u.id = g.userid AND g.lessonid = :lessonid AND g.id = f.firstcompleted AND g.userid=f.userid $user" | 1 |
|
"SELECT l.*, cm.idnumber as cmidnumber, l.course as courseid FROM {lesson} l, {course_modules} cm, {modules} m WHERE m.name='lesson' AND m.id=cm.module AND cm.instance=l.id AND l.course=:course" | 1 |
|
"SELECT l.id FROM {lesson} l WHERE l.course=:course" | 1 |
|
"UPDATE {lesson_overrides} SET available = available + ? WHERE lessonid IN (SELECT id FROM {lesson} WHERE course = ?) AND available <> 0" | 1 |
|
"UPDATE {lesson_overrides} SET deadline = deadline + ? WHERE lessonid IN (SELECT id FROM {lesson} WHERE course = ?) AND deadline <> 0" | 1 |
|
"SELECT id FROM {lesson_grades} WHERE userid = :userid AND lessonid = :lessonid ORDER BY completed" | 1 |
|
"UPDATE {lesson_attempts} SET retry = retry - 1 WHERE userid = ? AND lessonid = ? AND retry > ?" | 1 |
|
"UPDATE {lesson_branch} SET retry = retry - 1 WHERE userid = ? AND lessonid = ? AND retry > ?" | 1 |
|
'SELECT DISTINCT itemid FROM {files} WHERE contextid = :contextid AND component = :component AND filearea = :filearea' | 1 |
|
" SELECT DISTINCT ctx.id FROM {lesson} l JOIN {modules} m ON m.name = :lesson JOIN {course_modules} cm ON cm.instance = l.id AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulelevel LEFT JOIN {lesson_attempts} la ON la.lessonid = l.id AND la.userid = :userid1 LEFT JOIN {lesson_branch} lb ON lb.lessonid = l.id AND lb.userid = :userid2 LEFT JOIN {lesson_grades} lg ON lg.lessonid = l.id AND lg.userid = :userid3 LEFT JOIN {lesson_overrides} lo ON lo.lessonid = l.id AND lo.userid = :userid4 LEFT JOIN {lesson_timer} lt ON lt.lessonid = l.id AND lt.userid = :userid5 WHERE la.id IS NOT NULL OR lb.id IS NOT NULL OR lg.id IS NOT NULL OR lo.id IS NOT NULL OR lt.id IS NOT NULL" | 1 |
|
" SELECT lx.userid FROM {lesson} l JOIN {modules} m ON m.name = :lesson JOIN {course_modules} cm ON cm.instance = l.id AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulelevel JOIN {{$join}} lx ON lx.lessonid = l.id WHERE ctx.id = :contextid" | 1 |
|
" SELECT " . $DB->sql_concat('lp.id', "':'", 'COALESCE(la.id, 0)', "':'", 'COALESCE(lb.id, 0)') . " AS uniqid, lp.lessonid, lp.id AS page_id, lp.qtype AS page_qtype, lp.qoption AS page_qoption, lp.title AS page_title, lp.contents AS page_contents, lp.contentsformat AS page_contentsformat, la.id AS attempt_id, la.retry AS attempt_retry, la.correct AS attempt_correct, la.useranswer AS attempt_useranswer, la.timeseen AS attempt_timeseen, lb.id AS branch_id, lb.retry AS branch_retry, lb.timeseen AS branch_timeseen, lpb.id AS nextpage_id, lpb.title AS nextpage_title FROM {lesson_pages} lp LEFT JOIN {lesson_attempts} la ON la.pageid = lp.id AND la.userid = :userid1 LEFT JOIN {lesson_branch} lb ON lb.pageid = lp.id AND lb.userid = :userid2 LEFT JOIN {lesson_pages} lpb ON lpb.id = lb.nextpageid WHERE lp.lessonid $inlessonsql AND (la.id IS NOT NULL OR lb.id IS NOT NULL) ORDER BY lp.lessonid, lp.id, la.retry, lb.retry, la.id, lb.id" | 1 |
|
" SELECT l.id, cm.id AS cmid FROM {lesson} l JOIN {modules} m ON m.name = :lesson JOIN {course_modules} cm ON cm.instance = l.id AND cm.module = m.id WHERE cm.id $insql" | 1 |
|
"SELECT SUM(lessontime - starttime) FROM {lesson_timer} WHERE lessonid = :lessonid AND userid = :userid" | 1 |
|
'Delete page' | 1 |
|
'Delete all lesson attempts' | 1 |
|
'Delete page: {$a}' | 1 |
|
'Show close button' | 1 |
|
'Select a question type' | 1 |
|
'Select all attempts' | 1 |
|
'Select report' | 1 |
|
'Show an unanswered page' | 1 |
|
'Show an unseen page' | 1 |
|
'Update page: {$a}' | 1 |
|
'Update failed' | 1 |
|
'update grade' | 1 |
|
'update email essay grade' | 1 |
|
'SELECT a.* FROM {lesson_answers} a JOIN {lesson_pages} p ON p.id = a.pageid WHERE a.answerformat <> :format AND a.lessonid = :lessonid AND p.qtype IN (1, 8, 20)' | 1 |
|
"DELETE {lesson_branch} FROM {lesson_branch} LEFT JOIN {lesson_pages} ON {lesson_branch}.pageid = {lesson_pages}.id WHERE {lesson_pages}.id IS NULL" | 1 |
|
"DELETE FROM {lesson_branch} WHERE NOT EXISTS ( SELECT 'x' FROM {lesson_pages} WHERE {lesson_branch}.pageid = {lesson_pages}.id)" | 1 |
|
'Select type of file content filtering, please note this may cause problems for some Flash and Java applets. Please make sure that all text files are in UTF-8 encoding.' | 1 |
|
'Show upload/modified date' | 1 |
|
'Show size' | 1 |
|
'Show type' | 1 |
|
"SELECT sa.userid, sa.survey, MAX(sa.time) AS time, $allusernames FROM {survey_answers} sa JOIN {user} u ON u.id = sa.userid WHERE sa.survey IN ($slist) AND sa.time > ? GROUP BY sa.userid, sa.survey, $allusernames ORDER BY time ASC" | 1 |
|
"SELECT s.name, u.firstname, u.lastname, u.picture FROM {survey} s, {user} u WHERE s.id = ? AND u.id = ?" | 1 |
|
"SELECT $userfields, MAX(a.time) as time FROM {survey_answers} a JOIN {user} u ON a.userid = u.id $groupsjoin WHERE a.survey = :surveyid GROUP BY $userfields ORDER BY time ASC" | 1 |
|
"SELECT notes FROM {survey_analysis} WHERE survey=? AND userid=?" | 1 |
|
"UPDATE {survey_analysis} SET notes=? WHERE survey=? AND userid=?" | 1 |
|
"SELECT sa.*, $userfields FROM {survey_answers} sa, {user} u $groupfrom WHERE sa.survey = :surveyid AND sa.question = :questionid AND u.id = sa.userid $groupsql ORDER BY $sort" | 1 |
|
"SELECT sa.* FROM {survey_answers} sa WHERE sa.survey = ? AND sa.question = ? AND sa.userid = ?" | 1 |
|
"SELECT ch.id FROM {survey} ch WHERE ch.course=?" | 1 |
|
" SELECT DISTINCT ctx.id FROM {survey} s JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulelevel LEFT JOIN {survey_answers} sa ON sa.survey = s.id AND sa.userid = :userid1 LEFT JOIN {survey_analysis} sy ON sy.survey = s.id AND sy.userid = :userid2 WHERE s.template <> 0 AND (sa.id IS NOT NULL OR sy.id IS NOT NULL)" | 1 |
|
" SELECT sa.userid FROM {survey} s JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulelevel JOIN {survey_answers} sa ON sa.survey = s.id WHERE ctx.id = :contextid AND s.template <> 0" | 1 |
|
" SELECT sy.userid FROM {survey} s JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :modulelevel JOIN {survey_analysis} sy ON sy.survey = s.id WHERE ctx.id = :contextid AND s.template <> 0" | 1 |
|
" SELECT sa.*, sq.id as qid, sq.text as qtext, sq.shorttext as qshorttext, sq.intro as qintro, sq.options as qoptions, sq.type as qtype, cm.id as cmid FROM {survey_answers} sa JOIN {survey_questions} sq ON sq.id = sa.question JOIN {survey} s ON s.id = sa.survey JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id WHERE cm.id $insql AND sa.userid = :userid ORDER BY s.id, sq.id" | 1 |
|
" SELECT sy.*, cm.id as cmid FROM {survey_analysis} sy JOIN {survey} s ON s.id = sy.survey JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id WHERE cm.id $insql AND sy.userid = :userid ORDER BY s.id" | 1 |
|
" SELECT s.id FROM {survey} s JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id WHERE cm.id $insql" | 1 |
|
" SELECT s.id FROM {survey} s JOIN {modules} m ON m.name = :survey JOIN {course_modules} cm ON cm.instance = s.id AND cm.module = m.id WHERE cm.id = :cmid" | 1 |
|
'SELECT modtable.* FROM {' . $this->get_module_name( ) . '} modtable ' . $contextjoin . ' WHERE modtable.' . static::MODIFIED_FIELD_NAME . ' >= ? AND modtable.course != ? ORDER BY modtable.' . static::MODIFIED_FIELD_NAME . ' ASC' | 1 |
|
'Delete all survey responses' | 1 |
|
'Delete response analysis' | 1 |
|
'SELECT c.fieldid, c.content, c.content1, c.content2, c.content3, c.content4 FROM {data_content} c, {data_records} r WHERE c.recordid = ? AND r.id = c.recordid AND r.groupid = ?' | 1 |
|
'SELECT COUNT(r.id) FROM {data_records} r WHERE r.dataid =?' | 1 |
|
'SELECT COUNT(r.id) FROM {data_records} r WHERE r.dataid =? AND r.approved <> 1' | 1 |
|
"SELECT dr.id, dr.dataid, dr.approved, d.timeviewfrom, d.timeviewto, dr.groupid, d.approval, dr.userid, d.requiredentriestoview, cm.id AS cmid, c.id AS courseid, c.shortname, c.fullname, $ctxselect FROM {data_records} dr JOIN {data} d ON d.id = dr.dataid JOIN {modules} m ON m.name = 'data' JOIN {course_modules} cm ON cm.module = m.id AND cm.instance = d.id JOIN {tag_instance} tt ON dr.id = tt.itemid JOIN {course} c ON cm.course = c.id JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = :coursemodulecontextlevel WHERE tt.itemtype = :itemtype AND tt.tagid = :tagid AND tt.component = :component AND cm.deletioninprogress = 0 AND dr.id %ITEMFILTER% AND c.id %COURSEFILTER%" | 1 |
|
"SELECT dc.* FROM {data_content} dc INNER JOIN {data_fields} df ON dc.fieldid = df.id WHERE df.id = :fieldid AND dc.recordid = :recordid" | 1 |
|
"SELECT $what $fromsql $sortorder" | 1 |
|
"SELECT $count $fromsql" | 1 |
|
'SELECT id,name FROM {data_fields} WHERE dataid = ? ORDER by id' | 1 |
|
"SELECT dr.*, u.firstname, u.lastname FROM {data_records} dr, {user} u WHERE dr.dataid = {$data->id} $approved AND dr.userid = u.id $time ORDER BY dr.timecreated DESC" | 1 |
|
"SELECT id, $namefield FROM {tag} WHERE tagcollid = :tagcollid AND rawname $sql" | 1 |
|
'SELECT COUNT(*) FROM {data_records} WHERE dataid=? AND userid=?' | 1 |
|
'SELECT id,timemodified FROM {data_records} WHERE dataid = ? AND userid = ? ORDER BY timemodified DESC' | 1 |
|
"SELECT d.id as dataid, d.scale, d.course, r.userid as userid, d.approval, r.approved, r.timecreated, d.assesstimestart, d.assesstimefinish, r.groupid FROM {data_records} r JOIN {data} d ON r.dataid = d.id WHERE r.id = :itemid" | 1 |
|
"SELECT d.id as dataid, d.course, r.groupid FROM {data_records} r JOIN {data} d ON r.dataid = d.id WHERE r.id = :itemid" | 1 |
|
"SELECT * FROM {data_fields} df WHERE $like AND df.dataid = :dataid AND ((df.id < :fieldid1) OR (df.id > :fieldid2))" | 1 |
|
"SELECT * FROM {data_fields} df WHERE $like AND df.dataid = :dataid" | 1 |
|
"SELECT d.*, cm.idnumber as cmidnumber, d.course as courseid FROM {data} d, {course_modules} cm, {modules} m WHERE m.name='data' AND m.id=cm.module AND cm.instance=d.id AND d.course=?" | 1 |
|
"SELECT r.id FROM {data_records} r INNER JOIN {data} d ON r.dataid = d.id WHERE d.course = ?" | 1 |
|
"SELECT d.id FROM {data} d WHERE d.course=?" | 1 |
|
"SELECT r.id, r.userid, r.dataid, u.id AS userexists, u.deleted AS userdeleted FROM {data_records} r JOIN {data} d ON r.dataid = d.id LEFT JOIN {user} u ON r.userid = u.id WHERE d.course = ? AND r.userid > 0" | 1 |
|
'SELECT r.id FROM {data_records} r WHERE r.dataid = :dataid' | 1 |
|
'SELECT c' . $alias . '.recordid FROM {data_content} c' . $alias . ' INNER JOIN {data_fields} f ON f.id = c' . $alias . '.fieldid INNER JOIN {data_records} r ON r.id = c' . $alias . '.recordid INNER JOIN {user} u ON u.id = r.userid ' | 1 |
|
'SELECT r.id, r.approved, r.timecreated, r.timemodified, r.userid, ' . $namefields . ' FROM {data_content} c, {data_records} r, {user} u ' | 1 |
|
'SELECT r.id, r.approved, r.timecreated, r.timemodified, r.userid, ' . $namefields . ', ' . $sortcontentfull . ' AS sortorder FROM {data_content} c, {data_records} r, {user} u ' | 1 |
|
"SELECT dr.*, $allnamefields FROM {data_records} dr JOIN {user} u ON dr.userid = u.id WHERE dr.id = ?" | 1 |
|
"SELECT dr.*, $allnamefields FROM {data_records} dr JOIN {user} u ON dr.userid = u.id WHERE dr.id = ?" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id WHERE dr.userid = :userid" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id JOIN {comments} com ON com.commentarea = :commentarea and com.itemid = dr.id WHERE com.userid = :userid" | 1 |
|
"SELECT c.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id {$ratingquery->join} WHERE {$ratingquery->userwhere}" | 1 |
|
"SELECT dr.userid FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id WHERE c.id = :contextid" | 1 |
|
"SELECT dr.id FROM {context} c JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id WHERE c.id = :contextid" | 1 |
|
"SELECT cm.id AS cmid, d.name AS dataname, cm.course AS courseid, " . self::sql_fields( ) . " FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id JOIN {data_content} dc ON dc.recordid = dr.id JOIN {data_fields} df ON df.id = dc.fieldid WHERE ctx.id {$contextsql} AND ctx.contextlevel = :contextlevel AND dr.userid = :userid OR EXISTS (SELECT 1 FROM {comments} com WHERE com.commentarea=:commentarea AND com.itemid = dr.id AND com.userid = :userid1) OR EXISTS (SELECT 1 FROM {rating} r WHERE r.contextid = ctx.id AND r.itemid = dr.id AND r.component = :moddata AND r.ratingarea = :ratingarea AND r.userid = :userid2) ORDER BY cm.id, dr.id, dc.fieldid" | 1 |
|
"SELECT " . self::sql_fields( ) . " FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id LEFT JOIN {data_content} dc ON dc.recordid = dr.id LEFT JOIN {data_fields} df ON df.id = dc.fieldid WHERE cm.id = :cmid ORDER BY dr.id" | 1 |
|
"SELECT " . self::sql_fields( ) . " FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id AND dr.userid = :userid LEFT JOIN {data_content} dc ON dc.recordid = dr.id LEFT JOIN {data_fields} df ON df.id = dc.fieldid WHERE ctx.id = :ctxid AND ctx.contextlevel = :contextlevel ORDER BY dr.id" | 1 |
|
"SELECT " . self::sql_fields( ) . " FROM {context} ctx JOIN {course_modules} cm ON cm.id = ctx.instanceid JOIN {modules} m ON m.id = cm.module AND m.name = :modname JOIN {data} d ON d.id = cm.instance JOIN {data_records} dr ON dr.dataid = d.id AND dr.userid {$userinsql} LEFT JOIN {data_content} dc ON dc.recordid = dr.id LEFT JOIN {data_fields} df ON df.id = dc.fieldid WHERE ctx.id = :ctxid AND ctx.contextlevel = :contextlevel ORDER BY dr.id" | 1 |
|
"SELECT dr.*, d.course FROM {data_records} dr JOIN {data} d ON d.id = dr.dataid $contextjoin WHERE dr.timemodified >= :timemodified" | 1 |
|
"SELECT dr.*, d.* FROM {data_records} dr JOIN {data} d ON d.id = dr.dataid WHERE dr.id = ?" | 1 |
|
" SELECT con.* FROM {data_content} con JOIN {files} fil ON fil.component = :component AND fil.filearea = :filearea AND fil.itemid = con.id WHERE con.recordid = :recordid " | 1 |
|
"SELECT dc.*, df.name AS fldname, df.type AS fieldtype, df.required FROM {data_content} dc, {data_fields} df WHERE dc.fieldid = df.id AND dc.recordid = :recordid" | 1 |
|
'SELECT c.fieldid, c.content, c.content1, c.content2, c.content3, c.content4 FROM {data_content} c, ' . '{data_records} r WHERE c.recordid = ? AND r.id = c.recordid AND r.groupid = ?' | 1 |
|
'SELECT f.name, f.type, con.content FROM {data_content} con JOIN {data_fields} f ON con.fieldid = f.id WHERE con.recordid = :recordid' | 1 |
|
'UPDATE {data_fields} SET dataid = ?' | 1 |
|
'UPDATE {data_records} SET dataid = ?' | 1 |
|
"SELECT dr.*, d.course FROM {data_records} dr JOIN {data} d ON d.id = dr.dataid WHERE dr.id = :drid" | 1 |
|
"SELECT DISTINCT $varcharcontent AS content FROM {data_content} WHERE fieldid=? ORDER BY $varcharcontent" | 1 |
|
"SELECT DISTINCT $varcharlat AS la, $varcharlong AS lo FROM {data_content} WHERE fieldid = ? ORDER BY $varcharlat, $varcharlong" | 1 |
|
'Delete all entries' | 1 |
|
'Delete preset {$a}?' | 1 |
|
'Select fields' | 1 |
|
'Select export options' | 1 |
|
'Show all entries' | 1 |
|
'Update an existing field' | 1 |
|
'Delete site user preset.' | 1 |
|
"SELECT d.id FROM {data} d LEFT JOIN {data_fields} f ON d.id = f.dataid WHERE f.id IS NULL" | 1 |
|
"UPDATE {data_fields} SET param1 = '' WHERE type = 'text'" | 1 |
|
' SELECT * FROM {data_fields} WHERE dataid = ?' | 1 |
|
'SELECT t.id, ti.itemid, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = ? AND ti.component = ? AND ti.contextid = ?' | 1 |
|
"SELECT {$select} FROM {$from} {$subpluginsleftjoins} WHERE {$where}" | 1 |
|
<<<EOF SELECT cm.id as cmid, {$selects} FROM {$cmfrom} INNER JOIN {$coursefrom} ON c.id = cm.course INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {$bbbfrom} ON cm.instance = bbb.id {$subpluginsleftjoins} WHERE cm.course = :courseid EOF | 1 |
|
<<<EOF SELECT {$logtableselect}, {$userfields} FROM {$logtablefrom} INNER JOIN {$usertablefrom} ON u.id = l.userid WHERE $wheresql EOF | 1 |
|
'SELECT COUNT(DISTINCT id) FROM {bigbluebuttonbn_logs}' | 1 |
|
"SELECT c.id FROM {context} c INNER JOIN {course_modules} cm ON cm.id = c.instanceid AND c.contextlevel = :contextlevel INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {bigbluebuttonbn} bigbluebuttonbn ON bigbluebuttonbn.id = cm.instance INNER JOIN {bigbluebuttonbn_logs} bigbluebuttonbnlogs ON bigbluebuttonbnlogs.bigbluebuttonbnid = bigbluebuttonbn.id WHERE bigbluebuttonbnlogs.userid = :userid" | 1 |
|
"SELECT bigbluebuttonbn.id, cm.id AS cmid FROM {bigbluebuttonbn} bigbluebuttonbn JOIN {modules} m ON m.name = :bigbluebuttonbn JOIN {course_modules} cm ON cm.instance = bigbluebuttonbn.id AND cm.module = m.id WHERE cm.id $insql" | 1 |
|
"SELECT bnl.userid FROM {course_modules} cm JOIN {modules} m ON m.id = cm.module AND m.name = :modulename JOIN {bigbluebuttonbn} bn ON bn.id = cm.instance JOIN {bigbluebuttonbn_logs} bnl ON bnl.bigbluebuttonbnid = bn.id WHERE cm.id = :instanceid" | 1 |
|
'SELECT modtable.* FROM {' . $this->get_module_name( ) . '} modtable ' . $contextjoin | 1 |
|
'SELECT * FROM {role}' . $where | 1 |
|
'SELECT DISTINCT meetingid FROM {bigbluebuttonbn_logs} WHERE log = :createorimport' | 1 |
|
"UPDATE {bigbluebuttonbn_recordings} SET status = :status_reset WHERE id = " . implode(' OR id = ', array_keys($recs)) | 1 |
|
'SELECT * FROM {bigbluebuttonbn_recordings} WHERE status = :status_processed OR status = :status_notified ORDER BY timecreated DESC' | 1 |
|
'update cache ?' | 1 |
|
<<<EOF SELECT cm.instance FROM {course_modules} cm INNER JOIN {modules} m ON m.id = cm.module INNER JOIN {bigbluebuttonbn} bbb ON bbb.id = cm.instance WHERE cm.idnumber = :idnumber or bbb.name = :name EOF | 1 |
|
'SELECT DISTINCT meetingid FROM {bigbluebuttonbn_logs} WHERE log = :createlog OR log = :importlog' | 1 |
|
'Delete events' | 1 |
|
'Delete tags' | 1 |
|
'Delete custom logs' | 1 |
|
'Show profile pictures' | 1 |
|
'Show recordings' | 1 |
|
'Show recording settings' | 1 |
|
'Show only imported links enabled by default' | 1 |
|
'Show only imported links feature can be edited' | 1 |
|
'Show only imported links by default can be edited when the instance is added or updated.' | 1 |
|
'Select the formats which are viewable by everyone. All other formats are only viewable by teachers and other users with the mod/bigbluebuttonbn:viewallrecordingformats and mod/bigbluebuttonbn:managerecordings capabilities.' | 1 |
|
'Show the table in plain HTML' | 1 |
|
'Show only imported links' | 1 |
|
'Show recording preview' | 1 |
|
'Select the group you want to join and confirm the action' | 1 |
|
'Select a course first in the drop down menu' | 1 |
|
'Update a single recording' | 1 |
|
"SELECT DISTINCT ap.contextid FROM {analytics_predictions} ap JOIN {context} ctx ON ctx.id = ap.contextid WHERE ap.modelid = :modelid" | 1 |
|
"SELECT ap.* FROM {analytics_predictions} ap JOIN ( SELECT sampleid, max(rangeindex) AS rangeindex FROM {analytics_predictions} WHERE modelid = :modelidsubap and contextid = :contextidsubap GROUP BY sampleid ) apsub ON ap.sampleid = apsub.sampleid AND ap.rangeindex = apsub.rangeindex WHERE ap.modelid = :modelid and ap.contextid = :contextid" | 1 |
|
"SELECT apa.id, apa.predictionid, apa.userid, apa.actionname, apa.timecreated, ap.contextid, ap.sampleid, ap.rangeindex, ap.prediction, ap.predictionscore FROM {analytics_prediction_actions} apa JOIN {analytics_predictions} ap ON ap.id = apa.predictionid WHERE ap.modelid = :modelid" | 1 |
|
"SELECT $fields FROM {analytics_predictions} WHERE modelid = :modelid AND contextid $contextsql AND timecreated >= :firsttimecreated" | 1 |
|
"SELECT DISTINCT timeaccess FROM {user_lastaccess} ula JOIN {enrol} e ON e.courseid = ula.courseid JOIN {user_enrolments} ue ON e.id = ue.enrolid AND ue.userid = ula.userid WHERE $select" | 1 |
|
"SELECT DISTINCT timeaccess FROM {user_lastaccess} ula JOIN {enrol} e ON e.courseid = ula.courseid JOIN {user_enrolments} ue ON e.id = ue.enrolid AND ue.userid = ula.userid WHERE $filterselect AND ula.timeaccess != 0 ORDER BY timeaccess DESC" | 1 |
|
"SELECT am.* FROM {analytics_models} am" | 1 |
|
"DELETE FROM {analytics_prediction_actions} WHERE predictionid IN (SELECT ap.id FROM {analytics_predictions} ap LEFT JOIN {context} ctx ON ap.contextid = ctx.id WHERE ctx.id IS NULL)" | 1 |
|
"DELETE FROM {analytics_predictions} WHERE id IN ( SELECT oldpredictions.id FROM ( SELECT p.id FROM {analytics_predictions} p LEFT JOIN {context} ctx ON p.contextid = ctx.id WHERE ctx.id IS NULL ) oldpredictions )" | 1 |
|
"DELETE FROM {analytics_indicator_calc} WHERE id IN ( SELECT oldcalcs.id FROM ( SELECT c.id FROM {analytics_indicator_calc} c LEFT JOIN {context} ctx ON c.contextid = ctx.id WHERE ctx.id IS NULL ) oldcalcs )" | 1 |
|
"SELECT cc.id, cc.name, ctx.id AS contextid FROM {course_categories} cc JOIN {context} ctx ON ctx.contextlevel = :ctxlevel AND ctx.instanceid = cc.id" | 1 |
|
"SELECT c.id, c.shortname, ctx.id AS contextid FROM {course} c JOIN {context} ctx ON ctx.contextlevel = :ctxlevel AND ctx.instanceid = c.id WHERE c.id != :siteid" | 1 |
|
"SELECT $primarykey AS id, MIN(firstanalysis) AS firstanalysis FROM {analytics_used_analysables} aua WHERE modelid = :modelid" | 1 |
|
"SELECT DISTINCT ap.contextid FROM {analytics_predictions} ap {$joinusersql} WHERE u.id = :userid AND ap.modelid = :modelid" | 1 |
|
"SELECT DISTINCT aic.contextid FROM {analytics_indicator_calc} aic {$joinusersql} WHERE u.id = :userid AND aic.sampleorigin = :analysersamplesorigin" | 1 |
|
"SELECT DISTINCT ap.contextid" . $sql | 1 |
|
"SELECT u.id AS userid FROM {analytics_predictions} ap {$joinusersql} WHERE ap.contextid = :contextid AND ap.modelid = :modelid" | 1 |
|
"SELECT u.id AS userid FROM {analytics_indicator_calc} aic {$joinusersql} WHERE aic.contextid = :contextid AND aic.sampleorigin = :analysersamplesorigin" | 1 |
|
"SELECT apa.userid" . $sql | 1 |
|
"SELECT ap.*, $ctxfields FROM {analytics_predictions} ap JOIN {context} ctx ON ctx.id = ap.contextid {$joinusersql} WHERE u.id = :userid AND ap.modelid = :modelid AND ap.contextid {$contextsql}" | 1 |
|
"SELECT aic.*, $ctxfields FROM {analytics_indicator_calc} aic JOIN {context} ctx ON ctx.id = aic.contextid {$joinusersql} WHERE u.id = :userid AND aic.sampleorigin = :analysersamplesorigin AND aic.contextid {$contextsql}" | 1 |
|
"SELECT apa.*, ap.modelid, ap.contextid, $ctxfields" . $sql | 1 |
|
"SELECT ap.id FROM {analytics_predictions} ap WHERE ap.contextid = :contextid AND ap.modelid = :modelid" | 1 |
|
"SELECT apa.id " . $sql | 1 |
|
"SELECT DISTINCT ap.id FROM {analytics_predictions} ap {$joinusersql} WHERE u.id = :userid AND ap.modelid = :modelid AND ap.contextid {$contextsql}" | 1 |
|
"SELECT DISTINCT aic.id FROM {analytics_indicator_calc} aic {$joinusersql} WHERE u.id = :userid AND aic.sampleorigin = :analysersamplesorigin AND aic.contextid {$contextsql}" | 1 |
|
"SELECT apa.id" . $sql | 1 |
|
"SELECT DISTINCT ap.id FROM {analytics_predictions} ap {$joinusersql} WHERE ap.contextid = :contextid AND ap.modelid = :modelid AND u.id {$usersinsql}" | 1 |
|
"SELECT DISTINCT aic.id FROM {analytics_indicator_calc} aic {$joinusersql} WHERE aic.contextid = :contextid AND aic.sampleorigin = :analysersamplesorigin AND u.id {$usersinsql}" | 1 |
|
'SELECT ' . $select . ' FROM {' . $tablename . '} ' . $tablealias . ' ' . $usedanalysablesjoin . ' JOIN {context} ctx ON (ctx.contextlevel = :contextlevel AND ctx.instanceid = ' . $tablealias . '.id) ' | 1 |
|
"SELECT apa.id FROM {analytics_prediction_actions} apa JOIN {analytics_predictions} ap ON ap.id = apa.predictionid WHERE ap.contextid = :contextid AND apa.userid = :userid AND ap.modelid = :modelid" | 1 |
|
"SELECT COUNT('x')" | 2 |
|
"SELECT userid as userid FROM {comments} WHERE component = :component AND contextid = :contextid" | 2 |
|
"SELECT MAX(sortorder) FROM {repository}" | 2 |
|
"SELECT count('x') FROM {repository_instances} i, {repository} r WHERE r.type=:plugin AND r.id=i.typeid" | 2 |
|
'SELECT id from {course} WHERE shortname = ? AND id <> ?' | 2 |
|
"UPDATE {course} SET visibleold = visible WHERE category = ?" | 2 |
|
"UPDATE {course} SET visible = visibleold WHERE category = ?" | 2 |
|
'SELECT max(section) from {course_sections} WHERE course = ?' | 2 |
|
'SELECT s.* FROM {course_sections} s JOIN {course} c ON s.course = c.id WHERE s.id = ? AND c.format = ?' | 2 |
|
"UPDATE {course_sections} SET visible = 0 WHERE course = ? AND section = ?" | 2 |
|
'SELECT max(section) FROM {course_sections} WHERE course = ?' | 2 |
|
"SELECT u.id FROM {user} u {$ratingquery->join} WHERE {$ratingquery->userwhere}" | 2 |
|
"SELECT f.id AS fieldid FROM {customfield_field} f WHERE f.categoryid $categoryidstest" | 2 |
|
"SELECT {$fields} FROM {user} u WHERE username = :username" | 2 |
|
"SHOW TABLE STATUS WHERE Name LIKE BINARY '$prefix%'" | 2 |
|
"SHOW VARIABLES LIKE 'innodb_file_per_table'" | 2 |
|
"SHOW VARIABLES LIKE 'innodb_file_format'" | 2 |
|
'Delete field' | 2 |
|
'Delete table' | 2 |
|
'SELECT * FROM {tool_mfa} WHERE userid = ? AND factor = ? AND NOT label = ?' | 2 |
|
'Delete {$a}' | 2 |
|
"UPDATE {" . contextlist_context::TABLE . "} SET status = ? WHERE id $insql" | 2 |
|
'Delete category' | 2 |
|
'select count(distinct courseid) from {' . manager::DB_AREAS . '}' | 2 |
|
'Select cohorts' | 2 |
|
"SELECT COUNT(*)" | 2 |
|
'Delete role "{$a->role}"?' | 2 |
|
"UPDATE {user_enrolments} SET $updatesql WHERE id $ueidsql" | 2 |
|
'Delete selected user enrolments' | 2 |
|
'Select users' | 2 |
|
'Show hint' | 2 |
|
'Show the user\'s online status?' | 2 |
|
"SELECT COUNT(m.id) FROM {messages} m INNER JOIN {message_conversations} mc ON mc.id = m.conversationid WHERE mc.type = ? AND convhash = ?" | 2 |
|
"SELECT mc.id FROM {message_conversations} mc JOIN {message_conversation_members} mcm ON (mcm.conversationid = mc.id AND mcm.userid = :userid) WHERE mc.contextid IS NULL" | 2 |
|
"SELECT mc.id FROM {message_conversations} mc JOIN {messages} m ON (m.conversationid = mc.id AND m.useridfrom = :useridfrom) WHERE mc.contextid IS NULL" | 2 |
|
"SELECT m.*, mcm.userid as useridto FROM {messages} m INNER JOIN {message_conversations} mc ON m.conversationid = mc.id INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id WHERE mcm.userid != m.useridfrom AND m.id = :id" | 2 |
|
"SELECT m.*, mcm.userid as useridto FROM {messages} m INNER JOIN {message_conversations} mc ON m.conversationid = mc.id INNER JOIN {message_conversation_members} mcm ON mcm.conversationid = mc.id WHERE mcm.userid != ? AND m.id = ?" | 2 |
|
"SELECT u.* $uselect FROM {user} u $ujoin WHERE u.id $sqluserids" | 2 |
|
"SELECT {$sqlfullname} FROM {user} u WHERE u.id = :id" | 2 |
|
'SELECT * FROM {user_info_field} WHERE datatype = :datatype AND ' . $DB->sql_compare_text('param1') . ' = ' . $DB->sql_compare_text(':social', 40) | 2 |
|
'Delete criterion' | 2 |
|
"SELECT cm.*, m.name as modname FROM {modules} m, {course_modules} cm WHERE cm.id = ? AND cm.module = m.id " | 2 |
|
"SELECT userid FROM {scale} WHERE courseid = :contextinstanceid" | 2 |
|
"SELECT loggeduser, userid FROM {scale_history} WHERE courseid = :contextinstanceid" | 2 |
|
'Select a grade item' | 2 |
|
'show email,lang and height,search for Spanish speakers' | 2 |
|
'show email,lang and height,search for German speakers' | 2 |
|
'show email and height,search for English speakers' | 2 |
|
'show email only;search for users with height 180cm' | 2 |
|
'show email only;search for users with height 170cm' | 2 |
|
'SELECT COUNT(*)' | 2 |
|
" SELECT ctx.id FROM {context} ctx WHERE ctx.contextlevel = :ctxlevel AND ctx.instanceid = :ctxuserid" | 2 |
|
"SELECT " . $this->required_fields_sql("u") | 2 |
|
"SELECT c.*, (SELECT COUNT(1) FROM {question} q JOIN {question_versions} qv ON qv.questionid = q.id JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid WHERE q.parent = '0' $statuscondition AND c.id = qbe.questioncategoryid AND ($showallversions = 1 OR (qv.version = (SELECT MAX(v.version) FROM {question_versions} v JOIN {question_bank_entries} be ON be.id = v.questionbankentryid WHERE be.id = qbe.id) ) ) ) AS questioncount FROM {question_categories} c WHERE c.contextid IN ($contexts) $topwhere ORDER BY $sortorder" | 2 |
|
'SELECT MAX(version) AS max FROM {question_versions} WHERE questionbankentryid = ?' | 2 |
|
'Delete question' | 2 |
|
"SELECT qbe.* FROM {question_bank_entries} qbe WHERE qbe.id = ?" | 2 |
|
" SELECT qdd.id FROM {question_dataset_definitions} qdd JOIN {question_datasets} qd ON qd.datasetdefinition = qdd.id WHERE qd.question = ? AND qdd.name = ?" | 2 |
|
'Select one:' | 2 |
|
'Show standard instructions' | 2 |
|
"SELECT i.*, d.* FROM {question_datasets} d, {question_dataset_definitions} i WHERE i.id = d.datasetdefinition AND i.category = ?" | 2 |
|
"SELECT q.* FROM {question} q WHERE q.id = ?" | 2 |
|
' SELECT qdd.name, qdi.value FROM {question_dataset_items} qdi JOIN {question_dataset_definitions} qdd ON qdd.id = qdi.definition JOIN {question_datasets} qd ON qdd.id = qd.datasetdefinition WHERE qd.question = ? AND qdi.itemnumber = ? ' | 2 |
|
'Update the wild card(s) values' | 2 |
|
"UPDATE {cohort} SET contextid = :newcontext WHERE contextid = :oldcontext" | 2 |
|
'SELECT MIN(time) FROM {log}' | 2 |
|
'SELECT id from {course_modules} WHERE course = ?' | 2 |
|
'SELECT MAX(sortorder) FROM {badge_external_backpack}' | 2 |
|
"select $this->sysTimeStamp" | 2 |
|
"select * from " . $table | 2 |
|
'SELECT * FROM ' . $table | 2 |
|
'select @@identity' | 2 |
|
'select table_name from cat' | 2 |
|
"select cname,coltype,width from col where tname='%s' order by colno" | 2 |
|
"SHOW COLUMNS FROM `%s`" | 2 |
|
'select version()' | 2 |
|
"select version()" | 2 |
|
"select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno" | 2 |
|
"select datname from pg_database where datname not in ('template0','template1') order by 1" | 2 |
|
"SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum FROM pg_class c, pg_attribute a,pg_type t WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%' AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum" | 2 |
|
"SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and c.relnamespace=n.oid and n.nspname='%s' and a.attname not like '....%%' AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum" | 2 |
|
"SELECT NEXTVAL('%s')" | 2 |
|
"SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum" | 2 |
|
"UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?" | 2 |
|
"UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob" | 2 |
|
"select $col from $tables with (ROWLOCK,HOLDLOCK) where $where" | 2 |
|
"UPDATE $table SET $column='" . $val . "' WHERE $where" | 2 |
|
"UPDATE $table SET $column=0x" . bin2hex($val) . " WHERE $where" | 2 |
|
"select lower(a.rdb\$field_name), a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc" | 2 |
|
"SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '" . $index . "' ORDER BY RDB\$FIELD_POSITION ASC" | 2 |
|
"INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" | 2 |
|
"SELECT name FROM sys.sequences" | 2 |
|
"SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos" | 2 |
|
"SELECT name FROM sqlite_master WHERE type='table' ORDER BY name" | 2 |
|
"SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum" | 2 |
|
"SELECT * FROM syscat.indexes WHERE tabname='$table'" | 2 |
|
"select round((a.cntr_value*100.0)/b.cntr_value,2) from master.dbo.sysperfinfo a, master.dbo.sysperfinfo b where a.counter_name = 'Buffer cache hit ratio' and b.counter_name='Buffer cache hit ratio base'" | 2 |
|
"select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page reads/sec'" | 2 |
|
"select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page writes/sec'" | 2 |
|
"select cntr_value*8192 from master.dbo.sysperfinfo where counter_name = 'Total Pages' and object_name='SQLServer:Buffer Manager'" | 2 |
|
"select 8192" | 2 |
|
"SELECT @@MAX_CONNECTIONS" | 2 |
|
"select distinct name from sysobjects where xtype='U'" | 2 |
|
'show table status' | 2 |
|
"SELECT COUNT(DISTINCT rc.contextid) FROM {role_capabilities} rc JOIN {capabilities} cap ON cap.name = rc.capability WHERE " . $DB->sql_bitand('cap.riskbitmask', (RISK_XSS | RISK_CONFIG | RISK_DATALOSS)) . " <> 0 AND rc.permission = :capallow AND rc.roleid = :roleid" | 2 |
|
"DELETE FROM {" . $table . "} $select" | 2 |
|
"DELETE FROM {{$table}}" | 2 |
|
"SELECT $return FROM {" . $table . "} $select" | 2 |
|
"UPDATE {$this->prefix}$table SET $sets WHERE id=\$" . $i | 2 |
|
"SELECT * FROM {table2} JOIN {table}" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE content $insql ORDER BY id ASC" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE name $insql ORDER BY id ASC" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE course $insql ORDER BY id ASC" | 2 |
|
'SELECT DISTINCT * FROM {table_temp} PIVOT y in (SELECT y from {table2} nottemp)' | 2 |
|
'SELECT DISTINCT * FROM {table_temp} WITH (NOLOCK) PIVOT y in (SELECT y from {table2} nottemp)' | 2 |
|
<<<EOT SELECT username, lang FROM prefix_user EOT | 2 |
|
<<<EOT SELECT u.firstname, u.lastname, u.email FROM prefix_role_assignments AS ra JOIN prefix_context AS context ON context.id = ra.contextid AND context.contextlevel = 50 JOIN prefix_course AS c ON c.id = context.instanceid AND c.id = %%COURSEID%% JOIN prefix_user AS u ON u.id = ra.userid EOT | 2 |
|
"SELECT * FROM {{$tablename}} WHERE name = :name, course = :course" | 2 |
|
"SELECT * FROM {users}" | 2 |
|
"SELECT course AS id, course AS course FROM {{$tablename}}" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE course > ?" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', true) | 2 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', true, true, false, '|') | 2 |
|
"SELECT * FROM {{$tablename}} WHERE " . $DB->sql_like('name', '?', false, false) | 2 |
|
"SELECT charfield, {$fieldsql} AS falias FROM {{$tablename}} GROUP BY charfield" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE id $insql" | 2 |
|
"SELECT * FROM {{$tablename}} WHERE course = :select" | 2 |
|
"SELECT trigger_name, trigger_body FROM user_triggers WHERE table_name = ? AND trigger_name LIKE ?" | 2 |
|
" SELECT up.id, up.value FROM {user} qq JOIN {user_preferences} up ON up.userid = qq.id WHERE up.name = :prefname AND $sql" | 2 |
|
'SELECT DISTINCT roleid AS id FROM {role_capabilities} WHERE capability=? OR capability=?' | 2 |
|
"SELECT " . self::instance_sql_fields('f', 'r') . " FROM {files} f LEFT JOIN {files_reference} r ON f.referencefileid = r.id WHERE f.id = ?" | 2 |
|
<<<EOF SELECT cm.id as cmid, {$courseselect}, {$actselect} FROM {$cmfrom} INNER JOIN {$coursefrom} ON c.id = cm.course INNER JOIN {modules} m ON m.id = cm.module AND m.name = :modname INNER JOIN {$actfrom} ON cm.instance = a.id WHERE cm.idnumber = :idnumber OR a.name = :name EOF | 2 |
|
"SELECT * FROM {grade_items} WHERE id $usql" | 2 |
|
"SELECT id FROM {grade_items} " . "WHERE courseid = ? ORDER BY sortorder, id" | 2 |
|
"SHOW TABLE STATUS LIKE ?" | 2 |
|
"DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::NONCE_TABLE_NAME . ' WHERE consumer_pk = :id' | 2 |
|
'Insert image' | 2 |
|
'Insert column after' | 2 |
|
'Insert row after' | 2 |
|
'Delete column' | 2 |
|
'Delete row' | 2 |
|
'Insert character' | 2 |
|
'Delete selected files' | 2 |
|
'Show controls' | 2 |
|
'Insert media' | 2 |
|
'Insert H5P content' | 2 |
|
"SELECT userids.id FROM ($enrolsql) userids WHERE (userids.id IN ($aagsql)) OR $condition EXISTS ($matchsql)" | 2 |
|
'SELECT id FROM {user} WHERE 0 = 1' | 2 |
|
"SELECT id," . $userfieldsapi->get_sql('', false, '', '', false)->selects . " FROM {user} WHERE id " . $usql | 2 |
|
'Select log reader' | 2 |
|
'SELECT MIN(timeend) FROM {stats_daily}' | 2 |
|
'SELECT MIN(timeend) FROM {stats_weekly}' | 2 |
|
'SELECT MIN(timeend) FROM {stats_monthly}' | 2 |
|
"SELECT COUNT(id) " | 2 |
|
"SELECT MAX(time) " | 2 |
|
"SELECT COUNT(*) as count " | 2 |
|
'SELECT MIN(timeend) FROM {stats_user_daily}' | 2 |
|
'SELECT MIN(timeend) FROM {stats_user_weekly}' | 2 |
|
'SELECT MIN(timeend) FROM {stats_user_monthly}' | 2 |
|
'SELECT ' . ((empty($param->fieldscomplete)) ? 'id,roleid,timeend,' : '') . $param->fields . ' FROM {stats_' . $param->table . '} WHERE ' . (($course->id == SITEID) ? '' : ' courseid = ' . $course->id . ' AND ') . ((!empty($userid)) ? ' userid = ' . $userid . ' AND ' : '') . ((!empty($roleid)) ? ' roleid = ' . $roleid . ' AND ' : '') . ((!empty($param->stattype)) ? ' stattype = \'' . $param->stattype . '\' AND ' : '') . ' timeend >= ' . $param->timeafter . ' ' . $param->extras . ' ORDER BY timeend DESC' | 2 |
|
'SELECT t.id, t.name, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = ? AND ti.itemid = ?' | 2 |
|
"SELECT ctx.id FROM {backup_controllers} bc JOIN {context} ctx ON ctx.instanceid = bc.itemid AND ctx.contextlevel = :contextlevel AND bc.type = :type WHERE bc.userid = :userid" | 2 |
|
'Show advanced' | 2 |
|
'Show less' | 2 |
|
'Select a license for your content' | 2 |
|
'Select a license version' | 2 |
|
'Select the library you wish to use for your content.' | 2 |
|
"UPDATE {tag_instance} SET tagid = ? WHERE tagid = ? AND itemtype = ? AND component = ?" | 2 |
|
'SELECT c.id, c.enablecompletion, c.cacherev, c.startdate FROM {badge} b LEFT JOIN {course} c ON b.courseid = c.id WHERE b.id = :badgeid ' | 2 |
|
"SELECT * FROM ($sql) tmp ORDER BY $sort" | 2 |
|
"SELECT 'x' FROM {workshop_submissions} s JOIN {user} a ON (a.id = s.authorid) JOIN {groups_members} agm ON (a.id = agm.userid) JOIN {user} u ON (u.id = ?) JOIN {groups_members} ugm ON (u.id = ugm.userid) WHERE s.example = 0 AND s.workshopid = ? AND s.id = ? AND agm.groupid = ugm.groupid" | 2 |
|
'Delete all submissions' | 2 |
|
'update reference assessment' | 2 |
|
'update example assessment' | 2 |
|
'update aggregate grades' | 2 |
|
'update clear aggregated grades' | 2 |
|
'update clear assessments' | 2 |
|
"SELECT COUNT(1) FROM (SELECT $fields FROM $from WHERE $where) temp WHERE 1 = 1" | 2 |
|
" SELECT * FROM {quiz_attempts} quiza WHERE userid = ? AND quiz = ? AND " . quiz_report_qm_filter_select($quiz) | 2 |
|
'Show report' | 2 |
|
'delete override' | 2 |
|
"SELECT DISTINCT u.id FROM {user} u $groupstudentsjoins->joins WHERE $groupstudentsjoins->wheres" | 2 |
|
"SELECT DISTINCT u.id FROM {user} u $studentsjoins->joins WHERE $studentsjoins->wheres" | 2 |
|
'Delete selected attempts' | 2 |
|
'Show available spaces' | 2 |
|
"SELECT COUNT(c.id) FROM $from WHERE $where" | 2 |
|
'Delete template' | 2 |
|
"SELECT fp.id FROM {forum_posts} fp WHERE {$postsql}" | 2 |
|
'SELECT ' . $fields . ' FROM ' . $tables | 2 |
|
'Update discussion message' | 2 |
|
'Delete at the request of the author' | 2 |
|
'SELECT t.id, ti.itemid, t.rawname FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemtype = ? AND ti.component = ? AND ti.contextid = ?' | 2 |
|
'Show in activity chooser' | 2 |
|
"SELECT u.id FROM {user} u JOIN {groups_members} gm ON gm.userid = u.id {$enrolledjoin->joins} WHERE gm.groupid $ingroupsql AND {$enrolledjoin->wheres} ORDER BY $sort" | 2 |
|
'Show feedback if there is a grade' | 2 |
|
"UPDATE {book_chapters} SET pagenum = pagenum + 1 WHERE bookid = ? AND pagenum >= ?" | 2 |
|
'update chapter' | 2 |
|
'Delete entries by users not enrolled' | 2 |
|
'SELECT fieldid, content, content1, content2, content3, content4 FROM {data_content} WHERE recordid = ?' | 2 |
|
"SELECT DISTINCT $varcharcontent AS content FROM {data_content} WHERE fieldid=? AND content IS NOT NULL" | 2 |
|
'Delete recordings' | 2 |
|
"Delete comment posted by" | 3 |
|
'Select category' | 3 |
|
'SELECT ' . $this->required_fields_sql('u') | 3 |
|
'Show all' | 3 |
|
"Delete ASCII\0 NULL control character" | 3 |
|
'Delete ASCII NULL control character' | 3 |
|
"Delete ASCII\x05 ENQUIRY control character" | 3 |
|
'Delete ASCII ENQUIRY control character' | 3 |
|
"Delete ASCII\x06 ACKNOWLEDGE control character" | 3 |
|
'Delete ASCII ACKNOWLEDGE control character' | 3 |
|
"Delete ASCII\x07 BELL control character" | 3 |
|
'Delete ASCII BELL control character' | 3 |
|
"Delete ASCII\x0E SHIFT OUT control character" | 3 |
|
'Delete ASCII SHIFT OUT control character' | 3 |
|
"Delete ASCII\x0F SHIFT IN control character" | 3 |
|
'Delete ASCII SHIFT IN control character' | 3 |
|
"Delete ASCII\x10 DATA LINK ESCAPE control character" | 3 |
|
'Delete ASCII DATA LINK ESCAPE control character' | 3 |
|
"Delete ASCII\x11 DEVICE CONTROL ONE control character" | 3 |
|
'Delete ASCII DEVICE CONTROL ONE control character' | 3 |
|
"Delete ASCII\x12 DEVICE CONTROL TWO control character" | 3 |
|
'Delete ASCII DEVICE CONTROL TWO control character' | 3 |
|
"Delete ASCII\x13 DEVICE CONTROL THREE control character" | 3 |
|
'Delete ASCII DEVICE CONTROL THREE control character' | 3 |
|
"Delete ASCII\x14 DEVICE CONTROL FOUR control character" | 3 |
|
'Delete ASCII DEVICE CONTROL FOUR control character' | 3 |
|
"Delete ASCII\x15 NEGATIVE ACKNOWLEDGE control character" | 3 |
|
'Delete ASCII NEGATIVE ACKNOWLEDGE control character' | 3 |
|
"Delete ASCII\x16 SYNCHRONOUS IDLE control character" | 3 |
|
'Delete ASCII SYNCHRONOUS IDLE control character' | 3 |
|
"Delete ASCII\x1B ESCAPE control character" | 3 |
|
'Delete ASCII ESCAPE control character' | 3 |
|
"Delete ASCII\x7F DELETE control character" | 3 |
|
'Delete ASCII DELETE control character' | 3 |
|
"Delete ISO 8859\xC2\x80 PADDING CHARACTER control character" | 3 |
|
'Delete ISO 8859 PADDING CHARACTER control character' | 3 |
|
"Delete ISO 8859\xC2\x81 HIGH OCTET PRESET control character" | 3 |
|
'Delete ISO 8859 HIGH OCTET PRESET control character' | 3 |
|
"Delete ISO 8859\xC2\x83 NO BREAK HERE control character" | 3 |
|
'Delete ISO 8859 NO BREAK HERE control character' | 3 |
|
"Delete ISO 8859\xC2\x84 INDEX control character" | 3 |
|
'Delete ISO 8859 INDEX control character' | 3 |
|
"Delete ISO 8859\xC2\x86 START OF SELECTED AREA control character" | 3 |
|
'Delete ISO 8859 START OF SELECTED AREA control character' | 3 |
|
"Delete ISO 8859\xC2\x87 END OF SELECTED AREA control character" | 3 |
|
'Delete ISO 8859 END OF SELECTED AREA control character' | 3 |
|
"Delete ISO 8859\xC2\x88 CHARACTER TABULATION SET control character" | 3 |
|
'Delete ISO 8859 CHARACTER TABULATION SET control character' | 3 |
|
"Delete ISO 8859\xC2\x89 CHARACTER TABULATION WITH JUSTIFICATION control character" | 3 |
|
'Delete ISO 8859 CHARACTER TABULATION WITH JUSTIFICATION control character' | 3 |
|
"Delete ISO 8859\xC2\x8A LINE TABULATION SET control character" | 3 |
|
'Delete ISO 8859 LINE TABULATION SET control character' | 3 |
|
"Delete ISO 8859\xC2\x8B PARTIAL LINE FORWARD control character" | 3 |
|
'Delete ISO 8859 PARTIAL LINE FORWARD control character' | 3 |
|
"Delete ISO 8859\xC2\x8C PARTIAL LINE BACKWARD control character" | 3 |
|
'Delete ISO 8859 PARTIAL LINE BACKWARD control character' | 3 |
|
"Delete ISO 8859\xC2\x8D REVERSE LINE FEED control character" | 3 |
|
'Delete ISO 8859 REVERSE LINE FEED control character' | 3 |
|
"Delete ISO 8859\xC2\x8E SINGLE SHIFT TWO control character" | 3 |
|
'Delete ISO 8859 SINGLE SHIFT TWO control character' | 3 |
|
"Delete ISO 8859\xC2\x8F SINGLE SHIFT THREE control character" | 3 |
|
'Delete ISO 8859 SINGLE SHIFT THREE control character' | 3 |
|
"Delete ISO 8859\xC2\x90 DEVICE CONTROL STRING control character" | 3 |
|
'Delete ISO 8859 DEVICE CONTROL STRING control character' | 3 |
|
"Delete ISO 8859\xC2\x91 PRIVATE USE ONE control character" | 3 |
|
'Delete ISO 8859 PRIVATE USE ONE control character' | 3 |
|
"Delete ISO 8859\xC2\x92 PRIVATE USE TWO control character" | 3 |
|
'Delete ISO 8859 PRIVATE USE TWO control character' | 3 |
|
"Delete ISO 8859\xC2\x93 SET TRANSMIT STATE control character" | 3 |
|
'Delete ISO 8859 SET TRANSMIT STATE control character' | 3 |
|
"Delete ISO 8859\xC2\x95 MESSAGE WAITING control character" | 3 |
|
'Delete ISO 8859 MESSAGE WAITING control character' | 3 |
|
"Delete ISO 8859\xC2\x96 START OF GUARDED AREA control character" | 3 |
|
'Delete ISO 8859 START OF GUARDED AREA control character' | 3 |
|
"Delete ISO 8859\xC2\x97 END OF GUARDED AREA control character" | 3 |
|
'Delete ISO 8859 END OF GUARDED AREA control character' | 3 |
|
"Delete ISO 8859\xC2\x99 SINGLE GRAPHIC CHARACTER INTRODUCER control character" | 3 |
|
'Delete ISO 8859 SINGLE GRAPHIC CHARACTER INTRODUCER control character' | 3 |
|
"Delete ISO 8859\xC2\x9A SINGLE CHARACTER INTRODUCER control character" | 3 |
|
'Delete ISO 8859 SINGLE CHARACTER INTRODUCER control character' | 3 |
|
"Delete ISO 8859\xC2\x9B CONTROL SEQUENCE INTRODUCER control character" | 3 |
|
'Delete ISO 8859 CONTROL SEQUENCE INTRODUCER control character' | 3 |
|
"Delete ISO 8859\xC2\x9D OPERATING SYSTEM COMMAND control character" | 3 |
|
'Delete ISO 8859 OPERATING SYSTEM COMMAND control character' | 3 |
|
"Delete ISO 8859\xC2\x9E PRIVACY MESSAGE control character" | 3 |
|
'Delete ISO 8859 PRIVACY MESSAGE control character' | 3 |
|
"Delete ISO 8859\xC2\x9F APPLICATION PROGRAM COMMAND control character" | 3 |
|
'Delete ISO 8859 APPLICATION PROGRAM COMMAND control character' | 3 |
|
"Delete Unicode\xE2\x80\x8B ZERO WIDTH SPACE control character" | 3 |
|
'Delete Unicode ZERO WIDTH SPACE control character' | 3 |
|
"Delete Unicode\xEF\xBB\xBF ZERO WIDTH NO-BREAK SPACE control character" | 3 |
|
'Delete Unicode ZERO WIDTH NO-BREAK SPACE control character' | 3 |
|
"Delete Unicode\xEF\xBF\xBD REPLACEMENT CHARACTER control character" | 3 |
|
'Delete Unicode REPLACEMENT CHARACTER control character' | 3 |
|
'SELECT ' . $ufields | 3 |
|
'update data' | 3 |
|
'Delete comment' | 3 |
|
'show email,lang and height,search for users with height 180cm' | 3 |
|
'show email and height,search for Spanish/German/English speakers' | 3 |
|
"SELECT COUNT(1)" | 3 |
|
'SELECT count(1)' . $sql | 3 |
|
'SELECT ' . implode(', ', $fields) . $sql . ' ORDER BY ' . implode(', ', $sorts) | 3 |
|
'INSERT INTO ' . $table . ' (' . implode(',', array_keys($fields)) . ') VALUES (' . implode(',', $fields) . ')' | 3 |
|
'select @@rowcount' | 3 |
|
"select name from sysdatabases where name <> 'master'" | 3 |
|
"SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table ORDER BY O.name, I.Name, K.keyno" | 3 |
|
"select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, information_schema.table_constraints tc where tc.constraint_name = k.constraint_name and tc.constraint_type = 'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position " | 3 |
|
"insert into $seqname values($start)" | 3 |
|
"insert into $seq values($start)" | 3 |
|
"update $seq set id=id+1 where id=$num" | 3 |
|
"update $seq with (tablock,holdlock) set id = id + 1" | 3 |
|
"select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))" | 3 |
|
'SELECT S.RDB$FIELD_NAME AFIELDNAME FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON I.RDB$INDEX_NAME=S.RDB$INDEX_NAME WHERE I.RDB$RELATION_NAME=\'' . $table . '\' and I.RDB$INDEX_NAME like \'RDB$PRIMARY%\' ORDER BY I.RDB$INDEX_NAME,S.RDB$FIELD_POSITION' | 3 |
|
"SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '" . $table . "'" | 3 |
|
"SELECT Gen_ID($seqname,1) FROM RDB\$DATABASE" | 3 |
|
'show status' | 3 |
|
"select '-' from dual" | 3 |
|
"SELECT * FROM {{$tablename}} WHERE oneint $insql ORDER BY id ASC" | 3 |
|
'SELECT * FROM {silly_test_table} ORDER BY id' | 3 |
|
"SELECT intfield, {$fieldsql} AS falias FROM {{$tablename}} GROUP BY intfield" | 3 |
|
'SELECT MAX(id) FROM {' . $tablename . '}' | 3 |
|
'delete post' | 3 |
|
'delete entry' | 3 |
|
'delete attempt' | 3 |
|
'SELECT qbe.id as id, qv.id as versionid FROM {question_bank_entries} qbe JOIN {question_versions} qv ON qbe.id = qv.questionbankentryid JOIN {question} q ON qv.questionid = q.id WHERE q.id = ?' | 3 |
|
'Select all' | 3 |
|
"SELECT MAX(timecreated) " | 3 |
|
'Show more' | 3 |
|
"SELECT COUNT(*) FROM ($sql) tmp" | 3 |
|
'update assessment' | 3 |
|
'update example' | 3 |
|
'SELECT s.id AS submissionid, a.id AS assessmentid, a.weight AS assessmentweight, a.reviewerid, a.gradinggrade, g.dimensionid, g.grade FROM {workshop_submissions} s JOIN {workshop_assessments} a ON (a.submissionid = s.id) JOIN {workshop_grades} g ON (g.assessmentid = a.id AND g.strategy = :strategy) WHERE s.example=0 AND s.workshopid=:workshopid' | 3 |
|
'Select all options that should be available, existing settings are not modified. Hold CTRL key to select multiple fields.' | 3 |
|
'Delete all group overrides' | 3 |
|
'Delete all user overrides' | 3 |
|
'Delete entry' | 3 |
|
'SELECT DISTINCT ' . $DB->sql_concat('u.id', '\'#\'', 'COALESCE(sa.attempt, 0)') . ' AS uniqueid, ' | 3 |
|
'SELECT COUNT(DISTINCT(' . $DB->sql_concat('u.id', '\'#\'', 'COALESCE(sa.attempt, 0)') . ')) AS nbresults, ' | 3 |
|
'SELECT * FROM {' . self::TABLE . '} ' . $this->get_table_alias( ) | 3 |
|
"SELECT cm.id, cm.instance FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module " . "WHERE md.name = :modname AND cm.instance " . $sqlassignmentids | 3 |
|
"SELECT u.username FROM {user} u {$usersjoin->joins} WHERE {$usersjoin->wheres}" | 3 |
|
'SELECT u.* FROM {user} u ' . $join . ' WHERE ' . $where | 4 |
|
'SELECT COUNT(u.id)' | 4 |
|
'Delete role "$a->role"?' | 4 |
|
'Select action to carry out when user enrolment expires. Please note that some user data and settings are purged from course during course unenrolment.' | 4 |
|
"SELECT idnumber $selects FROM {user} $joins WHERE idnumber LIKE ? ORDER BY idnumber" | 4 |
|
'show email,lang and height,search for English speakers' | 4 |
|
'show email,lang and height,search for users with height 170cm' | 4 |
|
"UPDATE $table SET $column=? WHERE $where" | 4 |
|
"select $col from $tables where $where for update" | 4 |
|
'SELECT ' | 4 |
|
"SELECT * FROM {{$tablename}} WHERE course = ?" | 4 |
|
"SELECT * FROM {{$tablename}} WHERE id = ?" | 4 |
|
'delete discussion' | 4 |
|
'delete category' | 4 |
|
'update entry' | 4 |
|
SELECT userids.id FROM ( | 4 |
|
"select ue.id, ue.userid, e.enrol from {user_enrolments} ue join {enrol} e on ue.enrolid = e.id WHERE e.courseid = ?" | 4 |
|
'SELECT * FROM {tag_instance} WHERE component = ?' | 4 |
|
'SELECT DISTINCT itemid FROM {files} WHERE contextid = :contextid AND component = :component AND filearea = :filearea' | 4 |
|
'update submission' | 4 |
|
"SELECT dimensionid, wg.* FROM {workshop_grades} wg WHERE assessmentid = :assessmentid AND strategy= :strategy AND dimensionid $dimsql" | 4 |
|
'update mod' | 5 |
|
"SELECT r.id FROM {reportbuilder_report} r WHERE {$where}" | 5 |
|
SELECT | 5 |
|
"show status" | 5 |
|
"SELECT {{$tablename}} WHERE course = ? " | 5 |
|
'update post' | 5 |
|
'SELECT id FROM {context} WHERE id = :contextid' | 6 |
|
'Delete role \"$a->role\"?' | 6 |
|
"SELECT ctx.id FROM {user_info_data} uda JOIN {user_info_field} uif ON uda.fieldid = uif.id JOIN {context} ctx ON ctx.instanceid = uda.userid AND ctx.contextlevel = :contextlevel WHERE uda.userid = :userid AND uif.datatype = :datatype" | 6 |
|
"SELECT uda.userid FROM {user_info_data} uda JOIN {user_info_field} uif ON uda.fieldid = uif.id WHERE uda.userid = :userid AND uif.datatype = :datatype" | 6 |
|
"SELECT * FROM {user_info_data} uda JOIN {user_info_field} uif ON uda.fieldid = uif.id WHERE uda.userid = :userid AND uif.datatype = :datatype" | 6 |
|
'select SCOPE_IDENTITY()' | 6 |
|
"UPDATE $table SET $column=(?) WHERE $where" | 6 |
|
"insert into $seq with (tablock,holdlock) values($start)" | 6 |
|
"select distinct sql1 from adodb_logsql where sql1 like $sqlq" | 6 |
|
"SELECT * FROM {{$tablename}} ORDER BY id" | 6 |
|
"SELECT * FROM {{$tablename}}" | 6 |
|
'delete mod' | 7 |
|
"select id from $seq" | 7 |
|
"show variables" | 7 |
|
"SELECT c.id FROM {course} c {$ratingquery->join} WHERE {$ratingquery->userwhere}" | 8 |
|
"SELECT COUNT(gm.id) FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE gm.userid = ?" | 9 |
|
'SELECT u.id, ' . $this->userfieldsselects | 9 |
|
'SELECT COUNT(1)' | 9 |
|
"SELECT * FROM {table}" | 9 |
|
"SELECT id FROM {user} WHERE $sql ORDER BY username" | 9 |
|
"SELECT MIN(id) FROM {course_categories}" | 12 |
|
"SELECT COUNT(gm.id) FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE g.courseid = ?" | 14 |
|
"SELECT * FROM {{$tablename}}" | 23 |
|
"SELECT COUNT(gm.id) FROM {groups_members} gm JOIN {groups} g ON gm.groupid = g.id WHERE g.courseid = ?" | 44 |
|