Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
28 views
Moodle Request
moodle
Uploaded by
ByPass Pass
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Moodle Request For Later
Download
Save
Save Moodle Request For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
28 views
Moodle Request
moodle
Uploaded by
ByPass Pass
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Moodle Request For Later
Carousel Previous
Carousel Next
Save
Save Moodle Request For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 17
Search
Fullscreen
User and Role Report Count number of distinct learners and teachers enrolled per category {including all its sub categories) -ECT COUNT(DISTINCT Ira.userid) AS learners, COUNT(DISTINCT tr OM prefix_course AS ¢ #, mdl_course_categories AS cats T JOIN prefix_context AS ctx ON c.id = ctx. instanceid IN prefix_role_assignments AS Ira ON Ira.contextid = ctx.id IN prefix_role_assignments AS tra ON tra.contextid = ctx.id IN prefix_course_categories AS cats ON c.category = cats.id IRE c.category = cats.id r>¢ cats.path LIKE '%/CATEGORYID/X" #Replace CATEGORYID with OR cats.path LIKE '%/CATEGORYID" Detailed ACTIONs for each ROLE (TEACHER, NON-EDITING TEACHER andSTUDENT) SELECT r.name, l.action, COUNT( l.userid ) AS counter FROM prefix_log AS 1 JOIN prefix_context AS context ON context.instanceid = 1.cour JOIN prefix_role_assignments AS ra ON l.userid = ra.userid AN JOIN prefix_role AS r ON ra.roleid = r.id WHERE ra.roleid IN (3, 4, 5) GROUP BY roleid, 1.action Student (user) COUNT in each Course Including (optional) filter by: year (if included in course fullname), " hre SELECT concat(‘
@ Students in all courses of some institute What isthe status (deleted or not) of all Students (roleid = 5) in all courses of some InstitureSELECT c.id, c.fullname, u.firstname, u.lastname, u.deleted FROM prefix_course AS ¢ JOIN prefix_context AS ctx ON c.id = ctx.instanceid JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id JOIN prefix_user AS u ON u.id = ra.userid WHERE ra.roleid =! AND ctx.instanceid = c.id AND u.institution = ‘please enter school name here’ Full User info (for deleted users) Including extra custom profile fields (from prefix_user_info_data) SELECT * FROM prefix_user as u JOIN prefix_user_info_data as uid ON uid.userid = u.id JOIN prefix_user_info_field as uif ON (uid.fieldid = uif.id A WHERE “deleted and “institution’="your school name" an User's courses change “u.id = 2" with a new user idSELECT u.firstname, u.lastname, c.id, ¢.fullname FROM prefix_course AS ¢ JOIN prefix_context AS ctx ON c.id = ctx.instanceid JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id JOIN prefix_user AS u ON u.id = ra.userid WHERE uid = 2 List Users with extra info (email) in current course blocks/configurable_reports replaces %%COURSEID%%6 with course id. SELECT u.firstname, u.lastname, u.email FROM prefix_role_assignments AS ra JOIN prefix_context AS context ON context. JOIN prefix_course AS ¢ ON c.id = context. JOIN prefix_user AS u ON u.id = ra.userid id = ra.contextid A nstanceid AND c.idSpecial Roles SELECT ra.roleid,r.name yconcat(‘
=28,'Y"," FROM prefix_enrol As enr, prefix_user_enrolments AS uenr WHERE enr.id = uenr.enrolid AND enr.status = uenr.status List of users with language Contributed by: Randy Thornton (nttps//moodle.org/user/profle php?id=88992) ‘An issue with systems that do not have their default language set up properly isthe need to do a mass change for al users to a localization. A common case is changing default English to American English. This will show you the language setting forall users: SELECT username, lang from prefix_user NOTE: UPDATE commands require the ability o alter the database directly via tools like Adminer or PHPMyAdmin or other db tools. This code will change the setting from ‘en’ to ‘en_us' forall users: UPDATE prefix_user SET lang = ‘en_us' WHERE lang = ‘en’ To do this for only users who have a particular country set, use this as an example: UPDATE prefix_user SET lang = ‘en_us' WHERE country = ‘US’ AN »List of users with Authentication Contributed by: Randy Thornton (https://moodle.org/user/profle php?id=88992) ‘Sometimes you need to do mass changes of authentication methods. A common case is changing default manual to LDAP. This will show you the Authentication setting forall users: SELECT username, auth from prefix_user NOTE: UPDATE commands require the ability o alter the database directly via tools like Adminer or PHPMyAdmin or other db tools This code will change the setting from ‘manuat'to ldap" for all users except for the first ewo accounts which are Guest and Admin. (WARNING: itis bad practice to change your admin account from manual to an external method as failure of that external method will lock you out of Moodle as admin.) UPDATE prefix_user SET auth = ‘ldap’ WHERE auth = ‘manual’ AN »Compare role capability and permissions SELECT DISTINCT mrc.capability (SELECT rc.permission FROM “md)_role_capabilities’ AS rc WHE AND rc.roleid = '1' AND rc.contextid = ‘1') AS Manager . (SELECT rc.permission FROM “mdl_role_capabilities’ AS rc WHE AND rc.roleid = '2' AND rc.contextid = ‘1') AS CourseCreato ) (SELECT rc.permission FROM “mdl_role_capabilities’ AS rc WHE AND rc.roleid = '3' AND rc.contextid = ‘1') AS Teacher , (SELECT rc.permission FROM “mdl_role_capabilities” AS rc WHE AND rc.roleid = '4' AND rc.contextid = ‘1') AS AssistantTea (SELECT rc.permission FROM “mdl_role_capabilities’ AS rc WHE AND rc.roleid = 'S' AND rc.contextid = ‘1') AS Student , (SELECT rc.permission FROM “mdl_role_capabilities” AS rc WHE AND rc.roleid = '6' AND rc.contextid = ‘1') AS Guest FROM “mdl_role capabilities’ AS mrc User's accumulative 1e spent in course ‘A sum up of the time delta between logstore_standard_log user's records, consider- ing the @ 2 hour session limit. Uses: current users id S69KUSERIDIGH6 and current course's id 8%¢COURSEIDIEK ‘And also using a date filter (which can be ignored)The extra “User field is used as a dummy field for the Line chart Series field, in which | use X-id, Series=Type, Y=delta SELECT Lid, 1.timecreated, DATE_FORMAT(FROM_UNIXTINE(1.timecreated), '%d-%m-KV") AS dTime @prevtime := (SELECT max(timecreated) FROM ndl_logstore_stand WHERE userid = %XUSERTD%% and id < 1.id ORDER BY IF (1.timecreated - @prevtime < 7200, @delta := @delta + (1.t L.timecreated-@prevtime AS delta, "user" as type FROM prefix_logstore_standard_log as 1, (SELECT @delta := @) AS s_init # Change UserID WHERE 1.userid = %XUSERIDX% AND 1.courseid = XXCOURSEIDXX SMPILTER_STARTTINE:1.timecreated: >%% %%FILTER_ENDTINE:1.timec Log Activity Reports Count all Active Users by ROLE in a course category (including all of itssub-categories) SELECT COUNT(DISTINCT l.userid) as active FROM mdl_course as ¢ JOIN mdl_context AS ctx ON ctx.instanceid=c.id JOIN mdl_role_assignments AS ra ON ra.contextid = ctx.id JOIN mdl_user_lastaccess as 1 ON ra.userid = l.userid JOIN mdl_course_categories AS cats ON c.category = cats.id WHERE c.category=cats.id AND ( cats.path LIKE '%/80/%' OR cats.path LIKE '%/80" ) AND ra.roleid=3 AND ctx.contextlevel=50 #ra.roleid= TEACHER AND 1.timeaccess > (unix_timestamp() - ((60%69*24)*NO_OF_DAY » Detailed "VIEW" ACTION for each ROLE (TEACHER,NONE-EDITING TEACHER and STUDENT) SELECT 1.action, count( l.userid ) as counter , r.name FROM *prefix_log’ as 1 JOIN * prefix_role_assignments’ AS ra on l.userid = ra.userid JOIN *prefix_role AS r ON ra.roleid = r.id WHERE (ra.roleid IN (3,4,5)) AND (1.action LIKE '%view%' ) GROUP BY roleid,1.action order by r.name, counter descTotal Activity of Roles: and by Hours ‘eacher” and “None-Editing Teacher” by Dates The output columns of this report table can be used as base for a Pivot-Table which will show the amount of activity per hour per days in 3D graph view. SELECT DATE_FORMAT( FROM_UNIXTIME( 1.time ) , '%Y-Xm-%d' ) AS DATE_FORMAT( FROM_UNIXTIME( 1.time ) , ‘Xk’ ) AS grptimeh , FROM ~prefix_log” AS 1 JOIN prefix_user AS u ON u.id = l.userid JOIN prefix_role_assignments AS ra ON l.userid = ra.userid JOIN prefix_role AS r ON r.id = ra.roleid WHERE ra.roleid IN (3,4) GROUP BY grptimed, grptimeh ORDER BY grptimed, erptimeh How many LOGINs per user and user's Activity + link username to a user activity graph report
You might also like
CIS250 Final Exam Questions
PDF
100% (1)
CIS250 Final Exam Questions
5 pages
Moodle Scripts
PDF
No ratings yet
Moodle Scripts
82 pages
PG 2
PDF
No ratings yet
PG 2
2 pages
College Management System
PDF
No ratings yet
College Management System
29 pages
Exam 1
PDF
0% (1)
Exam 1
7 pages
Online Course Registration System
PDF
No ratings yet
Online Course Registration System
21 pages
Consultas SQL Scorm
PDF
No ratings yet
Consultas SQL Scorm
8 pages
Assign4 Ans
PDF
No ratings yet
Assign4 Ans
3 pages
DB Design
PDF
No ratings yet
DB Design
9 pages
Tech Academy Oracle SQL Assessment - 1
PDF
No ratings yet
Tech Academy Oracle SQL Assessment - 1
9 pages
6 Tutorme
PDF
No ratings yet
6 Tutorme
3 pages
Dbms 2 Assesment PDF
PDF
No ratings yet
Dbms 2 Assesment PDF
5 pages
Assign4 Ans
PDF
100% (1)
Assign4 Ans
3 pages
Assign5 Ans
PDF
No ratings yet
Assign5 Ans
3 pages
Srms Project
PDF
No ratings yet
Srms Project
70 pages
Assign4 Ans
PDF
No ratings yet
Assign4 Ans
3 pages
Assign5 Ans
PDF
100% (3)
Assign5 Ans
3 pages
College Alumani System
PDF
100% (1)
College Alumani System
51 pages
Cs2258 Database Management Systems Lab
PDF
No ratings yet
Cs2258 Database Management Systems Lab
12 pages
DB Lab Task-03.docx
PDF
No ratings yet
DB Lab Task-03.docx
4 pages
Lab03 Solutions - DBMS - Queries
PDF
No ratings yet
Lab03 Solutions - DBMS - Queries
4 pages
Course Code: CSE 454: Course Title: Software Development & Project Management
PDF
No ratings yet
Course Code: CSE 454: Course Title: Software Development & Project Management
14 pages
MySQL Query Practice Set
PDF
No ratings yet
MySQL Query Practice Set
5 pages
Project Report
PDF
No ratings yet
Project Report
16 pages
RAHULMINIPROJECT
PDF
No ratings yet
RAHULMINIPROJECT
49 pages
FIR System
PDF
No ratings yet
FIR System
40 pages
Student Management System Project
PDF
No ratings yet
Student Management System Project
5 pages
Page 1 of 15
PDF
No ratings yet
Page 1 of 15
15 pages
SQL: Structured Query Language
PDF
No ratings yet
SQL: Structured Query Language
38 pages
Relation
PDF
No ratings yet
Relation
16 pages
Schema Mysql CARTmulti
PDF
No ratings yet
Schema Mysql CARTmulti
28 pages
iSchool Case study v2
PDF
No ratings yet
iSchool Case study v2
6 pages
SQL
PDF
No ratings yet
SQL
8 pages
SQL Test
PDF
No ratings yet
SQL Test
5 pages
Exam 1 - Miguel Solis
PDF
No ratings yet
Exam 1 - Miguel Solis
11 pages
Richmindale Moodle Admin Guide
PDF
No ratings yet
Richmindale Moodle Admin Guide
4 pages
Database Managment System
PDF
No ratings yet
Database Managment System
18 pages
DBSM Project report-STUDENT ENROLLMENT SYSTEM
PDF
100% (1)
DBSM Project report-STUDENT ENROLLMENT SYSTEM
26 pages
Python Sba Sms
PDF
No ratings yet
Python Sba Sms
8 pages
SQL
PDF
No ratings yet
SQL
28 pages
Final Online Grading System
PDF
50% (4)
Final Online Grading System
22 pages
Assignment - College Direcotry Management System
PDF
No ratings yet
Assignment - College Direcotry Management System
8 pages
About Online Learning Management System in PHP MySQL
PDF
No ratings yet
About Online Learning Management System in PHP MySQL
4 pages
SQL Practice
PDF
No ratings yet
SQL Practice
7 pages
Schema Question
PDF
No ratings yet
Schema Question
36 pages
Databases
PDF
No ratings yet
Databases
21 pages
ICT WB Answers - C18
PDF
No ratings yet
ICT WB Answers - C18
4 pages
LAB_EXAM . Zaman Ali
PDF
No ratings yet
LAB_EXAM . Zaman Ali
6 pages
ACTIVITY Stored Procedures Triggers 2R3 Baluran
PDF
No ratings yet
ACTIVITY Stored Procedures Triggers 2R3 Baluran
6 pages
2808ICT Assignment 2 Comment
PDF
No ratings yet
2808ICT Assignment 2 Comment
3 pages
MIS SQL Assignment 29-044 Gourab Mondal
PDF
No ratings yet
MIS SQL Assignment 29-044 Gourab Mondal
11 pages
DBMS Project OM,Prakhar,Pranav
PDF
No ratings yet
DBMS Project OM,Prakhar,Pranav
26 pages
Information, Security & Control: (COMP 1476)
PDF
No ratings yet
Information, Security & Control: (COMP 1476)
83 pages
Unit 3 SQL prac notes ex1
PDF
No ratings yet
Unit 3 SQL prac notes ex1
4 pages
09-SQL_Injection.pptx (1)
PDF
No ratings yet
09-SQL_Injection.pptx (1)
79 pages
2381
PDF
No ratings yet
2381
12 pages
SQL COMPLETE COURSE
PDF
No ratings yet
SQL COMPLETE COURSE
14 pages
Student - Information - Database - Management - System - Documentation by Group DelaTiongCisco
PDF
No ratings yet
Student - Information - Database - Management - System - Documentation by Group DelaTiongCisco
10 pages
Lessons Learned App
PDF
No ratings yet
Lessons Learned App
12 pages