Hi everyone,
I'm very much a noob at SQL and am trying to implement an SQL report though the configurable reports plug in I have located the script below and modified it slightly to give me a little more user information. I now have the report showing those who have passed/ failed or completed all courses but cannot get it to display those who have not attempted a course I have tried various variants of "OR st.value = 'not attempted'" but to no avail when I include the statement it seems to report those users as 'completed'.
SELECT DISTINCT u.firstname FIRST,u.lastname LAST,c.fullname, u.IDNumber,u.department, u.institution AS 'jobtitle', u.city, st.attempt Attempt,st.VALUE STATUS,FROM_UNIXTIME(st.timemodified,"%m-%d-%Y") DATE
FROM prefix_scorm_scoes_track AS st
JOIN prefix_user AS u ON st.userid=u.id
JOIN prefix_scorm AS sc ON sc.id=st.scormid
JOIN prefix_course AS c ON c.id=sc.course
WHERE
st.VALUE='completed'
OR st.VALUE='passed'
OR st.VALUE='incomplete'
OR st.VALUE='failed'
ORDER BY c.fullname, u.lastname,u.firstname, st.attempt
I am using Moodle v2.9
Any help would be appreciated
Thanks!