I want to make a plugin where I can find the user(student) on the activity/resource page, and when he left the activity/resource page then I want to know he is not on the activity page.
I have tried to make a local plugin using moodle events core\event\course_module_viewed but I don't know need to make a local plugin or mod plugin, my plugin is not working.
And any event for the left page of activity/resources? Or how can I find that user has left page of activity/resource?
Please help me.