General developer forum

Block events

 
Raymond
Block events
 

Hi all,

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.

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Block events
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Hopefully https://docs.moodle.org/dev/Event_2 will help explain.

 
Average of ratings: -