Does anyone knows what will be the exact query for showing list of
user who have not completed the course?
thanks,
Regards,
Nikhil Pednekar
Hi Nikhil,
Use this query
SELECT u.username, c.fullname
FROM {course_completions} cc
JOIN {course} c ON (c.id = cc.course)
JOIN {user} u ON (u.id = cc.userid)
WHERE cc.timecompleted IS NULL
ORDER BY cc.course ASC
Hope this is help you.
Thanks,
Jitendra Gaur
thanks jitendra,
i have one problem...my {course_completions} is empty...
as this query showing null values...
any solution?
thanks.
Hi Nikhil,
From moodle 2.x version course_completions is nessesory table to log the completed course by the student. so you need to first configure the course completion settings only after that you can get the course completion data.
Take a detail look at course completion of moodle doc -
hi jitendra,
i tried almost all settings of course completion from completion doc. But still that table is empty.
Could you tell me what will be possible settings of course completion.
Thanks.
Hi Nikhil,
You can do following things -
Add course_completion block on course page and when student login they can manually complete the course which you need to set in completion tracking setting under the course administration.
Its require to run admin/cron.php to execute the course_completion module.