I've just released a new module for Drupal 7 called Checklist API, which I wrote specifically as an abstraction of the data storage and functional requirements of SEO Checklist and QA Checklist so they could define their checklists using a simple hook_menu()-like syntax and focus on the business question of what goes in their lists instead of how to make them work with Drupal. My architecture has some benefits:
- It doesn't require any database tables. Checklists are defined via hooks, and progress is stored in one Drupal variable per checklist, making changes to the list a simple matter of changing an array (instead of writing a database update).
- Because they're hook-based, checklist definitions are alter-able if someone wants to customize them from another module. As an example of the utility of this, you could have a QA Checklist bundle of modules with one core list and optional sub-modules that add sections to it for special branches of QA.
- There are built-in mechanisms for giving checklist items a default state based on some arbitrary condition (e.g. a given module is enabled) and for optionally showing a given link on an item only when it is checked or unchecked.
- Because progress is stored in variables, it's Features-exportable with Strongarm.
- I added a few little niceties, like a progress indicator that says "x of y (z%) complete" on the vertical tabs as you check items off.
Checklist API takes care of registering paths, creating and checking permissions, and storing progress; a module like QA Checklist could easily be completely re-created on top of it with three files and two hook implementations... and I would be happy to supply a patch doing just that, if it were welcome. The module includes an example implementation so you can try it out. Please give it a look and provide any feedback you have. With your approval, I'll take over the part of your module you never cared about so you can put your money and energy into innovating around your passion! :)
Comments
Comment #1
traviscarden commentedFixed as part of #1031710: Port QA Checklist to Drupal 7.