Here's an interesting little oddity. In Drupal 6, the options for "Poll duration" were: 1/2/4 days; 1/2/4/8/16 weeks; 1 year.

In Drupal 7, the options make less sense IMHO, as: 1/2/4 days; 1/2/4 weeks; 1 month and 3 weeks (!); 3 months and 3 weeks (?!?); and 1 year.

I'd like to change Drupal 7's options to the following: 1/2/3/4/5/6 days; 1/2/3/4 weeks; 1/2/3/6/9 months; 1 year.

I'm assuming that this is a trivially easy fix to make, code-wise, which is perfect for me: I'm actually not a coder, and would like this experience to learn how to contribute code to Drupal.

(Of course I could be wrong about how easy this fix is: For example, I can't find the text string "week" in the poll module at all! Odd.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tgeller’s picture

Status: Active » Needs review
FileSize
688 bytes

...and here's my first patch! Be gentle with me.

Naw, I'm just kidding. Tear it apart. ;) Seriously, I'd like to know whether I did this right, or (if not) what could be done better.

Status: Needs review » Needs work

The last submitted patch failed testing.

tgeller’s picture

Status: Needs work » Needs review
FileSize
675 bytes

Second try... I messed up on file names (I think).

Status: Needs review » Needs work

The last submitted patch failed testing.

tgeller’s picture

O.K., I give up... can anyone help me figure out what I'm doing wrong?

tgeller’s picture

Status: Needs work » Needs review
FileSize
701 bytes

Figured it out, thanks to help from John Morahan in http://drupal.org/node/519216 . Anyhoo, here we go again....

Status: Needs review » Needs work

The last submitted patch failed testing.

tgeller’s picture

Status: Needs work » Needs review
FileSize
701 bytes

O.K., I don't know why that failed -- maybe because the test happened about 45 days after the patch was rolled? But anyway, here we go again with a newly rolled patch...

lambic’s picture

Status: Needs review » Reviewed & tested by the community

patch works

sun’s picture

FileSize
1.06 KB

We can write this a little bit cleaner and provide some clues about the values we assign. :)

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.