General developer forum

Calender update triggers

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Sudheera Palihakkara
Re: Calender update triggers

Hi, Thanks for the reply. But sorry I did not understand this sentence.

" But you may want to hook into the event that results in the calendar being updated, for example the create/update of a course or the enrollment there in. "

Thank you for your time smile

Average of ratings: -
Anne Krijger
Re: Calender update triggers

Hi Sudheera,

You could ask yourself what calender items you are interested in.
And then see if those items have a trigger you can use.

For example; if you were interested in the time someone was enrolled in a course, you could use the enrollment trigger.

Hope this makes it a bit clearer.



Average of ratings: Useful (1)
Picture of Sudheera Palihakkara
Re: Calender update triggers


I'm interested in a scenario like, "I'm a student enrolled in a course and then when the teacher add event to the calender I want to write a code to do something." I have identified the event_hook() and can do something in the code when a event added. but it's only happening to the event adding user, I want to do that to all enrolled users. how can I achieve that.? thank you smile smile

Average of ratings: -
Re: Calender update triggers
Group Core developers

There isn't an event trigger for calendar event added, which is really what you are looking for. The second piece of whom to send information to would be part of the event processes.

The first step then would be to define the event sender in calendar using the events api ( This would be a modification of the core calendar.

The next step would be creating a plugin that handles the event. This would be the part in your description code that does something.

Average of ratings: -