CS 549, Spring 2008
Assignment #5
(total = 20 pts., due on May 5, Monday)
You must work individually on this assignment.
Part I: Checking out Required Software (0 pts.)
-
If your Unix prompt does not indicate the host name and the full path
of your working directory, add the following statement to your
~/.bashrc:
export PS1="\h \w \!% "
Then issue Unix command source ~/.bashrc or
open a new terminal.
-
Update the files previously checked out from the CVS repository
by issuing the following commands:
cd ~/public_html/ms_apps/fishing_v2
cvs up -d
cd ~/public_html/drupal-6.2/sites/all/modules/custom
cvs up -d
Note that the files under drupal-6.2/sites/all/modules/custom
were originally checked out from drupal_6.x_custom_modules.
Part II (20 pts.)
Modify Drupal module node_example to make it work
with one table for the fishing_v2 database.
-
Create table statements for the
fishing_v2database
can be found in file create_fishing_tables.sql
in ~/public_html/ms_apps/fishing_v2/sql_queries/.
-
Please work on the table assigned to you:
-
Chalainanont, Nirut -- table
angler.
-
Hussain, Zaid -- table
water_body
-
Muppidi, Ganga -- table
d_fish_species
-
Pham, Tuan -- table
fishing_spot
-
SevananArjunan, Ramkumar -- table
catch_record
-
Thangavelu, Madan -- table
fishing_season
-
The primary key should match the primary key
nid
of table node.
You do not need to consider attributes
modified_date, modified_by,
and row_owner_id.
-
Use the table name as the module name.
The major functions to be modified are as follows:
-
hook_form()
-
hook_validate()
-
hook_insert(), hook_update(),
hook_delete(), and hook_load()
-
hook_nodeapi()
-
hook_theme()
-
An example of handling the date type can be found in
announcement.install and announcement.module
in module custon/annoluncement.