Data Aggregation Project

About the Project:
This is a set of scripts that can be used to have students
(or anyone else) input data on the web and then download
the whole dataset via your favorite spreadsheet program.
We use it to aggregate student data in our intro labs 
which has about 700 students.  This allows us to have
students wrestle with large datasets that they helped
acquire.  It also gives us greater (statistical) power
to detect subtle effects (though most of our noise is
the result of students not following protocols).  You can
see the slides from a presentation I gave about these scripts
at:
  http://bcrc.bio.umass.edu/presentations/asdp/

What's Here

This directory contains the scripts necessary to set up
and run your very own data aggregation project.  

Getting Started

Eventually this section should tell you how to get started.
For now, let me say that you should untar the distribution
into the webtree and create a database in the msql database
system that the webserver can read and write to.  Update
gen.inc.sample with the generic information so that as you
create data aggregation systems, the generic information
will be correct.  You may also need to edit mkdb and backup
to correct paths to your executables (tar and friends).

In the root directory of the data aggregation system, run
mkdb and provide, as an argument, the name of the data
aggregation system you want to build (say, "./mkdb example".)
This should create a directory and copy all of the files from
template and put them in here.  Go into the directory and
"cp gen.inc.sample gen.inc".  Then edit gen.inc to create
a form to gather the data you want.

There used to be a way you could backup the data in a form
where it could be easily put back into the database.  That
doesn't work right now.  But as it turns out, I've never needed
it anyway, so maybe it doesn't really matter.  We should probably
rebuild the table initialization stuff so we can add previous
records that way.

gen.inc

This include file contains generalized functions and all of the
settings necessary to set up each data gathering project.  This
file is theoretically commented enough for someone to edit
it sensibly.

Eventually the plan is to replace gen.inc with an XML based
configuration file and a mechanism to allow editing via a
web-browser.  It would be a lot safer than hacking around
with PHP code directly.  Still, the existing system maximizes
my efficiency.  

index.phtml

This is a place where you can put directions for datagathering.
there is also a space in stepone.phtml where you can put
'last minute' information about datagathering -- warnings
about units are good here.

download.phtml

This scripts sucks the data out of the database and spits
it out through the web with extension and delimiter specified.  
If your mime-types are specified correctly at both ends, the
browser will fire up excel, or whatever you want, and
student's can start analysing data.  

footer.inc

This file contains a generalized footer that gets stuck on
the end of each page with links to various other pages.

review.phtml

This file allows someone to browse the data in the database
and sort it by any column.  Eventually, I hope to build
a search feature that will allow one to display a subset of
the data.

In the instructor directory are a set of files for the
instructor to use to manage the project:

index.phtml

This looks the same as the 'review.phtml' in the main
directory, but each cid is a hyperlink to the exclude.phtml
script.

exclude.phtml

This script gets called by index.phtml and will add the
letter "x" in front of the cid for one record in the database.
records so marked are not displayed to the students and
will not be downloaded by download.phtml.

