Forum OpenACS Development: Reminder Notifications

Collapse
Posted by Ryan Gallimore on
I saw a few abandoned posts for reminder notifications for Calendar. Is anyone working on this? Does anyone have any suggestions?

I implemented it in Calendar myself using a simple "remind me x days before" dropdown and a scheduled proc to send out the reminder mail.

Any further ideas?

Collapse
2: Re: Reminder Notifications (response to 1)
Posted by Dave Bauer on
Ryan,

I am looking to using the notification_date field in notifications table to schedule a notification for a certain time.

I am looking into this because News allows you to publish an item in the future and there isn't a simple way to trigger the notifications after publishing.

A similar feature would work for reminders.

Collapse
3: Re: Reminder Notifications (response to 2)
Posted by Ryan Gallimore on
This sounds good if one only wanted a reminder notification, but what if I want to be notified the instant the item was created, and then a reminder one day before?

Can I create two notification requests for the same item?

Collapse
4: Re: Reminder Notifications (response to 1)
Posted by Dave Bauer on
Ryan,

Good point.

You situation is one where you want a notification _request_ to ask for notification later. This is different than scheduling all notificaitons for a certain item to go out at a certain time.

This is a major shortcoming in notifications, since you can only schedule intervals or notification. Back in OpenACS 3 you could get weekly notifications on a certain day, for example.

I definitely think the interval concept needs to be improved or removed for a scheduled date/time schedule.

As I am poking around in notifications, I'll see if there is a place to acommodate these various use cases.

Collapse
5: Re: Reminder Notifications (response to 1)
Posted by Dave Bauer on
Ryan,

Look at notification::new tcl proc https://openacs.org/api-doc/proc-view?proc=notification%3a%3anew
which has the concept of "dynamic"notifications. So you could create a notification on a calendar item, that is sent to just the person who requested the reminder.

Along with that, my experiement for scheduling notifications for a certain time and date was successul and I will be adding this to CVS later today. I can tag/release notificaitons for 5.2 for this after some more testing.

Collapse
6: Re: Reminder Notifications (response to 5)
Posted by Matthew Coupe on
Hey,

I have a request at the moment for an admin to be able to hit a 'set reminder' button when creating a calendar entry so that all members of the dotlrn community/class would get spammed with a reminder for that item. Would this also be possible with notifications?

Cheers,
Matthew

Collapse
7: Re: Reminder Notifications (response to 1)
Posted by Dave Bauer on
Yes it is. See the api-doc for notification::new. There is a -force flag which means "send a notification even if the recipient didn't ask for it"
Collapse
8: Re: Reminder Notifications (response to 1)
Posted by Alberto Pesquera Martín on
Hi,

We (UNED) have been implemented a system of calendar's reminder recently. The idea is, as you have explained it, to notify users (personal or groups) of calendar events x days before.

Our exposition was: 1) to use the notifications when the events are added/modified. 2) A schedule procedure daily that checks the notifications and sends the corresponding reminders.

The code is available at http://cervero.innova.uned.es/dotLRN/calendar-reminder.tar.bz2 . I hope it will be useful for you.

As we are a few with the same need, it would be interested to work together on a common reminder solution and contribute it to community.

Collapse
9: Re: Reminder Notifications (response to 1)
Posted by Dave Bauer on
You don't need any additional code to support reminder notifications. The changes can me made when you create the notificaiton objects.

I have made a change that allows you to pass in the notification date/time and then the notificaiton will go out at that time only. I had to make one change to a query to support this.

As soon as I finish testing this can go into OpenACS and I can release a new notiifcations version.

Collapse
Posted by Ryan Gallimore on
Dave - this sounds great. Will this change support both the standard delivery of the notification (e.g. instantly) in addition to the reminder x days before?

Or do you need to call the notification proc twice?

Collapse
Posted by Dave Bauer on
Ryan,

I hadn't thought about that. I believe the most straightforward thing to do is to call it every time you need ot schedule a notification.

IE: Scheduling a reminder is different than a "subscription" to an entire calendar. Instant notification means you want to be notified when an object is added. And that is done when the object is created.

A reminder is someting personal and is requested by the user on an individual calendar item.

Right now the api doesn't have the flexibility to pass in a list of users, and their choosen subscriptions. Eventually we should add additional intervals or notification types that support automatic scheduled notifications. That will require more work.