Description
This module enables users to get their CiviCRM assigned activities into their Google Calendar or similar calendaring applications, by providing a feed of each user's assigned activities in iCalendar format, ready to be subscribed to from with Google Calendar, Outlook, etc.
Blog post announcing the module to CiviCRM community (note positive response in comments): http://civicrm.org/blogs/allenshaw/publishing-activities-icalendar-feed
Demo video here: http://nswebsolutions.com/ideas/new-module-drupal-civicrm-activities-ica...
Key features
- Activities are represented as VEVENT objects, matching applicable properties (DTSTART, DTEND based on duration, etc.) where possible and appending names of any other asignees to the DESCRIPTION property.
- Feed includes activities of any type, including client-defined activity types.
- Feed includes activities with a status of "Scheduled" or any client-defined activity status.
- To conserve server resources, feeds are cached at a site-wide configurable interval (default 30 minutes).
- A user's Activities feed shows all activities having that user assigned, even if other users are also assigned.
- The user can easily determine the correct URL for the Activities feed by viewing the URL in CiviCRM.
- URL includes a persistent random hash to limit other parties' attempts at guessing the URL and viewing the user's feed; this can be re-generated by the user in case, for example, the URL becomes known to the wrong people.
Drupal version
Code is being built for a client's system in Drupal 6, and once accepted by the client will be ported to Drupal 7.
Project page
http://drupal.org/sandbox/TwoMice/1274276
Git repo
git clone --branch 6.x-0.1-dev http://git.drupal.org/sandbox/TwoMice/1274276.git civicrm_activity_ical
Comments
Comment #1
TwoMice commentedNote: You'll find Coder turns up one warning about curly braces on table names in SQL. This is something of a false positive, since the query is sent to CiviCRM's DAO framework (which doesn't use the curly braces) and not to Drupal's database API.
Comment #2
TwoMice commentedElevating priority after two weeks of waiting, per project submission guidelines. (And understanding that project review backlog is huge.)
Comment #3
klausiComment #4
TwoMice commentedThanks for the review! I've fixed all the mentioned items and/or explained where appropriate below:
Fixed. Correct branch now available here:
git clone --branch 6.x-0.1 http://git.drupal.org/sandbox/TwoMice/1274276.git civicrm_activity_ical
Fixed. Now using
require_once drupal_get_path('module', 'civicrm_activity_ical') .'/functions.php';and using similar code wherever a file is included (except CiviCRM files; see next point).
These are files from the CiviCRM module, which this module requires. CiviCRM provides its files for inclusion by dynamically adjusting the PHP include path. Because of this it's incorrect to include a CiviCRM file using the full file path.
You raise a good point, though. Most Drupal developers looking at the module code won't assume this unique behavior. To lessen potential confusion, I've added comments to every line that includes a CiviCRM file in this way.
For reference, this CiviCRM manual page explains a little about how this include-path manipulation works:
http://wiki.civicrm.org/confluence/display/CRMDOC40/Directories
Sorry, my mistake. This is actually not a third-party file. I wrote this file based on a similar file within CiviCRM and mistakenly included the CiviCRM copyright header at the top of this file. I've removed that now.
Fixed. The doc block now contains a short description of the purpose of the class.
Comment #5
klausiOtherwise I think this is nearly ready.
Comment #6
TwoMice commentedHi,
Thanks again for the review. I've fixed the items you mentioned:
Sorry, my mistake. Thanks for pointing that out. Correct branch now available here:
git clone --branch 6.x-0.x http://git.drupal.org/sandbox/TwoMice/1274276.git civicrm_activity_ical
Okay, this is done.
Ah, good point. Fixed in all schema descriptions.
Fixed.
No, that's a mistake. Fixed.
Fixed, and made other similar improvements to function comment blocks as well.
Thanks again for taking the time to review this.
Comment #7
TwoMice commentedComment #8
klausiBut these are just minor nitpicks, I think this is RTBC. Now while we are waiting for the access grants to create full projects would you be so kind to do a review of the other applications pending? Just pick one from this list: http://drupal.org/project/issues/projectapplications?status=8
Comment #9
gregglesThanks for your contribution, TwoMice! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in minde: Commit messages - providing history and credit and Release naming conventions.
Comment #10
TwoMice commentedThanks for the approval!