Get first access of courses by api

Get first access of courses by api

by Eliseo Montenegro -
Number of replies: 2

Hello everyone, I need to bring you the list of students who first accessed a course and students who completed a course. Do you know what function I can do?

Average of ratings: -
In reply to Eliseo Montenegro

Re: Get first access of courses by api

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

you can have these information in the table {mdl}_course_completions.
Maybe they've a webservice that do the same or better.

ie:
SELECT *
FROM mdl_course_completions
WHERE timecompleted is not null
AND course = 1234

it give the list of student that have completed the course 1234

they've three dates in the table
timeenrolled
timestarted
timecompleted

I hope it's help.

Dominique.
Average of ratings:Useful (2)
In reply to Dominique Palumbo

Re: Get first access of courses by api

by Eliseo Montenegro -
thanks Dominique,
i get this event from select * FROM mdl_logstore_standard_log a
WHERE
a.eventname = '\\core\\event\\course_completed' and ....