To do list

Jay Matwichuk - July 14, 2009 - 02:39

Concept

This module creates a new content-type for a to do list. This can be used for anything that needs to be done, from getting milk at the store, to reminding yourself to updating a profile, to telling your users to vote on a poll by a certain date. With this list, the creator of the node can either assign the item to themselves, another user (or users), or both. Items can be given an optional deadline and priority, and items nearing their deadline or with a priority level of 'immediate' are shown a block. Each user also gets a page with a list of all the items that have been assigned to them, and another page with all the items they have assigned to others.

Directions

  1. After installing the module, go to admin/user/permissions and set permissions for your users. There are three permission levels at this time.
    • Create to do list: This is pretty self-explanatory.
    • To do list assignment: users in a role with this permission will be able to have to do list items assigned to them. If no roles are given this permission, the option to assign to do list items to other users will not be enabled when creating a new to do list item.
    • Administer to do list: As of RC1, there is only one setting that can be set by users with administer permissions. They are able to set the date format. Dates on the to do list, such as the start date and the deadline, do not contain times, only dates, so none of the Drupal date formats (small, medium and large) were appropriate for formatting, as they all contain times. Administrators can set a date format appropriate to their location at admin/settings/to_do.
  2. Go to admin/settings/to_do and set an appropriate date format for your site. The default date format is YYYY/MM/DD, as that is the format where I live. The USA uses DD/MM/YYYY and the UK uses MM/DD/YYYY. You will want to set the appropriate format for your location, using php date() formats. Two example formats are:
    • n/j/Y (UK)
    • j/n/Y (US)
  3. If you wish to enable a side block showing items that are coming close to their deadline, and/or marked with 'immediate' priority, go to admin/build/block and place the block named 'To do list' in the region of your choice.
  4. You can configure the number of items to be displayed in your own personal sidebar in your account edit page. Go to my account->edit, and set the number of items to display in sidebar, in the section titled 'to do list'.

Pages/Items this module creates

  • 'To do list' block, that can be enabled at admin/build/block.
  • Admin page at admin/settings/to_do.
  • An entry into each user's my account -> edit page that allows them to configure the number of items they would like to show in their block.
  • A listing of all items assigned to the user at to_do (same page).
  • A listing of all items a user has created at to_do/created.

Javascript

The block in the sidebar is javascript/ajax powered. For users with javascript turned off, they will only see urgent items (items either nearing their deadline, or marked with 'immediate' status). For users who have javascript enabled, they will be able to choose between 'urgent', and 'all', and will get pagination that will allow them to see all items. In a future release, I intend to make this work without javascript enabled, but that will probably be version 6.x-2.0, further down the line after this version is stable.

Bug in AHAH Helper module

There is a bug in the ahah helper module that causes an http 500 error to appear when using this module. To fix this bug, you need to apply the patch that is attached to the initial post in this thread. This bug exists as of AHAH Helper 2.0 (current version as of July 16/2009). I will update this note as future versions of the ahah helper module are released.

If you don't know how to apply patches, you can do this:

  1. Open up ahah_helper.module
  2. find this line:
    • require_once($form_state['storage']['#ahah_helper']['#file']);
  3. Replace that line with this one:
    • require_once($form_state['storage']['#ahah_helper']['file']);
  4. Save the file, upload it to your server, and you should be good to go.

Note

I have marked this as a release candidate, as I believe it is mostly working, and just needs to have the bugs I have missed ironed out. There are always one or two! I will make a full release version after a month or two.

Releases

Official releasesDateSizeLinksStatus
6.x-1.1-rc42009-Jul-3117.49 KBRecommended for 6.xThis is currently the recommended release for 6.x.


 
 

Drupal is a registered trademark of Dries Buytaert.