OverviewThis (perl) CGI script provides rudimentary support for managing an activity for which people register their interest in participating in the scheduled event. Using it, you can add ("Join") or remove ("Resign") yourself from the activity interest list, view the votes for any given date, enter your vote, and add an event date. The top of the page includes a form where you can select an existing date from a drop-down list, enter it directly in a text box, or select an existing date using a popup calendar widget. For date manipulation, the script uses a standard perl library (date.pl), which accepts dates in the following formats:
I typically just use the calendar widget or enter dates in the MM/DD/YYYY format. To view an existing event date, select the desired date from the date selection box (which contains pre-existing dates for the previous, current, and next month), select a date using the calendar widget, or enter a date in the text box and press the "View" button. The "Admin" button displays an administrative page various configuration data and functions, described in a separate section, below. To enter your vote for the selected date, select your name from the member selection box and press the "Vote" button. From the vote screen, check the appropriate radio button and press "Vote". There's also a short comment field if your vote needs more explanation (e.g. "maybe" votes generally warrant an explanation) or you simply want to provide an editorial comment. After you press "Vote", your vote will be recorded and the updated "View" page will be displayed. If you exit the form without pressing "Vote", your vote will not be recorded. There is also a sequence number assigned to each vote so that we can tell the order in which votes were recorded. At the bottom of the vote table, there are totals for the various vote types and a comment indicating whether the event has been confirmed or canceled (i.e. quorum wasn't met, reservations couldn't be obtained, a date was entered in error, etc.). If membership for the activity is "open", new participants can "Join" the group using the form at the bottom of the screen -- just enter a name and email address in the appropriate text fields. The script doesn't perform any validation or editing of the data, and the specified name is used in constructing URLs, so please limit names to alphanumeric characters and spaces (i.e. the only character substitution the script performs when constructing an URL is to replace spaces). If necessary, you can effectively correct any mistakes by using "Resign" or "Join". To remove yourself from the list, select your name from the name selection box at the top of the screen and press "Resign". If you are already a member and wish to change your email, you can do so by entering your name (exactly as it exists) and new email address and pressing "Join" to replace your existing data. If membership is closed, the name/email form will not be displayed. Existing members can still resign; other changes should be directed to the activity agent. The remaining action is "Email". I intentionally do not display email addresses on the screen. Instead, the script uses a "Location: mailto:" command to invoke your email client with the appropriate email addresses filled in. You can send email to selected members, all members, or members based on their vote for a particular event date using the multiple selection box near the bottom of the screen. One last thing: the script uses a very simple "lock" file mechanism to prevent concurrent updates to the data, so there is a chance that you will encounter a problem if the lock cannot be obtained. I've tried to minimize the critical sections of the script in order to minimize the exposure, but it does exist. If the lock cannot be obtained within about 35 seconds, the script will remove the lock (on the assumption that the request that created it has failed) and display an error message asking that you retry your request. |
AdministrationTo create a new event date, select "New" in the date selection box and use the calendar widget to select a date, or enter the desired date in the text field to the right of the date selection box, and press the "View" or "Admin" button. To produce a rudimentary report of all event dates, press the "Report" button. If a member is selected, only that member's votes will be displayed for each event date; otherwise, all votes are displayed. NOTE: The configuration data provided on the "Admin" page is intended for use by the event administrator(s). The default configuration, used when a new event date is created, can be viewed by selecting "New" in the date selection box and then pressing the "Admin" button. The configuration for a specific event date can be viewed by specifying the desired date before pressing the "Admin" button. The configuration page shows two tables: one for global configuration options, and one for date-specific configuration options. As noted above, if no date was selected, the date-specific values will be used to modify the default configuration applied to all newly-created subsequent dates. The global configuration consists of the following values:
The date-specific configuration consists of the following values:
Once any desired changes have been entered, the "Save" button may be pressed to save the changes. If a date was created in error, or simply needs to be deleted to free up disk space, press the "Delete" button (NOTE: this action is irreversible, and all configuration data and votes for that date are deleted). There is no "Cancel" button because, like all other forms, simply leaving the page without pressing "Save" or "Delete" will leave the values unchanged. |
|
If you have any questions, comments, or suggestions, please feel free to send them to me. Thanks -- Tim | |