Examination Management Architecture

The examination management module of the Instructional Support application allows course staff to set up examinations within the system, inform candidates of their seating locations, and print examination papers. The user interface also provides convenient access to related information such as TA assignments.

Database Schema

The _instruct database schema is divided up using prefixes. The examination management-related ones are as follows:

  • aas_ — Track information sent to AAS concerning which sections are participating in assigned seating.
  • accom_ — Accommodation processing.
  • auth_ — Authorization control.
  • cel_ — CEL interface; mostly views to allow CEL easy access to information relevant to them; also a thin interface to the general accommodation processing facilities.
  • exam_ — Examinations, sittings, and related attributes, including PDF masters.
  • print_ — Extra information required for printing.
  • ro_ — RO interface; mostly related to final examination schedule import; also some print deadline information.
  • room_ — Room map information.
  • teaching_admin_ — Admin unit organization and student registration.

User Interface

User interface code is in the Python module uw.local.teaching.webui. This code implements the Web user interface. A few notes on some specific modules to help in finding them:

  • accommodation — Accommodation processing (AAS, Relief). CEL uses the same accommodation processing system, but enters the data directly through the database rather than using the UI.
  • admin — Admin unit display, including form for changing authorization permissions.
  • admin_exams_edit — Examination creation form.
  • aids_edit — Permitted aids editor.
  • authority — Permissions checking.
  • candidate — Candidate information editing.
  • delegate — WSGI URL delegation. These are utility routines for building the URL structure of the application.
  • exam — WSGI handlers to implement examination view.
  • exam_edit — WSGI handlers to implement examination edit forms.
  • exam_render — Routines to render examinations as HTML.
  • offering — WSGI handlers for offering pages; overall URL structure for offerings.
  • offering_conflict — WSGI handler for final examination conflict checking page (ST#97082).
  • offering_edit — WSGI handlers to implement offering configuration forms (including moving sections between admin units).
  • order_edit — Seat and sequence number assignment order editor.
  • room — WSGI handlers for room list and map display.
  • room_render — Routines to render room lists and maps as HTML.
  • schedule — Student examination schedule display.
  • sitting — WSGI handlers to implement sitting view.
  • sitting_edit — WSGI handlers to implement sitting edit forms.
  • special — Candidate special case editing UI.
  • term — Per-term offering lists adapted to user permissions.
  • ui — Miscellaneous UI-related utility routines.
  • upload — PDF examination master upload UI.
  • wsgifunc — WSGI overall URL structure implementation.

PDF Handling Code

PDF handling code is implemented in Java, in the package ca.uwaterloo.odyssey.exams. It makes use of the iText PDF library. In an attempt to control and compartmentalize the extreme verbosity resulting from the nature of the Java programming language, the iText library, and the Java SQL database interface libraries, extensive subclassing is used. Additionally, all SQL queries are isolated in separate classes, with names ending in “Q” (for Query).

Here are the most important “main program” classes, those which define a Java main method. These are usually and normally invoked by Python code but could be invoked manually if necessary.

  • getRawMaster — Dump out a raw examination master PDF to stdout. Not required for any ordinary process within the system; but may be used if there is a problem with an uploaded master to obtain the exact file that was uploaded.
  • prepareExamPrintJob — Writes out PDF files for printing the examination papers for an examination.
  • preparePostingPads — Writes out PDF files for printing the PAC posting pads for a term.
  • prestamp — Impose standard cover page header and page footers on an uploaded examination paper and save the stamped PDF in the database.
  • printBlankRoomMap — Create a PDF map of a room. Not part of any ordinary process within the system.
  • printExamCoversheets — Writes out PDF files for printing CEL examination cover sheets.
  • printExamFolders — Create a PDF of examination folders; one of the documents available for download by course staff after sequence numbers are assigned.
  • printExamLabels — Create a PDF of examination labels; one of the documents available for download by course staff after sequence numbers are assigned.
  • printExamLookup — Create a PDF of seat lookup information for an examination; one of the documents available for download by course staff after sequence numbers are assigned.
  • printExamSequenceLookup — Create a PDF of candidate sequence lookup information for an examination; one of the documents available for download by course staff after sequence numbers are assigned.
  • printExamSittingProctorPackages — Create a PDF of room proctor packages for a sitting; one of the documents available for download by course staff after sequence numbers are assigned.
  • restamp — Re-impose standard cover page header and page footers on a previously-uploaded examination paper and save the stamped PDF in the database.