# University of Michigan Department of Mathematics Gateway Test Software

This page serves as a distribution point for the gateway testing software mentioned in the article

Select this icon to get ordering information for this book.

The software is distributed as a zip file gateway.zip, in which will be found a spreadsheet file gateway.wk3, a sample TeX file called tests.tex, the file tests.dvi that results from processing the sample TeX file, and a README file that contains, essentially, the text of this web page. Requirements to run this software are any system with plain TeX available and also having available a version of Lotus 123 capable of handling version 3 (wk3) format files. These Lotus 123 versions include 123 for DOS version 3 or higher, 123 for OS/2, 123 for Windows, versions of 123 for UNIX, as well as others. Installation requires someone familiar enough with Lotus 123 to make the minor modifications to the spreadsheet necessary to customize it for the user site. This familiarity need amount to little more than the ability to modify the contents of cells containing labels.

As was mentioned in the article cited above, the reason for designing the software as a 123 spreadsheet outputting a TeX-format file is that the 123/TeX combination is available on so many different platforms.

## (Standard) Disclaimer

Though we hope you find this gateway test generator useful, neither the author nor any other body, including the author's employer and the publisher of the above-mentioned article, makes any claim about its functionality and suitability for the use to which you intend to put it.

## Obtaining the Software

Select this icon to obtain the file gateway.zip (42K).

The zip directory for gateway.zip is as follows.

 Length    Date    Time    Name ("^" ==> case
------    ----    ----    ----   conversion)
119023  05-06-95  15:43   gateway.wk3
59612  05-06-95  15:44   tests.dvi
46143  05-06-95  15:44   tests.tex
------                    -------
239371                    4


## An Overview of What the Spreadsheet Does

As supplied, the spreadsheet creates derivative gateway tests for Calculus I, but it can be modified by changing the question bank as well as the title and other descriptive information for the test in the spreadsheet gateway.wk3. When loaded, the spreadsheet writes TeX code to the file tests.tex for 50 essentially different copies of a seven-question gateway test. The file tests.tex must then be processed by plain TeX to produce the actual tests.

Each repetition of this process results in 50 more gateway tests all essentially different from those produced in earlier runs, assuming reasonable behavior by the gods of probability that do the random selection of questions from the test bank. (However, see the warning below.)

If you wish to view some sample output, unzip the file tests.dvi in gateway.zip and feed the result into your dvi-file viewer or printer. The supplied sample does consist of all 50 pages output by the spreadsheet, so, if printing, you might wish to process only the first few pages.

## A Bit More Detail on How the Spreadsheet Works

The spreadsheet contains a list of 140 different questions consisting of functions to be differentiated, of which seven are selected for inclusion on a copy of the gateway test as follows. The first question included on the test is selected at random from the first 20 in the list, the second question is selected at random from the second 20 in the list, and so forth. The selection is done this way so that, while each test is substantially different from every other one, the nature of each of the seven questions on the test is predictable; questions within each batch of 20 will represent variations on a common theme. Each of the questions on a given test will have in front of it the number of the question in the test question data bank, to ease grading when done from an answer key.

The actual structure of the spreadsheet is as follows.

• Cells A1001 through A1140 contain the 140 questions from which question selection will occur.
• Cells A1 through A902 contain the images of the ASCII TeX code for the 50 tests. Specifically:
• Cells A1 and A2 contain some global preamble code applying to all 50 tests.
• The specific ASCII code for the first test is in cells A3 through A20, for the second test in A21 through A38, and so forth, each test requiring 18 lines in the spreadsheet.
• Columns B and C are hidden (and must remain so for the spreadsheet to operate properly), and contain code to randomize the selection of test questions from the database using the 123 @RAND function and to construct the actual addresses of the selected questions. Column A contains indirect links to the questions at the constructed addresses, so that the corresponding questions appear at the appropriate place in the spreadsheet. (It is the address scheme used in the spreadsheet that requires the use of wk3 format instead of the somewhat more common and more portable wk1 format.)
• Code for the autoexecuting macro \0 in cell D910 causes the image of the TeX code in cells A1 through A902 to be written to the file tests.tex, after which the macro code causes 123 to exit. The file tests.tex is now ready to be processed by TeX.

## Running It

Here is how to run the software as supplied. Suggestions are given near the end of this document if you encounter problems.

1. Obtain the file gateway.zip by selecting the icon in the section Obtaining the Software above.
2. Unzip the entire file (using unzip or pkunzip or your local equivalent), and place the resulting four files in your home directory. (In the next step, the file tests.tex will get overwritten, but for technical reasons, involving the form of the macro code in the spreadsheet, it is necessary to have a file by that name present so that it can get overwritten.)
3. Start your version of Lotus 123, then load the file gateway.wk3. The file contains an autoexecuting macro that will create the file tests.tex and then automatically exit 123.
• For technical reasons involving minor differences in command sequences for different versions of 123, it might be that 123 does not terminate automatically after tests.tex is written. If this happens, just use the /qy sequence to exit manually, taking care not to save the modified spreadsheet (though, frankly, there should be no harm done if you do save it). Someone familiar with 123 macros will have no trouble modifying the macro code so that automatic exiting does occur.
4. Process the file tests.tex with plain TeX.
5. Use your dvi-file viewer or printer to examine the result.

