General developer forum

Sending SMS when an important event occurs

I'm new to Moodle. I have a project to create a plugin for Moodle to send SMS to students who subscribe for this service,

1. when a new resource is added to a course

2. At the commencement of a quiz

3. Number of hours defined by the student before an assignment deadline

4. When a new post is posted in a subscribed forum

As I understand I have to develop a block type plugin. And I read about cron method and I think it will be useful. But first what I had in mind was event handling. That is, defining events and developing event handlers so when an event occurs it's event handler will be executed and SMS will be sent. Still haven't found out whether this is possible or suitable though.

I installed Moodle and now figuring out what are the tables I will need.

Any idea on where to begin ? I have to complete this very soon and any help would be highly appreciated.

for example, when considering adding a new resource, 1. I should go through the code of resource module and find out where in that code "adding a resource to the database" happens and write code to create an eventdata object and trigger the event(call events_trigger() function)

2. Then write the event handler function

3. Then I have to insert my handler in events.php inside the db folder of resource module. If events.php doesnt already exist I have to create it

I too have a same kind of project and there what I have to do is send an fb notification to the user according to the same criteria that Manuri has stated. Would I be able to use the same API s mentioned above?