Hi Lana, and welcome.
As a "side project" I have been working on this issue of "Student Activity" over the last year or so. Somewhat coincidentally, I have hit it much harder over the last two days. I have been working on an
SQL query that can produce what you find if in the "Complete Report" for a student, with more detail, and eventually "graphics." I am real close to having the
SQL complete. So, let me ask you some questions:
1) How do you define current classes, given your Moodle?
2) How do you define "outstanding assessments?" I assume, also, that you mean Moodle quizzes. Or do you include other Moodle
activities?
3) Okay. I understand this one.
4) This might be similar to #2. I think that you mean either a score of 0, or a no-activity, meaning never touched.
As you explore your questions, you should realize (you probably do) that Moodle is a relational
database and that you can write whatever SQL you wish to write. Consider browsing
List of SQL Contributed reports for examples. Many can be modified to suit your needs.
I should mention that a lot of this is generic, but then a lot depends upon how your school is using Moodle. For example, in my Moodle, I use a course shortname like so: MSCI2800-Su20-M-OL. You might notice the "Su20" in it. By doing so, I can then create a query to access this semester's students, like show down below. But this query would only work for you if your school had the same course shortname convention. But you see, if you know what you want from your Moodle, you can help yourself along by setting things up to support your needs. Incidentally, I don't set course start dates or end dates, which someone might want to you for this purpose. But maybe I should? I just have not. Also, in my Moodle, I don't have studentIDs, so I use this field in my own way. A "99999" means that this person in my course is not a regular student. You will see me exclude this 99999 from the query shown below. Again, this is an example of how I use Moodle that might not match others.
I can share with you one of my MoodleMoot presentations on a topic that might help, as reference.
Here's the query:
# Students enrolled in this semester courses
SELECT c.shortname,
c.idnumber AS Course_number,
u.firstname,
u.lastname
FROM prefix_course AS c
JOIN prefix_enrol AS en ON en.courseid = c.id
JOIN prefix_user_enrolments AS ue ON ue.enrolid = en.id
JOIN prefix_user u ON u.id = ue.userid
JOIN prefix_role_assignments AS asg ON u.id = asg.userid
JOIN prefix_context AS con ON asg.contextid = con.id
WHERE ue.status = 0
AND asg.roleid = 5
AND en.courseid = con.instanceid
AND u.idnumber <> 99999
AND substring_index(substring_index(shortname, "-", 2),"-",-1) =
(SELECT substring_index(substring_index(shortname, "-", 2),"-",-1)
FROM prefix_course
WHERE idnumber IN
(SELECT max(idnumber)
FROM prefix_course))
ORDER BY c.idnumber DESC, u.lastname asc, u.firstname asc