Printing the Exams Individually with Labels

Version by Pieter Jacques and Joel Shapiro

If you are making exams with grtex for a large course, you need to have an exam code printed on each exam, and this is often done with a label on the cover page. We can now prepare the exams so that a label with the code, the student's picture, and other information is printed directly on the cover sheet. These are the instructions for doing that, so the student labels printed directly on the Ricoh copy machines, rather than using pasted-on labels.

This is for doing this on one of the Department Unix/Linux machines. If you want to do most of the work on your own machines, see Making grtex exams with labels on your own computer

Table of variables
makeexamsdirectory for making this exam.
xxxcourse number
xxxExam.efile name of grtex output.
crsnumcourse number, again.
numextrasnumber of exams without names or IDs.
numvernumber of different versions of exam.
testsname of subdirectory of makeexams in which the output will be placed.
secyshell login username of person watching the printer.
printereither 7503 or 6503, which printer to use.
plexeither duplex or simplex.

0) You will only be able to print the exams without help if you are in the crsadmin group. Check by executing
cat /home/shapiro/amIcrsadmin
If it denies permission, ask our IT staff to add you to the crsadmin group.

1) To start, cd to the directory in which you intend to run grtex. Let's call it "makeexams" .

2) Download a copy of grtexWLBL. [If you already have a "cover" file you wish to preserve, rename it cover.sav and then rename it back to cover after the tar.]   Then
tar xvf grtexWLBL.tar
As untarred, there will be new files cover.wscan, cover.noscan, lbltempl.tex, note2secy, sendprint, studlabel.tex, and a symbolic link pix, as well as a copy of these instructions Instructions.

3) You need to have a "cover" file and you must have \input cover in the header page of your grtex input file. Your "cover" file must include the lines
\input studlabel
\input lbltempl
in the place where the exam label should be. If you are printing the answer sheet on the cover, you will also need to include it. The file cover.wscan gives an example of doing so, while cover.noscan is an example using the mark sense forms.
You might want "cover" to be a symbolic link to your exam's cover file. If you want to try the sample, ln -s cover.wscan cover (or cover.noscan). You can make a "tail" file with content if you want, or else touch tail.
Run grtex and let us call the output of this grtex command xxxExam.e Then check that you can successfully latex it:
latex xxxExam.e
This is important, because if it hangs in makeIndivLtx below it will be hard to get out.

4) Copy your roster
cp /home/sysmgmnt/registration/rosters/crsnum.scv crsnum.csv
(where crsnum is your three digit course number)
Note: this will print your exam in alphabetic order. If you prefer them to be ordered by section, and alphabetic within sections, execute
./doSectOrder crsnum.csv new.csv
mv new.csv crsnum.csv
There is another opportunity to reorder by hand in step 6(b).

At this point, you have (among others) the files xxxExam.e, cover, lbltempl.tex, tail, xxx.csv, and a directory pix (linked to pictures in /home/sysmgmnt/registration/pictures/)

5) If you are happy with the default 101 for the lowest numbered exam, skip this step. But otherwise, decide what is to be the lowest numbered exam and add the number as one more argument to the makestudlbl command below.

6) Now it is time to execute a bunch of commands:
(a) breakgrtex xxxExam.e
this will make the multiple versions.
(b) makestudlbl xxx.csv homestud numextras
[If you asked to have the first exam numbered 51:   makestudlbl xxx.csv homestud numextras 51]
This makes homestud, extracted from the roster file, containing one line per student, with their ID, section, exam code, last name and first name. numextras is the number of extra exams with exam numbers to prepare without names. One additional one will be prepared without an exam code as well.
homestud, (which you can all whatever you like) contains an ordered list of students. You can reorder them if you like.
(c) The next step can make trouble if xxxExam.e doesn't latex okay, so make sure you tried that out first,
latex xxxExam.e
If it is okay,
makeIndivLtx xxxExam numver crsnum homestud tests
Here numver is the number of versions, and crsnum is the course number. This makes the individual exams and places them in subdirectory tests, which must have been either be nonexistent or empty beforehand.

7) If you are printing the answer sheet on the cover, it is very important that it comes out just right. Measure the length of the thick black line. It should be 7.5in, 8.0in, 10.0in or 10.5 inch if the form is mcxxfs, mcxxs, mcxxf or mcxx respectively, where xx is the number of MC questions. Also check that subtracting the second number from the fourth listed by fgrep BoundingBox mc*.ps (replace * with correct version) is 72 times the number inches in the \epsfysize=... line in cover.
Also check that the small square with white diamond in the middle, near the paper edge, is printed, and for mcxxf and mcxxfs, that the four rectangles are printed okay.

8) Decide if you want your exams printed on both sides of the paper (duplex) or only on one side (simplex). You also need to decide if you are going to monitor the printing yourself or involve a secretary. Also, if you are not currently logged onto a computer in the shell group (shell.physics.rutgers.edu, physlinux* ) you should do so.

If a secretary is supervising your printing, once you have checked everything out, tell your secretary you are ready to have the exams printed, probably by sending email as described in note2secy. She should then get back to you saying she is ready for you to submit the exams which will be printed within the next day, approximately, and telling you which printer to use, either 7503 or 6503.

If you are handling the printing yourself, make sure you have a subdirectory printnow of your home directory, and make sure it does not have a file crsnum in it. And decide which printer to use, 7503 or 6503.

Now, when you are ready or when the secretary is, with you logged onto shell.physics.rutgers.edu, cd to makeexams, and execute:
./sendprint crsnum homestud tests secy printer plex
where crsnum is your 3 digit course number; printer is either 7503 or 6503, as told to your assistant; tests is the subdirectory with the exams; secy is the Physics username of the assistant in charge, or else your own username, and plex is either duplex or simplex.
Do not close the terminal or otherwise interrupt, because sendprint must run until the exams are all printed. The exams will not start printing until either you (in a separate terminal window) or the secretary gives the goahead by executing
touch /home/secy/printnow/crsnum.
Thereafter, executing lpq -P PHYS-221-RMP7503 (or ...RMP6503) should list all the exams not yet printed.
When all exams have been printed, the sendprint terminal will say: all files have been printed. Goodbye..

If you are handling the printing yourself, now is the time to delete the goahead file : rm ~/printnow/crsnum.
Last modified: Tue Feb 13 14:07:14 2018