Forum OpenACS Development: Reminder Notifications
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?
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.
Can I create two notification requests for the same item?
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.
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.
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?
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.
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.
Or do you need to call the notification proc twice?
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.