If I pass userid and courseid, the web services should return me timestart and timeend from mdl_user_enrolments table.I have tried to find web services which will return me these data, but no luck. Is there any web services which will help me to achieve this?If not what are the steps I have to follow to write web services?Where I have to write and store this files.I guess this will be my SQL queries.
SELECT ue.timestart,ue.timeendHow will I convert these data into JSON format to send these data?
FROM
mdl_user_enrolments as ue
INNER JOIN mdl_enrol as en ON en.id=ue.enrolid
WHERE en.courseid=? AND ue.userid=?