Supported by:

With special thanks to

for creating the original Coursework on Oracle Code

 

 

Coursework on PostgreSQL Opensource port.

Releases are here

 

Introduction.

Coursework on PostgreSQL is a port of the 2.1 version of the Coursework that was developed for Oracle. It uses and identical method of installation to that version, except for the database specific items.
The source code is currently distributed as a tarball which unpacks into the directory structure as below.

coursework/coursework_postgres
root source code directory containing Ant build file and script to build code
coursework/coursework_postgres_sql
database build scripts
courseworkimages.tar.gz
a tarball of all images used
coursework/coursework_postgres/build.xml
The Ant build definitition
coursework/coursework_postgres/conf
Configuration files
coursework/coursework_postgres/coursework.properties
Main Configuration file for Coursework webapp
coursework/coursework_postgres/devprodconf
Development configuration files
coursework/coursework_postgres/dtl
Templates
coursework/coursework_postgres/etc
WEB-INF files
coursework/coursework_postgres/lib
Supporting jarís
coursework/coursework_postgres/src
The source

Prerequisites.

  1. Read the installation note for Coursework on Oracle from Stanford.
  2. We currently run Coursework on Tomcat 4.0.4 and the latest 4.1 production release. We use JDK 1.4.0, 1.4.1, 1.4.2.
  3. We use Postgres 7.3
  4. Although other combinations of Web Application Server, JDK and Postgres may work, we havenít tested with all combinations. Your mileage may vary. It will not build with JDK 1.3
  5. Ant 1.4 or later correctly setup.


Building the Code.

  1. Make certain you have recent version of Ant installed ( 1.4 or later ?)

  2. Look in coursework_postgres/coursework.properties and coursework_postgres/conf/coursework.properties and edit to suite your site.

  3. Edit the coursework_postgres/conf/oracle.properties file to point to your Postgres database. Although the file is named oracle.properties, it should point to a Postgres database for this version of the code.

  4. Edit coursework_postgres/conf/log4j.conf so that the log files are in a suitable place for your system.

  5. Other configuration files are as deployed at Stanford. You may edit if you have the services available at your site.

  6. Type ant all all in coursework_postgres/

  7. You will get 5 warnings in the compile, and should get no errors. There may be a lot of output from the javadoc build.
    This creates a web app directory ready for deployment.

Database.

Create a database as the postgres user eg
createdb cw

Then load the data using the scripts in coursework_postgres_sql/ using
psql cw < 00_buildscript.sql


Images.

You should unpack the images tarball so that they can be served from http://<host>/courseworkimages/

Deployment

You can deploy the created webapp directly into a tomcat instance, restart the container and browse to the root webapp directory.

For further information you should consult Stanfords Coursework on Oracle documentation.