course not completed

course not completed

by nikhil pednekar -
Number of replies: 5

Does anyone knows what will be the exact query for showing list of

user who have not completed the course?

thanks,

Regards,

Nikhil Pednekar

Average of ratings: -
In reply to nikhil pednekar

Re: course not completed

by Jitendra Gaur -

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

In reply to Jitendra Gaur

Re: course not completed

by nikhil pednekar -

thanks jitendra,

i have one problem...my {course_completions} is empty...

as this query showing null values...

any solution?

thanks.

In reply to nikhil pednekar

Re: course not completed

by Jitendra Gaur -

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 - 

http://docs.moodle.org/dev/Course_completion

In reply to Jitendra Gaur

Re: course not completed

by nikhil pednekar -

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.

In reply to nikhil pednekar

Re: course not completed

by Jitendra Gaur -

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.