To take a test, you open a file with the extension .qiz. Scientific Notebook assumes that this is a source file and runs exambld2 with this file as input, generating a temporary read-only .tex file containing the resulting test and opening the .tex file. The correct answers to the problems are provided in encrypted form in a hidden input field. When the student clicks the button to grade the quiz, a set of name-value pairs is generated from the input objects. This data is passed to a dynamic link library called tcicgi.dll. This acts like an Internet server, passing the data on to a cgi (Common Gateway Interface) program and retrieving the result from that program. You specify the cgi program name in the source file for your test. This program is the grading program. It receives the name-value pairs and constructs a document that is displayed as the result. It uses the encrypted hidden field value to grade the test.
The grading program could also be used to store or transmit the test responses. Since the architecture models that of cgi, it is very flexible.
We have taken ``real'' cgi programs and modified them to work with this system. The only change that is needed is to generate a LaTeX document as the result, in place of an HTML document.
You're free to replace either the Exam Builder, or the cgi grading program, with your own creations. For example, you could use text input fields for free form responses and then develop your own program for grading those responses. You could develop a much richer language for generating the Maple definitions and for the problem statements.