Course reports of active courses

I would like to know if and how i can create a report over all my courses, that show me when it was last accessed by learners and if there’s any activity in the course at all.
We are updating to a new version and we need to move all the most active courses.
Thanks :slight_smile:

Hi @paulo, for your use case, you could use the courseware_studentmodule table, grouping by course and getting the maximum modified_date (not sure about the field name) per course.

That will provide you with a rough estimate last time a user interacted with a course. If you have enabled tracking block completion, you can apply the same principle using the table completion_blockcompletion.

A query like this should show you the unique users (how many are accessing?) and total activities (roughly how much total activity is happening?) for anything after Jan 1, 2023. Just adjust the dates to your liking:

SELECT course_id, 
       COUNT(DISTINCT student_id) AS unique_users, 
       COUNT(*) AS total_activities
FROM courseware_studentmodule 
WHERE modified > '2023-01-01' 
GROUP BY course_id;

(Courtesy ChatGPT!)