1

I need to be notified when a course activity (Assignment, Chat & Quiz) is added to a course.
I need to send a message to all enrolled users.

How can I add a hook on those events in moodle 2.9?

Thanks

Ariyan
  • 14,760
  • 31
  • 112
  • 175
  • It's not normal to change a course much after people have enrolled and started doing it. I think it will mess with your completions data. – Pete Feb 07 '16 at 20:44

1 Answers1

1

Yes there is a \core\event\course_module_created event.

Use the example from this I answered recently, replacing course_completed with course_module_created:

Email using cron and including attachment to email from moodle

Community
  • 1
  • 1
Russell England
  • 9,436
  • 1
  • 27
  • 41