Notifications module

Recently I made a few changes to the Scheduler module. These changes were really part 1 of a two-part change requested by my client.

The second part of the project involved the sending of notifications to users. Once a schedule and slots had been created, the users needed to be notified that they could book themselves into one of the available slots.

So, basically the Notifications module allows you to do the following:

  • Create a notification template (message to send)
  • Send an instant notification
  • Send a notification on a specific date

Using the Notifications module is fairly simple. You start by clicking the ‘Create Template’ button to create a notifications template. This is the message that you would like to send the users. You can create and store as many of these templates as you need.


Once the template page has loaded, you need to select a course. With the course selected, all the related information for that course is displayed, including details about any upcoming events.

The provided editor field below the course information allows you to copy/paste information into it. You can also use tags like {$user-firstname} in the notification. These will be substituted with the users first name when the notification is sent. The editor is a normal Atto editor, so adding in images and style the content is also possible.


Once the template has been created, you then have two options regarding how you would like to send a notification.

The first and easiest being the Instant Notification. This allows you to select a course, filter the users by groups in the course, or using the search function. Once you have the users, allocate a template to use, and send the notifications out.

You can, in one course, send different notifications to different users at the same time.


The second method works like the Instant Notification, except that you can set a date when the notification should be sent. This adds the notifications to a table in the database. When the cron task runs, it checks the table for pending notifications and send them. Notifications are only sent once, regardless of the number of times the cron task runs.




Leave a Reply

Your email address will not be published. Required fields are marked *