Attendance per category

Re: Attendance per category

by nainesh kathrotia -
Number of replies: 2

how to get report by sql query please suggest

In reply to nainesh kathrotia

Re: Attendance per category

by sivan sharon -

any progress regarding reporting of attendance in the category level?

In reply to nainesh kathrotia

Re: Attendance per category

by Vernon Spain -
Picture of Plugin developers Picture of Testers

This is (SAMPLE USE ONLY) a query that I'd run via the ad-hoc reporting tool.

To select the category you'd change the 99 to the category id matching the one you wanted.

You'd need installed:

Ad-hoc reporting tool

Attendance module.


Hope this helps,

V



SELECT
mdl_attendance_log.sessionid,
mdl_attendance_log.statusid,
mdl_attendance_log.statusset,
mdl_attendance_log.timetaken,
mdl_attendance_log.takenby,
mdl_attendance.`name`,
mdl_user.username,
mdl_user.idnumber,
mdl_user.firstname,
mdl_user.lastname,
mdl_user.email,
mdl_course.category,
mdl_attendance_sessions.description,
mdl_attendance_log.remarks,
mdl_attendance.id,
mdl_attendance_statuses.description
FROM
mdl_attendance_log
INNER JOIN mdl_user ON mdl_attendance_log.studentid = mdl_user.id
INNER JOIN mdl_attendance_sessions ON mdl_attendance_log.sessionid = mdl_attendance_sessions.id
INNER JOIN mdl_attendance ON mdl_attendance_sessions.attendanceid = mdl_attendance.id
INNER JOIN mdl_course ON mdl_attendance.course = mdl_course.id
INNER JOIN mdl_attendance_statuses ON mdl_attendance_statuses.attendanceid = mdl_attendance.id
WHERE
mdl_course.category = 99