I have a query that shows the course creation date and the category they're in, but I can't see anything in mdl_logstore_standard_log, mdl_course or mdl_course_categories that I can use to create filter on when they were moved. When moving the course to another category, it creates this entry in the logstore_standard_log table:
The query I'm running is a simple one:
select cat.name, c.* from mdl_course c
join mdl_course_categories cat on cat.id = c.category
and cat.path = '/15/' or cat.path like '/15/%'
order by
cat.name asc,
c.fullname asc
I want this query only to show courses that were moved into this categoryid within the current month. I know I can filter the log table on the timemodified column on each log entry (i.e. and date_format(from_unixtime(c.timemodified), '%Y-%m') = date_format(now(), '%Y-%m')) to show the courses that have been edited within the current month, but this doesn't capture the courses moving between categories.
Does anyone have a solution for this they're willing to share? Much appreciated in advance!