User Tools

Site Tools


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/06/13 12:50] – 172.16.7.218moodle-requete [2023/09/28 12:26] (current) – external edit 127.0.0.1
Line 34: Line 34:
 select eventname,target,courseid,FROM_UNIXTIME(timecreated) from mdl_logstore_standard_log where timecreated>1675688400 AND timecreated<1675702800 AND userid=78293; select eventname,target,courseid,FROM_UNIXTIME(timecreated) from mdl_logstore_standard_log where timecreated>1675688400 AND timecreated<1675702800 AND userid=78293;
 </code> </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>
 +
  
moodle-requete.1686660654.txt.gz · Last modified: 2023/09/28 12:26 (external edit) · Currently locked by: 216.73.217.114