CCK Field Definitions

First published module

This weekend I got my first CVS submission to Drupal accepted. It's the aforementioned CCK Field Definitions module, available here.

With this, I am officially an initiated drupaler, but first I had to get it actually committed to the repositories.

I'm not too well versed in CVS. I don't think anyone is. There was so much information on the Drupal website that it was actually dizzying. I read page after page in the CVS section of the Drupal handbook until I stumbled upon the CVS reference guide for module maintainers. This guide walked me through actually creating the CVS folder and committing my first version of the module. It's a step-by-step guide that solves all your problems for committing a module for the first time.

Notice I said for the first time.

I spent the better part of a day trying to figure out how to update a module to create a new release. Maybe I did it wrong. I started using Eclipse, thinking that, since Eclipse has such a good CVS integration, it will all work out of the box. Wrong. Good thing I read in some blog which I cannot remember that you cannot use Eclipse to create a new branch to commit an updated version of your module...or something like that. Which was a good thing, otherwise I would still be trying to do it with Eclipse.

I ended up committing a new version which was exactly like the previous one. With an official release and all. Crap. Good thing no one uses this module.

Two identical commits later I got it working: by using the command line. Still. If I were asked to do it again, I would punch a kitten.

Data dictionary for Drupal content types

This Drupal module displays your CCK content type fields along with their descriptions in a dictionary-like fashion. It also allows certain users to edit those descriptions.

What is the purpose, you say? Well, I created a website for medical data entry. The information gathered in the website is used for researching the outcomes of patients that suffer from very specific heart conditions. This type of research is very thorough, so the participant nurses are required to fill out forms for each patient undergoing a certain procedure. These forms are quite long, in the range of 300 fields, separated across multiple pages.

300 fields is a lot of fields for a single content type, but that's how we like it. I used a yet-unreleased module that takes any content type and splits it across as many pages as you want. More on that later.

I still haven't gotten to the purpose. So whenever the users want to study all the fields at a glance, without having to browse through the actual form, they need a nice dictionary layout of the fields. Initially, I copy/pasted all the definitions into a page and formatted it using <dt> and <dd> tags, but it turns out that these field descriptions are revised quarterly, or sometimes even monthly, due to changes in practices in the health care industry.

The hell I was allowing the coordinators to touch the CCK fields to change the descriptions, and I wasn't about to hack core to allow them either. Nor was I going to update the fields myself upon request, since my time is better spent doing work. So I sat down to write this module.

Edit: I submitted this project to drupal.org and it got approved. The link for the project is http://drupal.org/project/cck_field_defs

Syndicate content