Completion reporting by country

Completion reporting by country

by Paul Gillary -
Number of replies: 1

Hi All, 
Is there an easy way to get course completion data by country? Or a hard way! 
We have an international customer with several regions. All the users have registered their country so the data is there if we can somehow report on it.
Thanks
Paul

Average of ratings: -
In reply to Paul Gillary

Re: Completion reporting by country

by Dominique Palumbo -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

I cannot really test it... so take it for what it was !

SELECT u.country
,c.shortname
,count(u.id) nb_user
FROM prefix_course_completions AS cp
JOIN prefix_course AS c ON cp.course = c.id
JOIN prefix_user AS u ON cp.userid = u.id
WHERE cp.timecompleted IS NOT NULL
GROUP BY u.country,c.shortname
ORDER BY c.shortname

=> Based on Course Completion sitewide for all Users Contributed by: Randy Thornton
Average of ratings: Useful (1)