-
Notifications
You must be signed in to change notification settings - Fork 23
Scripts feedback mail sender
Torrib edited this page Oct 15, 2013
·
9 revisions
The sript feedback_mail_sender should be run once a day.
It loops trough active feedback relations and generates mails to be sent based on the following information:
- The first mail is sent the day after the event, if the content object has a start_date, or the day after the feedback relation is created.
- Notifications are sent the two days before the feedback deadline is passed.
- One final notification is sent the day of the feedback deadline.
- After the feedback deadline has passed the remaining users are given a mark and a notification is sent.
The respoinsible(see feedback_mail) gets a notification when the the first and the final mail is sent.
To send mail notifications the object connected to the feedback relation should use the following methods:
- feedback_users
- Returns a list of the users thats suposed to answer the feedback schema
- feedback_title
- Returns a string representing what the feedback is about
- feedback_mail
- The mailadress to the ones responsible for the feedback.
- feedback_date
- Returns the start date of the "event" if this field is missing, the first notification will be sent the day after the feedback is made