Rob,
Ok, well I spent most of the day working on this and finally got something working that I'm satisfied with for now. I refined the sql query a bit to get rid of extraneous information and will post it below (again for reference).
After I finished with that, I looked at the code in lib.php for some time trying to figure out how to have the grade from
mdl_facetoface_signups_status
sent to the Excel export instead of the grade that is apparently being pulled from the gradebook. I'm still a little lost because it appears global functions, that I'm not familiar with, are being called. I feel like I have a grasp on what needs to be done and just have to figure out how to actually get it done.
If you have any advice or suggestions, I will be appreciative.
I will stop posting lengthy sql queries with this message.
Jason
**********************************
SQL Query to get attendance data from the face-to-face module (note each instance value needs to be entered (12 is shown here)). There may be some unneeded information in the query that I have overlooked.
**********************************
SELECT
FROM_UNIXTIME(mdl_facetoface_sessions_dates.timestart) AS Date,
mdl_user.username,
mdl_user.firstname,
mdl_user.lastname,
CASE mdl_facetoface_signups_status.grade WHEN 100 THEN "Attended" WHEN 50 THEN "Partially-Attended" WHEN 0 THEN "No-Show" ELSE "Cancelled" END AS Grade,
FROM_UNIXTIME(mdl_facetoface_signups_status.timecreated) AS When_Created
FROM
mdl_facetoface
JOIN
mdl_facetoface_sessions
ON mdl_facetoface_sessions.facetoface = mdl_facetoface.id
JOIN
mdl_facetoface_signups
ON mdl_facetoface_sessions.id = mdl_facetoface_signups.sessionid
JOIN
mdl_facetoface_sessions_dates
ON mdl_facetoface_signups.sessionid = mdl_facetoface_sessions_dates.sessionid
JOIN
mdl_facetoface_signups_status
ON mdl_facetoface_signups.id = mdl_facetoface_signups_status.signupid
LEFT JOIN
(
SELECT
mdl_facetoface_signups_status.signupid,
MAX(mdl_facetoface_signups_status.timecreated) AS timecreated
FROM
mdl_facetoface_signups_status
INNER JOIN
mdl_facetoface_signups
ON mdl_facetoface_signups.id = mdl_facetoface_signups_status.signupid
INNER JOIN
mdl_facetoface_sessions
ON mdl_facetoface_signups.sessionid = mdl_facetoface_sessions.id
AND mdl_facetoface_sessions.facetoface = 12
WHERE
mdl_facetoface_signups_status.statuscode IN (10,80,90,100)
GROUP BY
mdl_facetoface_signups_status.signupid
) sign
ON mdl_facetoface_signups.id = sign.signupid
JOIN
mdl_user
ON mdl_user.id = mdl_facetoface_signups.userid
WHERE
mdl_facetoface.id = 12
AND mdl_facetoface_signups_status.superceded = 0
AND mdl_facetoface_signups_status.statuscode >= 0
ORDER BY
mdl_facetoface_sessions.id, mdl_facetoface_sessions_dates.timestart , mdl_user.firstname, mdl_user.lastname