Source Code Directory Structure

This directory holds the all the main system source code and has the following files and directories:-

src/index.html

This is a default web page to prevent users from seeing the directory contents.

src/help

This is where system level help files are stored. Help files for individual coursework topics or questions are held in thecoursework packages". They should be html or xml files: they may be pre-cursor files to these e.g a doc file.

src/html

This contains any pure html files needed by the system. Currently it contains a default index.html to prevent users seeing the directory contents.

src/images

Directory with any images or icons needed by the system.

src/initParameters

Files in here hold details of variables used in the source code, i.e. name-value relations, so that values can be changed in the source code without editing the source code. The syntax of the variable definitions is based on that used by Tomcat. The Tomcat version of these has not been used, as Tomcat has a flat structure for its variables which are all held in an application's web.xml file, making this file hard to read and overly large. The system implemented has a file containing variables applied across the whole system and then files with variables for packages, sub-packages and individual Java objects with a hierarchical naming scheme. The name space is flat however, but with redefinitions of variables hiding earlier definitions. See initParameters section.

src/java

This is Java source directory. The Java code is in packages and the directory structure replocates the package structure as is normal. The Java is divided into packages by function and the following packages/directories exist:-

src/java/system

This hold code which is used by a range of other objects or are the main objects that are used by the coursework system: they implement the main structure of the Tomcat application, e.g. SystemServlet, RequestService, DBConnection.

src/java/question

This hold the objects that form the basis of question generation.

src/java/questionnaire

This hold the objects that form the basis of questionnaires used produced within a question.

src/java/user

Objects used in providing the user interface to the system as against the manager interface.

src/java/manager

Objects used in providing the manager functions and interface. This contains several packages, which relate to the different functions that can be performed. The main packages are tableCommands, which deals with the database table operations, questionGeneration, which deals with generating java, jsp amd csv pages ffrom xml defintions of topiucs and questions, and xmlClasses, which has a range of functions, some of which are currently defunct and may be removed soon.

src/java/dynDrawings

Objects that handle the dynDrawing system for modifying diagrams on the fly in respnse to user actions.

src/jsp

This is Jsp source directory. Instead of having a flat file structure for these files, where it is hard to find things and name clashes can be a problem, a hierarchical structure has been developed, where the jsp files are clustered in a similar way the java files covered above. This allows the jsp files that relate to a particular group of java files to be identified as they are located by the same relative path, e.g. jsp relating to the manager/tableCommands Java objects are held in src/jsp/manager/tableCommands. Thus, there are directories manager, user, questions and system.

src/templates

This holds files relating to automatic topic and question generation, see the chapter called Question Generation in User Manual for the ExerTran Coursework System. These files, "autoJava.xsl", "autoJsp.xsl", "autoCsv.xsl", define how to turn the XML question definition file into Java, jsp and Csv files of the packages directory of the coursework, see the chapter called Topic Packages. The document definition, "QuestionDocument.dtd", file that defines the structure of an XML definition file is also held in this directory, see the Section called Question Document DTD File in the chapter called Question Generation in User Manual for the ExerTran Coursework System.

The "templates" directory also holds the "cwDef.tmpl" template file used to provide the basic structure of a coursework definition file, see the chapter called Coursework Definition File, and the package.tmpl file, which provides the outline basis of a topic/question defintion file for the automatic generation of questions, see the chapter called Question Generation in User Manual for the ExerTran Coursework System. Currently, other template files are held in the "src/sml" directory rather than in this directory.

src/xml

This directory holds the XML files that define the structure of the tables used in the database: changes to one of these files cause the corresponding table structure to change on the next save of the table to the database. The structure of these files is described in the chapter called XML Definition Files for Database Tables, and is also define in the XML definition file, "dBaseTable.dtd" held in this same directory.

Also held in this file are the 2 template files, "context.tmpl" and "web.tmpl". The first of these "context.tmpl" is turned after keyword substitution of variables from the coursework definition file, see the chapter called Coursework Definition File, into the context XML file stored in the Tomcat configuration directory under the coursework "name", e.g. "D2.xml", if the coursework is called "D2". The context XML file tells Tomcat all that it needs to know to start the coursework application when Tomcat is started. The "web.tmpl" template file is used to create the web.xml file, see , from the coursework definition file via keyword substitution of variables.