Package: collective.contentrules.mustread
Content rule to define which content items need to be read by which users (local roles) before a certain deadline.A notification email is sent to all users when the read confirmation is requested.An optional reminder email is sent to all users that did not confirm their read-requests 2 days (configurable) before the deadline.When read-requests for content items have expired, a notification email is sent to a configurable emailaddress that lists all unread documents and which users did not confirm the item as read in time.Site-Administrators can view read-statistics (per content-item and site-wide) as well as download a CSV list of all read-requests.The content rule allows to configurethe number of days the users have time to read the content (deadline = today + nr-of-days),the number of days the reminder is sent out before the deadline,and the subject/text of the notification and reminder emails.This addon depends oncollective.mustread.To enable must-read actions on non-folderish ATContentTypes include archetypes.zcml (seeInstallation).Setup contentruleAdd a new content rule.Typically you’ll useRead confirmation requestedas the triggering event.This is fired when a user calls the @@request-read-confirmation view on a content object
which is linked in theactionsdropdown of content items if the user has theRequest read confirmationpermission.You can also use other event triggers such asObject added to this containerorWorkflow state changedif this makes sense for your use-case.As action chooseRequest read confirmationand configure it:Email sourceThe email address notifications and reminders get send from (From:header)RoleCurrently the users who get notified of the read request are defined by a global, acquired or local role you can chose (similiar tocollective.contentrules.mailtoroleWe also support roles granted to groups and also support looking up users in nested groupsMaybe we’ll add support to alternatively choose groups and users directly in the future.Acquired RolesAlso notify users which acquiredRolefrom a parent objectGlobal RolesAlso notify users which have been grantedRolein the user or group control panel.Notification SubjectSubject of notification emailNotification MessageText for the notification email. You can use all the replacement variables of plone.stringinterp and in addition
theContent action specific variables)Reminder SubjectSubject of reminder emailReminder MessageText for the reminder mail.If empty, no reminder is sentDeadline DelayNumber of days a read request must be confirmed within.
Will be used to compute the deadline of requests.Reminder DelayDefines how many days before the deadline a reminder email will be sent.Content action specific variablesThis package defines some additionalplone.stringinterpvariables:mustread_urlURL of the item that marks the object as read (/@@mustread-hit)(available in other actions as well).mustread_fullnameFull Name of the person the read request is assigned to(only available inRequest read confirmationaction).mustread_deadlineLocalized deadline of the read request(only available inRequest read confirmationaction).UsageAftersetting up the content ruleyou simply call the@@request-read-confirmationview on a content object.This should be available in theactionsdropdown of content items for users having theRequest read confirmationpermission.For the users matching the role-filter defined in the action, a mustread database entry gets created and a notification email is sent out.You’ll see a satusmessage indicating which usernames got notified.If you want your users to get notified again some days before the deadline, you’ll want toSetup a reminder.You can alsoSetup an expiration notification(an email report of missed read requests - which documents have missed requests and which users did not read the document).There is a csv export (@@read-statistic-csv) that lists all mustread records (useful as audit-log or doing advanced spreadsheet-magic).Setup a reminderThe view@@send-read-reminderssearches for (child-)objects with open read requests and notifies
users if today’s date equalsdeadline of the reminder - notification-delay(which is specified in the action of the contentrule)You can use a clockserver (similar tohttps://github.com/collective/collective.timedevents) or a cronjob (z3c.recipe.usercrontab) for this.This is an example for a cronjob that sends out reminder emails at 7am:0  7  *   *   *     wget --quiet -O- --user=admin --password=admin --auth-no-challenge http://127.0.0.1:8080/Plone/@@send-read-reminders > /dev/nullAttention!make sure to call this view only once a day since the system does not keep records for sent notifications
and users would get multiple reminder emails.Setup an expiration notificationThe view@@send-expired-notificationlists all documents having open read requests and notifies the portal’s admin address.You can configure the recipients in the registry recordcollective.contentrules.mustread.interfaces.IMustReadSettings.expired_recipientMake sure to call it only once a day - similar toSetup a reminderTodosReport View for objects - shows mustread records for an object or context including child-objects.A heading for each object, links to mustread report for this objectTable listing with sortable columns:username, deadline, read-at, status (read, read too late, not read)Add cleanup options to report viewRemove a single mustread entryRemove all mustread entriesReport view for users (link usernames in report for object)Table listing all objects the user has read, not read, read too late.limitation of types that offer must-read actions is done by marker interface
(see archetypes.zcml) - there might be nicer waysimplement dexterity behaviour for ICanBeMarkedAsMustReadIdea: separate content-action for notifications so we can define multiple notifications with different delays and textsIdea: allow to call @@send-read-reminders w/o authentication using a secret
(similar to munin.zope)TranslationsThis product has been translated intoEnglishGermanInstallationInstall collective.contentrules.mustread by adding it to your buildout:[buildout]

...

eggs =
    collective.contentrules.mustread

zcml =
    collective.contentrules.mustread-archetypesAttention!when using atcontenttypes, also include archetypes.zcml or apply marker interface to your typesand then runningbin/buildoutInstall it via the addon configuration panel (Plone/prefs_install_products_form)And make sure to configure the Database forcollective.mustreadContributeIssue Tracker:https://github.com/collective/collective.contentrules.mustread/issuesSource Code:https://github.com/collective/collective.contentrules.mustreadSupportIf you are having issues, please let us knowvia the issue trackerLicenseThe project is licensed under the GPLv2.ContributorsHarald Friessnegger,harald@webmeisterei.comChangelog1.0a2 (2017-04-26)Do not send expiration email if there are no users with deadlines
that expired before our search-date [fRiSi]1.0a1 (2017-04-26)Initial release.
[frisi]