Hello,
I have a simple query to have an understanding of when the Course Recomplete plugin has updated (deleted) a student's current course completion to trigger retraining. The query below works in a limited way, Row 6 returns the values or 0 (zero) or 1 because of the IS Null statement instead of the date I was attempting to retrieve. Any assistance would be appreciated.
Kind Regards.
SELECT
course.fullname course,
CONCAT(user.firstname, ' ', user.lastname) AS 'Name',
FROM_UNIXTIME(completions.timeenrolled, '%m-%d-%Y') AS 'DateEnrolled',
FROM_UNIXTIME(completions.timecompleted, '%m-%d-%Y') AS 'DateCompleted',
FROM_UNIXTIME(completions.timecompleted, '%m-%d-%Y') IS NULL AS 'Notified'
FROM prefix_course_completions AS completions
JOIN prefix_course AS course ON completions.course = course.id
JOIN prefix_user AS user ON completions.userid = user.id
AND user.deleted = 0 AND user.suspended = 0
WHERE (course.id = 90)
and (course.visible = 1)
ORDER BY DateCompleted
##%%course.fullname%%
%%FILTER_COURSEENROLLEDSTUDENTS%%