List of Courses and Associated Teachers

Re: List of Courses and Associated Teachers

by Diana G -
Number of replies: 1

Hello... I need the same report for moodle 2.7

Any idea?

In reply to Diana G

Re: List of Courses and Associated Teachers

by Владимир Фулин -

try this

SELECT  concat(pu.lastname," ",pu.firstname) Teacher, 

COUNT(pu.id)

FROM prefix_role_assignments AS ra

JOIN prefix_user AS pu ON ra.userid = pu.id

WHERE ra.roleid=3

GROUP BY pu.id

ORDER BY COUNT(pu.id) DESC