Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
moodle-requete

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
moodle-requete [2023/02/15 15:35] 172.16.7.218moodle-requete [2023/09/28 12:26] (current) – external edit 127.0.0.1
Line 28: Line 28:
 LINES TERMINATED BY '\r\n'; LINES TERMINATED BY '\r\n';
 ; ;
 +</code>
 +
 +Les traces d'un utilisateur entre 2 dates
 +<code>
 +select eventname,target,courseid,FROM_UNIXTIME(timecreated) from mdl_logstore_standard_log where timecreated>1675688400 AND timecreated<1675702800 AND userid=78293;
 +</code>
 +
 +Nbr de participants dans un ou plusieurs cours
 +<code>
 +SELECT c.id, c.shortname, c.fullname, u.id, u.username, u.firstname, u.lastname, r.shortname as 'role', FROM_UNIXTIME(ue.timecreated)
 +From   mdl_user as u
 +join   mdl_user_enrolments ue on ue.userid=u.id
 +join   mdl_enrol en on ue.enrolid=en.id AND (ue.timecreated>1688162400 AND ue.timecreated<1693951150)
 +join   mdl_role_assignments ra on u.id=ra.userid
 +join   mdl_role r on ra.roleid=r.id and r.shortname ='student'
 +join   mdl_context cx on cx.id = ra.contextid and cx.contextlevel = 50
 +JOIN   mdl_course c ON c.id = cx.instanceid AND en.courseid and c.id>3606
 +GROUP BY c.id,u.id;
 </code> </code>
  
  
moodle-requete.1676475320.txt.gz · Last modified: 2023/09/28 12:26 (external edit)