General developer forum

All course wise reports

 
Picture of Kumar k
All course wise reports
 

Hi 

I want to generate all  course wise reports (completed, incompleted) using ad-hock quries.


I am usig Ad-hoc database queries pluggin(https://moodle.org/plugins/pluginversions.php?plugin=report_customsql)



is this right Pluggin for generate ad-hock reports.


 can any one provide right query. Right now iam using below query but no result given

 

 URLIS:https://docs.moodle.org/33/en/ad-hoc_contributed_reports#User_Course_Completion

 Code:

 

 "SELECT 

  u.username, 

  c.shortname,  

 DATE_FORMAT(FROM_UNIXTIME(p.timecompleted),'%Y-%m-%d') AS completed

FROM prefix_course_completions AS p

JOIN prefix_course AS c ON p.course = c.id

JOIN prefix_user AS u ON p.userid = u.id

WHERE c.enablecompletion = 1

ORDER BY u.username"

 

 
Average of ratings: -