by Daniel Bower.
I ended up having to write a plugin to get the data that I wanted.
This is the part that I used to determine last logins for a course:
// fetch last logins
$lastLoginSql = "select mu.email, mula.timeaccess
from {user_lastaccess} mula
inner join {user} mu on mula.userid = mu.id
inner join {course} mc on mc.id = mula.courseid
where mc.id = :courseid";
$lastLoginSqlparams = array('courseid' => $course->id);
$lastLoginResults = $DB ->get_records_sql($lastLoginSql, $lastLoginSqlparams);