Hello Friends,
I'm trying to write a query to find students who have been suspended from their courses within the last hour.
I'm using something similar to
SELECT ue.userid
FROM prefix_user_enrolments ue
WHERE ue.status="1"
AND UNIX_TIMESTAMP() - ue.timemodified < 3600
To test it, I enter a course, go to Course Administration->Users->Enrolled Users and change a student's enrollment status from Active to Suspended in the "Enrollment Methods" column. Then I immediately run the report. I expect the suspended student to be returned by the query, however no records are returned.
Puzzled, I looked at the user_enrolments table and discovered that the "timemodified" field was not updated although I would have expected it to update to the time at which I suspended the student.
Shouldn't the field update? Or do I misunderstand the purpose of the "timemodified" field? If I misunderstand it, how should I modify query to get the records I want?
About Me:
I'm new in this forum, I am a consultant and have worked with multiple firms
You can check http://blog.advids.co/20-video-examples-from-it-security-management-software-solutions/ one of my work.