## Modifying It

Of course, you will wish to change the test headings, instructions, and questions. Here is how you can do so.

1. Use an ASCII text editor to create a file containing the questions you want on the test, with one question per line. The questions should be created in seven batches of 20 similar questions. (If you wish to have fewer questions in each batch, say 5 or 10, then just duplicate questions to pad out each batch to 20.)
2. The format of the questions in the test question bank can best be illustrated by giving an example. Here is question 54 as it appears in cell A1054 of the spreadsheet:
\a{54.}{$f(x)=\displaystyle{\ln (x^2-3) \over \tan (-x)}$}
The \a invokes a certain required macro that takes two arguments in braces. The first is the question number, written here as 54 followed by a period. It does not matter what you put here as long as it creates a legal TeX character string, so you can leave out the period if you wish, or duplicate question numbers (as you would wish to do if duplicating questions to fill out a batch to size 20), or even leave out the question number altogether by just inserting {} for this first argument. The second argument in braces is the question, which in this case is the function to be differentiated. To summarize, on each line in your question file, you must have the \a followed by two arguments in braces, the first of which will be inserted as a question number and the second as the question. For example, you might have the following as the seventh question in your list:
     \a{7.}{Factor $x^2-5x+4$.}
3. At this point, your question file should have exactly 140 lines. Now check your questions. To do so, insert the following as the first line in your file:
     \def\a#1#2{\item{\bf#1}#2\medskip}
Put a \bye command as the last line in the file. Now process the file using plain TeX. Correct the file as needed, then be absolutely sure to delete the first line of the file that you added for this checkout! (For neatness, you should also delete the line you added with the \bye, but this is not essential.) It is necessary that the first 140 lines of your file contain only your questions, with one question per line.
4. Start your version of Lotus 123. Turn off automatic execution of autoexecute macros (which can be done on some versions by looking under Tools User setup), then load the spreadsheet gateway.wk3.
5. Go to cell A1001 in the spreadsheet, then overlay the list of questions appearing there with your new list by typing /fit (File Import Text), then entering the name of the ASCII file containing your list of questions. If this is done correctly, then cell A1000 should still be empty, cell A1001 should contain your first question, cell A1140 should contain your last, and cell A1141 should be empty. If cell A1141 or cells below it are nonempty, this probably indicates that you had some garbage lines at the end of your file. This will not hurt anything, since the cells following A1140 are not used for anything.
6. Change the header information in cells A3 through A12 as needed to get the correct titles and instructions for your tests. Though you are changing this information only in the first copy of the test, you do not need to change it elsewhere since these ten lines are automatically duplicated into the other 49 tests. You may also wish to erase cell A2, which contains a command that will cause BE SURE TO PICK UP YOUR STUDENT ID WHEN DONE! to be printed at the bottom of each test. Warning! Be sure only to erase cell A2, if desired. Do not delete the row containing it!
7. Do not delete any rows or columns in the spreadsheet, or insert any into the spreadsheet, as this will cause unpredictable results.
8. Save your modified spreadsheet, then test it using the procedure under Running It described above.

## Further Modifications

You may wish to modify the spreadsheet so that each gateway test has more or fewer than seven questions, or so that more or fewer than 50 copies are printed at one time. This is not at all difficult or time-consuming to do, once you know how the spreadsheet really works. (The gateway tests we construct at the University of Michigan, based on this spreadsheet, have between four and 50 questions, and we print between 10 and 50 copies at once.) If you display the hidden columns B and C and carefully examine the code hidden therein, you will see what is happening, and should be able to make the modifications. The author would be glad to help you if you are really stuck. Contact him at meggin@math.lsa.umich.edu.

## Problems?

• If you get some sort of a range error while processing the spreadsheet, you probably don't have a tests.tex file present to be overwritten. Create a dummy one with anything at all in it, then retry loading the spreadsheet.
• Each time you process gateway tests, you should get a batch of 50 that is essentially different from any other batch of 50 that came out of the process, since the 123 random number generator should be reseeded. A few versions of 123, including early versions of 123 for OS/2, did not do the reseeding, which would result in each batch of 50 being identical (though the individual tests within each batch should still be substantially different). If this happens to you, proceed as follows each time you create a batch of tests.
4. Press the CALC key (usually F9) some number of times n, and make sure n is different each time you print a batch of tests. So you would probably press it once for the second batch, twice for the third batch, and so forth. Now manually execute the macro \0 and proceed as before.
• If it appears that questions are being truncated before being written out by 123 (which usually shows up as various sorts of errors when you try to TeX the output), then your questions may be unusually long (i.e. more than something like 240 characters, depending on the version of 123). If this happens, then get a Lotus 123 expert to show you how to lengthen the output buffer, or consider shortening the questions. You may also have to modify the output range for printing specified in the autoexecuting macro \0.