I have a custom block, which is displayed sitewide. This block enables specific individuals (e.g., those with role of managers) to get into a course and archive activity results in each module. Basically, at the click of a button, the manager can send, for instance, Turnitin Marks, to an external CRM system.
What I would want is to trigger events everytime a manager does this. I've looked at some of the code, especially in /mod/quiz/classes/events and /mod/quiz/db/events.php, but it seems this is more for activity modules than it is for blocks.
Can you please provide, maybe some sample code, showing how I can trigger events properly using the block component.