What updates the timemodified field in the mdl_course table?

What updates the timemodified field in the mdl_course table?

by Lea Cohen -
Number of replies: 3

I want to use this report in our Configurable Reports in order to find least active or probably empty courses, but I'm trying to understand what indication the course->timemodified field gives me.

I tested a course and saw that the course->timemodified does not change when

  • A teacher adds a new activity to the course
  • A student submits a quiz
  • A students preforms some activity in the course (such as writes a forum post)
  • A user logs into the course
So I'm wondering, when does the  course->timemodified field change?
(I read this discussion, but it too only adds that enrolling a student does not change the course->timemodified )


Average of ratings: -
In reply to Lea Cohen

Re: What updates the timemodified field in the mdl_course table?

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Off the top of my head (and without checking), clicking 'Edit settings', then saving the course settings form updates the timemodified value in the course table.

I could see an argument that creating/editing an activity within the course should also update the time modified, but I think it would be quite a stretch to include student interactions with the course activities as updating the timemodified.

Average of ratings: Useful (1)
In reply to Lea Cohen

Re: What updates the timemodified field in the mdl_course table?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It has been my experience, that most everything in Moodle has it's own timemodified for it's "settings." In this case, course->timemodified, refers to the time the "course settings" were last modified. Creating/editing an assignment modifies it's database entry for timemodified. Same with other activities, resources, etc. that I have worked with or checked.
Average of ratings: Useful (1)
In reply to Lea Cohen

Re: What updates the timemodified field in the mdl_course table?

by Lea Cohen -
Thank you both, @Davo Smith and @AL Rachels !